chef_cap 0.3.16 → 0.3.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module ChefCap
2
- VERSION = "0.3.16"
2
+ VERSION = "0.3.17"
3
3
  end
data/recipes/chef_cap.rb CHANGED
@@ -166,7 +166,7 @@ namespace :chef do
166
166
  case ruby_version_switcher
167
167
  when 'rbenv'
168
168
  gem_check_for_chef_cmd = "gem specification --version '>=#{chef_version}' chef 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }'"
169
- install_chef_cmd = "gem install chef --no-ri --no-rdoc"
169
+ install_chef_cmd = "gem install chef --no-ri --no-rdoc --version=#{chef_version}"
170
170
  run "#{gem_check_for_chef_cmd} || #{install_chef_cmd} && echo 'Chef Solo already on this server.'"
171
171
 
172
172
  gem_check_for_bundler_cmd = "gem specification --version '>0' bundler 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }'"
@@ -175,7 +175,7 @@ namespace :chef do
175
175
  run "rbenv rehash"
176
176
  else
177
177
  gem_check_for_chef_cmd = "gem specification --version '>=#{chef_version}' chef 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }'"
178
- install_chef_cmd = "sudo `cat #{rvm_bin_path}` default exec gem install chef --no-ri --no-rdoc"
178
+ install_chef_cmd = "sudo `cat #{rvm_bin_path}` default exec gem install chef --no-ri --no-rdoc --version=#{chef_version}"
179
179
  sudo "`cat #{rvm_bin_path}` default exec #{gem_check_for_chef_cmd} || #{install_chef_cmd} && echo 'Chef Solo already on this server.'"
180
180
 
181
181
  gem_check_for_bundler_cmd = "gem specification --version '>0' bundler 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }'"
@@ -509,7 +509,7 @@ describe "chef_cap" do
509
509
  context "using rvm" do
510
510
  it "sets up chef gem" do
511
511
  chef_cap.cap_servers.should_not be_empty
512
- chef_cap.should_receive(:sudo).ordered.with("`cat /tmp/.chef_cap_rvm_path` default exec gem specification --version '>=0.1982.1234' chef 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }' || sudo `cat /tmp/.chef_cap_rvm_path` default exec gem install chef --no-ri --no-rdoc && echo 'Chef Solo already on this server.'").and_return("mocked")
512
+ chef_cap.should_receive(:sudo).ordered.with("`cat /tmp/.chef_cap_rvm_path` default exec gem specification --version '>=0.1982.1234' chef 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }' || sudo `cat /tmp/.chef_cap_rvm_path` default exec gem install chef --no-ri --no-rdoc --version=0.1982.1234 && echo 'Chef Solo already on this server.'").and_return("mocked")
513
513
  chef_cap.should_receive(:sudo).ordered.with("`cat /tmp/.chef_cap_rvm_path` default exec gem specification --version '>0' bundler 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }' || sudo `cat /tmp/.chef_cap_rvm_path` default exec gem install bundler --no-ri --no-rdoc && echo 'Bundler already on this server.'").and_return("mocked")
514
514
  chef_cap.should_receive(:sudo).ordered.with("`cat /tmp/.chef_cap_rvm_path` default exec which chef-solo").and_return("mocked")
515
515
 
@@ -561,7 +561,7 @@ describe "chef_cap" do
561
561
  it "sets up chef gem" do
562
562
  chef_cap.cap_servers.should_not be_empty
563
563
  chef_cap.stub!(:put => "stubbed")
564
- chef_cap.should_receive(:run).ordered.with("gem specification --version '>=0.1982.1234' chef 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }' || gem install chef --no-ri --no-rdoc && echo 'Chef Solo already on this server.'").and_return("mocked")
564
+ chef_cap.should_receive(:run).ordered.with("gem specification --version '>=0.1982.1234' chef 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }' || gem install chef --no-ri --no-rdoc --version=0.1982.1234 && echo 'Chef Solo already on this server.'").and_return("mocked")
565
565
  chef_cap.should_receive(:run).ordered.with("gem specification --version '>0' bundler 2>&1 | awk 'BEGIN { s = 0 } /^name:/ { s = 1; exit }; END { if(s == 0) exit 1 }' || gem install bundler --no-ri --no-rdoc && echo 'Bundler already on this server.'").and_return("mocked")
566
566
  chef_cap.should_receive(:run).ordered.with("rbenv rehash").and_return("mocked")
567
567
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef_cap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16
4
+ version: 0.3.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-20 00:00:00.000000000 Z
12
+ date: 2012-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &70132830939720 !ruby/object:Gem::Requirement
16
+ requirement: &70336577638480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.5.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70132830939720
24
+ version_requirements: *70336577638480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec-rails
27
- requirement: &70132830939220 !ruby/object:Gem::Requirement
27
+ requirement: &70336577637980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.1'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70132830939220
35
+ version_requirements: *70336577637980
36
36
  description: chef_cap uses chef"s JSON config format to drive both capistrano and
37
37
  chef-solo"
38
38
  email:
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: 2384103699850789343
96
+ hash: -3231368102240217156
97
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  none: false
99
99
  requirements:
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  segments:
104
104
  - 0
105
- hash: 2384103699850789343
105
+ hash: -3231368102240217156
106
106
  requirements: []
107
107
  rubyforge_project:
108
108
  rubygems_version: 1.8.17