simple-config 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a30b31e157076c6655917339477c6823c5d4b1d
4
- data.tar.gz: d48488ba801176c9bc289571dd6b2fa3b7eb91f4
3
+ metadata.gz: 06a6c0dbcc7748e68fe3257821892f6e15109048
4
+ data.tar.gz: ecbb45dd7cb791841ffdd5eb41a06cef0818ec7a
5
5
  SHA512:
6
- metadata.gz: 8ec92cf76e7d1a5b23d0369767466eddcb3dd4769951278e58dcb39f53559cea56d0834a5f7c01bbece9a2a38c01dcb09157cac4ac74caa71b5502c812f002bc
7
- data.tar.gz: 3cecc09558c5ecbe53070a3298a34530d59c00d4f314f3204c78de65a6afde67a6baaf0f6fe76b854fde492979fa1764e0dd23f1b1b45e181e5f5ed15998f204
6
+ metadata.gz: 37dea24bb068948e9994181257947929e57823760341c5f6a38b9c11526a4201676b9d84447c06727e50bee206c96d9a033581fb07becabcca3c244cdbd6e1db
7
+ data.tar.gz: ceaa421e08721992847a9d58f0389381992f7d057b0f6c88cf644ed82237b3e4445e233ea5fda3f3f77115810f098fb97583ad6ecc7ef768bfec34c4522d38f9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/simple-config.rb CHANGED
@@ -59,9 +59,11 @@ class SimpleConfig
59
59
  end
60
60
 
61
61
  end
62
-
63
- if a.count {|x| x.first == :description } > 1 then
64
- return a.map(&:last)
62
+
63
+ anonymous_items, remaining = a.partition {|x| x.first == :description }
64
+
65
+ if anonymous_items.any? then
66
+ return {items: anonymous_items.map(&:last)}.merge(Hash[remaining])
65
67
  else
66
68
  @to_h = Hash[a]
67
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file