abstract_importer 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48e21131bf98cff4d6e2c9bd6d26d1250081f23a
|
4
|
+
data.tar.gz: 1f213fef44ac6fa850a87405118807708071dadc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df926ba45f927f96b45f70acbd156244a32db2bb91052befbaba386ff3f624b019ade75d01eb65698aa305ab7dd675b1888a2528bae7afe8d70e9b37c095ed84
|
7
|
+
data.tar.gz: e48bf3593a2a36dcde98084ea43c574f41707a2e458e373feed19a8be97383428668c6b70c87e75b608ad8b9d21cfc97342f332d0c8d2b5d16fee61edd626869
|
@@ -206,7 +206,14 @@ module AbstractImporter
|
|
206
206
|
case ENV["IMPORT_REPORTER"].to_s.downcase
|
207
207
|
when "none" then Reporters::NullReporter.new(io)
|
208
208
|
when "performance" then Reporters::PerformanceReporter.new(io)
|
209
|
-
|
209
|
+
when "debug" then Reporters::DebugReporter.new(io)
|
210
|
+
when "dot" then Reporters::DotReporter.new(io)
|
211
|
+
else
|
212
|
+
if Rails.env.production?
|
213
|
+
Reporters::DebugReporter.new(io)
|
214
|
+
else
|
215
|
+
Reporters::DotReporter.new(io)
|
216
|
+
end
|
210
217
|
end
|
211
218
|
end
|
212
219
|
|
@@ -49,13 +49,7 @@ module AbstractImporter
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
def record_created(record)
|
53
|
-
io.print "." unless production?
|
54
|
-
end
|
55
|
-
|
56
52
|
def record_failed(record, hash)
|
57
|
-
io.print "×" unless production?
|
58
|
-
|
59
53
|
error_messages = invalid_params[record.class.name] ||= {}
|
60
54
|
record.errors.full_messages.each do |error_message|
|
61
55
|
error_messages[error_message] = hash unless error_messages.key?(error_message)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'abstract_importer/reporters/base_reporter'
|
2
2
|
require 'abstract_importer/reporters/debug_reporter'
|
3
|
+
require 'abstract_importer/reporters/dot_reporter'
|
3
4
|
require 'abstract_importer/reporters/null_reporter'
|
4
5
|
require 'abstract_importer/reporters/performance_reporter'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abstract_importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- lib/abstract_importer/reporters.rb
|
218
218
|
- lib/abstract_importer/reporters/base_reporter.rb
|
219
219
|
- lib/abstract_importer/reporters/debug_reporter.rb
|
220
|
+
- lib/abstract_importer/reporters/dot_reporter.rb
|
220
221
|
- lib/abstract_importer/reporters/null_reporter.rb
|
221
222
|
- lib/abstract_importer/reporters/performance_reporter.rb
|
222
223
|
- lib/abstract_importer/strategies.rb
|