csv_to_products 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/core_ext/csv_row.rb +10 -0
- data/lib/csv_to_products.rb +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e285540ef01ff26252480802898ad88e594133a
|
4
|
+
data.tar.gz: b35ce20c31cd227dbaed7bc895e27db829d53332
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f9ff4f8d8dcad04aab68851f332a205508b38bb1b41e21cc03c3e057d1a4b677977f7e6a9851808ec3f6efb87315f39f6f00f53666729c08bd35a4e201e0bb1
|
7
|
+
data.tar.gz: 0613d038e20b055e0d25b621a067a6d3eb46a7eb2b8dc01b2d1215bc5a089b565d8267ee5380a093e8ffaf758b767b6c88555199e9bbb4be2c032298b3d72469
|
data/lib/csv_to_products.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'csv'
|
2
2
|
require 'fileutils'
|
3
3
|
require_relative 'pairs'
|
4
|
+
require_relative 'core_ext/csv_row'
|
4
5
|
|
5
6
|
module CSVToProducts
|
6
7
|
class << self
|
@@ -44,11 +45,11 @@ module CSVToProducts
|
|
44
45
|
end
|
45
46
|
|
46
47
|
def product_path
|
47
|
-
File.expand_path("#{
|
48
|
+
File.expand_path("#{sanitize(row['name'])}.md", folder)
|
48
49
|
end
|
49
50
|
|
50
|
-
def
|
51
|
-
s.to_s.gsub(
|
51
|
+
def sanitize(s)
|
52
|
+
s.to_s.gsub(/[ \/\\]/, '-').downcase
|
52
53
|
end
|
53
54
|
|
54
55
|
def is_number?(s)
|
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.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max White
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- LICENSE.txt
|
35
35
|
- README.md
|
36
36
|
- bin/csv_to_products
|
37
|
+
- lib/core_ext/csv_row.rb
|
37
38
|
- lib/csv_to_products.rb
|
38
39
|
- lib/pairs.rb
|
39
40
|
homepage: https://github.com/jekyll-store/csv_to_products
|
@@ -56,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
57
|
version: '0'
|
57
58
|
requirements: []
|
58
59
|
rubyforge_project:
|
59
|
-
rubygems_version: 2.
|
60
|
+
rubygems_version: 2.4.5
|
60
61
|
signing_key:
|
61
62
|
specification_version: 4
|
62
63
|
summary: Jekyll-Store cmdline tool to translate CSV file to products.
|