data_miner 0.4.12 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.12
1
+ 0.4.13
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{data_miner}
8
- s.version = "0.4.12"
8
+ s.version = "0.4.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Seamus Abshere", "Andy Rossmeissl"]
@@ -43,13 +43,23 @@ module DataMiner
43
43
 
44
44
  increment_counter = resource.column_names.include?('data_miner_touch_count')
45
45
  log_run = resource.column_names.include?('data_miner_last_run_id')
46
-
46
+ test_counter = 0
47
+
47
48
  table.each_row do |row|
48
49
  if errata
49
50
  next if errata.rejects?(row)
50
51
  errata.correct!(row)
51
52
  end
52
53
 
54
+ if ENV['DUMP'] == 'true'
55
+ raise "[data_miner gem] Stopping after 5 rows because TEST=true" if test_counter > 5
56
+ test_counter += 1
57
+ DataMiner.log_info %{Row #{test_counter}
58
+ IN: #{row.inspect}
59
+ OUT: #{attributes.inject(Hash.new) { |memo, v| attr_name, attr = v; memo[attr_name] = attr.value_from_row(row); memo }.inspect}
60
+ }
61
+ end
62
+
53
63
  record = resource.send "find_or_initialize_by_#{@key}", attributes[@key].value_from_row(row)
54
64
  changes = attributes.map { |_, attr| attr.set_record_from_row record, row }
55
65
  if changes.any?
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 12
9
- version: 0.4.12
8
+ - 13
9
+ version: 0.4.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Seamus Abshere