Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #121 from tchak/fix-railtie

Pass project instead of assetfile to middleware
  • Loading branch information...
commit ae0795842a8958934d872a005d18b16161aa05fe 2 parents f3ce4c5 + 2d907ad
@wycats wycats authored
View
4 lib/rake-pipeline/rails_plugin.rb
@@ -3,6 +3,8 @@
Rails.configuration.after_initialize do
if defined?(RAKEP_ENABLED) && RAKEP_ENABLED
assetfile = defined?(RAKEP_ASSETFILE) ? RAKEP_ASSETFILE : 'Assetfile'
- Rails.configuration.middleware.use(Rake::Pipeline::Middleware, assetfile)
+ project = Rake::Pipeline::Project.new assetfile
+
+ Rails.configuration.middleware.use Rake::Pipeline::Middleware, project
end
end
View
4 lib/rake-pipeline/railtie.rb
@@ -24,7 +24,9 @@ class Railtie < ::Rails::Railtie
initializer "rake-pipeline.assetfile" do |app|
if config.rake_pipeline_enabled
assetfile = File.join(Rails.root, config.rake_pipeline_assetfile)
- config.app_middleware.insert ActionDispatch::Static, Rake::Pipeline::Middleware, assetfile
+ project = Rake::Pipeline::Project.new assetfile
+
+ config.app_middleware.insert ActionDispatch::Static, Rake::Pipeline::Middleware, project
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.