1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/lib/middleman/builder.rb

15 lines
378 B
Ruby
Raw Normal View History

2009-09-28 22:43:08 -04:00
require 'middleman'
module Middleman
class Builder
def self.render_file(source, destination)
# Middleman.set :environment, :build
request_path = destination.gsub(File.join(Dir.pwd, 'build'), "")
browser = Rack::Test::Session.new(Rack::MockSession.new(Middleman))
browser.get(request_path)
browser.last_response.body
end
end
end