whiskey_disk 0.6.13 → 0.6.14

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 0.6.14 / 2011-02-23
3
+ ==================
4
+
5
+ * forcing bash as the execution shell
6
+
2
7
  0.6.13 / 2011-02-20
3
8
  ==================
4
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.13
1
+ 0.6.14
data/lib/whiskey_disk.rb CHANGED
@@ -133,11 +133,11 @@ class WhiskeyDisk
133
133
  end
134
134
 
135
135
  def run(domain, cmd)
136
- system('ssh', '-v', domain[:name], build_command(domain, cmd))
136
+ system('ssh', '-v', domain[:name], 'bash', '-c', build_command(domain, cmd))
137
137
  end
138
138
 
139
139
  def shell(domain, cmd)
140
- system(build_command(domain, cmd))
140
+ system('bash', '-c', build_command(domain, cmd))
141
141
  end
142
142
 
143
143
  def flush
@@ -215,7 +215,7 @@ class WhiskeyDisk
215
215
 
216
216
  def run_script(script)
217
217
  return unless script
218
- enqueue(%Q<cd #{self[:deploy_to]}; echo "Running post script..."; #{env_vars} sh -x #{build_path(script)}>)
218
+ enqueue(%Q<cd #{self[:deploy_to]}; echo "Running post script..."; #{env_vars} bash -x #{build_path(script)}>)
219
219
  end
220
220
 
221
221
  def ensure_main_parent_path_is_present
@@ -384,22 +384,22 @@ describe 'WhiskeyDisk' do
384
384
 
385
385
  it 'should attempt to run the post setup script' do
386
386
  WhiskeyDisk.run_post_setup_hooks
387
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x .*/path/to/setup/script})
387
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x .*/path/to/setup/script})
388
388
  end
389
389
 
390
390
  it 'should pass any environment variables when running the post setup script' do
391
391
  WhiskeyDisk.run_post_setup_hooks
392
- WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' sh -x .*/path/to/setup/script})
392
+ WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' bash -x .*/path/to/setup/script})
393
393
  end
394
394
 
395
395
  it 'should cd to the deploy_to path prior to running the script' do
396
396
  WhiskeyDisk.run_post_setup_hooks
397
- WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*sh -x /path/to/setup/script})
397
+ WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*bash -x /path/to/setup/script})
398
398
  end
399
399
 
400
400
  it 'should use an absolute path to run the post setup script when the script path starts with a "/"' do
401
401
  WhiskeyDisk.run_post_setup_hooks
402
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x /path/to/setup/script})
402
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x /path/to/setup/script})
403
403
  end
404
404
  end
405
405
 
@@ -410,22 +410,22 @@ describe 'WhiskeyDisk' do
410
410
 
411
411
  it 'should attempt to run the post setup script' do
412
412
  WhiskeyDisk.run_post_setup_hooks
413
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x .*/path/to/setup/script})
413
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x .*/path/to/setup/script})
414
414
  end
415
415
 
416
416
  it 'should pass any environment variables when running the post setup script' do
417
417
  WhiskeyDisk.run_post_setup_hooks
418
- WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' sh -x .*/path/to/setup/script})
418
+ WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' bash -x .*/path/to/setup/script})
419
419
  end
420
420
 
421
421
  it 'should cd to the deploy_to path prior to running the script' do
422
422
  WhiskeyDisk.run_post_setup_hooks
423
- WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*sh -x /path/to/main/repo/path/to/setup/script})
423
+ WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*bash -x /path/to/main/repo/path/to/setup/script})
424
424
  end
425
425
 
426
426
  it 'should use a path relative to the setup path to run the post setup script' do
427
427
  WhiskeyDisk.run_post_setup_hooks
428
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x /path/to/main/repo/path/to/setup/script})
428
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x /path/to/main/repo/path/to/setup/script})
429
429
  end
430
430
  end
431
431
  end
@@ -492,22 +492,22 @@ describe 'WhiskeyDisk' do
492
492
 
493
493
  it 'should attempt to run the post deployment script' do
494
494
  WhiskeyDisk.run_post_deploy_hooks
495
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x .*/path/to/deployment/script})
495
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x .*/path/to/deployment/script})
496
496
  end
497
497
 
498
498
  it 'should pass any environment variables when running the post deploy script' do
499
499
  WhiskeyDisk.run_post_deploy_hooks
500
- WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' sh -x .*/path/to/deployment/script})
500
+ WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' bash -x .*/path/to/deployment/script})
501
501
  end
502
502
 
503
503
  it 'should cd to the deploy_to path prior to running the script' do
504
504
  WhiskeyDisk.run_post_deploy_hooks
505
- WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*sh -x /path/to/deployment/script})
505
+ WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*bash -x /path/to/deployment/script})
506
506
  end
507
507
 
508
508
  it 'should use an absolute path to run the post deployment script when the script path starts with a "/"' do
509
509
  WhiskeyDisk.run_post_deploy_hooks
510
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x /path/to/deployment/script})
510
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x /path/to/deployment/script})
511
511
  end
512
512
  end
513
513
 
@@ -518,22 +518,22 @@ describe 'WhiskeyDisk' do
518
518
 
519
519
  it 'should attempt to run the post deployment script' do
520
520
  WhiskeyDisk.run_post_deploy_hooks
521
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x .*/path/to/deployment/script})
521
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x .*/path/to/deployment/script})
522
522
  end
523
523
 
524
524
  it 'should pass any environment variables when running the post deploy script' do
525
525
  WhiskeyDisk.run_post_deploy_hooks
526
- WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' sh -x .*/path/to/deployment/script})
526
+ WhiskeyDisk.buffer.join(' ').should.match(%r{FOO='BAR' bash -x .*/path/to/deployment/script})
527
527
  end
528
528
 
529
529
  it 'should cd to the deploy_to path prior to running the script' do
530
530
  WhiskeyDisk.run_post_deploy_hooks
531
- WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*sh -x /path/to/main/repo/path/to/deployment/script})
531
+ WhiskeyDisk.buffer.join(' ').should.match(%r{cd /path/to/main/repo;.*bash -x /path/to/main/repo/path/to/deployment/script})
532
532
  end
533
533
 
534
534
  it 'should use a path relative to the deployment path to run the post deployment script' do
535
535
  WhiskeyDisk.run_post_deploy_hooks
536
- WhiskeyDisk.buffer.join(' ').should.match(%r{sh -x /path/to/main/repo/path/to/deployment/script})
536
+ WhiskeyDisk.buffer.join(' ').should.match(%r{bash -x /path/to/main/repo/path/to/deployment/script})
537
537
  end
538
538
  end
539
539
  end
@@ -868,14 +868,14 @@ describe 'WhiskeyDisk' do
868
868
  end
869
869
 
870
870
  it 'should pass the string to the shell with verbosity enabled' do
871
- WhiskeyDisk.should.receive(:system).with("set -x; ls")
871
+ WhiskeyDisk.should.receive(:system).with('bash', '-c', "set -x; ls")
872
872
  WhiskeyDisk.shell(@domain, 'ls')
873
873
  end
874
874
 
875
875
  it 'should include domain role settings when the domain has roles' do
876
876
  @domain = { :name => @domain_name, :roles => [ 'web', 'db' ] }
877
877
  WhiskeyDisk.configuration = { 'domain' => [ @domain ] }
878
- WhiskeyDisk.should.receive(:system).with("set -x; export WD_ROLES='web:db'; ls")
878
+ WhiskeyDisk.should.receive(:system).with('bash', '-c', "set -x; export WD_ROLES='web:db'; ls")
879
879
  WhiskeyDisk.shell(@domain, 'ls')
880
880
  end
881
881
  end
@@ -898,14 +898,14 @@ describe 'WhiskeyDisk' do
898
898
  end
899
899
 
900
900
  it 'should pass the string to ssh for the domain, with verbosity enabled' do
901
- WhiskeyDisk.should.receive(:system).with('ssh', '-v', @domain_name, "set -x; ls")
901
+ WhiskeyDisk.should.receive(:system).with('ssh', '-v', @domain_name, 'bash', '-c', "set -x; ls")
902
902
  WhiskeyDisk.run(@domain, 'ls')
903
903
  end
904
904
 
905
905
  it 'should include domain role settings when the domain has roles' do
906
906
  @domain = { :name => @domain_name, :roles => [ 'web', 'db' ] }
907
907
  WhiskeyDisk.configuration = { 'domain' => [ @domain ] }
908
- WhiskeyDisk.should.receive(:system).with('ssh', '-v', @domain_name, "set -x; export WD_ROLES='web:db'; ls")
908
+ WhiskeyDisk.should.receive(:system).with('ssh', '-v', @domain_name, 'bash', '-c', "set -x; export WD_ROLES='web:db'; ls")
909
909
  WhiskeyDisk.run(@domain, 'ls')
910
910
  end
911
911
  end
data/whiskey_disk.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{whiskey_disk}
8
- s.version = "0.6.13"
8
+ s.version = "0.6.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rick Bradley"]
12
- s.date = %q{2011-02-20}
12
+ s.date = %q{2011-02-23}
13
13
  s.description = %q{Opinionated gem for doing fast git-based server deployments.}
14
14
  s.email = %q{rick@rickbradley.com}
15
15
  s.executables = ["wd_role", "wd"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiskey_disk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 13
10
- version: 0.6.13
9
+ - 14
10
+ version: 0.6.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rick Bradley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-20 00:00:00 -06:00
18
+ date: 2011-02-23 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency