datanorm 1.0.6 → 1.0.7
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 065ea784071baba768257ab08781410cf92791d66c67671868a461266bc97982
|
|
4
|
+
data.tar.gz: cac6e4d71a506b11c57dc6495b8c7bf03fa626d528915dac0f53bbbd9f03185a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a192ff308125a6259f38d1b649dc0166546b2da4ab028e4a12055051ae94ae085b446f412962bd366e7b42a75b248c66573973146a0171dba32c15851e990cf
|
|
7
|
+
data.tar.gz: 98075448fb648b86977353d9595f1ae6dcc3cfaa2aefd5719ac5a0daab90f6af17e0f129afe7bd582b84e70e8b27f56e74801ad4b8ec575453ab840753d8f970
|
|
@@ -13,7 +13,7 @@ module Datanorm
|
|
|
13
13
|
def call
|
|
14
14
|
return unless products_file.file?
|
|
15
15
|
|
|
16
|
-
::File.foreach(products_file) do |json|
|
|
16
|
+
::File.foreach(products_file, encoding: Encoding::UTF_8) do |json|
|
|
17
17
|
progress.increment!
|
|
18
18
|
|
|
19
19
|
if yield_progress
|
|
@@ -34,7 +34,7 @@ module Datanorm
|
|
|
34
34
|
return @products_count if defined?(@products_count)
|
|
35
35
|
|
|
36
36
|
@products_count = 0
|
|
37
|
-
::File.foreach(products_file) { @products_count += 1 }
|
|
37
|
+
::File.foreach(products_file, encoding: Encoding::UTF_8) { @products_count += 1 }
|
|
38
38
|
@products_count
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -31,14 +31,14 @@ module Datanorm
|
|
|
31
31
|
|
|
32
32
|
def read_file!
|
|
33
33
|
if split_newlines
|
|
34
|
-
path.read.split("\n")
|
|
34
|
+
path.read(encoding: Encoding::UTF_8).split("\n")
|
|
35
35
|
else
|
|
36
|
-
path.read
|
|
36
|
+
path.read(encoding: Encoding::UTF_8)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def read_json!
|
|
41
|
-
JSON.parse(path.read, symbolize_names: true)
|
|
41
|
+
JSON.parse(path.read(encoding: Encoding::UTF_8), symbolize_names: true)
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -31,7 +31,7 @@ module Datanorm
|
|
|
31
31
|
|
|
32
32
|
def do_read_currently_cached_lines
|
|
33
33
|
if filepath.exist?
|
|
34
|
-
@lines = filepath.readlines(chomp: true)
|
|
34
|
+
@lines = filepath.readlines(chomp: true, encoding: Encoding::UTF_8)
|
|
35
35
|
Tron.success(:loaded_current_file_content)
|
|
36
36
|
else
|
|
37
37
|
@lines = []
|