serve-this 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/serve-this.rb +4 -2
- metadata +4 -4
data/lib/serve-this.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rack'
|
|
2
2
|
|
3
3
|
module ServeThis
|
4
4
|
|
5
|
-
VERSION = "0.0.
|
5
|
+
VERSION = "0.0.5"
|
6
6
|
|
7
7
|
def self.from(root)
|
8
8
|
Rack::Builder.new do
|
@@ -36,8 +36,10 @@ module ServeThis
|
|
36
36
|
# if we are looking at / lets try index.html
|
37
37
|
if path == "/" && exists?("index.html")
|
38
38
|
env["PATH_INFO"] = "/index.html"
|
39
|
+
elsif !exists?(path) && exists?(path+".html")
|
40
|
+
env["PATH_INFO"] += ".html"
|
39
41
|
end
|
40
|
-
|
42
|
+
|
41
43
|
self.file_server.call(env)
|
42
44
|
end
|
43
45
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serve-this
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthew Rudy Jacobs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-27 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|