toml-rb 1.0.0 → 1.1.0

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: ac69523887231de77fcd7f39324df5eb7e372056
4
- data.tar.gz: aa219d97002259cc6c73ddee1acef86776dfa365
3
+ metadata.gz: 32ade102e20e23061b94e8ca46213e6339bb6ed5
4
+ data.tar.gz: 2c733d188a03f4a82eed240b97ebdbfdc30d7773
5
5
  SHA512:
6
- metadata.gz: 87a4601c420d0455d4a3aff4b1f825c7fe34d41125b636de125862a47c6adcf8f8387fe9d8eb76232aa3f03d5a8a008ae460a9be4a459f7292916d36f9df6360
7
- data.tar.gz: 172e265a83e3aaa2a4750959eaf66f00e41fb01c316f17a6e16bdb60f163d66aef055f123b58933a9c657e92cb1234eef709d07a2b290ce32acc6903a83bb7f4
6
+ metadata.gz: 20c0af758d312662bddf908b2e7640fba6f7eacdd81d4c70b59bf85d63858d5422f7035a5979d7397080eeac528b5446afc2483312f78e76dff2bc17a3ed83d9
7
+ data.tar.gz: 1dd538cd557011d7a2a1c8fe8c1583788d3080cabf0b42239dd92fcad9f26573a93cf003b6b401a89afeaa84adc8bb465ec523fad1ba69233ce2dc530ab91ed3
data/README.md CHANGED
@@ -19,7 +19,7 @@ Parser Usage
19
19
  ------------
20
20
 
21
21
  ```ruby
22
- require 'toml'
22
+ require 'toml-rb'
23
23
 
24
24
  # From a file!
25
25
  path = File.join(File.dirname(__FILE__), 'path', 'to', 'file')
@@ -45,7 +45,7 @@ Dumper Usage
45
45
  ------------
46
46
 
47
47
  ```ruby
48
- require 'toml'
48
+ require 'toml-rb'
49
49
 
50
50
  # Simple example
51
51
  TomlRB.dump( simple: true)
@@ -6,6 +6,7 @@ module TomlRB
6
6
 
7
7
  def navigate_keys(hash, symbolize_keys = false)
8
8
  last_key = @nested_keys.pop
9
+ last_key = last_key.to_sym if symbolize_keys
9
10
 
10
11
  # Go over the parent keys
11
12
  @nested_keys.each do |key|
@@ -37,3 +37,13 @@ hosts = [
37
37
  [amqp]
38
38
  exchange = {durable = true, auto_delete = false}
39
39
 
40
+ [[products]]
41
+ name = "Hammer"
42
+ sku = 738594937
43
+
44
+ [[products]]
45
+
46
+ [[products]]
47
+ name = "Nail"
48
+ sku = 284758393
49
+ color = "gray"
@@ -162,7 +162,12 @@ class TomlRB::Examples
162
162
  'durable' => true,
163
163
  'auto_delete' => false
164
164
  }
165
- }
165
+ },
166
+ "products" => [
167
+ { "name" => "Hammer", "sku" => 738_594_937 },
168
+ {},
169
+ { "name" => "Nail", "sku" => 284_758_393, "color" => "gray" }
170
+ ]
166
171
  }
167
172
  end
168
173
 
@@ -75,7 +75,14 @@ class TomlTest < Minitest::Test
75
75
  durable: true,
76
76
  auto_delete: false
77
77
  }
78
- }
78
+ },
79
+
80
+ products: [
81
+ { name: "Hammer", sku: 738_594_937 },
82
+ {},
83
+ { name: "Nail", sku: 284_758_393, color: "gray" }
84
+ ]
85
+
79
86
  }
80
87
 
81
88
  assert_equal(hash, parsed)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'toml-rb'
3
- s.version = '1.0.0'
3
+ s.version = '1.1.0'
4
4
  s.date = Time.now.strftime('%Y-%m-%d')
5
5
  s.summary = 'Toml parser in ruby, for ruby.'
6
6
  s.description = 'A Toml parser using Citrus parsing library. '
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toml-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Mancuso
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-14 00:00:00.000000000 Z
12
+ date: 2017-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: citrus
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.5.1
89
+ rubygems_version: 2.6.12
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Toml parser in ruby, for ruby.