Skip to content

Commit

Permalink
Fix support for rails 5 without breaking previous ruby version support
Browse files Browse the repository at this point in the history
  • Loading branch information
ashoda committed Dec 12, 2016
1 parent 255b93e commit 9a01759
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apivore.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'rspec', '~> 3'
s.add_runtime_dependency 'rspec-expectations', '~> 3.1'
s.add_runtime_dependency 'rspec-mocks', '~> 3.1'
s.add_runtime_dependency 'actionpack', '>= 4', '< 6'
s.add_runtime_dependency 'hashie', '~> 3.3'
s.add_development_dependency 'pry', '~> 0'
s.add_development_dependency 'rake', '~> 10.3'
s.add_development_dependency 'rspec-rails', '~> 3'
s.add_development_dependency 'activesupport', '>= 4', '< 6'

# Rails 5 stopped support for ruby < 2.2.2
# Hack to support currently suported ruby versions
# TODO: remove and explicitly require ruby 2.2.2 as min version in version 2 of apivore
if RUBY_VERSION >= '2.2.2'
s.add_runtime_dependency 'actionpack', '>= 4', '< 6'
else
s.add_runtime_dependency 'actionpack', '< 5'
end

if RUBY_VERSION >= '2.2.0'
s.add_development_dependency 'test-unit', '~> 3'
end
Expand Down

0 comments on commit 9a01759

Please sign in to comment.