lib/ember-cli/railtie.rb in ember-cli-rails-0.0.6 vs lib/ember-cli/railtie.rb in ember-cli-rails-0.0.7

- old
+ new

@@ -9,15 +9,22 @@ inflect.acronym "CLI" end end initializer "ember-cli-rails.enable" do - EmberCLI.enable! if EmberCLI::Helpers.non_production? + EmberCLI.enable! if enable? end rake_tasks do require "sprockets/rails/task" - EmberCLI::Helpers.override_assets_precompile_task! + Helpers.override_assets_precompile_task! end + def enable? + !skip_ember_cli_init? && Helpers.non_production? + end + + def skip_ember_cli_init? + ENV.fetch("SKIP_EMBER", false) + end end end