Skip to content

Commit

Permalink
Add rakep executable
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Oct 10, 2011
1 parent b9dd6f6 commit f4d65f9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions bin/rakep
@@ -0,0 +1,25 @@
#!/usr/bin/env ruby

require "rake-pipeline"
require "rake-pipeline/middleware"
require "rack/server"

module Rake
class Pipeline
class Server < Rack::Server
def app
not_found = [404, { "Content-Type" => "text/plain" }, ["not found"]]
config = "rake_pipeline_config.rb"

pipeline_source = File.read(config)

pipeline = Pipeline.class_eval "build do\n#{pipeline_source}\nend", config, 1
pipeline_app = Middleware.new(not_found)
pipeline_app.pipeline = pipeline
pipeline_app
end
end
end
end

Rake::Pipeline::Server.new.start
2 changes: 2 additions & 0 deletions lib/rake-pipeline/middleware.rb
@@ -1,3 +1,5 @@
require "rack"

module Rake
class Pipeline
class Middleware
Expand Down

0 comments on commit f4d65f9

Please sign in to comment.