bobkit 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/bobkit/scope.rb +2 -2
- data/lib/bobkit/slim_bridge.rb +4 -1
- data/lib/bobkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0dd26336edd85a8386b472c019cd30dd6be912d
|
4
|
+
data.tar.gz: 7dcb0e8859b6a3dc070b6cc7f0f8610c109ea5e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ad406af81d98fa5e695bc2874f45d16ff2b6fb1e8a4b51937c289bb02917f624bdf44602d66b0fbb1fbcba6790d6cbf28dd6691f7bdd5ddb9c5c65394aa6933
|
7
|
+
data.tar.gz: ec1cc7f00cd1b5cdd1aab7990c088fe947ab58b5727f3e46b8216decb025e4a6ba3edf2ec5cfd98b905eb2079f5af4e0f62d52eccaa036a79e66285030d5207e
|
data/README.md
CHANGED
@@ -216,6 +216,7 @@ provided, we will watch all the input folders.
|
|
216
216
|
Todo
|
217
217
|
--------------------------------------------------
|
218
218
|
|
219
|
+
- [ ] Consider adding `input_root` which will prefix all others
|
219
220
|
- [ ] YAML loader (data_folder?)
|
220
221
|
- [ ] CSV Loader (data_folder?)
|
221
222
|
- [ ] Maybe: Render from/to Markdown
|
data/lib/bobkit/scope.rb
CHANGED
data/lib/bobkit/slim_bridge.rb
CHANGED
@@ -3,6 +3,7 @@ module Bobkit
|
|
3
3
|
include FileHelpers
|
4
4
|
include SlimOptions
|
5
5
|
include LocationOptions
|
6
|
+
include ScopeOptions
|
6
7
|
|
7
8
|
def render(options={}, extra_options={})
|
8
9
|
options = { partial: options }.merge(extra_options) if options.is_a? String
|
@@ -11,7 +12,9 @@ module Bobkit
|
|
11
12
|
output = options.delete :output
|
12
13
|
|
13
14
|
context = options.empty? ? scope : options
|
14
|
-
|
15
|
+
if context.is_a? Hash or !context
|
16
|
+
context = Scope.new context
|
17
|
+
end
|
15
18
|
|
16
19
|
content = Slim::Template.new("#{templates_folder}/#{partial}.slim", slim_options).render(context)
|
17
20
|
content = Slim::Template.new("#{layouts_folder}/#{layout}.slim", slim_options).render(context) { content } if layout
|
data/lib/bobkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bobkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
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: 2016-04-
|
11
|
+
date: 2016-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slim
|