From 7cd233907e6c15a12dd317599c22ec4eaf2ea2b4 Mon Sep 17 00:00:00 2001 From: Ben Willis Date: Sun, 7 May 2017 18:51:13 -0700 Subject: [PATCH 1/7] Fixes #63 --- .travis.yml | 22 +--- Appraisals | 24 ---- gemfiles/rails3.2.gemfile | 10 -- gemfiles/rails3.2.gemfile.lock | 121 ------------------- gemfiles/rails4.0.gemfile | 10 -- gemfiles/rails4.0.gemfile.lock | 102 ---------------- gemfiles/rails4.1.gemfile | 9 -- gemfiles/rails4.1.gemfile.lock | 106 ---------------- gemfiles/rails4.2.gemfile.lock | 4 +- gemfiles/rails5.0.gemfile.lock | 4 +- spec/integration/view/view_additions_spec.rb | 17 +-- 11 files changed, 9 insertions(+), 420 deletions(-) delete mode 100644 gemfiles/rails3.2.gemfile delete mode 100644 gemfiles/rails3.2.gemfile.lock delete mode 100644 gemfiles/rails4.0.gemfile delete mode 100644 gemfiles/rails4.0.gemfile.lock delete mode 100644 gemfiles/rails4.1.gemfile delete mode 100644 gemfiles/rails4.1.gemfile.lock diff --git a/.travis.yml b/.travis.yml index 2567fcc..512f27f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,37 +5,17 @@ before_install: - gem install bundler rvm: - - 1.9.2 - - 1.9.3 - - 2.0.0 - - 2.1.0 - 2.2.0 - 2.2.2 + - 2.3.3 - ruby-head gemfile: - - gemfiles/rails3.2.gemfile - - gemfiles/rails4.0.gemfile - - gemfiles/rails4.1.gemfile - gemfiles/rails4.2.gemfile - gemfiles/rails5.0.gemfile matrix: exclude: - - rvm: 1.9.2 - gemfile: gemfiles/rails4.0.gemfile - - rvm: 1.9.2 - gemfile: gemfiles/rails4.1.gemfile - - rvm: 1.9.2 - gemfile: gemfiles/rails4.2.gemfile - - rvm: 1.9.2 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 1.9.3 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 2.0.0 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 2.1.0 - gemfile: gemfiles/rails5.0.gemfile - rvm: 2.2.0 gemfile: gemfiles/rails5.0.gemfile diff --git a/Appraisals b/Appraisals index be02105..2919d16 100644 --- a/Appraisals +++ b/Appraisals @@ -1,27 +1,3 @@ -appraise "rails3.2" do - gem('actionpack', '~> 3.2.0') - gem('activesupport', '~> 3.2.0') - gem('railties', '~> 3.2.0') - # Rails 3.2 has test-unit as a dependency, but Ruby 2.2 removes - # it, so we need to now manually require it as a dependency - gem('test-unit', '~>3.0') -end - -appraise "rails4.0" do - gem('actionpack', '~> 4.0.0') - gem('activesupport', '~> 4.0.0') - gem('railties', '~> 4.0.0') - # Rails 4.0 has test-unit as a dependency, but Ruby 2.2 removes - # it, so we need to now manually require it as a dependency - gem('test-unit', '~>3.0') -end - -appraise "rails4.1" do - gem('actionpack', '~> 4.1.0') - gem('activesupport', '~> 4.1.0') - gem('railties', '~> 4.1.0') -end - appraise "rails4.2" do gem('actionpack', '~> 4.2.0') gem('activesupport', '~> 4.2.0') diff --git a/gemfiles/rails3.2.gemfile b/gemfiles/rails3.2.gemfile deleted file mode 100644 index d7306ba..0000000 --- a/gemfiles/rails3.2.gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 3.2.0" -gem "activesupport", "~> 3.2.0" -gem "railties", "~> 3.2.0" -gem "test-unit", "~>3.0" - -gemspec :path => "../" diff --git a/gemfiles/rails3.2.gemfile.lock b/gemfiles/rails3.2.gemfile.lock deleted file mode 100644 index 8bde86f..0000000 --- a/gemfiles/rails3.2.gemfile.lock +++ /dev/null @@ -1,121 +0,0 @@ -PATH - remote: ../ - specs: - versioncake (3.2.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - appraisal (0.5.2) - bundler - rake - builder (3.0.4) - colorize (0.5.8) - coveralls (0.6.7) - colorize - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - thor - diff-lcs (1.2.5) - erubis (2.7.0) - hike (1.2.2) - i18n (0.6.1) - journey (1.0.4) - json (1.8.3) - mime-types (1.23) - multi_json (1.7.3) - power_assert (0.2.4) - rack (1.4.5) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.3) - rack - rack-test (0.6.2) - rack (>= 1.0) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) - rack-ssl (~> 1.3.2) - rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.0.4) - rdoc (3.12.2) - json (~> 1.4) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - sprockets (2.2.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - test-unit (3.1.4) - power_assert - thor (0.18.1) - thread_safe (0.3.5) - tilt (1.4.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 3.2.0) - activesupport (~> 3.2.0) - appraisal - coveralls - railties (~> 3.2.0) - rake - rspec - rspec-rails - test-unit (~> 3.0) - versioncake! - -BUNDLED WITH - 1.10.6 diff --git a/gemfiles/rails4.0.gemfile b/gemfiles/rails4.0.gemfile deleted file mode 100644 index 5ac7f6d..0000000 --- a/gemfiles/rails4.0.gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 4.0.0" -gem "activesupport", "~> 4.0.0" -gem "railties", "~> 4.0.0" -gem "test-unit", "~>3.0" - -gemspec :path => "../" diff --git a/gemfiles/rails4.0.gemfile.lock b/gemfiles/rails4.0.gemfile.lock deleted file mode 100644 index 6d258dc..0000000 --- a/gemfiles/rails4.0.gemfile.lock +++ /dev/null @@ -1,102 +0,0 @@ -PATH - remote: ../ - specs: - versioncake (3.2.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (4.0.0) - activesupport (= 4.0.0) - builder (~> 3.1.0) - erubis (~> 2.7.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - activesupport (4.0.0) - i18n (~> 0.6, >= 0.6.4) - minitest (~> 4.2) - multi_json (~> 1.3) - thread_safe (~> 0.1) - tzinfo (~> 0.3.37) - appraisal (0.5.2) - bundler - rake - atomic (1.1.10) - builder (3.1.4) - colorize (0.5.8) - coveralls (0.6.7) - colorize - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - thor - diff-lcs (1.2.5) - erubis (2.7.0) - i18n (0.6.4) - mime-types (1.23) - minitest (4.7.5) - multi_json (1.7.7) - power_assert (0.2.4) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - railties (4.0.0) - actionpack (= 4.0.0) - activesupport (= 4.0.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.1.0) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - test-unit (3.1.4) - power_assert - thor (0.18.1) - thread_safe (0.1.0) - atomic - tzinfo (0.3.37) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 4.0.0) - activesupport (~> 4.0.0) - appraisal - coveralls - railties (~> 4.0.0) - rake - rspec - rspec-rails - test-unit (~> 3.0) - versioncake! - -BUNDLED WITH - 1.10.6 diff --git a/gemfiles/rails4.1.gemfile b/gemfiles/rails4.1.gemfile deleted file mode 100644 index 13b40e5..0000000 --- a/gemfiles/rails4.1.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 4.1.0" -gem "activesupport", "~> 4.1.0" -gem "railties", "~> 4.1.0" - -gemspec :path => "../" diff --git a/gemfiles/rails4.1.gemfile.lock b/gemfiles/rails4.1.gemfile.lock deleted file mode 100644 index f0b73ed..0000000 --- a/gemfiles/rails4.1.gemfile.lock +++ /dev/null @@ -1,106 +0,0 @@ -PATH - remote: ../ - specs: - versioncake (3.2.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (4.1.0) - actionview (= 4.1.0) - activesupport (= 4.1.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - actionview (4.1.0) - activesupport (= 4.1.0) - builder (~> 3.1) - erubis (~> 2.7.0) - activesupport (4.1.0) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - appraisal (1.0.0) - bundler - rake - thor (>= 0.14.0) - builder (3.2.2) - coveralls (0.7.0) - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - term-ansicolor - thor - diff-lcs (1.2.5) - docile (1.1.3) - erubis (2.7.0) - i18n (0.6.9) - json (1.8.3) - mime-types (2.2) - minitest (5.3.3) - multi_json (1.9.2) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - railties (4.1.0) - actionpack (= 4.1.0) - activesupport (= 4.1.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.2.2) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.8.2) - docile (~> 1.1.0) - multi_json - simplecov-html (~> 0.8.0) - simplecov-html (0.8.0) - term-ansicolor (1.3.0) - tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.3) - tins (1.1.0) - tzinfo (1.1.0) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 4.1.0) - activesupport (~> 4.1.0) - appraisal - coveralls - railties (~> 4.1.0) - rake - rspec - rspec-rails - versioncake! - -BUNDLED WITH - 1.10.6 diff --git a/gemfiles/rails4.2.gemfile.lock b/gemfiles/rails4.2.gemfile.lock index f531860..88969bc 100644 --- a/gemfiles/rails4.2.gemfile.lock +++ b/gemfiles/rails4.2.gemfile.lock @@ -1,5 +1,5 @@ PATH - remote: ../ + remote: .. specs: versioncake (3.2.0) actionpack (>= 3.2) @@ -130,4 +130,4 @@ DEPENDENCIES versioncake! BUNDLED WITH - 1.10.6 + 1.14.6 diff --git a/gemfiles/rails5.0.gemfile.lock b/gemfiles/rails5.0.gemfile.lock index aae5593..b822b6e 100644 --- a/gemfiles/rails5.0.gemfile.lock +++ b/gemfiles/rails5.0.gemfile.lock @@ -1,5 +1,5 @@ PATH - remote: ../ + remote: .. specs: versioncake (3.2.0) actionpack (>= 3.2) @@ -118,4 +118,4 @@ DEPENDENCIES versioncake! BUNDLED WITH - 1.12.5 + 1.14.6 diff --git a/spec/integration/view/view_additions_spec.rb b/spec/integration/view/view_additions_spec.rb index 8b77e8b..b748885 100644 --- a/spec/integration/view/view_additions_spec.rb +++ b/spec/integration/view/view_additions_spec.rb @@ -33,19 +33,10 @@ it { expect(template_format).to eq 'application/json' } end - context 'when in Rails >=4.1' do - before do - unless (ActionPack::VERSION::MAJOR == 4 && ActionPack::VERSION::MINOR >= 1) || - ActionPack::VERSION::MAJOR > 5 - skip('Template variants are only available in Rails >=4.1') - end - end - - context 'when handler, format, variant and version are present' do - let(:template_extension) { 'application.json+tablet.v1.jbuilder' } - - it { expect(template_format).to eq 'application/json' } - end + context 'when handler, format, variant and version are present' do + let(:template_extension) { 'application.json+tablet.v1.jbuilder' } + + it { expect(template_format).to eq 'application/json' } end end end From bd652f7024caf208202f8c97a7d69faa337e396b Mon Sep 17 00:00:00 2001 From: Ben Willis Date: Sun, 7 May 2017 18:51:13 -0700 Subject: [PATCH 2/7] Fixes #63 --- .travis.yml | 22 +--- Appraisals | 24 ---- gemfiles/rails3.2.gemfile | 10 -- gemfiles/rails3.2.gemfile.lock | 121 ------------------- gemfiles/rails4.0.gemfile | 10 -- gemfiles/rails4.0.gemfile.lock | 102 ---------------- gemfiles/rails4.1.gemfile | 9 -- gemfiles/rails4.1.gemfile.lock | 106 ---------------- spec/integration/view/view_additions_spec.rb | 17 +-- 9 files changed, 5 insertions(+), 416 deletions(-) delete mode 100644 gemfiles/rails3.2.gemfile delete mode 100644 gemfiles/rails3.2.gemfile.lock delete mode 100644 gemfiles/rails4.0.gemfile delete mode 100644 gemfiles/rails4.0.gemfile.lock delete mode 100644 gemfiles/rails4.1.gemfile delete mode 100644 gemfiles/rails4.1.gemfile.lock diff --git a/.travis.yml b/.travis.yml index 8b2762c..512f27f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,37 +5,17 @@ before_install: - gem install bundler rvm: - - 1.9.2-p330 - - 1.9.3 - - 2.0.0 - - 2.1.0 - 2.2.0 - 2.2.2 + - 2.3.3 - ruby-head gemfile: - - gemfiles/rails3.2.gemfile - - gemfiles/rails4.0.gemfile - - gemfiles/rails4.1.gemfile - gemfiles/rails4.2.gemfile - gemfiles/rails5.0.gemfile matrix: exclude: - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails4.0.gemfile - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails4.1.gemfile - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails4.2.gemfile - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 1.9.3 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 2.0.0 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 2.1.0 - gemfile: gemfiles/rails5.0.gemfile - rvm: 2.2.0 gemfile: gemfiles/rails5.0.gemfile diff --git a/Appraisals b/Appraisals index be02105..2919d16 100644 --- a/Appraisals +++ b/Appraisals @@ -1,27 +1,3 @@ -appraise "rails3.2" do - gem('actionpack', '~> 3.2.0') - gem('activesupport', '~> 3.2.0') - gem('railties', '~> 3.2.0') - # Rails 3.2 has test-unit as a dependency, but Ruby 2.2 removes - # it, so we need to now manually require it as a dependency - gem('test-unit', '~>3.0') -end - -appraise "rails4.0" do - gem('actionpack', '~> 4.0.0') - gem('activesupport', '~> 4.0.0') - gem('railties', '~> 4.0.0') - # Rails 4.0 has test-unit as a dependency, but Ruby 2.2 removes - # it, so we need to now manually require it as a dependency - gem('test-unit', '~>3.0') -end - -appraise "rails4.1" do - gem('actionpack', '~> 4.1.0') - gem('activesupport', '~> 4.1.0') - gem('railties', '~> 4.1.0') -end - appraise "rails4.2" do gem('actionpack', '~> 4.2.0') gem('activesupport', '~> 4.2.0') diff --git a/gemfiles/rails3.2.gemfile b/gemfiles/rails3.2.gemfile deleted file mode 100644 index 69d75f5..0000000 --- a/gemfiles/rails3.2.gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 3.2.0" -gem "activesupport", "~> 3.2.0" -gem "railties", "~> 3.2.0" -gem "test-unit", "~>3.0" - -gemspec path: "../" diff --git a/gemfiles/rails3.2.gemfile.lock b/gemfiles/rails3.2.gemfile.lock deleted file mode 100644 index adc949e..0000000 --- a/gemfiles/rails3.2.gemfile.lock +++ /dev/null @@ -1,121 +0,0 @@ -PATH - remote: .. - specs: - versioncake (3.3.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - appraisal (0.5.2) - bundler - rake - builder (3.0.4) - colorize (0.5.8) - coveralls (0.6.7) - colorize - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - thor - diff-lcs (1.2.5) - erubis (2.7.0) - hike (1.2.2) - i18n (0.6.1) - journey (1.0.4) - json (1.8.3) - mime-types (1.23) - multi_json (1.7.3) - power_assert (0.2.4) - rack (1.4.5) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.3) - rack - rack-test (0.6.2) - rack (>= 1.0) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) - rack-ssl (~> 1.3.2) - rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.0.4) - rdoc (3.12.2) - json (~> 1.4) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - sprockets (2.2.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - test-unit (3.1.4) - power_assert - thor (0.18.1) - thread_safe (0.3.6) - tilt (1.4.1) - tzinfo (1.2.3) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 3.2.0) - activesupport (~> 3.2.0) - appraisal - coveralls - railties (~> 3.2.0) - rake - rspec - rspec-rails - test-unit (~> 3.0) - versioncake! - -BUNDLED WITH - 1.14.6 diff --git a/gemfiles/rails4.0.gemfile b/gemfiles/rails4.0.gemfile deleted file mode 100644 index 986743d..0000000 --- a/gemfiles/rails4.0.gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 4.0.0" -gem "activesupport", "~> 4.0.0" -gem "railties", "~> 4.0.0" -gem "test-unit", "~>3.0" - -gemspec path: "../" diff --git a/gemfiles/rails4.0.gemfile.lock b/gemfiles/rails4.0.gemfile.lock deleted file mode 100644 index 7ae3f96..0000000 --- a/gemfiles/rails4.0.gemfile.lock +++ /dev/null @@ -1,102 +0,0 @@ -PATH - remote: .. - specs: - versioncake (3.3.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (4.0.0) - activesupport (= 4.0.0) - builder (~> 3.1.0) - erubis (~> 2.7.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - activesupport (4.0.0) - i18n (~> 0.6, >= 0.6.4) - minitest (~> 4.2) - multi_json (~> 1.3) - thread_safe (~> 0.1) - tzinfo (~> 0.3.37) - appraisal (0.5.2) - bundler - rake - atomic (1.1.10) - builder (3.1.4) - colorize (0.5.8) - coveralls (0.6.7) - colorize - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - thor - diff-lcs (1.2.5) - erubis (2.7.0) - i18n (0.6.4) - mime-types (1.23) - minitest (4.7.5) - multi_json (1.7.7) - power_assert (0.2.4) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - railties (4.0.0) - actionpack (= 4.0.0) - activesupport (= 4.0.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.1.0) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - test-unit (3.1.4) - power_assert - thor (0.18.1) - thread_safe (0.1.0) - atomic - tzinfo (0.3.37) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 4.0.0) - activesupport (~> 4.0.0) - appraisal - coveralls - railties (~> 4.0.0) - rake - rspec - rspec-rails - test-unit (~> 3.0) - versioncake! - -BUNDLED WITH - 1.14.6 diff --git a/gemfiles/rails4.1.gemfile b/gemfiles/rails4.1.gemfile deleted file mode 100644 index ccf0f2b..0000000 --- a/gemfiles/rails4.1.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 4.1.0" -gem "activesupport", "~> 4.1.0" -gem "railties", "~> 4.1.0" - -gemspec path: "../" diff --git a/gemfiles/rails4.1.gemfile.lock b/gemfiles/rails4.1.gemfile.lock deleted file mode 100644 index 7486293..0000000 --- a/gemfiles/rails4.1.gemfile.lock +++ /dev/null @@ -1,106 +0,0 @@ -PATH - remote: .. - specs: - versioncake (3.3.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (4.1.0) - actionview (= 4.1.0) - activesupport (= 4.1.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - actionview (4.1.0) - activesupport (= 4.1.0) - builder (~> 3.1) - erubis (~> 2.7.0) - activesupport (4.1.0) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - appraisal (1.0.0) - bundler - rake - thor (>= 0.14.0) - builder (3.2.2) - coveralls (0.7.0) - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - term-ansicolor - thor - diff-lcs (1.2.5) - docile (1.1.3) - erubis (2.7.0) - i18n (0.6.9) - json (1.8.3) - mime-types (2.2) - minitest (5.3.3) - multi_json (1.9.2) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - railties (4.1.0) - actionpack (= 4.1.0) - activesupport (= 4.1.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.2.2) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.8.2) - docile (~> 1.1.0) - multi_json - simplecov-html (~> 0.8.0) - simplecov-html (0.8.0) - term-ansicolor (1.3.0) - tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.3) - tins (1.1.0) - tzinfo (1.1.0) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 4.1.0) - activesupport (~> 4.1.0) - appraisal - coveralls - railties (~> 4.1.0) - rake - rspec - rspec-rails - versioncake! - -BUNDLED WITH - 1.14.6 diff --git a/spec/integration/view/view_additions_spec.rb b/spec/integration/view/view_additions_spec.rb index 8b77e8b..b748885 100644 --- a/spec/integration/view/view_additions_spec.rb +++ b/spec/integration/view/view_additions_spec.rb @@ -33,19 +33,10 @@ it { expect(template_format).to eq 'application/json' } end - context 'when in Rails >=4.1' do - before do - unless (ActionPack::VERSION::MAJOR == 4 && ActionPack::VERSION::MINOR >= 1) || - ActionPack::VERSION::MAJOR > 5 - skip('Template variants are only available in Rails >=4.1') - end - end - - context 'when handler, format, variant and version are present' do - let(:template_extension) { 'application.json+tablet.v1.jbuilder' } - - it { expect(template_format).to eq 'application/json' } - end + context 'when handler, format, variant and version are present' do + let(:template_extension) { 'application.json+tablet.v1.jbuilder' } + + it { expect(template_format).to eq 'application/json' } end end end From a38b1e27fef2ef683a2cf478c850c1ee76087782 Mon Sep 17 00:00:00 2001 From: Ben Willis Date: Sun, 7 May 2017 22:12:48 -0700 Subject: [PATCH 3/7] Remove workaround for issue that was for Ruby 1.9.3 --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 512f27f..9646a98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,5 @@ language: ruby -# https://github.com/travis-ci/travis-ci/issues/5239 -before_install: - - gem install bundler - rvm: - 2.2.0 - 2.2.2 From e8654ba1a56ab0145bc45777889e734a504d7516 Mon Sep 17 00:00:00 2001 From: Ben Willis Date: Sun, 7 May 2017 22:13:19 -0700 Subject: [PATCH 4/7] Remove patch that is for Rails <4.1 --- lib/versioncake/view_additions.rb | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/lib/versioncake/view_additions.rb b/lib/versioncake/view_additions.rb index f038ee1..5966fe3 100644 --- a/lib/versioncake/view_additions.rb +++ b/lib/versioncake/view_additions.rb @@ -6,25 +6,15 @@ ActionView::LookupContext.register_detail(:versions){ [] } ActionView::PathResolver.class_eval do - # not sure why we are doing this yet, but looks like a good idea - if ActionPack::VERSION::MAJOR >= 4 && ActionPack::VERSION::MINOR >= 1 || ActionPack::VERSION::MAJOR >= 5 - ActionView::PathResolver::EXTENSIONS.replace({ - locale: ".", - formats: ".", - versions: ".", - variants: "+", - handlers: "." - }) + ActionView::PathResolver::EXTENSIONS.replace({ + locale: ".", + formats: ".", + versions: ".", + variants: "+", + handlers: "." + }) - ActionView::PathResolver::DEFAULT_PATTERN.replace ":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:versions,}{.:handlers,}" - else - ActionView::PathResolver::EXTENSIONS.replace [:locale, :formats, :versions, :handlers] - - # The query builder has the @details from the lookup_context and will - # match the detail name to the string in the pattern, so we must append - # it to the default pattern - ActionView::PathResolver::DEFAULT_PATTERN.replace ":prefix/:action{.:locale,}{.:formats,}{.:versions,}{.:handlers,}" - end + ActionView::PathResolver::DEFAULT_PATTERN.replace ":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:versions,}{.:handlers,}" # The default extract handler expects that the handler is the last extension and # the format is the next one. Since we are replacing the DEFAULT_PATTERN, we need to From a19ceb6a8e25383a1ad8944f6d234d284a8e8b44 Mon Sep 17 00:00:00 2001 From: Ben Willis Date: Sun, 7 May 2017 18:51:13 -0700 Subject: [PATCH 5/7] Fixes #63 --- .travis.yml | 22 +--- Appraisals | 24 ---- gemfiles/rails3.2.gemfile | 10 -- gemfiles/rails3.2.gemfile.lock | 121 ------------------- gemfiles/rails4.0.gemfile | 10 -- gemfiles/rails4.0.gemfile.lock | 102 ---------------- gemfiles/rails4.1.gemfile | 9 -- gemfiles/rails4.1.gemfile.lock | 106 ---------------- spec/integration/view/view_additions_spec.rb | 17 +-- 9 files changed, 5 insertions(+), 416 deletions(-) delete mode 100644 gemfiles/rails3.2.gemfile delete mode 100644 gemfiles/rails3.2.gemfile.lock delete mode 100644 gemfiles/rails4.0.gemfile delete mode 100644 gemfiles/rails4.0.gemfile.lock delete mode 100644 gemfiles/rails4.1.gemfile delete mode 100644 gemfiles/rails4.1.gemfile.lock diff --git a/.travis.yml b/.travis.yml index 8b2762c..512f27f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,37 +5,17 @@ before_install: - gem install bundler rvm: - - 1.9.2-p330 - - 1.9.3 - - 2.0.0 - - 2.1.0 - 2.2.0 - 2.2.2 + - 2.3.3 - ruby-head gemfile: - - gemfiles/rails3.2.gemfile - - gemfiles/rails4.0.gemfile - - gemfiles/rails4.1.gemfile - gemfiles/rails4.2.gemfile - gemfiles/rails5.0.gemfile matrix: exclude: - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails4.0.gemfile - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails4.1.gemfile - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails4.2.gemfile - - rvm: 1.9.2-p330 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 1.9.3 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 2.0.0 - gemfile: gemfiles/rails5.0.gemfile - - rvm: 2.1.0 - gemfile: gemfiles/rails5.0.gemfile - rvm: 2.2.0 gemfile: gemfiles/rails5.0.gemfile diff --git a/Appraisals b/Appraisals index be02105..2919d16 100644 --- a/Appraisals +++ b/Appraisals @@ -1,27 +1,3 @@ -appraise "rails3.2" do - gem('actionpack', '~> 3.2.0') - gem('activesupport', '~> 3.2.0') - gem('railties', '~> 3.2.0') - # Rails 3.2 has test-unit as a dependency, but Ruby 2.2 removes - # it, so we need to now manually require it as a dependency - gem('test-unit', '~>3.0') -end - -appraise "rails4.0" do - gem('actionpack', '~> 4.0.0') - gem('activesupport', '~> 4.0.0') - gem('railties', '~> 4.0.0') - # Rails 4.0 has test-unit as a dependency, but Ruby 2.2 removes - # it, so we need to now manually require it as a dependency - gem('test-unit', '~>3.0') -end - -appraise "rails4.1" do - gem('actionpack', '~> 4.1.0') - gem('activesupport', '~> 4.1.0') - gem('railties', '~> 4.1.0') -end - appraise "rails4.2" do gem('actionpack', '~> 4.2.0') gem('activesupport', '~> 4.2.0') diff --git a/gemfiles/rails3.2.gemfile b/gemfiles/rails3.2.gemfile deleted file mode 100644 index 69d75f5..0000000 --- a/gemfiles/rails3.2.gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 3.2.0" -gem "activesupport", "~> 3.2.0" -gem "railties", "~> 3.2.0" -gem "test-unit", "~>3.0" - -gemspec path: "../" diff --git a/gemfiles/rails3.2.gemfile.lock b/gemfiles/rails3.2.gemfile.lock deleted file mode 100644 index 7e0931e..0000000 --- a/gemfiles/rails3.2.gemfile.lock +++ /dev/null @@ -1,121 +0,0 @@ -PATH - remote: .. - specs: - versioncake (3.4.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - appraisal (0.5.2) - bundler - rake - builder (3.0.4) - colorize (0.5.8) - coveralls (0.6.7) - colorize - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - thor - diff-lcs (1.2.5) - erubis (2.7.0) - hike (1.2.2) - i18n (0.6.1) - journey (1.0.4) - json (1.8.3) - mime-types (1.23) - multi_json (1.7.3) - power_assert (0.2.4) - rack (1.4.5) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.3) - rack - rack-test (0.6.2) - rack (>= 1.0) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) - rack-ssl (~> 1.3.2) - rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.0.4) - rdoc (3.12.2) - json (~> 1.4) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - sprockets (2.2.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - test-unit (3.1.4) - power_assert - thor (0.18.1) - thread_safe (0.3.6) - tilt (1.4.1) - tzinfo (1.2.3) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 3.2.0) - activesupport (~> 3.2.0) - appraisal - coveralls - railties (~> 3.2.0) - rake - rspec - rspec-rails - test-unit (~> 3.0) - versioncake! - -BUNDLED WITH - 1.14.6 diff --git a/gemfiles/rails4.0.gemfile b/gemfiles/rails4.0.gemfile deleted file mode 100644 index 986743d..0000000 --- a/gemfiles/rails4.0.gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 4.0.0" -gem "activesupport", "~> 4.0.0" -gem "railties", "~> 4.0.0" -gem "test-unit", "~>3.0" - -gemspec path: "../" diff --git a/gemfiles/rails4.0.gemfile.lock b/gemfiles/rails4.0.gemfile.lock deleted file mode 100644 index b09e569..0000000 --- a/gemfiles/rails4.0.gemfile.lock +++ /dev/null @@ -1,102 +0,0 @@ -PATH - remote: .. - specs: - versioncake (3.4.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (4.0.0) - activesupport (= 4.0.0) - builder (~> 3.1.0) - erubis (~> 2.7.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - activesupport (4.0.0) - i18n (~> 0.6, >= 0.6.4) - minitest (~> 4.2) - multi_json (~> 1.3) - thread_safe (~> 0.1) - tzinfo (~> 0.3.37) - appraisal (0.5.2) - bundler - rake - atomic (1.1.10) - builder (3.1.4) - colorize (0.5.8) - coveralls (0.6.7) - colorize - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - thor - diff-lcs (1.2.5) - erubis (2.7.0) - i18n (0.6.4) - mime-types (1.23) - minitest (4.7.5) - multi_json (1.7.7) - power_assert (0.2.4) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - railties (4.0.0) - actionpack (= 4.0.0) - activesupport (= 4.0.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.1.0) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - test-unit (3.1.4) - power_assert - thor (0.18.1) - thread_safe (0.1.0) - atomic - tzinfo (0.3.37) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 4.0.0) - activesupport (~> 4.0.0) - appraisal - coveralls - railties (~> 4.0.0) - rake - rspec - rspec-rails - test-unit (~> 3.0) - versioncake! - -BUNDLED WITH - 1.14.6 diff --git a/gemfiles/rails4.1.gemfile b/gemfiles/rails4.1.gemfile deleted file mode 100644 index ccf0f2b..0000000 --- a/gemfiles/rails4.1.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "actionpack", "~> 4.1.0" -gem "activesupport", "~> 4.1.0" -gem "railties", "~> 4.1.0" - -gemspec path: "../" diff --git a/gemfiles/rails4.1.gemfile.lock b/gemfiles/rails4.1.gemfile.lock deleted file mode 100644 index b966bed..0000000 --- a/gemfiles/rails4.1.gemfile.lock +++ /dev/null @@ -1,106 +0,0 @@ -PATH - remote: .. - specs: - versioncake (3.4.0) - actionpack (>= 3.2) - activesupport (>= 3.2) - railties (>= 3.2) - tzinfo - -GEM - remote: https://rubygems.org/ - specs: - actionpack (4.1.0) - actionview (= 4.1.0) - activesupport (= 4.1.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - actionview (4.1.0) - activesupport (= 4.1.0) - builder (~> 3.1) - erubis (~> 2.7.0) - activesupport (4.1.0) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - appraisal (1.0.0) - bundler - rake - thor (>= 0.14.0) - builder (3.2.2) - coveralls (0.7.0) - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - term-ansicolor - thor - diff-lcs (1.2.5) - docile (1.1.3) - erubis (2.7.0) - i18n (0.6.9) - json (1.8.3) - mime-types (2.2) - minitest (5.3.3) - multi_json (1.9.2) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - railties (4.1.0) - actionpack (= 4.1.0) - activesupport (= 4.1.0) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.2.2) - rest-client (1.6.7) - mime-types (>= 1.16) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - simplecov (0.8.2) - docile (~> 1.1.0) - multi_json - simplecov-html (~> 0.8.0) - simplecov-html (0.8.0) - term-ansicolor (1.3.0) - tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.3) - tins (1.1.0) - tzinfo (1.1.0) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack (~> 4.1.0) - activesupport (~> 4.1.0) - appraisal - coveralls - railties (~> 4.1.0) - rake - rspec - rspec-rails - versioncake! - -BUNDLED WITH - 1.14.6 diff --git a/spec/integration/view/view_additions_spec.rb b/spec/integration/view/view_additions_spec.rb index 8b77e8b..b748885 100644 --- a/spec/integration/view/view_additions_spec.rb +++ b/spec/integration/view/view_additions_spec.rb @@ -33,19 +33,10 @@ it { expect(template_format).to eq 'application/json' } end - context 'when in Rails >=4.1' do - before do - unless (ActionPack::VERSION::MAJOR == 4 && ActionPack::VERSION::MINOR >= 1) || - ActionPack::VERSION::MAJOR > 5 - skip('Template variants are only available in Rails >=4.1') - end - end - - context 'when handler, format, variant and version are present' do - let(:template_extension) { 'application.json+tablet.v1.jbuilder' } - - it { expect(template_format).to eq 'application/json' } - end + context 'when handler, format, variant and version are present' do + let(:template_extension) { 'application.json+tablet.v1.jbuilder' } + + it { expect(template_format).to eq 'application/json' } end end end From ae5f72bbdae2ea070d2c6959ae87d084a2a3992c Mon Sep 17 00:00:00 2001 From: Ben Willis Date: Sun, 7 May 2017 22:12:48 -0700 Subject: [PATCH 6/7] Remove workaround for issue that was for Ruby 1.9.3 --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 512f27f..9646a98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,5 @@ language: ruby -# https://github.com/travis-ci/travis-ci/issues/5239 -before_install: - - gem install bundler - rvm: - 2.2.0 - 2.2.2 From 0f43559972148b5b44b4d1dc9228d06483413757 Mon Sep 17 00:00:00 2001 From: Ben Willis Date: Sun, 7 May 2017 22:13:19 -0700 Subject: [PATCH 7/7] Remove patch that is for Rails <4.1 --- lib/versioncake/view_additions.rb | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/lib/versioncake/view_additions.rb b/lib/versioncake/view_additions.rb index 71a9a78..5966fe3 100644 --- a/lib/versioncake/view_additions.rb +++ b/lib/versioncake/view_additions.rb @@ -6,28 +6,15 @@ ActionView::LookupContext.register_detail(:versions){ [] } ActionView::PathResolver.class_eval do - # not sure why we are doing this yet, but looks like a good idea - if ActionPack::VERSION::MAJOR >= 4 && ActionPack::VERSION::MINOR >= 1 || ActionPack::VERSION::MAJOR >= 5 - ActionView::PathResolver::EXTENSIONS.replace({ - locale: ".", - formats: ".", - versions: ".", - variants: "+", - handlers: "." - }) + ActionView::PathResolver::EXTENSIONS.replace({ + locale: ".", + formats: ".", + versions: ".", + variants: "+", + handlers: "." + }) - def initialize(pattern = nil) - @pattern = pattern || ":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:versions,}{.:handlers,}" - super() - end - else - ActionView::PathResolver::EXTENSIONS.replace [:locale, :formats, :versions, :handlers] - - # The query builder has the @details from the lookup_context and will - # match the detail name to the string in the pattern, so we must append - # it to the default pattern - ActionView::PathResolver::DEFAULT_PATTERN.replace ":prefix/:action{.:locale,}{.:formats,}{.:versions,}{.:handlers,}" - end + ActionView::PathResolver::DEFAULT_PATTERN.replace ":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:versions,}{.:handlers,}" # The default extract handler expects that the handler is the last extension and # the format is the next one. Since we are replacing the DEFAULT_PATTERN, we need to