mysql_mirror 0.1.2 → 0.1.3
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/VERSION +1 -1
- data/lib/mysql_mirror.rb +8 -2
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.3
|
data/lib/mysql_mirror.rb
CHANGED
|
@@ -116,8 +116,14 @@ private
|
|
|
116
116
|
def remote_mysqldump
|
|
117
117
|
@tmp_file_name = "mysql_mirror_#{@start_time.to_i}.sql"
|
|
118
118
|
tables = get_tables.map(&:to_s).join(" ")
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
|
|
120
|
+
if self.where.blank?
|
|
121
|
+
where = ""
|
|
122
|
+
else
|
|
123
|
+
where_statement = self.where.values.first
|
|
124
|
+
where = "--where=\"#{where_statement}\""
|
|
125
|
+
end
|
|
126
|
+
|
|
121
127
|
config = "-u#{@source_config[:username]} -p'#{@source_config[:password]}' -h #{@source_config[:host]} #{@source_config[:database]}"
|
|
122
128
|
|
|
123
129
|
the_cmd = "#{mysqldump_command_prefix} #{where} #{config} #{tables} > #{@tmp_file_name}"
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
version: 0.1.
|
|
8
|
+
- 3
|
|
9
|
+
version: 0.1.3
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Peter Leonhardt
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-03-
|
|
18
|
+
date: 2010-03-31 00:00:00 -05:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies: []
|
|
21
21
|
|