breezy_template 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/test/template_test.rb +0 -52
- 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: 9bc1f6c5a13af3aeccdea6b849419aa0d80b28df
|
4
|
+
data.tar.gz: 8cfd2e19a34bd4f4bcd5497328271243ad8b824c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed1c374fb20a926f636c644998687c1dd4344e4e75d031408bf16b56c293e9aeacf84414061aded8a86252b487421a534062bf08991d294c1d6d73efb869e7c0
|
7
|
+
data.tar.gz: 222e21f344d45af50dd74142e26eca910218494c35176b3bcbc49c2e951f47a7c8d4d44c05bc6d4a98de3ffbfd297a5222077e6ab1a53acae58a3c1df1cf93f7
|
data/test/template_test.rb
CHANGED
@@ -248,30 +248,6 @@ class TemplateTest < ActiveSupport::TestCase
|
|
248
248
|
assert_equal [], result['comments']
|
249
249
|
end
|
250
250
|
|
251
|
-
# test 'nesting multiple children from array with inline loop' do
|
252
|
-
# comments = [ Comment.new('hello', 1), Comment.new('world', 2) ]
|
253
|
-
#
|
254
|
-
# result = jbuild do |json|
|
255
|
-
# json.comments comments do |comment|
|
256
|
-
# json.content comment.content
|
257
|
-
# end
|
258
|
-
# end
|
259
|
-
#
|
260
|
-
# assert_equal ['content'], result['comments'].first.keys
|
261
|
-
# assert_equal 'hello', result['comments'].first['content']
|
262
|
-
# assert_equal 'world', result['comments'].second['content']
|
263
|
-
# end
|
264
|
-
|
265
|
-
# todo: revisit test 'handles nil-collections as empty arrays' do
|
266
|
-
# result = jbuild do |json|
|
267
|
-
# json.comments nil do |comment|
|
268
|
-
# json.content comment.content
|
269
|
-
# end
|
270
|
-
# end
|
271
|
-
#
|
272
|
-
# assert_equal [], result['comments']
|
273
|
-
# end
|
274
|
-
|
275
251
|
test 'nesting multiple children from a non-Enumerable that responds to #map, #members_at, #members_by' do
|
276
252
|
comments = NonEnumerable.new([ Comment.new('hello', 1), Comment.new('world', 2) ])
|
277
253
|
|
@@ -288,20 +264,6 @@ class TemplateTest < ActiveSupport::TestCase
|
|
288
264
|
assert_equal 'world', result['comments'].second['content']
|
289
265
|
end
|
290
266
|
|
291
|
-
# test 'nesting multiple chilren from a non-Enumerable that responds to #map with inline loop' do
|
292
|
-
# comments = NonEnumerable.new([ Comment.new('hello', 1), Comment.new('world', 2) ])
|
293
|
-
#
|
294
|
-
# result = jbuild do |json|
|
295
|
-
# json.comments comments do |comment|
|
296
|
-
# json.content comment.content
|
297
|
-
# end
|
298
|
-
# end
|
299
|
-
#
|
300
|
-
# assert_equal ['content'], result['comments'].first.keys
|
301
|
-
# assert_equal 'hello', result['comments'].first['content']
|
302
|
-
# assert_equal 'world', result['comments'].second['content']
|
303
|
-
# end
|
304
|
-
|
305
267
|
test 'array! casts array-like objects to array before merging' do
|
306
268
|
wrapped_array = VeryBasicWrapper.new(%w[foo bar])
|
307
269
|
result = jbuild do |json|
|
@@ -311,20 +273,6 @@ class TemplateTest < ActiveSupport::TestCase
|
|
311
273
|
assert_equal %w[foo bar], result
|
312
274
|
end
|
313
275
|
|
314
|
-
# #todo: remove this ability
|
315
|
-
# test 'nesting multiple children from array with inline loop on root' do
|
316
|
-
# comments = [ Comment.new('hello', 1), Comment.new('world', 2) ]
|
317
|
-
#
|
318
|
-
# result = jbuild do |json|
|
319
|
-
# json.call(comments) do |comment|
|
320
|
-
# json.content comment.content
|
321
|
-
# end
|
322
|
-
# end
|
323
|
-
#
|
324
|
-
# assert_equal 'hello', result.first['content']
|
325
|
-
# assert_equal 'world', result.second['content']
|
326
|
-
# end
|
327
|
-
|
328
276
|
test 'array nested inside nested hash' do
|
329
277
|
result = jbuild do |json|
|
330
278
|
json.author do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breezy_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johny Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|