dump 1.0.1 → 1.0.2

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'dump'
5
- s.version = '1.0.1'
5
+ s.version = '1.0.2'
6
6
  s.summary = %q{Rails app rake and capistrano tasks to create and restore dumps of database and assets}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
@@ -30,9 +30,9 @@ Capistrano::Configuration.instance(:i_need_this!).load do
30
30
 
31
31
  env.update(DumpRake::Env.for_command(command, true))
32
32
 
33
- cmd = %W[#{rake} -s dump:#{command}]
33
+ cmd = %W[-s dump:#{command}]
34
34
  cmd += env.sort.map{ |key, value| "#{key}=#{value}" }
35
- cmd.shelljoin
35
+ "#{rake} #{cmd.shelljoin}"
36
36
  end
37
37
 
38
38
  def fetch_rails_env
@@ -34,6 +34,17 @@ describe "cap dump" do
34
34
  end
35
35
  end
36
36
 
37
+ describe :dump_command do
38
+
39
+ it "should return escaped string" do
40
+ @cap.dump.dump_command(:hello, :rake => 'rake', 'x x' => 'a b').should == 'rake -s dump:hello x\\ x\\=a\\ b'
41
+ end
42
+
43
+ it "should return escaped string for complex rake invocation command" do
44
+ @cap.dump.dump_command(:hello, :rake => 'bundler exec rake', 'x x' => 'a b').should == 'bundler exec rake -s dump:hello x\\ x\\=a\\ b'
45
+ end
46
+ end
47
+
37
48
  describe "do_transfer" do
38
49
  before do
39
50
  @cap.dump.stub!(:do_transfer_via)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dump
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ivan Kuchin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-07-28 00:00:00 Z
18
+ date: 2012-09-22 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: archive-tar-minitar