mascot-server 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mascot-server.rb +4 -4
- 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: ff27ad30519bccb2d9f5157cb5bb6083ee9c1f6c
|
4
|
+
data.tar.gz: 742eeb9de5b7e8951a8ee178746cbab7859e73ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03b425d24b40bab3e5ceb76170388b19eece36399e7c52bf49f5c19ff78da37865362f8da3cb03c60ec5e76bde79274998f51f1792616701cbfd819cd668908a
|
7
|
+
data.tar.gz: 83448dd2a437587bfd281e8802a27b8ee8a096c2c1be5128323260c51bf865697c93924174e7687fcffc9d75b2cd83dec783d41d202e6b57e43723d68b1e0c1b
|
data/lib/mascot-server.rb
CHANGED
@@ -23,16 +23,16 @@ module Mascot
|
|
23
23
|
class Server
|
24
24
|
ROOT_PATH = Pathname.new("/")
|
25
25
|
|
26
|
-
def initialize(
|
26
|
+
def initialize(site: , relative_to: "/")
|
27
27
|
@relative_to = Pathname.new(relative_to)
|
28
|
-
@
|
28
|
+
@site = site
|
29
29
|
end
|
30
30
|
|
31
31
|
def call(env)
|
32
32
|
req = Rack::Request.new(env)
|
33
|
-
resource = @
|
33
|
+
resource = @site.get req.path
|
34
34
|
# TODO: Memoize this per request and between requests eventually.
|
35
|
-
resources = @
|
35
|
+
resources = @site.resources
|
36
36
|
|
37
37
|
if resource
|
38
38
|
body = if resource.asset.template_extensions.empty?
|
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.11
|
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-08-
|
11
|
+
date: 2016-08-10 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.11
|
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.11
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: tilt
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|