Skip to content

Commit

Permalink
Move Pipeline::Server into its own file.
Browse files Browse the repository at this point in the history
  • Loading branch information
dudleyf committed Dec 28, 2011
1 parent 3088a02 commit ca39445
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
17 changes: 1 addition & 16 deletions bin/rakep
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ if ARGV[0] == "build"
elsif ARGV[0] == "clean"
Rake::Pipeline::Runner.new("Assetfile").clobber
else
require "rake-pipeline/middleware"
require "rack/server"

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

Middleware.new(not_found, config)
end
end
end
end

require "rake-pipeline/server"
Rake::Pipeline::Server.new.start
end
15 changes: 15 additions & 0 deletions lib/rake-pipeline/server.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require "rake-pipeline/middleware"
require "rack/server"

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

Middleware.new(not_found, config)
end
end
end
end

0 comments on commit ca39445

Please sign in to comment.