Permalink
Browse files

play nice with Rails 3 and 4

  • Loading branch information...
1 parent 4551e57 commit 7fa87023f6d9a87cbb279c81a8cae1e4ec706e8b @vast vast committed Oct 10, 2013
Showing with 14 additions and 2 deletions.
  1. +3 −0 .travis.yml
  2. +1 −1 api_taster.gemspec
  3. +5 −0 gemfiles/Gemfile.rails-3.2.x
  4. +5 −1 spec/mapper_spec.rb
View
@@ -2,3 +2,6 @@ language: ruby
rvm:
- 1.9.3
- 2.0.0
+gemfile:
+ - gemfiles/Gemfile.rails-3.2.x
+ - Gemfile
View
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split($\)
s.test_files = Dir["spec/**/*"]
- s.add_dependency 'rails', '>= 4.0'
+ s.add_dependency 'rails', '>= 3.2'
s.add_dependency 'jquery-rails'
s.add_dependency 'sass-rails'
s.add_dependency 'bootstrap-sass', '~> 2.1'
@@ -0,0 +1,5 @@
+source "https://rubygems.org"
+
+gemspec :path => '..'
+
+gem "rails", "~> 3.2.6"
View
@@ -36,7 +36,11 @@ module ApiTaster
before(:all) do
Rails.application.routes.draw do
resources :dummy_users do
- member { map_method :patch, [:update] }
+ if Rails.version.starts_with? '4'
+ member { map_method :patch, [:update] }
+ else
+ member { map_method :patch, :update }
+ end
end
end

0 comments on commit 7fa8702

Please sign in to comment.