assimilate 0.3.3 → 0.3.4
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.
- data/lib/assimilate.rb +2 -2
- data/lib/assimilate/command.rb +10 -4
- data/lib/assimilate/version.rb +1 -1
- metadata +3 -3
data/lib/assimilate.rb
CHANGED
@@ -22,7 +22,7 @@ module Assimilate
|
|
22
22
|
if opts[:commit]
|
23
23
|
batcher.commit
|
24
24
|
else
|
25
|
-
$stderr.puts "suppressing data commit"
|
25
|
+
$stderr.puts "(suppressing data commit)"
|
26
26
|
end
|
27
27
|
batcher.stats
|
28
28
|
# TODO explicit handling for Assimilate exceptions - when code is stable
|
@@ -42,7 +42,7 @@ module Assimilate
|
|
42
42
|
if opts[:commit]
|
43
43
|
extender.commit
|
44
44
|
else
|
45
|
-
$stderr.puts "suppressing data commit"
|
45
|
+
$stderr.puts "(suppressing data commit)"
|
46
46
|
|
47
47
|
if ENV['ASSIM_VERBOSE']
|
48
48
|
$stderr.puts "UPDATES:"
|
data/lib/assimilate/command.rb
CHANGED
@@ -73,9 +73,15 @@ class Assimilate::Command
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
def idsummary(ids)
|
77
|
+
if ids.any?
|
78
|
+
"(#{ids.take(10).join(',')})"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
76
82
|
def logmessage(command, options, results)
|
77
83
|
$stderr.puts <<-EOT
|
78
|
-
|
84
|
+
assimilate #{command} for #{options[:domain]} using #{options[:idfield]}
|
79
85
|
EOT
|
80
86
|
|
81
87
|
case command
|
@@ -84,9 +90,9 @@ EOT
|
|
84
90
|
Original record count: #{results[:baseline_count]}
|
85
91
|
Final record count: #{results[:final_count]}
|
86
92
|
Unchanged records: #{results[:unchanged_count]}
|
87
|
-
New records: #{results[:adds_count]}
|
88
|
-
Deletes: #{results[:deletes_count]}
|
89
|
-
Updates: #{results[:updates_count]}
|
93
|
+
New records: #{results[:adds_count]} #{idsummary(results[:new_ids])}
|
94
|
+
Deletes: #{results[:deletes_count]} #{idsummary(results[:deleted_ids])}
|
95
|
+
Updates: #{results[:updates_count]} #{idsummary(results[:updated_ids])}
|
90
96
|
EOT
|
91
97
|
if results[:updated_fields].any?
|
92
98
|
$stderr.puts <<-EOT
|
data/lib/assimilate/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assimilate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongo
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
segments:
|
180
180
|
- 0
|
181
|
-
hash:
|
181
|
+
hash: 1943096819041455805
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project: assimilate
|
184
184
|
rubygems_version: 1.8.24
|