-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It seems that RSpec 3.10 changed the Has matcher which breaks the monkey patches that SuperDiff makes. Extend the Appraisals such that now we test against both RSpec < 3.10 and RSpec >= 3.10.
- Loading branch information
Showing
32 changed files
with
1,264 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,62 @@ | ||
common_dependencies = proc do | ||
rails_dependencies = proc do | ||
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby | ||
gem "jdbc-sqlite3", platform: :jruby | ||
end | ||
|
||
appraise "rails_5_0" do | ||
instance_eval(&common_dependencies) | ||
appraisals = { | ||
rails_5_0: proc { | ||
instance_eval(&rails_dependencies) | ||
|
||
gem "activerecord", "~> 5.0.0" | ||
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] | ||
end | ||
|
||
appraise "rails_5_1" do | ||
instance_eval(&common_dependencies) | ||
|
||
gem "activerecord", "~> 5.1.0" | ||
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] | ||
end | ||
|
||
appraise "rails_5_2" do | ||
instance_eval(&common_dependencies) | ||
|
||
gem "activerecord", "~> 5.2.0" | ||
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] | ||
end | ||
gem "activerecord", "~> 5.0.0" | ||
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] | ||
}, | ||
rails_5_1: proc { | ||
instance_eval(&rails_dependencies) | ||
|
||
appraise "no_rails" do | ||
end | ||
gem "activerecord", "~> 5.1.0" | ||
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] | ||
}, | ||
rails_5_2: proc { | ||
instance_eval(&rails_dependencies) | ||
|
||
if Gem::Requirement.new(">= 2.5.0").satisfied_by?(Gem::Version.new(RUBY_VERSION)) | ||
appraise "rails_6_0" do | ||
instance_eval(&common_dependencies) | ||
gem "activerecord", "~> 5.2.0" | ||
gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] | ||
}, | ||
rails_6_0: proc { | ||
instance_eval(&rails_dependencies) | ||
|
||
gem "activerecord", "~> 6.0" | ||
gem "sqlite3", "~> 1.4.0", platform: [:ruby, :mswin, :mingw] | ||
}, | ||
no_rails: proc {}, | ||
rspec_lt_3_10: proc { | ||
gem "rspec", "< 3.10" | ||
}, | ||
rspec_gte_3_10: proc { | ||
gem "rspec", ">= 3.10", "< 4" | ||
}, | ||
} | ||
|
||
rails_appraisals = [ | ||
:rails_5_0, | ||
:rails_5_1, | ||
:rails_5_2, | ||
:no_rails, | ||
] | ||
if Gem::Requirement.new(">= 2.5.0").satisfied_by?(Gem::Version.new(RUBY_VERSION)) | ||
rails_appraisals << :rails_6_0 | ||
end | ||
|
||
rspec_appraisals = [ | ||
:rspec_lt_3_10, | ||
:rspec_gte_3_10, | ||
] | ||
|
||
rails_appraisals.each do |rails_appraisal| | ||
rspec_appraisals.each do |rspec_appraisal| | ||
appraise "#{rails_appraisal}_#{rspec_appraisal}" do | ||
instance_eval(&appraisals.fetch(rails_appraisal)) | ||
instance_eval(&appraisals.fetch(rspec_appraisal)) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "appraisal" | ||
gem "childprocess" | ||
gem "pry-byebug", platform: :mri | ||
gem "pry-nav", platform: :jruby | ||
gem "rake" | ||
gem "rubocop" | ||
gem "rspec", ">= 3.10", "< 4" | ||
|
||
gemspec path: "../" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
PATH | ||
remote: .. | ||
specs: | ||
super_diff (0.5.3) | ||
attr_extras (>= 6.2.4) | ||
diff-lcs | ||
patience_diff | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
appraisal (2.3.0) | ||
bundler | ||
rake | ||
thor (>= 0.14.0) | ||
ast (2.4.1) | ||
attr_extras (6.2.4) | ||
byebug (11.1.3) | ||
childprocess (4.0.0) | ||
coderay (1.1.3) | ||
diff-lcs (1.4.4) | ||
method_source (1.0.0) | ||
parallel (1.19.2) | ||
parser (2.7.1.4) | ||
ast (~> 2.4.1) | ||
patience_diff (1.1.0) | ||
trollop (~> 1.16) | ||
pry (0.13.1) | ||
coderay (~> 1.1) | ||
method_source (~> 1.0) | ||
pry-byebug (3.9.0) | ||
byebug (~> 11.0) | ||
pry (~> 0.13.0) | ||
rainbow (3.0.0) | ||
rake (13.0.1) | ||
regexp_parser (1.7.1) | ||
rexml (3.2.4) | ||
rspec (3.10.0) | ||
rspec-core (~> 3.10.0) | ||
rspec-expectations (~> 3.10.0) | ||
rspec-mocks (~> 3.10.0) | ||
rspec-core (3.10.0) | ||
rspec-support (~> 3.10.0) | ||
rspec-expectations (3.10.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.10.0) | ||
rspec-mocks (3.10.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.10.0) | ||
rspec-support (3.10.0) | ||
rubocop (0.89.1) | ||
parallel (~> 1.10) | ||
parser (>= 2.7.1.1) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 1.7) | ||
rexml | ||
rubocop-ast (>= 0.3.0, < 1.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 1.4.0, < 2.0) | ||
rubocop-ast (0.3.0) | ||
parser (>= 2.7.1.4) | ||
ruby-progressbar (1.10.1) | ||
thor (1.0.1) | ||
trollop (1.16.2) | ||
unicode-display_width (1.7.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
appraisal | ||
childprocess | ||
pry-byebug | ||
pry-nav | ||
rake | ||
rspec (>= 3.10, < 4) | ||
rubocop | ||
super_diff! | ||
|
||
BUNDLED WITH | ||
2.1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
PATH | ||
remote: .. | ||
specs: | ||
super_diff (0.5.3) | ||
attr_extras (>= 6.2.4) | ||
diff-lcs | ||
patience_diff | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
appraisal (2.3.0) | ||
bundler | ||
rake | ||
thor (>= 0.14.0) | ||
ast (2.4.1) | ||
attr_extras (6.2.4) | ||
byebug (11.1.3) | ||
childprocess (4.0.0) | ||
coderay (1.1.3) | ||
diff-lcs (1.4.4) | ||
method_source (1.0.0) | ||
parallel (1.19.2) | ||
parser (2.7.1.4) | ||
ast (~> 2.4.1) | ||
patience_diff (1.1.0) | ||
trollop (~> 1.16) | ||
pry (0.13.1) | ||
coderay (~> 1.1) | ||
method_source (~> 1.0) | ||
pry-byebug (3.9.0) | ||
byebug (~> 11.0) | ||
pry (~> 0.13.0) | ||
rainbow (3.0.0) | ||
rake (13.0.1) | ||
regexp_parser (1.7.1) | ||
rexml (3.2.4) | ||
rspec (3.9.0) | ||
rspec-core (~> 3.9.0) | ||
rspec-expectations (~> 3.9.0) | ||
rspec-mocks (~> 3.9.0) | ||
rspec-core (3.9.2) | ||
rspec-support (~> 3.9.3) | ||
rspec-expectations (3.9.2) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.9.0) | ||
rspec-mocks (3.9.1) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.9.0) | ||
rspec-support (3.9.3) | ||
rubocop (0.89.1) | ||
parallel (~> 1.10) | ||
parser (>= 2.7.1.1) | ||
rainbow (>= 2.2.2, < 4.0) | ||
regexp_parser (>= 1.7) | ||
rexml | ||
rubocop-ast (>= 0.3.0, < 1.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (>= 1.4.0, < 2.0) | ||
rubocop-ast (0.3.0) | ||
parser (>= 2.7.1.4) | ||
ruby-progressbar (1.10.1) | ||
thor (1.0.1) | ||
trollop (1.16.2) | ||
unicode-display_width (1.7.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
appraisal | ||
childprocess | ||
pry-byebug | ||
pry-nav | ||
rake | ||
rspec (< 3.10) | ||
rubocop | ||
super_diff! | ||
|
||
BUNDLED WITH | ||
2.1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.