insxsync 0.0.8 → 0.0.9
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_restore.rb +11 -3
- metadata +1 -1
data/lib/insxsync/version.rb
CHANGED
data/lib/sync_point_restore.rb
CHANGED
@@ -229,7 +229,7 @@ class SyncPointRestore < ErrorHandlingIface
|
|
229
229
|
dump = File.open(file, 'r')
|
230
230
|
db_name = nil
|
231
231
|
until db_name.not_nil?
|
232
|
-
line =
|
232
|
+
line = dump.readline
|
233
233
|
if line =~ /use\s*`([^']*?)`/i
|
234
234
|
db_name = line.scan(/use\s*`([^']*)`/i).flatten[0]
|
235
235
|
end
|
@@ -242,9 +242,17 @@ class SyncPointRestore < ErrorHandlingIface
|
|
242
242
|
end
|
243
243
|
end
|
244
244
|
end
|
245
|
-
|
245
|
+
|
246
|
+
dump = File.open(file, 'r')
|
247
|
+
db_name = nil
|
248
|
+
until db_name.not_nil?
|
249
|
+
line = dump.readline
|
250
|
+
if line =~ /use\s*`([^']*?)`/i
|
251
|
+
db_name = line.scan(/use\s*`([^']*)`/i).flatten[0]
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
246
255
|
`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."
|
248
256
|
`mysql -u #{$db_user} --password='#{$db_pass}' -b '#{db_name}' -e 'UPDATE ContactDetail set Email = 'test@my1outsourcing.com';' -h #{$db_host} -P#{$db_port}`
|
249
257
|
end
|
250
258
|
end
|