insxsync 0.0.7 → 0.0.8
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/insxsync/version.rb +1 -1
- data/lib/sync_point_collection.rb +1 -1
- data/lib/sync_point_restore.rb +4 -0
- metadata +1 -1
data/lib/insxsync/version.rb
CHANGED
@@ -83,7 +83,7 @@ class SyncPointCollection < ErrorHandlingIface
|
|
83
83
|
filename = File.join(dir, suffix)
|
84
84
|
FileUtils.mkdir_p(File.dirname(filename))
|
85
85
|
File.open(filename, 'w') do |file|
|
86
|
-
file.write(
|
86
|
+
file.write(obj.read)
|
87
87
|
end
|
88
88
|
end
|
89
89
|
# next unless obj.key =~ /(.*?)\.deflated/
|
data/lib/sync_point_restore.rb
CHANGED
@@ -220,6 +220,8 @@ class SyncPointRestore < ErrorHandlingIface
|
|
220
220
|
mysql = which("mysql")
|
221
221
|
raise if mysql.nil?
|
222
222
|
|
223
|
+
|
224
|
+
puts "Restoring data."
|
223
225
|
`#{mysql} -u #{$db_user} --password='#{$db_pass}' -h #{$db_host} -P#{$db_port} < #{file}`
|
224
226
|
if $?.exitstatus != 0
|
225
227
|
puts "Error: Unknown error importing #{file}."
|
@@ -240,7 +242,9 @@ class SyncPointRestore < ErrorHandlingIface
|
|
240
242
|
end
|
241
243
|
end
|
242
244
|
end
|
245
|
+
puts "Removing passwords."
|
243
246
|
`mysql -u #{$db_user} --password='#{$db_pass}' -b '#{db_name}' -e 'UPDATE \`User\` SET \`Password\` = '92a891f888e79d1c2e8b82663c0f37cc6d61466c508ec62b8132588afe354712b20bb75429aa20aa3ab7cfcc58836c734306b43efd368080a2250831bf7f363f';' -h #{$db_host} -P#{$db_port}`
|
247
|
+
puts "Removing emails."
|
244
248
|
`mysql -u #{$db_user} --password='#{$db_pass}' -b '#{db_name}' -e 'UPDATE ContactDetail set Email = 'test@my1outsourcing.com';' -h #{$db_host} -P#{$db_port}`
|
245
249
|
end
|
246
250
|
end
|