insxsync 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module InsxSync
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -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 = file.readline
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
- puts "Removing passwords."
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insxsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: