kojo 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kojo/collection.rb +6 -2
- data/lib/kojo/config.rb +1 -1
- data/lib/kojo/extensions/file.rb +2 -0
- data/lib/kojo/front_matter_template.rb +2 -2
- data/lib/kojo/refinements/array.rb +1 -1
- data/lib/kojo/refinements/string.rb +0 -1
- data/lib/kojo/template.rb +1 -1
- data/lib/kojo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b135236a60c6021df034236a28118c5184ce87dc6a029eabf154be2afb282baa
|
4
|
+
data.tar.gz: 9cb63fdc1dc1134c5e59ebe25f1c90b755c5df86fb48763f55a985b689c166b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eb027521703e1e3856b31c8fe18c749ccd0ef9ac05abbd3cb1aa812827fc9ee56e330418664d347cc89422da34e6387f1f2913f56e39584b78e625c533e89e9
|
7
|
+
data.tar.gz: 93f80e96e9c4272844d7fba22626d7565c871b18841f6bf4080a5cdf52b476577e8c3f6ab7c04d0c8e9fb933f43c70f1b45753f5011f5294008a609a5493b094
|
data/lib/kojo/collection.rb
CHANGED
@@ -12,15 +12,19 @@ module Kojo
|
|
12
12
|
@import_base = dir
|
13
13
|
end
|
14
14
|
|
15
|
-
def render(args={}, &block)
|
15
|
+
def render(args = {}, &block)
|
16
16
|
files.each do |file|
|
17
17
|
handle file, args, &block
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
def size
|
22
|
+
files.size
|
23
|
+
end
|
24
|
+
|
21
25
|
private
|
22
26
|
|
23
|
-
def handle(file, args={})
|
27
|
+
def handle(file, args = {})
|
24
28
|
template = Template.new file
|
25
29
|
template.import_base = import_base
|
26
30
|
|
data/lib/kojo/config.rb
CHANGED
data/lib/kojo/extensions/file.rb
CHANGED
@@ -12,7 +12,7 @@ module Kojo
|
|
12
12
|
@file = file
|
13
13
|
end
|
14
14
|
|
15
|
-
def render(additional_args=nil)
|
15
|
+
def render(additional_args = nil)
|
16
16
|
additional_args ||= {}
|
17
17
|
config, @template = read_file file
|
18
18
|
|
@@ -24,7 +24,7 @@ module Kojo
|
|
24
24
|
|
25
25
|
private
|
26
26
|
|
27
|
-
def handle(args={})
|
27
|
+
def handle(args = {})
|
28
28
|
content = template
|
29
29
|
content = content.eval_erb args, file
|
30
30
|
content = content.eval_vars args, file
|
data/lib/kojo/template.rb
CHANGED
data/lib/kojo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kojo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mister_bin
|