sheet_reader_writer 1.0.0 → 1.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sheet_reader_writer/version.rb +1 -1
- data/lib/sheet_reader_writer.rb +11 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3916dd45737c7c31f3aa124103d9afd8252121a6
|
4
|
+
data.tar.gz: 2d781e26392a43092a5a75b112d177cbd9eda737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c658da5c3c267241018860f0b9a79c27cfbd38651a2051cc4de24ad05432f7399c20c606c8fabb9e06a74fbba16ab0279c081480b461274590a50d6e5b18c988
|
7
|
+
data.tar.gz: 6984c20a0ac8ee39488b2c2f1ba418ab706b133ce444a24fba833813f2dba849db43b9b41c33ee21fd3f22a03db044d09e303835829e1d5330f0178364cac73d
|
data/lib/sheet_reader_writer.rb
CHANGED
@@ -91,7 +91,18 @@ class SheetReaderWriter
|
|
91
91
|
|
92
92
|
private
|
93
93
|
|
94
|
+
def stringify_keys(hash)
|
95
|
+
hash.reduce({}) do |hash, (k,v)|
|
96
|
+
hash[k.to_s] = v
|
97
|
+
hash
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
94
101
|
def to_values_array(row_hashes)
|
102
|
+
row_hashes = row_hashes.map do |row_hash|
|
103
|
+
stringify_keys(row_hash)
|
104
|
+
end
|
105
|
+
|
95
106
|
keys = row_hashes.map do |row_hash|
|
96
107
|
row_hash.keys
|
97
108
|
end.flatten.uniq.sort
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sheet_reader_writer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clearbit
|
@@ -62,9 +62,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - ">"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 1.3.1
|
68
68
|
requirements: []
|
69
69
|
rubyforge_project:
|
70
70
|
rubygems_version: 2.2.5
|