Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete EmberCli::Middleware #268

Merged
merged 1 commit into from
Nov 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.