Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Rails 2 and 3 Integration
- Loading branch information
Peter Wagenet
committed
Nov 26, 2011
1 parent
105c571
commit 2580cd8
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
require 'rake-pipeline/middleware' | |||
|
|||
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) | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
module Rake | |||
class Pipeline | |||
class Railtie < ::Rails::Railtie | |||
config.rake_pipeline_enabled = false | |||
config.rake_pipeline_assetfile = File.join(RAILS_ROOT, 'Assetfile') | |||
|
|||
initializer do |app| | |||
if config.rake_pipeline_enabled | |||
config.middleware.use(Rake::Pipeline::Middleware, config.rake_pipeline_assetfile) | |||
end | |||
end | |||
end | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
# For Rails 2 | |||
require 'rake-pipeline' |