diff --git a/Appraisals b/Appraisals index f34f0e9c..c514457d 100644 --- a/Appraisals +++ b/Appraisals @@ -8,32 +8,56 @@ appraisals = { instance_eval(&rails_dependencies) gem "activerecord", "~> 5.0.0" + gem "railties", "~> 5.0.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] }, rails_5_1: proc { instance_eval(&rails_dependencies) gem "activerecord", "~> 5.1.0" + gem "railties", "~> 5.1.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] }, rails_5_2: proc { instance_eval(&rails_dependencies) gem "activerecord", "~> 5.2.0" + gem "railties", "~> 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 "railties", "~> 6.0" gem "sqlite3", "~> 1.4.0", platform: [:ruby, :mswin, :mingw] }, no_rails: proc {}, - rspec_lt_3_10: proc { - gem "rspec", "< 3.10" + rspec_lt_3_10: proc { |with_rails| + version = "< 3.10" + + if with_rails + gem "rspec-core", version + gem "rspec-expectations", version + gem "rspec-mocks", version + gem "rspec-support", version + gem "rspec-rails" + else + gem "rspec", version + end }, - rspec_gte_3_10: proc { - gem "rspec", ">= 3.10", "< 4" + rspec_gte_3_10: proc { |with_rails| + version = [">= 3.10", "< 4"] + + if with_rails + gem "rspec-core", *version + gem "rspec-expectations", *version + gem "rspec-mocks", *version + gem "rspec-support", *version + gem "rspec-rails" + else + gem "rspec", *version + end }, } @@ -54,9 +78,16 @@ rspec_appraisals = [ 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)) + if rails_appraisal == :no_rails + appraise "#{rails_appraisal}_#{rspec_appraisal}" do + instance_eval(&appraisals.fetch(rails_appraisal)) + instance_exec(false, &appraisals.fetch(rspec_appraisal)) + end + else + appraise "#{rails_appraisal}_#{rspec_appraisal}" do + instance_eval(&appraisals.fetch(rails_appraisal)) + instance_exec(true, &appraisals.fetch(rspec_appraisal)) + end end end end diff --git a/gemfiles/rails_5_0_rspec_gte_3_10.gemfile b/gemfiles/rails_5_0_rspec_gte_3_10.gemfile index 727fcc4c..d0798a37 100644 --- a/gemfiles/rails_5_0_rspec_gte_3_10.gemfile +++ b/gemfiles/rails_5_0_rspec_gte_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 5.0.0" +gem "railties", "~> 5.0.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] -gem "rspec", ">= 3.10", "< 4" +gem "rspec-core", ">= 3.10", "< 4" +gem "rspec-expectations", ">= 3.10", "< 4" +gem "rspec-mocks", ">= 3.10", "< 4" +gem "rspec-support", ">= 3.10", "< 4" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_5_0_rspec_gte_3_10.gemfile.lock b/gemfiles/rails_5_0_rspec_gte_3_10.gemfile.lock index e79936d1..8175f1bd 100644 --- a/gemfiles/rails_5_0_rspec_gte_3_10.gemfile.lock +++ b/gemfiles/rails_5_0_rspec_gte_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (5.0.7.2) + actionview (= 5.0.7.2) + activesupport (= 5.0.7.2) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.7.2) + activesupport (= 5.0.7.2) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) activemodel (5.0.7.2) activesupport (= 5.0.7.2) activerecord (5.0.7.2) @@ -27,15 +40,24 @@ GEM arel (7.1.4) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubis (2.7.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.7.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) + mini_portile2 (2.4.0) minitest (5.14.2) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -47,14 +69,24 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + rack (2.2.3) + rack-test (0.6.3) + rack (>= 1.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.0.7.2) + actionpack (= 5.0.7.2) + activesupport (= 5.0.7.2) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.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) @@ -63,6 +95,14 @@ GEM rspec-mocks (3.10.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.10.0) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +135,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 5.0.0) rake - rspec (>= 3.10, < 4) + rspec-core (>= 3.10, < 4) + rspec-expectations (>= 3.10, < 4) + rspec-mocks (>= 3.10, < 4) + rspec-rails + rspec-support (>= 3.10, < 4) rubocop sqlite3 (~> 1.3.6) super_diff! diff --git a/gemfiles/rails_5_0_rspec_lt_3_10.gemfile b/gemfiles/rails_5_0_rspec_lt_3_10.gemfile index 58b3a1b7..ab8af5f0 100644 --- a/gemfiles/rails_5_0_rspec_lt_3_10.gemfile +++ b/gemfiles/rails_5_0_rspec_lt_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 5.0.0" +gem "railties", "~> 5.0.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] -gem "rspec", "< 3.10" +gem "rspec-core", "< 3.10" +gem "rspec-expectations", "< 3.10" +gem "rspec-mocks", "< 3.10" +gem "rspec-support", "< 3.10" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_5_0_rspec_lt_3_10.gemfile.lock b/gemfiles/rails_5_0_rspec_lt_3_10.gemfile.lock index 8155d0a0..fd2a31e5 100644 --- a/gemfiles/rails_5_0_rspec_lt_3_10.gemfile.lock +++ b/gemfiles/rails_5_0_rspec_lt_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (5.0.7.2) + actionview (= 5.0.7.2) + activesupport (= 5.0.7.2) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.7.2) + activesupport (= 5.0.7.2) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) activemodel (5.0.7.2) activesupport (= 5.0.7.2) activerecord (5.0.7.2) @@ -27,15 +40,24 @@ GEM arel (7.1.4) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubis (2.7.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.7.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) + mini_portile2 (2.4.0) minitest (5.14.2) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -47,14 +69,24 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + rack (2.2.3) + rack-test (0.6.3) + rack (>= 1.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.0.7.2) + actionpack (= 5.0.7.2) + activesupport (= 5.0.7.2) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.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) @@ -63,6 +95,14 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.9.3) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +135,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 5.0.0) rake - rspec (< 3.10) + rspec-core (< 3.10) + rspec-expectations (< 3.10) + rspec-mocks (< 3.10) + rspec-rails + rspec-support (< 3.10) rubocop sqlite3 (~> 1.3.6) super_diff! diff --git a/gemfiles/rails_5_1_rspec_gte_3_10.gemfile b/gemfiles/rails_5_1_rspec_gte_3_10.gemfile index f53bed84..df7c2491 100644 --- a/gemfiles/rails_5_1_rspec_gte_3_10.gemfile +++ b/gemfiles/rails_5_1_rspec_gte_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 5.1.0" +gem "railties", "~> 5.1.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] -gem "rspec", ">= 3.10", "< 4" +gem "rspec-core", ">= 3.10", "< 4" +gem "rspec-expectations", ">= 3.10", "< 4" +gem "rspec-mocks", ">= 3.10", "< 4" +gem "rspec-support", ">= 3.10", "< 4" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_5_1_rspec_gte_3_10.gemfile.lock b/gemfiles/rails_5_1_rspec_gte_3_10.gemfile.lock index 30767cf6..28e31832 100644 --- a/gemfiles/rails_5_1_rspec_gte_3_10.gemfile.lock +++ b/gemfiles/rails_5_1_rspec_gte_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (5.1.7) + actionview (= 5.1.7) + activesupport (= 5.1.7) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.1.7) + activesupport (= 5.1.7) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) activemodel (5.1.7) activesupport (= 5.1.7) activerecord (5.1.7) @@ -27,15 +40,24 @@ GEM arel (8.0.0) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubi (1.9.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.7.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) + mini_portile2 (2.4.0) minitest (5.14.2) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -47,14 +69,24 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.1.7) + actionpack (= 5.1.7) + activesupport (= 5.1.7) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.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) @@ -63,6 +95,14 @@ GEM rspec-mocks (3.10.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.10.0) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +135,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 5.1.0) rake - rspec (>= 3.10, < 4) + rspec-core (>= 3.10, < 4) + rspec-expectations (>= 3.10, < 4) + rspec-mocks (>= 3.10, < 4) + rspec-rails + rspec-support (>= 3.10, < 4) rubocop sqlite3 (~> 1.3.6) super_diff! diff --git a/gemfiles/rails_5_1_rspec_lt_3_10.gemfile b/gemfiles/rails_5_1_rspec_lt_3_10.gemfile index 433917b3..b29cf64c 100644 --- a/gemfiles/rails_5_1_rspec_lt_3_10.gemfile +++ b/gemfiles/rails_5_1_rspec_lt_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 5.1.0" +gem "railties", "~> 5.1.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] -gem "rspec", "< 3.10" +gem "rspec-core", "< 3.10" +gem "rspec-expectations", "< 3.10" +gem "rspec-mocks", "< 3.10" +gem "rspec-support", "< 3.10" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_5_1_rspec_lt_3_10.gemfile.lock b/gemfiles/rails_5_1_rspec_lt_3_10.gemfile.lock index 0c50e7ab..6c1d5e4d 100644 --- a/gemfiles/rails_5_1_rspec_lt_3_10.gemfile.lock +++ b/gemfiles/rails_5_1_rspec_lt_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (5.1.7) + actionview (= 5.1.7) + activesupport (= 5.1.7) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.1.7) + activesupport (= 5.1.7) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) activemodel (5.1.7) activesupport (= 5.1.7) activerecord (5.1.7) @@ -27,15 +40,24 @@ GEM arel (8.0.0) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubi (1.9.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.7.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) + mini_portile2 (2.4.0) minitest (5.14.2) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -47,14 +69,24 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.1.7) + actionpack (= 5.1.7) + activesupport (= 5.1.7) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.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) @@ -63,6 +95,14 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.9.3) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +135,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 5.1.0) rake - rspec (< 3.10) + rspec-core (< 3.10) + rspec-expectations (< 3.10) + rspec-mocks (< 3.10) + rspec-rails + rspec-support (< 3.10) rubocop sqlite3 (~> 1.3.6) super_diff! diff --git a/gemfiles/rails_5_2_rspec_gte_3_10.gemfile b/gemfiles/rails_5_2_rspec_gte_3_10.gemfile index bc2d6f27..3e9df2b0 100644 --- a/gemfiles/rails_5_2_rspec_gte_3_10.gemfile +++ b/gemfiles/rails_5_2_rspec_gte_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 5.2.0" +gem "railties", "~> 5.2.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] -gem "rspec", ">= 3.10", "< 4" +gem "rspec-core", ">= 3.10", "< 4" +gem "rspec-expectations", ">= 3.10", "< 4" +gem "rspec-mocks", ">= 3.10", "< 4" +gem "rspec-support", ">= 3.10", "< 4" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_5_2_rspec_gte_3_10.gemfile.lock b/gemfiles/rails_5_2_rspec_gte_3_10.gemfile.lock index e9c9d7cc..58f9b86d 100644 --- a/gemfiles/rails_5_2_rspec_gte_3_10.gemfile.lock +++ b/gemfiles/rails_5_2_rspec_gte_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (5.2.4.3) + actionview (= 5.2.4.3) + activesupport (= 5.2.4.3) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.2.4.3) + activesupport (= 5.2.4.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) activemodel (5.2.4.3) activesupport (= 5.2.4.3) activerecord (5.2.4.3) @@ -27,15 +40,24 @@ GEM arel (9.0.0) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubi (1.9.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.7.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) + mini_portile2 (2.4.0) minitest (5.14.2) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -47,14 +69,24 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.2.4.3) + actionpack (= 5.2.4.3) + activesupport (= 5.2.4.3) + method_source + rake (>= 0.8.7) + thor (>= 0.19.0, < 2.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) @@ -63,6 +95,14 @@ GEM rspec-mocks (3.10.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.10.0) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +135,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 5.2.0) rake - rspec (>= 3.10, < 4) + rspec-core (>= 3.10, < 4) + rspec-expectations (>= 3.10, < 4) + rspec-mocks (>= 3.10, < 4) + rspec-rails + rspec-support (>= 3.10, < 4) rubocop sqlite3 (~> 1.3.6) super_diff! diff --git a/gemfiles/rails_5_2_rspec_lt_3_10.gemfile b/gemfiles/rails_5_2_rspec_lt_3_10.gemfile index 450f00f0..c0c7488d 100644 --- a/gemfiles/rails_5_2_rspec_lt_3_10.gemfile +++ b/gemfiles/rails_5_2_rspec_lt_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 5.2.0" +gem "railties", "~> 5.2.0" gem "sqlite3", "~> 1.3.6", platform: [:ruby, :mswin, :mingw] -gem "rspec", "< 3.10" +gem "rspec-core", "< 3.10" +gem "rspec-expectations", "< 3.10" +gem "rspec-mocks", "< 3.10" +gem "rspec-support", "< 3.10" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_5_2_rspec_lt_3_10.gemfile.lock b/gemfiles/rails_5_2_rspec_lt_3_10.gemfile.lock index 1c004bed..586cd022 100644 --- a/gemfiles/rails_5_2_rspec_lt_3_10.gemfile.lock +++ b/gemfiles/rails_5_2_rspec_lt_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (5.2.4.3) + actionview (= 5.2.4.3) + activesupport (= 5.2.4.3) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.2.4.3) + activesupport (= 5.2.4.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) activemodel (5.2.4.3) activesupport (= 5.2.4.3) activerecord (5.2.4.3) @@ -27,15 +40,24 @@ GEM arel (9.0.0) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubi (1.9.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.7.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) + mini_portile2 (2.4.0) minitest (5.14.2) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -47,14 +69,24 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.2.4.3) + actionpack (= 5.2.4.3) + activesupport (= 5.2.4.3) + method_source + rake (>= 0.8.7) + thor (>= 0.19.0, < 2.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) @@ -63,6 +95,14 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.9.3) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +135,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 5.2.0) rake - rspec (< 3.10) + rspec-core (< 3.10) + rspec-expectations (< 3.10) + rspec-mocks (< 3.10) + rspec-rails + rspec-support (< 3.10) rubocop sqlite3 (~> 1.3.6) super_diff! diff --git a/gemfiles/rails_6_0_rspec_gte_3_10.gemfile b/gemfiles/rails_6_0_rspec_gte_3_10.gemfile index 6be47a3c..93d584c9 100644 --- a/gemfiles/rails_6_0_rspec_gte_3_10.gemfile +++ b/gemfiles/rails_6_0_rspec_gte_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 6.0" +gem "railties", "~> 6.0" gem "sqlite3", "~> 1.4.0", platform: [:ruby, :mswin, :mingw] -gem "rspec", ">= 3.10", "< 4" +gem "rspec-core", ">= 3.10", "< 4" +gem "rspec-expectations", ">= 3.10", "< 4" +gem "rspec-mocks", ">= 3.10", "< 4" +gem "rspec-support", ">= 3.10", "< 4" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_6_0_rspec_gte_3_10.gemfile.lock b/gemfiles/rails_6_0_rspec_gte_3_10.gemfile.lock index 0167b3a2..13a3d1ed 100644 --- a/gemfiles/rails_6_0_rspec_gte_3_10.gemfile.lock +++ b/gemfiles/rails_6_0_rspec_gte_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (6.0.3.4) + actionview (= 6.0.3.4) + activesupport (= 6.0.3.4) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actionview (6.0.3.4) + activesupport (= 6.0.3.4) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) activemodel (6.0.3.4) activesupport (= 6.0.3.4) activerecord (6.0.3.4) @@ -26,15 +39,23 @@ GEM thor (>= 0.14.0) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubi (1.10.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.9.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) minitest (5.14.2) + nokogiri (1.11.1-x86_64-darwin) + racc (~> 1.4) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -46,14 +67,25 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + racc (1.5.2) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (6.0.3.4) + actionpack (= 6.0.3.4) + activesupport (= 6.0.3.4) + method_source + rake (>= 0.8.7) + thor (>= 0.20.3, < 2.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) @@ -62,6 +94,14 @@ GEM rspec-mocks (3.10.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.10.0) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +135,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 6.0) rake - rspec (>= 3.10, < 4) + rspec-core (>= 3.10, < 4) + rspec-expectations (>= 3.10, < 4) + rspec-mocks (>= 3.10, < 4) + rspec-rails + rspec-support (>= 3.10, < 4) rubocop sqlite3 (~> 1.4.0) super_diff! diff --git a/gemfiles/rails_6_0_rspec_lt_3_10.gemfile b/gemfiles/rails_6_0_rspec_lt_3_10.gemfile index a6c43cf4..d09d051d 100644 --- a/gemfiles/rails_6_0_rspec_lt_3_10.gemfile +++ b/gemfiles/rails_6_0_rspec_lt_3_10.gemfile @@ -11,7 +11,12 @@ gem "rubocop" gem "activerecord-jdbcsqlite3-adapter", platform: :jruby gem "jdbc-sqlite3", platform: :jruby gem "activerecord", "~> 6.0" +gem "railties", "~> 6.0" gem "sqlite3", "~> 1.4.0", platform: [:ruby, :mswin, :mingw] -gem "rspec", "< 3.10" +gem "rspec-core", "< 3.10" +gem "rspec-expectations", "< 3.10" +gem "rspec-mocks", "< 3.10" +gem "rspec-support", "< 3.10" +gem "rspec-rails" gemspec path: "../" diff --git a/gemfiles/rails_6_0_rspec_lt_3_10.gemfile.lock b/gemfiles/rails_6_0_rspec_lt_3_10.gemfile.lock index ed2e22ff..800bd64f 100644 --- a/gemfiles/rails_6_0_rspec_lt_3_10.gemfile.lock +++ b/gemfiles/rails_6_0_rspec_lt_3_10.gemfile.lock @@ -9,6 +9,19 @@ PATH GEM remote: https://rubygems.org/ specs: + actionpack (6.0.3.4) + actionview (= 6.0.3.4) + activesupport (= 6.0.3.4) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actionview (6.0.3.4) + activesupport (= 6.0.3.4) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) activemodel (6.0.3.4) activesupport (= 6.0.3.4) activerecord (6.0.3.4) @@ -26,15 +39,25 @@ GEM thor (>= 0.14.0) ast (2.4.1) attr_extras (6.2.4) + builder (3.2.4) byebug (11.1.3) childprocess (4.0.0) coderay (1.1.3) concurrent-ruby (1.1.7) + crass (1.0.6) diff-lcs (1.4.4) + erubi (1.10.0) i18n (1.8.5) concurrent-ruby (~> 1.0) + loofah (2.9.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) method_source (1.0.0) + mini_portile2 (2.5.0) minitest (5.14.2) + nokogiri (1.11.1) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) @@ -46,14 +69,25 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) + racc (1.5.2) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (6.0.3.4) + actionpack (= 6.0.3.4) + activesupport (= 6.0.3.4) + method_source + rake (>= 0.8.7) + thor (>= 0.20.3, < 2.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) @@ -62,6 +96,14 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) + rspec-rails (4.0.1) + actionpack (>= 4.2) + activesupport (>= 4.2) + railties (>= 4.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.9.3) rubocop (0.89.1) parallel (~> 1.10) @@ -95,8 +137,13 @@ DEPENDENCIES jdbc-sqlite3 pry-byebug pry-nav + railties (~> 6.0) rake - rspec (< 3.10) + rspec-core (< 3.10) + rspec-expectations (< 3.10) + rspec-mocks (< 3.10) + rspec-rails + rspec-support (< 3.10) rubocop sqlite3 (~> 1.4.0) super_diff! diff --git a/lib/super_diff/rspec.rb b/lib/super_diff/rspec.rb index 763231c8..e9af17fb 100644 --- a/lib/super_diff/rspec.rb +++ b/lib/super_diff/rspec.rb @@ -62,7 +62,10 @@ def self.fuzzy_object?(value) end def self.rspec_version - GemVersion.new(::RSpec::Version::STRING) + @_rspec_version ||= begin + require "rspec/core/version" + GemVersion.new(::RSpec::Core::Version::STRING) + end end SuperDiff.configuration.tap do |config| diff --git a/lib/super_diff/rspec/monkey_patches.rb b/lib/super_diff/rspec/monkey_patches.rb index 38f589fa..372e0350 100644 --- a/lib/super_diff/rspec/monkey_patches.rb +++ b/lib/super_diff/rspec/monkey_patches.rb @@ -9,7 +9,6 @@ require "rspec/matchers/built_in/have_attributes" require "rspec/matchers/built_in/include" require "rspec/matchers/built_in/match" -require "rspec/version" module RSpec module Expectations diff --git a/support/test_plan.rb b/support/test_plan.rb index bbf2b534..e666aa54 100644 --- a/support/test_plan.rb +++ b/support/test_plan.rb @@ -30,8 +30,6 @@ def boot require "pry-nav" end - require "rspec" - require "super_diff" SuperDiff.const_set(:IntegrationTests, Module.new) @@ -83,19 +81,19 @@ def boot_rails end def run_plain_test - run_test("super_diff/rspec") + run_test_with_libraries("super_diff/rspec") end def run_rspec_active_support_test - run_test("super_diff/rspec", "super_diff/active_support") + run_test_with_libraries("super_diff/rspec", "super_diff/active_support") end def run_rspec_active_record_test - run_test("super_diff/rspec", "super_diff/active_record") + run_test_with_libraries("super_diff/rspec", "super_diff/active_record") end def run_rspec_rails_test - run_test("super_diff/rspec-rails") + run_test_with_libraries("super_diff/rspec-rails") end private @@ -124,21 +122,27 @@ def reconnect_activerecord end end - def run_test(*libraries) + def run_test_with_libraries(*libraries) if !using_outside_of_zeus? option_parser.parse! end SuperDiff::Csi.color_enabled = color_enabled? + + if SuperDiff::CurrentBundle.instance.current_appraisal.name.start_with?("no_rails_") + require "rspec" + else + require "rails" + require "rspec-rails" + end + RSpec.configure do |config| config.color_mode = color_enabled? ? :on : :off end yield if block_given? - libraries.each do |library| - require library - end + libraries.each { |library| require library } if !using_outside_of_zeus? RSpec::Core::Runner.invoke