Skip to content

Commit

Permalink
Merge pull request #125 from gondoi/master
Browse files Browse the repository at this point in the history
RVM gem with Omnibus
  • Loading branch information
fnichol committed Jan 15, 2013
2 parents abae257 + 3d52d45 commit 6a9017b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
6 changes: 0 additions & 6 deletions libraries/rvm_chef_user_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
# limitations under the License.
#

begin
require 'rvm'
rescue LoadError
Chef::Log.debug("Missing gem 'rvm' (#{File.basename(__FILE__)})")
end

def create_rvm_chef_user_environment
klass = Class.new(::RVM::Environment) do
attr_reader :user
Expand Down
2 changes: 2 additions & 0 deletions libraries/rvm_rubygems_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def gem_platforms
end

def initialize(new_resource, run_context=nil)
original_gem_binary = new_resource.gem_binary
super
new_resource.gem_binary("gem") unless original_gem_binary
user = new_resource.respond_to?("user") ? new_resource.user : nil
@gem_env = RVMGemEnvironment.new(gem_binary_path, ruby_strings, user)
end
Expand Down
6 changes: 0 additions & 6 deletions libraries/rvm_shell_chef_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
# limitations under the License.
#

begin
require 'rvm'
rescue LoadError
Chef::Log.debug("Missing gem 'rvm' (#{File.basename(__FILE__)})")
end

def create_rvm_shell_chef_wrapper
require 'chef/mixin/command'

Expand Down
8 changes: 2 additions & 6 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@
#

# install rvm api gem during chef compile phase
gem_package 'rvm' do
action :nothing
end.run_action(:install)

require 'rubygems'
Gem.clear_paths
chef_gem 'rvm'
require 'rvm'

create_rvm_shell_chef_wrapper
create_rvm_chef_user_environment

Expand Down

0 comments on commit 6a9017b

Please sign in to comment.