bobkit 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afce343a0b04ba05c425e26ca54e8bc380438c26
4
- data.tar.gz: ebac4d26af7c3c25f150ccc89917730e13b5b72e
3
+ metadata.gz: d96f55c5d526578e5ee34e70855282dfb385db24
4
+ data.tar.gz: 85ae03b075ea7a6ff52d8e6e2306c44832d89024
5
5
  SHA512:
6
- metadata.gz: 46152c1cc2b759dece001194910b6b72bef65d427441c0d4d95eff9a7f6533cf5de90f9f89481da10b7a24f5be5dc7f0bb1840d6614fcd6281bf0bde9e741185
7
- data.tar.gz: a5ee34e284f5be8c2e48b54a312cc78f15a31adcf1b3c2c08cf06e789734bfe1f8b468c54f3d74907d0d3f7c44983cf3c1921a057e5ef36169cb3830d11265c9
6
+ metadata.gz: 301434fd123ce5762da1341aae645aa65f31ffe6155ab87a44feed1019121fa266078da98758c3eafa50a77f9434b945a932e6b7634636140d1cd54dd96964e8
7
+ data.tar.gz: 1e28e01af490eefb0d3bf35da91513714e5aa1ef7968a59ca79e0b555d7a515d0114d82955a026cf659e84ce71df7895ab2f435456ff3029b4b73dd06e65b140
data/README.md CHANGED
@@ -136,6 +136,11 @@ html = render 'cats'
136
136
  scope email: 'bob@kit.com', name: 'Bob'
137
137
  html = render 'user'
138
138
 
139
+ # You can render an object that responds to 'to_partial'
140
+ # This method should return the name of the partial file
141
+ user = User.new
142
+ html = render user
143
+
139
144
  # You can send a scope directly to `render`
140
145
  html = render 'user', email: 'bob@kit.com', name: 'Bob'
141
146
 
@@ -13,7 +13,13 @@ module Bobkit
13
13
  include I18nBridge
14
14
 
15
15
  def render(options={}, extra_options={})
16
- options = { partial: options }.merge(extra_options) if options.is_a? String
16
+ if options.is_a? String
17
+ options = { partial: options }.merge(extra_options)
18
+ elsif options.respond_to? :to_partial
19
+ scope options
20
+ options = { partial: options.to_partial }.merge(extra_options)
21
+ end
22
+
17
23
  partial = options.delete :partial
18
24
  layout = options.delete :layout
19
25
  output = options.delete :output
@@ -1,3 +1,3 @@
1
1
  module Bobkit
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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.1.4
4
+ version: 0.1.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: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slim
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.4'
33
+ version: '3.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.4'
40
+ version: '3.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sass-globbing
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.7'
75
+ version: '0.8'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.7'
82
+ version: '0.8'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: filewatcher
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0.7'
131
+ version: '0.1'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0.7'
138
+ version: '0.1'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: runfile-tasks
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -170,28 +170,28 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '3.4'
173
+ version: '3.6'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '3.4'
180
+ version: '3.6'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0.11'
187
+ version: '0.15'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0.11'
194
+ version: '0.15'
195
195
  description: Site Generation Toolkit with Slim, SCSS, CoffeeScript and Markdown
196
196
  email: db@dannyben.com
197
197
  executables: []
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  version: '0'
238
238
  requirements: []
239
239
  rubyforge_project:
240
- rubygems_version: 2.6.6
240
+ rubygems_version: 2.6.13
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: Site Generation Toolkit