Skip to content

Commit

Permalink
Delete EmberCli::Middleware
Browse files Browse the repository at this point in the history
Given that [each mounted Ember application manages its own `ember`
process][mount], and that Rails is [no longer responsible for running
EmberCLI tests][tests], the middleware no longer serves a purpose.

[mount]: #263
[tests]: #264
  • Loading branch information
seanpdoyle committed Nov 14, 2015
1 parent b8a8452 commit b283d3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 deletions.
20 changes: 5 additions & 15 deletions lib/ember-cli-rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class DependencyError < StandardError; end
autoload :App, "ember-cli/app"
autoload :Configuration, "ember-cli/configuration"
autoload :Helpers, "ember-cli/helpers"
autoload :Middleware, "ember-cli/middleware"
autoload :PathSet, "ember-cli/path_set"
autoload :Runner, "ember-cli/runner"

Expand All @@ -32,31 +31,26 @@ def skip?
ENV["SKIP_EMBER"].present?
end

def prepare!
@prepared ||= begin
def enable!
@enabled ||= begin
Rails.configuration.assets.paths << root.join("assets").to_s
at_exit{ cleanup }
true
end
end

def enable!
prepare!
append_middleware unless env.production?
end

def install_dependencies!
prepare!
enable!
each_app &:install_dependencies
end

def run_tests!
prepare!
enable!
each_app &:run_tests
end

def compile!
prepare!
enable!
each_app &:compile
end

Expand Down Expand Up @@ -87,10 +81,6 @@ def cleanup
def each_app
apps.each{ |name, app| yield app }
end

def append_middleware
Rails.configuration.middleware.use Middleware
end
end

EmberCLI = EmberCli
17 changes: 0 additions & 17 deletions lib/ember-cli/middleware.rb

This file was deleted.

0 comments on commit b283d3a

Please sign in to comment.