saucier 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,3 +3,7 @@ def _cset(name, *args, &block)
3
3
  set(name, *args, &block)
4
4
  end
5
5
  end
6
+
7
+ def rvm_wrapper(command)
8
+ "rvm #{chef_ruby}@#{chef_gemset} --create do #{command}"
9
+ end
@@ -17,10 +17,8 @@ module Capistrano::Saucier
17
17
 
18
18
  task :install do
19
19
  command = []
20
- command << ". /etc/profile.d/rvm.sh"
21
20
  command << "cd #{current_release}"
22
- command << "rvm use #{chef_ruby}@#{chef_gemset} --create"
23
- command << "bundle exec librarian-chef install"
21
+ command << rvm_wrapper("bundle exec librarian-chef install")
24
22
  run command.join(" && ")
25
23
  end
26
24
  end
@@ -19,12 +19,10 @@ module Capistrano::Saucier
19
19
  task :install do
20
20
  servers = find_servers_for_task(current_task)
21
21
  servers.each do |s|
22
- node_name = s.options[:node_name] ||= 'chef-node'
22
+ node_name = s.options[:node_name] || 'chef-node'
23
23
  command = []
24
- command << ". /etc/profile.d/rvm.sh"
25
24
  command << "cd #{current_release}"
26
- command << "rvm use #{chef_ruby}@#{chef_gemset} --create"
27
- command << "rvmsudo env SSH_AUTH_SOCK=$SSH_AUTH_SOCK chef-solo -c #{current_release}/#{chef_solo_config} -j #{current_release}/#{chef_node_config} -N #{node_name}"
25
+ command << rvm_wrapper("rvmsudo env SSH_AUTH_SOCK=$SSH_AUTH_SOCK chef-solo -c #{current_release}/#{chef_solo_config} -j #{current_release}/#{chef_node_config} -N #{node_name}")
28
26
  run command.join(" && ")
29
27
  end
30
28
  end
data/lib/saucier.rb CHANGED
@@ -43,10 +43,8 @@ module Capistrano::Saucier
43
43
 
44
44
  task :bundle_install do
45
45
  command = []
46
- command << ". /etc/profile.d/rvm.sh"
47
46
  command << "cd #{current_release}"
48
- command << "rvm use #{chef_ruby}@#{chef_gemset} --create"
49
- command << "bundle install"
47
+ command << rvm_wrapper("bundle install")
50
48
  run command.join(" && ")
51
49
  end
52
50
  end
data/saucier.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "saucier"
6
- s.version = "0.0.2"
6
+ s.version = "0.0.3"
7
7
  s.authors = ["Shaun Dern"]
8
8
  s.email = ["shaun@substantial.com"]
9
9
  s.homepage = "http://github.com/substantial/saucier"
@@ -27,10 +27,8 @@ describe Capistrano::Saucier::Recipes::ChefLibrarian do
27
27
  describe "task :install" do
28
28
  let(:install_command) {
29
29
  command = []
30
- command << ". /etc/profile.d/rvm.sh"
31
30
  command << "cd current/release/path"
32
- command << "rvm use default@global --create"
33
- command << "bundle exec librarian-chef install"
31
+ command << "rvm default@global --create do bundle exec librarian-chef install"
34
32
  command.join(" && ")
35
33
  }
36
34
  before do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saucier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-08-15 00:00:00.000000000 Z
12
+ date: 2012-09-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  segments:
147
147
  - 0
148
- hash: -2137213671960445821
148
+ hash: 1308848195273489696
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  segments:
156
156
  - 0
157
- hash: -2137213671960445821
157
+ hash: 1308848195273489696
158
158
  requirements: []
159
159
  rubyforge_project: saucier
160
160
  rubygems_version: 1.8.24