schema-model 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema/csv_parser.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f7554a43ea84d40fc6befa498bfa66bd3362c7673da1c5e9719926c6fecb6b
|
4
|
+
data.tar.gz: dbaa36dea474d468145a91996c1b817e3ce7fd23132cf4feeadb0ab80500566d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd488a8d9a99d9f33c20c5f1662a85b1a2eb869a9b2703125065fc7b84b9c92911b4d6b604534255c485a19926aab42aa4da3153a03de97c4b3aeceed655e922
|
7
|
+
data.tar.gz: 5cb585cae9631cae66e3f390b4e1d34e41e405c6d8481c814f032d53203b9437048bdc78946c7164ac55531e06d4231e7d638ca814642471e2d18096f9138fc2
|
data/lib/schema/csv_parser.rb
CHANGED
@@ -8,7 +8,7 @@ module Schema
|
|
8
8
|
def initialize(csv, schema_class, headers = nil)
|
9
9
|
@csv = csv
|
10
10
|
@schema_class = schema_class
|
11
|
-
@headers = headers || csv.shift
|
11
|
+
@headers = (headers || csv.shift).map(&:strip)
|
12
12
|
@mapped_headers = schema_class.map_headers_to_attributes(@headers)
|
13
13
|
end
|
14
14
|
|