Releases: cbeer/engine_cart
Releases · cbeer/engine_cart
Version 0.8.0
- it moves the internal testing app into
.internal_test_app
instead ofspec/internal
. The Rails plugin gemspec includes all ofspec
in the gem, and we want to avoid including the internal application in any packaged gem. - provides better error messages about resolving conflicts between your engine gem’s Gemfile and the testing app Gemfile
- provides
engine_cart:server
andengine_cart:console
rake tasks to run the test app rails server from your engine gem project’s top level directory. - warns about using out-of-date engine_cart initialization in your Gemfile
- tries to be more careful about using a clean testing environment
- runs bundle install with —quiet option (but rails generators will still run bundler noisily)
Upgrade guide:
- Update any
spec/test_app_templates
that usesource_root
paths that are relative to the test application to account for the change in the test app location - Remove the
spec/internal
directory - Add
.internal_test_app
to.gitignore (and, possibly, remove
spec/internal`) - Update the engine_cart initialization in the Gemfile to have this:
# 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.exists?(file)
begin
eval_gemfile file
rescue Bundler::GemfileError => e
Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
Bundler.ui.warn e.message
end
else
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
`