insxsync 0.0.7 → 0.0.8

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.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -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(data)
86
+ file.write(obj.read)
87
87
  end
88
88
  end
89
89
  # next unless obj.key =~ /(.*?)\.deflated/
@@ -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
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.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: