Skip to content

Commit 6397394

Browse files
committed
Test against all supported versions of Rails
Add Appraisal and require usage of it from now on when running tests.
1 parent 40e2948 commit 6397394

15 files changed

+684
-4
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ cache:
66
env:
77
# Source: https://github.com/rspec/rspec-rails/pull/2148
88
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.io=org.jruby.dist"
9+
gemfile:
10+
- gemfiles/rails_5_0.gemfile
11+
- gemfiles/rails_5_1.gemfile
12+
- gemfiles/rails_5_2.gemfile
13+
- gemfiles/rails_6_0.gemfile
14+
matrix:
15+
exclude:
16+
- rvm: ruby-2.4.6
17+
gemfile: gemfiles/rails_6_0.gemfile
918
rvm:
1019
- ruby-2.6.3
1120
- ruby-2.5.5

Appraisals

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
common_dependencies = proc do
2+
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
3+
gem "jdbc-sqlite3", platform: :jruby
4+
end
5+
6+
appraise "rails_5_0" do
7+
instance_eval(&common_dependencies)
8+
9+
gem "activerecord", "~> 5.0.0"
10+
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw]
11+
end
12+
13+
appraise "rails_5_1" do
14+
instance_eval(&common_dependencies)
15+
16+
gem "activerecord", "~> 5.1.0"
17+
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw]
18+
end
19+
20+
appraise "rails_5_2" do
21+
instance_eval(&common_dependencies)
22+
23+
gem "activerecord", "~> 5.2.0"
24+
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw]
25+
end
26+
27+
if Gem::Requirement.new(">= 2.5.0").satisfied_by?(Gem::Version.new(RUBY_VERSION))
28+
appraise "rails_6_0" do
29+
instance_eval(&common_dependencies)
30+
31+
gem "activerecord", "~> 6.0"
32+
gem "sqlite3", "~> 1.4.0", platform: [:ruby, :mswin, :mingw]
33+
end
34+
end

Gemfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ source "https://rubygems.org"
44

55
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
66

7-
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
7+
gem "appraisal"
88
gem "childprocess"
9-
gem "jdbc-sqlite3", platform: :jruby
109
gem "pry-byebug", platform: :mri
1110
gem "pry-nav", platform: :jruby
1211
gem "rake"
@@ -15,6 +14,5 @@ gem "rspec-expectations", github: "rspec/rspec-expectations"
1514
gem "rspec-mocks", github: "rspec/rspec-mocks"
1615
gem "rspec-support", github: "rspec/rspec-support"
1716
gem "rubocop"
18-
gem "sqlite3", platform: [:ruby, :mswin, :mingw]
1917

2018
gemspec

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ Finally, submit your PR and I'll take a look at it when I get a chance.
174174

175175
## Compatibility
176176

177-
`super_diff` is [tested][travis] to work with Ruby >= 2.4.x and RSpec 3.x.
177+
`super_diff` is [tested][travis] to work with Ruby >= 2.4.x, RSpec 3.x, and
178+
Rails >= 5.x.
178179

179180
[travis]: http://travis-ci.org/mcmire/super_diff
180181

gemfiles/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
BUNDLE_RETRY: "1"

gemfiles/rails_5_0.gemfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "childprocess"
7+
gem "pry-byebug", platform: :mri
8+
gem "pry-nav", platform: :jruby
9+
gem "rake"
10+
gem "rspec-core", git: "https://github.com/rspec/rspec-core"
11+
gem "rspec-expectations", git: "https://github.com/rspec/rspec-expectations"
12+
gem "rspec-mocks", git: "https://github.com/rspec/rspec-mocks"
13+
gem "rspec-support", git: "https://github.com/rspec/rspec-support"
14+
gem "rubocop"
15+
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
16+
gem "jdbc-sqlite3", platform: :jruby
17+
gem "activerecord", "~> 5.0.0"
18+
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw]
19+
20+
gemspec path: "../"

gemfiles/rails_5_0.gemfile.lock

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
GIT
2+
remote: https://github.com/rspec/rspec-core
3+
revision: 8a287bd893889dba60e7bfce530727e7b009651e
4+
specs:
5+
rspec-core (3.9.0.pre)
6+
rspec-support (= 3.9.0.pre)
7+
8+
GIT
9+
remote: https://github.com/rspec/rspec-expectations
10+
revision: 4310cb957c922334791cade79f688c8143c74916
11+
specs:
12+
rspec-expectations (3.9.0.pre)
13+
diff-lcs (>= 1.2.0, < 2.0)
14+
rspec-support (= 3.9.0.pre)
15+
16+
GIT
17+
remote: https://github.com/rspec/rspec-mocks
18+
revision: a62ec6fc309680a21ad3a88409500181381b13f8
19+
specs:
20+
rspec-mocks (3.9.0.pre)
21+
diff-lcs (>= 1.2.0, < 2.0)
22+
rspec-support (= 3.9.0.pre)
23+
24+
GIT
25+
remote: https://github.com/rspec/rspec-support
26+
revision: c69a231d7369dd165ad7ce4742e1a2e21e3462b5
27+
specs:
28+
rspec-support (3.9.0.pre)
29+
30+
PATH
31+
remote: ..
32+
specs:
33+
super_diff (0.1.0)
34+
activerecord (> 4.2, < 7.0)
35+
attr_extras
36+
diff-lcs
37+
patience_diff
38+
39+
GEM
40+
remote: https://rubygems.org/
41+
specs:
42+
activemodel (5.0.7.2)
43+
activesupport (= 5.0.7.2)
44+
activerecord (5.0.7.2)
45+
activemodel (= 5.0.7.2)
46+
activesupport (= 5.0.7.2)
47+
arel (~> 7.0)
48+
activesupport (5.0.7.2)
49+
concurrent-ruby (~> 1.0, >= 1.0.2)
50+
i18n (>= 0.7, < 2)
51+
minitest (~> 5.1)
52+
tzinfo (~> 1.1)
53+
appraisal (2.2.0)
54+
bundler
55+
rake
56+
thor (>= 0.14.0)
57+
arel (7.1.4)
58+
ast (2.4.0)
59+
attr_extras (6.2.1)
60+
byebug (11.0.1)
61+
childprocess (2.0.0)
62+
rake (< 13.0)
63+
coderay (1.1.2)
64+
concurrent-ruby (1.1.5)
65+
diff-lcs (1.3)
66+
i18n (1.6.0)
67+
concurrent-ruby (~> 1.0)
68+
jaro_winkler (1.5.3)
69+
method_source (0.9.2)
70+
minitest (5.11.3)
71+
parallel (1.17.0)
72+
parser (2.6.4.1)
73+
ast (~> 2.4.0)
74+
patience_diff (1.1.0)
75+
trollop (~> 1.16)
76+
pry (0.12.2)
77+
coderay (~> 1.1.0)
78+
method_source (~> 0.9.0)
79+
pry-byebug (3.7.0)
80+
byebug (~> 11.0)
81+
pry (~> 0.10)
82+
rainbow (3.0.0)
83+
rake (12.3.3)
84+
rubocop (0.74.0)
85+
jaro_winkler (~> 1.5.1)
86+
parallel (~> 1.10)
87+
parser (>= 2.6)
88+
rainbow (>= 2.2.2, < 4.0)
89+
ruby-progressbar (~> 1.7)
90+
unicode-display_width (>= 1.4.0, < 1.7)
91+
ruby-progressbar (1.10.1)
92+
sqlite3 (1.3.13)
93+
thor (0.20.3)
94+
thread_safe (0.3.6)
95+
trollop (1.16.2)
96+
tzinfo (1.2.5)
97+
thread_safe (~> 0.1)
98+
unicode-display_width (1.6.0)
99+
100+
PLATFORMS
101+
ruby
102+
103+
DEPENDENCIES
104+
activerecord (~> 5.0.0)
105+
activerecord-jdbcsqlite3-adapter
106+
appraisal
107+
childprocess
108+
jdbc-sqlite3
109+
pry-byebug
110+
pry-nav
111+
rake
112+
rspec-core!
113+
rspec-expectations!
114+
rspec-mocks!
115+
rspec-support!
116+
rubocop
117+
sqlite3 (~> 1.3.6)
118+
super_diff!
119+
120+
BUNDLED WITH
121+
2.0.2

gemfiles/rails_5_1.gemfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "childprocess"
7+
gem "pry-byebug", platform: :mri
8+
gem "pry-nav", platform: :jruby
9+
gem "rake"
10+
gem "rspec-core", git: "https://github.com/rspec/rspec-core"
11+
gem "rspec-expectations", git: "https://github.com/rspec/rspec-expectations"
12+
gem "rspec-mocks", git: "https://github.com/rspec/rspec-mocks"
13+
gem "rspec-support", git: "https://github.com/rspec/rspec-support"
14+
gem "rubocop"
15+
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
16+
gem "jdbc-sqlite3", platform: :jruby
17+
gem "activerecord", "~> 5.1.0"
18+
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw]
19+
20+
gemspec path: "../"

gemfiles/rails_5_1.gemfile.lock

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
GIT
2+
remote: https://github.com/rspec/rspec-core
3+
revision: 8a287bd893889dba60e7bfce530727e7b009651e
4+
specs:
5+
rspec-core (3.9.0.pre)
6+
rspec-support (= 3.9.0.pre)
7+
8+
GIT
9+
remote: https://github.com/rspec/rspec-expectations
10+
revision: 4310cb957c922334791cade79f688c8143c74916
11+
specs:
12+
rspec-expectations (3.9.0.pre)
13+
diff-lcs (>= 1.2.0, < 2.0)
14+
rspec-support (= 3.9.0.pre)
15+
16+
GIT
17+
remote: https://github.com/rspec/rspec-mocks
18+
revision: a62ec6fc309680a21ad3a88409500181381b13f8
19+
specs:
20+
rspec-mocks (3.9.0.pre)
21+
diff-lcs (>= 1.2.0, < 2.0)
22+
rspec-support (= 3.9.0.pre)
23+
24+
GIT
25+
remote: https://github.com/rspec/rspec-support
26+
revision: c69a231d7369dd165ad7ce4742e1a2e21e3462b5
27+
specs:
28+
rspec-support (3.9.0.pre)
29+
30+
PATH
31+
remote: ..
32+
specs:
33+
super_diff (0.1.0)
34+
activerecord (> 4.2, < 7.0)
35+
attr_extras
36+
diff-lcs
37+
patience_diff
38+
39+
GEM
40+
remote: https://rubygems.org/
41+
specs:
42+
activemodel (5.1.7)
43+
activesupport (= 5.1.7)
44+
activerecord (5.1.7)
45+
activemodel (= 5.1.7)
46+
activesupport (= 5.1.7)
47+
arel (~> 8.0)
48+
activesupport (5.1.7)
49+
concurrent-ruby (~> 1.0, >= 1.0.2)
50+
i18n (>= 0.7, < 2)
51+
minitest (~> 5.1)
52+
tzinfo (~> 1.1)
53+
appraisal (2.2.0)
54+
bundler
55+
rake
56+
thor (>= 0.14.0)
57+
arel (8.0.0)
58+
ast (2.4.0)
59+
attr_extras (6.2.1)
60+
byebug (11.0.1)
61+
childprocess (2.0.0)
62+
rake (< 13.0)
63+
coderay (1.1.2)
64+
concurrent-ruby (1.1.5)
65+
diff-lcs (1.3)
66+
i18n (1.6.0)
67+
concurrent-ruby (~> 1.0)
68+
jaro_winkler (1.5.3)
69+
method_source (0.9.2)
70+
minitest (5.11.3)
71+
parallel (1.17.0)
72+
parser (2.6.4.1)
73+
ast (~> 2.4.0)
74+
patience_diff (1.1.0)
75+
trollop (~> 1.16)
76+
pry (0.12.2)
77+
coderay (~> 1.1.0)
78+
method_source (~> 0.9.0)
79+
pry-byebug (3.7.0)
80+
byebug (~> 11.0)
81+
pry (~> 0.10)
82+
rainbow (3.0.0)
83+
rake (12.3.3)
84+
rubocop (0.74.0)
85+
jaro_winkler (~> 1.5.1)
86+
parallel (~> 1.10)
87+
parser (>= 2.6)
88+
rainbow (>= 2.2.2, < 4.0)
89+
ruby-progressbar (~> 1.7)
90+
unicode-display_width (>= 1.4.0, < 1.7)
91+
ruby-progressbar (1.10.1)
92+
sqlite3 (1.3.13)
93+
thor (0.20.3)
94+
thread_safe (0.3.6)
95+
trollop (1.16.2)
96+
tzinfo (1.2.5)
97+
thread_safe (~> 0.1)
98+
unicode-display_width (1.6.0)
99+
100+
PLATFORMS
101+
ruby
102+
103+
DEPENDENCIES
104+
activerecord (~> 5.1.0)
105+
activerecord-jdbcsqlite3-adapter
106+
appraisal
107+
childprocess
108+
jdbc-sqlite3
109+
pry-byebug
110+
pry-nav
111+
rake
112+
rspec-core!
113+
rspec-expectations!
114+
rspec-mocks!
115+
rspec-support!
116+
rubocop
117+
sqlite3 (~> 1.3.6)
118+
super_diff!
119+
120+
BUNDLED WITH
121+
2.0.2

gemfiles/rails_5_2.gemfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "childprocess"
7+
gem "pry-byebug", platform: :mri
8+
gem "pry-nav", platform: :jruby
9+
gem "rake"
10+
gem "rspec-core", git: "https://github.com/rspec/rspec-core"
11+
gem "rspec-expectations", git: "https://github.com/rspec/rspec-expectations"
12+
gem "rspec-mocks", git: "https://github.com/rspec/rspec-mocks"
13+
gem "rspec-support", git: "https://github.com/rspec/rspec-support"
14+
gem "rubocop"
15+
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
16+
gem "jdbc-sqlite3", platform: :jruby
17+
gem "activerecord", "~> 5.2.0"
18+
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw]
19+
20+
gemspec path: "../"

0 commit comments

Comments
 (0)