munge 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/munge/application.rb +1 -1
- data/lib/munge/helpers/rendering.rb +2 -1
- data/lib/munge/transformers/{tilt.rb → tilt_transformer.rb} +8 -2
- data/lib/munge/version.rb +1 -1
- data/lib/munge.rb +1 -1
- data/seeds/config/view_helpers.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c596cde656ea166e0febf10a87f2d419c4316385
|
4
|
+
data.tar.gz: 69533be20adc8de7fff0185ef62a7277f7417af0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 010455f44a56ac64e1d844ed5162be5a5c8a3b6f51ae6f2371bef881a14234b8c1548afbb95f5d80a3892fd2ffbf7ba4cb0feacec10fd3ef411b2757e3034722
|
7
|
+
data.tar.gz: 09896ef1edd2904bdbfca617b53ed79bb8519730dabef653d891a7dc8fb6db6861f4bf3c559c38e6947054ae22b765e7db45e3da8911b338ba00e8e4bcb85d21
|
data/lib/munge/application.rb
CHANGED
@@ -28,7 +28,8 @@ module Munge
|
|
28
28
|
output =
|
29
29
|
engines
|
30
30
|
.inject(content) do |memo, engine|
|
31
|
-
|
31
|
+
options = @tilt_options[engine]
|
32
|
+
template = engine.new(template_name, options) { memo }
|
32
33
|
|
33
34
|
if inner
|
34
35
|
template.render(self, data) { inner }
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module Munge
|
2
2
|
module Transformers
|
3
|
-
class
|
3
|
+
class TiltTransformer
|
4
4
|
def initialize(scope)
|
5
5
|
@pristine_scope = scope
|
6
|
-
@registry
|
6
|
+
@registry = []
|
7
|
+
@demands = Hash.new { Hash.new }
|
7
8
|
end
|
8
9
|
|
9
10
|
def name
|
@@ -14,6 +15,7 @@ module Munge
|
|
14
15
|
scope = @pristine_scope.dup
|
15
16
|
scope.instance_variable_set :@renderer, @renderer
|
16
17
|
dirty_scope = extend_with_helpers(scope)
|
18
|
+
dirty_scope.instance_variable_set(:@tilt_options, @demands)
|
17
19
|
dirty_scope.render_with_layout(item, content_engines: renderer, content_override: content)
|
18
20
|
end
|
19
21
|
|
@@ -21,6 +23,10 @@ module Munge
|
|
21
23
|
@registry.push(helper)
|
22
24
|
end
|
23
25
|
|
26
|
+
def demand(tilt_template, **options)
|
27
|
+
@demands[tilt_template] = @demands[tilt_template].merge(options)
|
28
|
+
end
|
29
|
+
|
24
30
|
private
|
25
31
|
|
26
32
|
def extend_with_helpers(scope)
|
data/lib/munge/version.rb
CHANGED
data/lib/munge.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: munge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Ahn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -192,7 +192,7 @@ dependencies:
|
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '3.4'
|
195
|
-
description: Documentation for this release is located in https://github.com/zachahn/munge/blob/v0.
|
195
|
+
description: Documentation for this release is located in https://github.com/zachahn/munge/blob/v0.9.0/README.md
|
196
196
|
email:
|
197
197
|
- zach.ahn@gmail.com
|
198
198
|
executables:
|
@@ -243,7 +243,7 @@ files:
|
|
243
243
|
- lib/munge/system/readers/filesystem.rb
|
244
244
|
- lib/munge/system/router.rb
|
245
245
|
- lib/munge/system/router/itemish.rb
|
246
|
-
- lib/munge/transformers/
|
246
|
+
- lib/munge/transformers/tilt_transformer.rb
|
247
247
|
- lib/munge/util/config.rb
|
248
248
|
- lib/munge/util/path.rb
|
249
249
|
- lib/munge/util/symbol_hash.rb
|
@@ -295,3 +295,4 @@ signing_key:
|
|
295
295
|
specification_version: 4
|
296
296
|
summary: Static site generator aiming to simplify complex build rules
|
297
297
|
test_files: []
|
298
|
+
has_rdoc:
|