csv_to_products 0.0.2 → 0.1.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/pairs.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e285540ef01ff26252480802898ad88e594133a
4
- data.tar.gz: b35ce20c31cd227dbaed7bc895e27db829d53332
3
+ metadata.gz: 95dad4230323887da49e39e4fa9591471889cd30
4
+ data.tar.gz: 6a469d60252efdf1c62d65b5d249c6b41fdfee10
5
5
  SHA512:
6
- metadata.gz: 8f9ff4f8d8dcad04aab68851f332a205508b38bb1b41e21cc03c3e057d1a4b677977f7e6a9851808ec3f6efb87315f39f6f00f53666729c08bd35a4e201e0bb1
7
- data.tar.gz: 0613d038e20b055e0d25b621a067a6d3eb46a7eb2b8dc01b2d1215bc5a089b565d8267ee5380a093e8ffaf758b767b6c88555199e9bbb4be2c032298b3d72469
6
+ metadata.gz: 901672ef4b305747ff01611ad444b92ce7b7dd801697a6545b88a29eeb0153cdcfe7ca3ff1bec254b9a744021c1a95bdd4162ee4848ff064fdd9637bfbdb8416
7
+ data.tar.gz: 55bda5f0a5d0e96fc74352dcd93b4ed0d9291655b2ddd5dda29be50b20256909ab4895fc5cd9e89974b31098e5a9cdc9ff4dfe13cd34b6f0f2a7f6c5f9d27338
data/README.md CHANGED
@@ -22,9 +22,9 @@ If the arguments are missing, it will try to parse `products.csv` into the `_pro
22
22
 
23
23
  Each product must have a unique name and a numeric price.
24
24
 
25
- ## Collection
25
+ ## Array
26
26
 
27
- Any field name of the form `collection[Member]` with be treated as a collection. For example a csv with fields like this,
27
+ Any field name of the form `array[Member]` with be treated as a array. For example a csv with fields like this,
28
28
 
29
29
  | available_sizes[Small] | available_sizes[Medium] | available_sizes[Large] |
30
30
  | ---------------------- | ----------------------- | ---------------------- |
@@ -33,7 +33,7 @@ Any field name of the form `collection[Member]` with be treated as a collection.
33
33
  Will be collected into the front matter as:
34
34
 
35
35
  ```yaml
36
- available_sizes: Small Large
36
+ available_sizes: [Small, Large]
37
37
  ```
38
38
 
39
39
  All values will be treated as false, except for: `y`, `Y`, `1`, `true`, `yes`, and `Yes`.
data/lib/pairs.rb CHANGED
@@ -30,7 +30,7 @@ module Pairs
30
30
 
31
31
  def pretty_pairs
32
32
  pairs.map do |k, v|
33
- v = v.join(' ') if v.is_a?(Array)
33
+ v = "[#{v.join(', ')}]" if v.is_a?(Array)
34
34
  "#{k}: #{v}\n"
35
35
  end.join
36
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_to_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max White