to_simple_yaml 1.0.4 → 1.0.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
  SHA256:
3
- metadata.gz: 70c7c3e7f07b2f8698e21784e8e37e2fb31a090dd847f3b93ea4e49742778c0a
4
- data.tar.gz: 21ccb29d96df8261713cfff74fa09e99c6415df1956bd4cbb49dd8f1df1b98f1
3
+ metadata.gz: 0ca65651f069d3d7c1818b5ca31c1d40536465f41cc1bebaaee9a5da968160aa
4
+ data.tar.gz: 732c0b2ddabe7594bc72c748b91b74476de533690d3e69095a432b3fe8bc0c3c
5
5
  SHA512:
6
- metadata.gz: b3314841f5bd13c319008d376172c2c7980e1f138b3a3499c48495bbf5590d754b0fa91771362b1d724c9d64aba24717c33b9511b5338633ab8b1928df360f42
7
- data.tar.gz: f3010ee3b67a1c28df89b71b6057963884f0839f312435289519633bf520f14f5b8d7c1a5a7fdbb2240c38e13197c5cb6954a0a17bf28097525a9808d37fafbb
6
+ metadata.gz: 31290e9b62b0490749a4816ce1f9bc0a8da7fd2bad34570140b451c5a01466d57a142ff9a7833a7aab2edc04034559a6cd923ecc4dd516e5531a90961414278a
7
+ data.tar.gz: 2bea9806043385131a6b584bf011112dc180afd0e3d2c32a8ed8b99bb9c73b009a934df7c5066322e4b4e39f00b1fc7fa9afc57a5cb0fe0a142cdacf1b0c3ef8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- to_simple_yaml (1.0.4)
4
+ to_simple_yaml (1.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -25,7 +25,7 @@ class Object
25
25
  obj.compact.keys.each_with_index do |key, index|
26
26
  array_first = array && index == 0
27
27
  array_inline = array && index != 0
28
- if obj[key].is_a?(String) && obj[key].start_with?('#')
28
+ if obj[key].is_a?(String) && obj[key].start_with?('#', '*')
29
29
  yaml << template("#{array_first ? '- ' : ''}#{key}: '#{obj[key]}'", array_inline ? indent + 1 : indent)
30
30
  elsif obj[key].is_a?(String) || obj[key].is_a?(Numeric) || obj[key].is_a?(TrueClass) || obj[key].is_a?(FalseClass)
31
31
  yaml << template("#{array_first ? '- ' : ''}#{key}: #{obj[key]}", array_inline ? indent + 1 : indent)
@@ -43,7 +43,7 @@ class Object
43
43
  elsif obj.is_a?(Array)
44
44
  yaml = ''
45
45
  obj.compact.each do |value|
46
- if value.is_a?(String) && value.start_with?('#')
46
+ if value.is_a?(String) && value.start_with?('#', '*')
47
47
  yaml << template("- '#{value}'", indent)
48
48
  elsif value.is_a?(String) || value.is_a?(Numeric) || value.is_a?(TrueClass) || value.is_a?(FalseClass)
49
49
  yaml << template("- #{value}", indent)
@@ -1,3 +1,3 @@
1
1
  module ToSimpleYaml
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_simple_yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - tanmen