Skip to content

Commit

Permalink
Update to engine-cart 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Nov 8, 2015
1 parent 8307c7b commit c8ffa51
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ tmp
coverage
pkg
.bundle
.internal_test_app
29 changes: 20 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@ gemspec
# Git. Remember to move these dependencies to your gemspec before releasing
# your gem to rubygems.org.

# load local rails test instance Gemfile (engine cart adds this automagically)
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
if File.exists?(file)
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
# BEGIN ENGINE_CART BLOCK
# engine_cart: 0.8.0
# engine_cart stanza: 0.8.0
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path(".internal_test_app", File.dirname(__FILE__)))
if File.exist?(file)
begin
eval_gemfile file
rescue Bundler::GemfileError => e
Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
Bundler.ui.warn e.message
end
else
gem 'rails', ENV['RAILS_VERSION']
# explicitly include sass-rails to get compatible sprocket dependencies
if ENV['RAILS_VERSION'] and ENV['RAILS_VERSION'] =~ /^4.2/
gem 'sass-rails', ">= 5.0.0.beta1"
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"

gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']

if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] =~ /^4.2/
gem 'responders', "~> 2.0"
gem 'sass-rails', ">= 5.0"
else
gem 'sass-rails', "< 5.0"
end
end
# END ENGINE_CART BLOCK
2 changes: 1 addition & 1 deletion blacklight-hierarchy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |s|

s.add_development_dependency "rspec-rails"
s.add_development_dependency "sqlite3"
s.add_development_dependency "engine_cart"
s.add_development_dependency "engine_cart", '~> 0.8'
s.add_development_dependency "capybara"
s.add_development_dependency "coveralls"
end
3 changes: 2 additions & 1 deletion lib/blacklight/hierarchy/engine.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
require 'blacklight'
require 'rails'

module Blacklight
module Hierarchy
class Engine < Rails::Engine
end
end
end
end

0 comments on commit c8ffa51

Please sign in to comment.