Skip to content

Commit

Permalink
Rails 5 Update
Browse files Browse the repository at this point in the history
* We have to detect the rails version specified in the Gemfile.
  If we are using Rails 5, we have to point to a prerelease version
  of draper for compatibility. If not, we can use draper ~> 2.1.

SEE: drapergem/draper#697
  • Loading branch information
jessedoyle committed Feb 1, 2017
1 parent 537d76a commit 75b5899
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ama_layout.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ Gem::Specification.new do |spec|
spec.add_dependency "rails", ">= 4.2"
spec.add_dependency "sass-rails", "~> 5.0"
spec.add_dependency "font-awesome-sass", "4.7.0"
spec.add_dependency "draper", "3.0.0.pre1"
# Sigh ... SEE: https://github.com/drapergem/draper/issues/697
if Gem::Specification.find { |s| s.name == 'rails' }.version < Gem::Version.new('5.0.0')
spec.add_dependency "draper", "~> 2"
else
spec.add_dependency "draper", ">= 3.0.0.pre1"
end
spec.add_dependency "browser", "~> 2.0"
spec.add_dependency "breadcrumbs_on_rails", "~> 3.0.1"
spec.add_development_dependency "bundler", "~> 1.11"
spec.add_development_dependency "rake", "~> 11.0"
spec.add_development_dependency "rake", ">= 11.0"
spec.add_development_dependency "rspec-rails"
spec.add_development_dependency "factory_girl"
spec.add_development_dependency "simplecov"
Expand Down

0 comments on commit 75b5899

Please sign in to comment.