data_seeder 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/app/models/data_seeder/seed_file.rb +1 -1
- data/lib/data_seeder/version.rb +1 -1
- data/test/dummy/log/test.log +3659 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 999dc4a6f140a6f98ec1607e249e09714f832195
|
4
|
+
data.tar.gz: c6fd34c9f01d87c32c8d9da633fc0a4b90b4b7de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cf23450ba99b756200600a934b97b31ab5ab2ed61e81a29e08af23e009df5036187c845b313a01b4f0f475dde0926b9c89d2c18ec764758b04669db72296f64
|
7
|
+
data.tar.gz: d12636d3d7c86ad536232ec8c74593c195c09dc8a9d23ba35074abd3e5a55dcaaa69028a119f0cf845ee6e748328264cca1320b1c9354dce2922a363ac88e520
|
data/README.md
CHANGED
@@ -174,6 +174,10 @@ Defines the ActiveRecord Class if it can't be inferred from the seed file.
|
|
174
174
|
|
175
175
|
Proc used for converting a line to attributes.
|
176
176
|
|
177
|
+
#### open_options
|
178
|
+
|
179
|
+
Options passed to File.open to allow encoding values, etc. (ex: open_options: {encoding: 'ISO-8859-1:UTF-8'})
|
180
|
+
|
177
181
|
#### postprocess
|
178
182
|
|
179
183
|
Modify the attributes from the seed file before applying them to the model.
|
@@ -61,7 +61,7 @@ module DataSeeder
|
|
61
61
|
return false if depends && !self.class.processed?(depends)
|
62
62
|
DataSeeder.config.logger.info { "Loading #{path}" }
|
63
63
|
DataSeeder.config.log_indent do
|
64
|
-
File.open(path, 'r') do |io|
|
64
|
+
File.open(path, 'r', config[:open_options]) do |io|
|
65
65
|
loader.process(io)
|
66
66
|
end
|
67
67
|
self.sha256 = new_sha256
|
data/lib/data_seeder/version.rb
CHANGED