diff --git a/.travis.yml b/.travis.yml index af401639..7976a066 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,11 +17,15 @@ matrix: - rvm: jruby-19mode include: - rvm: 1.9.3 - gemfile: gemfiles/4.0.gemfile + gemfile: gemfiles/4.0.0.gemfile + - rvm: 1.9.3 + gemfile: gemfiles/4.0.1.gemfile - rvm: 2.0.0 gemfile: gemfiles/3.2.gemfile - rvm: 2.0.0 - gemfile: gemfiles/4.0.gemfile + gemfile: gemfiles/4.0.0.gemfile + - rvm: 2.0.0 + gemfile: gemfiles/4.0.1.gemfile - rvm: rbx-19mode gemfile: gemfiles/3.2.gemfile - rvm: jruby-19mode diff --git a/Appraisals b/Appraisals index 8d1e20c9..185b72c0 100644 --- a/Appraisals +++ b/Appraisals @@ -1,3 +1,12 @@ +rails_4_0 = proc do + gem 'jquery-rails' + gem 'activeresource', '4.0.0' + # Test suite makes heavy use of attr_accessible + gem 'protected_attributes' +end + +#--- + if RUBY_VERSION < '2.0' appraise '3.0' do gem 'rails', '~> 3.0.17' @@ -21,13 +30,16 @@ appraise '3.2' do gem 'strong_parameters' end -appraise '4.0' do +appraise '4.0.0' do + instance_eval(&rails_4_0) gem 'rails', '4.0.0' - gem 'bcrypt-ruby', '~> 3.0.0' #FIXME: This should be ~> 3.1.0 for Rails 4.0 - gem 'jquery-rails' - gem 'sass-rails', '~> 4.0.0' - gem 'activeresource', require: 'active_resource' - - # Test suite makes heavy use of attr_accessible - gem 'protected_attributes' + gem 'sass-rails', '4.0.0' + gem 'bcrypt-ruby', '~> 3.0.0' +end + +appraise '4.0.1' do + instance_eval(&rails_4_0) + gem 'rails', '4.0.1' + gem 'sass-rails', '4.0.1' + gem 'bcrypt-ruby', '~> 3.1.2' end diff --git a/features/step_definitions/rails_steps.rb b/features/step_definitions/rails_steps.rb index ae1b728d..bbc23776 100644 --- a/features/step_definitions/rails_steps.rb +++ b/features/step_definitions/rails_steps.rb @@ -154,7 +154,7 @@ module FileHelpers end def rails_4? - match = ORIGINAL_BUNDLE_VARS['BUNDLE_GEMFILE'].match(/(\d)\.\d\.gemfile$/) + match = ORIGINAL_BUNDLE_VARS['BUNDLE_GEMFILE'].match(/(\d)\.\d\.(\d\.)?gemfile$/) match.captures[0] == '4' end end diff --git a/gemfiles/4.0.gemfile b/gemfiles/4.0.0.gemfile similarity index 82% rename from gemfiles/4.0.gemfile rename to gemfiles/4.0.0.gemfile index b8f55bf2..60b613d5 100644 --- a/gemfiles/4.0.gemfile +++ b/gemfiles/4.0.0.gemfile @@ -9,11 +9,11 @@ gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby gem "jdbc-sqlite3", :platform=>:jruby gem "jruby-openssl", :platform=>:jruby gem "therubyrhino", :platform=>:jruby -gem "rails", "4.0.0" -gem "bcrypt-ruby", "~> 3.0.0" gem "jquery-rails" -gem "sass-rails", "~> 4.0.0" -gem "activeresource", :require=>"active_resource" +gem "activeresource", "4.0.0" gem "protected_attributes" +gem "rails", "4.0.0" +gem "sass-rails", "4.0.0" +gem "bcrypt-ruby", "~> 3.0.0" gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/4.0.gemfile.lock b/gemfiles/4.0.0.gemfile.lock similarity index 85% rename from gemfiles/4.0.gemfile.lock rename to gemfiles/4.0.0.gemfile.lock index 1b2c41c8..60ce38bb 100644 --- a/gemfiles/4.0.gemfile.lock +++ b/gemfiles/4.0.0.gemfile.lock @@ -38,28 +38,28 @@ GEM appraisal (0.5.2) bundler rake - arel (4.0.0) + arel (4.0.1) aruba (0.5.3) childprocess (>= 0.3.6) cucumber (>= 1.1.1) rspec-expectations (>= 2.7.0) - atomic (1.1.13) + atomic (1.1.14) bcrypt-ruby (3.0.1) bourne (1.5.0) mocha (>= 0.13.2, < 0.15) builder (3.1.4) childprocess (0.3.9) ffi (~> 1.0, >= 1.0.11) - cucumber (1.3.6) + cucumber (1.3.10) builder (>= 2.1.2) diff-lcs (>= 1.1.3) - gherkin (~> 2.12.0) - multi_json (~> 1.7.5) + gherkin (~> 2.12) + multi_json (>= 1.7.5, < 2.0) multi_test (>= 0.0.2) - diff-lcs (1.2.4) + diff-lcs (1.2.5) erubis (2.7.0) - ffi (1.9.0) - gherkin (2.12.1) + ffi (1.9.3) + gherkin (2.12.2) multi_json (~> 1.3) hike (1.2.3) i18n (0.6.5) @@ -70,11 +70,11 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) metaclass (0.0.1) - mime-types (1.24) + mime-types (1.25.1) minitest (4.7.5) mocha (0.14.0) metaclass (~> 0.0.1) - multi_json (1.7.9) + multi_json (1.8.2) multi_test (0.0.2) polyglot (0.3.3) protected_attributes (1.0.3) @@ -98,10 +98,10 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.1.0) - rspec-core (2.14.5) - rspec-expectations (2.14.2) + rspec-core (2.14.7) + rspec-expectations (2.14.4) diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.3) + rspec-mocks (2.14.4) rspec-rails (2.14.0) actionpack (>= 3.0) activesupport (>= 3.0) @@ -109,30 +109,30 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) - sass (3.2.10) + sass (3.2.12) sass-rails (4.0.0) railties (>= 4.0.0.beta, < 5.0) sass (>= 3.1.10) sprockets-rails (~> 2.0.0) - shoulda-context (1.1.4) - sprockets (2.10.0) + shoulda-context (1.1.6) + sprockets (2.10.1) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.0.0) + sprockets-rails (2.0.1) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) - sqlite3 (1.3.7) + sqlite3 (1.3.8) thor (0.18.1) - thread_safe (0.1.2) + thread_safe (0.1.3) atomic tilt (1.4.1) - treetop (1.4.14) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.37) + tzinfo (0.3.38) PLATFORMS ruby @@ -140,7 +140,7 @@ PLATFORMS DEPENDENCIES activerecord-jdbc-adapter activerecord-jdbcsqlite3-adapter - activeresource + activeresource (= 4.0.0) appraisal (~> 0.4) aruba bcrypt-ruby (~> 3.0.0) @@ -154,7 +154,7 @@ DEPENDENCIES rails (= 4.0.0) rake (>= 0.9.2) rspec-rails (>= 2.13.1, < 3) - sass-rails (~> 4.0.0) + sass-rails (= 4.0.0) shoulda-context (~> 1.1.2) shoulda-matchers! sqlite3 diff --git a/gemfiles/4.0.1.gemfile b/gemfiles/4.0.1.gemfile new file mode 100644 index 00000000..bf82206a --- /dev/null +++ b/gemfiles/4.0.1.gemfile @@ -0,0 +1,19 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "shoulda-context", "~> 1.1.2" +gem "sqlite3", :platform=>:ruby +gem "activerecord-jdbc-adapter", :platform=>:jruby +gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby +gem "jdbc-sqlite3", :platform=>:jruby +gem "jruby-openssl", :platform=>:jruby +gem "therubyrhino", :platform=>:jruby +gem "jquery-rails" +gem "activeresource", "4.0.0" +gem "protected_attributes" +gem "rails", "4.0.1" +gem "sass-rails", "4.0.1" +gem "bcrypt-ruby", "~> 3.1.2" + +gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/4.0.1.gemfile.lock b/gemfiles/4.0.1.gemfile.lock new file mode 100644 index 00000000..24f48fc3 --- /dev/null +++ b/gemfiles/4.0.1.gemfile.lock @@ -0,0 +1,161 @@ +PATH + remote: ../ + specs: + shoulda-matchers (2.4.0) + activesupport (>= 3.0.0) + +GEM + remote: https://rubygems.org/ + specs: + actionmailer (4.0.1) + actionpack (= 4.0.1) + mail (~> 2.5.4) + actionpack (4.0.1) + activesupport (= 4.0.1) + builder (~> 3.1.0) + erubis (~> 2.7.0) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activemodel (4.0.1) + activesupport (= 4.0.1) + builder (~> 3.1.0) + activerecord (4.0.1) + activemodel (= 4.0.1) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.1) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.3) + activeresource (4.0.0) + activemodel (~> 4.0) + activesupport (~> 4.0) + rails-observers (~> 0.1.1) + activesupport (4.0.1) + 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 + arel (4.0.1) + aruba (0.5.3) + childprocess (>= 0.3.6) + cucumber (>= 1.1.1) + rspec-expectations (>= 2.7.0) + atomic (1.1.14) + bcrypt-ruby (3.1.2) + bourne (1.5.0) + mocha (>= 0.13.2, < 0.15) + builder (3.1.4) + childprocess (0.3.9) + ffi (~> 1.0, >= 1.0.11) + cucumber (1.3.10) + builder (>= 2.1.2) + diff-lcs (>= 1.1.3) + gherkin (~> 2.12) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.0.2) + diff-lcs (1.2.5) + erubis (2.7.0) + ffi (1.9.3) + gherkin (2.12.2) + multi_json (~> 1.3) + hike (1.2.3) + i18n (0.6.5) + jquery-rails (3.0.4) + railties (>= 3.0, < 5.0) + thor (>= 0.14, < 2.0) + mail (2.5.4) + mime-types (~> 1.16) + treetop (~> 1.4.8) + metaclass (0.0.1) + mime-types (1.25.1) + minitest (4.7.5) + mocha (0.14.0) + metaclass (~> 0.0.1) + multi_json (1.8.2) + multi_test (0.0.2) + polyglot (0.3.3) + protected_attributes (1.0.5) + activemodel (>= 4.0.1, < 5.0) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rails (4.0.1) + actionmailer (= 4.0.1) + actionpack (= 4.0.1) + activerecord (= 4.0.1) + activesupport (= 4.0.1) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.1) + sprockets-rails (~> 2.0.0) + rails-observers (0.1.2) + activemodel (~> 4.0) + railties (4.0.1) + actionpack (= 4.0.1) + activesupport (= 4.0.1) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.1.0) + rspec-core (2.14.7) + rspec-expectations (2.14.4) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.4) + rspec-rails (2.14.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + sass (3.2.12) + sass-rails (4.0.1) + railties (>= 4.0.0, < 5.0) + sass (>= 3.1.10) + sprockets-rails (~> 2.0.0) + shoulda-context (1.1.6) + sprockets (2.10.1) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-rails (2.0.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + sqlite3 (1.3.8) + thor (0.18.1) + thread_safe (0.1.3) + atomic + tilt (1.4.1) + treetop (1.4.15) + polyglot + polyglot (>= 0.3.1) + tzinfo (0.3.38) + +PLATFORMS + ruby + +DEPENDENCIES + activerecord-jdbc-adapter + activerecord-jdbcsqlite3-adapter + activeresource (= 4.0.0) + appraisal (~> 0.4) + aruba + bcrypt-ruby (~> 3.1.2) + bourne (~> 1.3) + bundler (~> 1.1) + cucumber (~> 1.1) + jdbc-sqlite3 + jquery-rails + jruby-openssl + protected_attributes + rails (= 4.0.1) + rake (>= 0.9.2) + rspec-rails (>= 2.13.1, < 3) + sass-rails (= 4.0.1) + shoulda-context (~> 1.1.2) + shoulda-matchers! + sqlite3 + therubyrhino diff --git a/spec/support/active_resource_builder.rb b/spec/support/active_resource_builder.rb index e7877217..c844b4f7 100644 --- a/spec/support/active_resource_builder.rb +++ b/spec/support/active_resource_builder.rb @@ -1,3 +1,5 @@ +require 'active_resource' + module ActiveResourceBuilder def self.included(example_group) example_group.class_eval do