easy_sheet_io 0.3.9 → 0.4.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.
- checksums.yaml +4 -4
- data/lib/easy_sheet_io/version.rb +1 -1
- data/lib/easy_sheet_io.rb +2 -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: 6a90d815666a67c59552eea1992bead1ba2ae6303db79e3f833a543eebc57963
|
4
|
+
data.tar.gz: b817dcb25b5042d76d269f2da8bf86ec1653d5b10f7ee7461b08ae4935b008b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d22d32dc15813a3dd040e8a9f863336d412aa59c8b650c87d71e2e77f77517bc3199a1cdad793f641943c4d67be3e8e494825bc2835066276ca181326a295ca0
|
7
|
+
data.tar.gz: 8606cb6bcbe63cb7c7407e752003bf594689c405756975e867df63764ecb58eb0547320d503e7c414385462230d7c396f52c0c3352d0a3c287c6227593b5c0c2
|
data/lib/easy_sheet_io.rb
CHANGED
@@ -28,6 +28,7 @@ module EasySheetIo
|
|
28
28
|
# Try Another Encoding
|
29
29
|
puts "Fail Encoding #{encoding}. Trying cp932..."
|
30
30
|
csv = CSV.parse(File.open(path, encoding: "cp932", &:read), col_sep: col_sep)
|
31
|
+
encoding = "cp932"
|
31
32
|
end
|
32
33
|
|
33
34
|
if format.to_s == "array"
|
@@ -36,7 +37,7 @@ module EasySheetIo
|
|
36
37
|
return to_hash(csv, **opt)
|
37
38
|
else # include format.nil?
|
38
39
|
ans = to_df(to_hash(csv, **opt), format: format)
|
39
|
-
ans.convert_enc!(from: encoding, to: "utf-8") if encoding != "utf-8"
|
40
|
+
ans.convert_enc!(from: encoding, to: "utf-8") # if encoding != "utf-8"
|
40
41
|
return ans
|
41
42
|
end
|
42
43
|
end
|