faml 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/Rakefile +8 -4
- data/ext/attribute_builder/attribute_builder.c +7 -2
- data/incompatibilities/README.md +3 -1
- data/incompatibilities/spec/render/array_attribute_spec.md +301 -0
- data/incompatibilities/spec/render/attribute_spec.md +43 -368
- data/incompatibilities/spec/render/hash_attribute_spec.md +120 -0
- data/lib/faml/version.rb +1 -1
- data/spec/render/array_attribute_spec.rb +85 -0
- data/spec/render/attribute_spec.rb +15 -154
- data/spec/render/hash_attribute_spec.rb +66 -0
- data/spec/spec_helper.rb +14 -0
- metadata +10 -2
data/spec/spec_helper.rb
CHANGED
@@ -30,6 +30,20 @@ module RenderSpecHelper
|
|
30
30
|
eval(Faml::Engine.new(options).call(str))
|
31
31
|
end
|
32
32
|
end
|
33
|
+
|
34
|
+
def with_each_attribute_type(key, val, tag: 'span', text: '', klass: nil, id: nil)
|
35
|
+
if id
|
36
|
+
tag = "#{tag}##{id}"
|
37
|
+
end
|
38
|
+
if klass
|
39
|
+
tag = "#{tag}.#{klass}"
|
40
|
+
end
|
41
|
+
aggregate_failures do
|
42
|
+
yield("%#{tag}{#{key}: #{val}}#{text}")
|
43
|
+
yield("- v = #{val}\n%#{tag}{#{key}: v}#{text}")
|
44
|
+
yield("- h = {#{key}: #{val}}\n%#{tag}{h}#{text}")
|
45
|
+
end
|
46
|
+
end
|
33
47
|
end
|
34
48
|
|
35
49
|
module Faml
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escape_utils
|
@@ -330,6 +330,7 @@ files:
|
|
330
330
|
- haml_spec_test.rb
|
331
331
|
- incompatibilities/README.md
|
332
332
|
- incompatibilities/spec/compiler_newline_spec.md
|
333
|
+
- incompatibilities/spec/render/array_attribute_spec.md
|
333
334
|
- incompatibilities/spec/render/attribute_spec.md
|
334
335
|
- incompatibilities/spec/render/comment_spec.md
|
335
336
|
- incompatibilities/spec/render/doctype_spec.md
|
@@ -341,6 +342,7 @@ files:
|
|
341
342
|
- incompatibilities/spec/render/filters/markdown_spec.md
|
342
343
|
- incompatibilities/spec/render/filters/plain_spec.md
|
343
344
|
- incompatibilities/spec/render/filters/preserve_spec.md
|
345
|
+
- incompatibilities/spec/render/hash_attribute_spec.md
|
344
346
|
- incompatibilities/spec/render/helpers_spec.md
|
345
347
|
- incompatibilities/spec/render/indent_spec.md
|
346
348
|
- incompatibilities/spec/render/multiline_spec.md
|
@@ -447,6 +449,7 @@ files:
|
|
447
449
|
- spec/rails/vendor/assets/javascripts/.keep
|
448
450
|
- spec/rails/vendor/assets/stylesheets/.keep
|
449
451
|
- spec/rails_helper.rb
|
452
|
+
- spec/render/array_attribute_spec.rb
|
450
453
|
- spec/render/attribute_spec.rb
|
451
454
|
- spec/render/comment_spec.rb
|
452
455
|
- spec/render/doctype_spec.rb
|
@@ -464,6 +467,7 @@ files:
|
|
464
467
|
- spec/render/filters/scss_spec.rb
|
465
468
|
- spec/render/filters_spec.rb
|
466
469
|
- spec/render/haml_comment_spec.rb
|
470
|
+
- spec/render/hash_attribute_spec.rb
|
467
471
|
- spec/render/helpers_spec.rb
|
468
472
|
- spec/render/multiline_spec.rb
|
469
473
|
- spec/render/newline_spec.rb
|
@@ -523,6 +527,7 @@ summary: Faster implementation of Haml template language.
|
|
523
527
|
test_files:
|
524
528
|
- incompatibilities/README.md
|
525
529
|
- incompatibilities/spec/compiler_newline_spec.md
|
530
|
+
- incompatibilities/spec/render/array_attribute_spec.md
|
526
531
|
- incompatibilities/spec/render/attribute_spec.md
|
527
532
|
- incompatibilities/spec/render/comment_spec.md
|
528
533
|
- incompatibilities/spec/render/doctype_spec.md
|
@@ -534,6 +539,7 @@ test_files:
|
|
534
539
|
- incompatibilities/spec/render/filters/markdown_spec.md
|
535
540
|
- incompatibilities/spec/render/filters/plain_spec.md
|
536
541
|
- incompatibilities/spec/render/filters/preserve_spec.md
|
542
|
+
- incompatibilities/spec/render/hash_attribute_spec.md
|
537
543
|
- incompatibilities/spec/render/helpers_spec.md
|
538
544
|
- incompatibilities/spec/render/indent_spec.md
|
539
545
|
- incompatibilities/spec/render/multiline_spec.md
|
@@ -605,6 +611,7 @@ test_files:
|
|
605
611
|
- spec/rails/vendor/assets/javascripts/.keep
|
606
612
|
- spec/rails/vendor/assets/stylesheets/.keep
|
607
613
|
- spec/rails_helper.rb
|
614
|
+
- spec/render/array_attribute_spec.rb
|
608
615
|
- spec/render/attribute_spec.rb
|
609
616
|
- spec/render/comment_spec.rb
|
610
617
|
- spec/render/doctype_spec.rb
|
@@ -622,6 +629,7 @@ test_files:
|
|
622
629
|
- spec/render/filters/scss_spec.rb
|
623
630
|
- spec/render/filters_spec.rb
|
624
631
|
- spec/render/haml_comment_spec.rb
|
632
|
+
- spec/render/hash_attribute_spec.rb
|
625
633
|
- spec/render/helpers_spec.rb
|
626
634
|
- spec/render/multiline_spec.rb
|
627
635
|
- spec/render/newline_spec.rb
|