dbmanager 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.1.7
2
+
3
+ * merge pull request from Racko (add quotes to file names)
4
+
1
5
  ## v0.1.6
2
6
 
3
7
  * close issue #5 (should not require 'dbmanager.rb' in the rake file)
@@ -28,7 +28,7 @@ module Dbmanager
28
28
  end
29
29
 
30
30
  def dump_command
31
- "mysqldump #{ignoretables} #{params(source)} > #{filename}"
31
+ "mysqldump #{ignoretables} #{params(source)} > '#{filename}'"
32
32
  end
33
33
 
34
34
  def ignoretables
@@ -59,11 +59,11 @@ module Dbmanager
59
59
  end
60
60
 
61
61
  def import_command
62
- "mysql #{params(target)} < #{tmp_file}"
62
+ "mysql #{params(target)} < '#{tmp_file}'"
63
63
  end
64
64
 
65
65
  def remove_tmp_file
66
- Dbmanager.execute "rm #{tmp_file}"
66
+ Dbmanager.execute "rm '#{tmp_file}'"
67
67
  end
68
68
 
69
69
  def create_db_if_missing_command
@@ -1,3 +1,3 @@
1
1
  module Dbmanager
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
@@ -38,7 +38,7 @@ module Dbmanager
38
38
  command = [
39
39
  'mysqldump --ignore-table=database.a_view',
40
40
  '--ignore-table=database.another_view -uroot',
41
- '-psecret -h0.0.0.0 -P42 database > /tmp/dump_file.sql'
41
+ '-psecret -h0.0.0.0 -P42 database > \'/tmp/dump_file.sql\''
42
42
  ].join(' ')
43
43
  subject.dump_command.should == command
44
44
  end
@@ -59,7 +59,7 @@ module Dbmanager
59
59
 
60
60
  describe '#import_command' do
61
61
  it 'returns expected command' do
62
- subject.import_command.should == 'mysql -ubeta_user < /some/arbitrary/path'
62
+ subject.import_command.should == 'mysql -ubeta_user < \'/some/arbitrary/path\''
63
63
  end
64
64
  end
65
65
 
@@ -71,7 +71,7 @@ module Dbmanager
71
71
 
72
72
  describe '#remove_tmp_file' do
73
73
  it 'tries to remove the temporary file' do
74
- Dbmanager.should_receive(:execute).with('rm /some/arbitrary/path')
74
+ Dbmanager.should_receive(:execute).with('rm \'/some/arbitrary/path\'')
75
75
  subject.remove_tmp_file
76
76
  end
77
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbmanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-22 00:00:00.000000000 Z
12
+ date: 2012-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -218,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  segments:
220
220
  - 0
221
- hash: 200730802332040638
221
+ hash: 1798185120944994185
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  none: false
224
224
  requirements:
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  version: '0'
228
228
  segments:
229
229
  - 0
230
- hash: 200730802332040638
230
+ hash: 1798185120944994185
231
231
  requirements: []
232
232
  rubyforge_project: dbmanager
233
233
  rubygems_version: 1.8.24