jeremylightsmith-actionsite 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/action_site.rb +1 -1
- data/lib/action_site/site.rb +2 -2
- metadata +1 -1
data/lib/action_site.rb
CHANGED
data/lib/action_site/site.rb
CHANGED
@@ -88,7 +88,7 @@ module ActionSite
|
|
88
88
|
def serve(port = 3000)
|
89
89
|
app = proc do |env|
|
90
90
|
path = env["PATH_INFO"]
|
91
|
-
file = File.join(
|
91
|
+
file = File.join(@out_dir, path)
|
92
92
|
if File.directory?(file)
|
93
93
|
path = env["PATH_INFO"] = File.join(path, "index.html")
|
94
94
|
end
|
@@ -99,7 +99,7 @@ module ActionSite
|
|
99
99
|
return [500, {"Content-Type" => "text/plain"}, "Error in generation :\n\n#{$!.to_s}\n#{$!.backtrace.join("\n")}"]
|
100
100
|
end
|
101
101
|
|
102
|
-
Rack::File.new(
|
102
|
+
Rack::File.new(@out_dir).call(env)
|
103
103
|
end
|
104
104
|
|
105
105
|
Thin::Server.start('0.0.0.0', port) do
|