Skip to content

Commit 2d5ad69

Browse files
author
Mattia Roccoberton
committed
Setup Appraisal
1 parent d431304 commit 2d5ad69

21 files changed

Lines changed: 1763 additions & 24 deletions

.fasterer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
exclude_paths:
33
- bin/*
44
- db/schema.rb
5+
- gemfiles/**/*
56
- spec/dummy/**/*
67
- vendor/**/*

.github/workflows/specs.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
2-
name: Tests
2+
name: Specs
33

44
on:
55
push:
6-
branches: [develop, master]
6+
branches:
7+
- master
78
pull_request:
8-
branches: [develop, master]
9+
branches:
10+
- master
911

1012
jobs:
1113
tests:
@@ -14,9 +16,13 @@ jobs:
1416
strategy:
1517
matrix:
1618
ruby: ['2.6', '2.7', '3.0']
19+
gemfile: ['rails60_activeadmin22', 'rails60_activeadmin', 'rails61_activeadmin29', 'rails61_activeadmin']
20+
21+
env:
22+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
1723

1824
steps:
19-
- name: Checkout
25+
- name: Checkout repository
2026
uses: actions/checkout@v2
2127

2228
- name: Set up Ruby
@@ -26,9 +32,9 @@ jobs:
2632
bundler-cache: true
2733

2834
- name: Run tests
29-
run: bin/rspec --profile
35+
run: bundle exec rspec --profile
3036

31-
- name: Archive screenshots for failed tests
37+
- name: On failure, archive screenshots as artifacts
3238
uses: actions/upload-artifact@v2
3339
if: failure()
3440
with:

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ AllCops:
66
Exclude:
77
- bin/*
88
- db/schema.rb
9+
- gemfiles/**/*
910
- spec/dummy/**/*
1011
- vendor/**/*
1112
NewCops: enable

Appraisals

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# frozen_string_literal: true
2+
3+
appraise 'rails52-activeadmin20' do
4+
gem 'activeadmin', '~> 2.0.0'
5+
gem 'rails', '~> 5.2.0'
6+
end
7+
8+
appraise 'rails60-activeadmin22' do
9+
gem 'activeadmin', '~> 2.2.0'
10+
gem 'rails', '~> 6.0.0'
11+
end
12+
13+
appraise 'rails60-activeadmin' do
14+
gem 'activeadmin'
15+
gem 'rails', '~> 6.0.0'
16+
end
17+
18+
appraise 'rails61-activeadmin29' do
19+
gem 'activeadmin', '~> 2.9.0'
20+
gem 'rails', '~> 6.1.0'
21+
end
22+
23+
appraise 'rails61-activeadmin' do
24+
gem 'activeadmin'
25+
gem 'rails', '~> 6.1.0'
26+
end

Gemfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,23 @@ source 'https://rubygems.org'
55
gemspec
66

77
group :development, :test do
8-
gem 'activestorage', '~> 6.0'
9-
gem 'puma', '~> 4.3'
10-
gem 'sassc', '~> 2.4'
11-
gem 'sprockets-rails', '~> 3.2'
12-
gem 'sqlite3', '~> 1.4'
8+
gem 'puma'
9+
gem 'sassc'
10+
gem 'sqlite3'
1311

1412
# Testing
15-
gem 'capybara', '~> 3.33'
16-
gem 'rspec_junit_formatter', '~> 0.4'
17-
gem 'rspec-rails', '~> 5.1'
18-
gem 'selenium-webdriver', '~> 3.142'
13+
gem 'capybara'
14+
gem 'rspec_junit_formatter'
15+
gem 'rspec-rails'
16+
gem 'selenium-webdriver'
1917

2018
# Linters
21-
gem 'fasterer', '~> 0.9'
22-
gem 'rubocop', '~> 1.25'
23-
gem 'rubocop-packaging', '~> 0.5'
24-
gem 'rubocop-performance', '~> 1.13'
25-
gem 'rubocop-rails', '~> 2.13'
26-
gem 'rubocop-rspec', '~> 2.8'
19+
gem 'fasterer'
20+
gem 'rubocop'
21+
gem 'rubocop-packaging'
22+
gem 'rubocop-performance'
23+
gem 'rubocop-rails'
24+
gem 'rubocop-rspec'
2725

2826
# Tools
2927
gem 'pry-rails'

activeadmin_blaze_theme.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ Gem::Specification.new do |spec|
2424
spec.require_paths = ['lib']
2525

2626
spec.add_runtime_dependency 'activeadmin', '~> 2.0'
27+
28+
spec.add_development_dependency 'appraisal', '~> 2.4'
2729
end

bin/appraisal

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'appraisal' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
14+
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
16+
17+
if File.file?(bundle_binstub)
18+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19+
load(bundle_binstub)
20+
else
21+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23+
end
24+
end
25+
26+
require "rubygems"
27+
require "bundler/setup"
28+
29+
load Gem.bin_path("appraisal", "appraisal")

extra/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Development
2+
3+
## Releases
4+
5+
```sh
6+
# Update version.rb with the new version
7+
# Update the gemfiles:
8+
bin/appraisal
9+
```
10+
11+
## Testing
12+
13+
```sh
14+
# Running specs using a specific configuration:
15+
bin/appraisal rails60-activeadmin22 rspec
16+
# Using latest activeadmin version:
17+
bin/appraisal rails60-activeadmin rspec
18+
# See gemfiles for more configurations
19+
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "activeadmin", "~> 2.0.0"
6+
gem "rails", "~> 5.2.0"
7+
8+
group :development, :test do
9+
gem "puma"
10+
gem "sassc"
11+
gem "sqlite3"
12+
gem "capybara"
13+
gem "rspec_junit_formatter"
14+
gem "rspec-rails"
15+
gem "selenium-webdriver"
16+
gem "fasterer"
17+
gem "rubocop"
18+
gem "rubocop-packaging"
19+
gem "rubocop-performance"
20+
gem "rubocop-rails"
21+
gem "rubocop-rspec"
22+
gem "pry-rails"
23+
end
24+
25+
gemspec path: "../"

0 commit comments

Comments
 (0)