rack-rscript 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -2
- data/lib/rack-rscript.rb +13 -6
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 401363d046b8a5c4eada3e105544be9ecbdf2a31
|
|
4
|
+
data.tar.gz: af30cfa83751c42be73657aefd73f0ae288001f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cecf74657abfb025630531563181a0685cc9950336c9645548f5eaa84dc7b24c842b94f1219b41c2e0b35cc719a79a9dab882936dd086515e81abb4173f122dc
|
|
7
|
+
data.tar.gz: b98b728b0eb703f79eb9b96d421df7b186c2026d92e84ba0d1006a7ae13a88fe03bcf5f803b3d6a1e9255ec4934e32f1e362e649e04dd42742cd7dea8a47c705
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
�_�q�d[�b���d��
|
|
1
|
+
I����$����3�0��G���'�
|
data/lib/rack-rscript.rb
CHANGED
|
@@ -167,14 +167,21 @@ class RackRscript
|
|
|
167
167
|
|
|
168
168
|
end
|
|
169
169
|
|
|
170
|
-
def render(name,type, options={})
|
|
171
|
-
layout = Tilt[type.to_s].new(options) {|x| @templates[:layout]}
|
|
172
|
-
template = Tilt[type.to_s].new(options) {|x| @templates[name]}
|
|
170
|
+
def render(name, type, options={})
|
|
171
|
+
layout = Tilt[type.to_s].new(options) {|x| @templates[:layout][:content]}
|
|
172
|
+
template = Tilt[type.to_s].new(options) {|x| @templates[name][:content]}
|
|
173
173
|
layout.render{ template.render }
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
-
def template(name
|
|
177
|
-
@templates.merge!({name => blk.call})
|
|
176
|
+
def template(name, type=nil, &blk)
|
|
177
|
+
@templates.merge!({name => {content: blk.call, type: type}})
|
|
178
178
|
end
|
|
179
|
-
|
|
179
|
+
|
|
180
|
+
def tilt(name, options={})
|
|
181
|
+
|
|
182
|
+
layout = Tilt[@templates[:layout][:type].to_s].new(options) {|x| @templates[:layout][:content]}
|
|
183
|
+
template = Tilt[@templates[name][:type].to_s].new(options) {|x| @templates[name][:content]}
|
|
184
|
+
layout.render{ template.render }
|
|
185
|
+
end
|
|
180
186
|
end
|
|
187
|
+
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rack-rscript
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
|
29
29
|
PrSIAHSciIEyWkxdvMiXuEOAU+cBA3uVHTfpn/QHpap2lC3rCNFDCt1jdNhsvPJW
|
|
30
30
|
P8hoKd8f6iDnTJw4mqinZSTTIweaDo1s
|
|
31
31
|
-----END CERTIFICATE-----
|
|
32
|
-
date: 2013-08-
|
|
32
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
|
33
33
|
dependencies:
|
|
34
34
|
- !ruby/object:Gem::Dependency
|
|
35
35
|
name: rack
|
metadata.gz.sig
CHANGED
|
Binary file
|