mascot-server 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config.ru +1 -1
- data/lib/mascot-server.rb +2 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 726e09ddb5480464e49aa6c95aac383d82a2cb17
|
4
|
+
data.tar.gz: 6aaba5da158d2b5b3c6a8a9e8646c84bff28f7c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b7a8807ac3f5e41d96615f5ecd7ec898c6c31499aab97e56798766384f0d823c2b545a3e8fbafcf02d569498ddf38a9cd5e22f61e61c9aee78d588aaa7dc472
|
7
|
+
data.tar.gz: adc677b033b66931f14a3706ac082975c2352e157a9a2a7bedb84fcbce76eb7027d54c59bd97fcfe4bc714b635d2c8e365ed400b34955a7f65a821c194363e99
|
data/config.ru
CHANGED
data/lib/mascot-server.rb
CHANGED
@@ -14,7 +14,7 @@ module Mascot
|
|
14
14
|
|
15
15
|
private
|
16
16
|
def engine
|
17
|
-
Tilt[@resource.
|
17
|
+
Tilt[@resource.asset.path]
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -29,7 +29,7 @@ module Mascot
|
|
29
29
|
|
30
30
|
def call(env)
|
31
31
|
req = Rack::Request.new(env)
|
32
|
-
resource = @sitemap.
|
32
|
+
resource = @sitemap.get req.path
|
33
33
|
|
34
34
|
if resource
|
35
35
|
[ 200, {"Content-Type" => resource.mime_type.to_s}, [TiltRenderer.new(resource).render] ]
|
@@ -37,12 +37,5 @@ module Mascot
|
|
37
37
|
[ 404, {"Content-Type" => "text/plain"}, ["Not Found"]]
|
38
38
|
end
|
39
39
|
end
|
40
|
-
|
41
|
-
private
|
42
|
-
# If we mount this middleware in a path other than root, we need to configure it
|
43
|
-
# so that it correctly maps the request path to the content path.
|
44
|
-
def normalize_path(request_path)
|
45
|
-
ROOT_PATH.join(Pathname.new(request_path).relative_path_from(@relative_to)).to_s
|
46
|
-
end
|
47
40
|
end
|
48
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mascot-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.
|
61
|
+
version: 0.1.6
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1.
|
68
|
+
version: 0.1.6
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: tilt
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|