Skip to content

Commit

Permalink
Merge pull request #165 from aried3r/ar/fix_161
Browse files Browse the repository at this point in the history
Fix for issue #161 on Chef 13
  • Loading branch information
tas50 committed Jun 23, 2017
2 parents 9fa58e9 + 8bb53f4 commit 40f03cb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
8 changes: 6 additions & 2 deletions .kitchen.dokken.yml
Expand Up @@ -89,7 +89,11 @@ suites:
- name: 2.1.6
environment:
CONFIGURE_OPTS: --disable-install-rdoc
- name: 2.2.2
- name: 2.4.1
environment:
CONFIGURE_OPTS: --disable-install-rdoc
global: 2.1.6
global: 2.1.6
gems:
'2.4.1':
- name: bundler
action: upgrade
6 changes: 5 additions & 1 deletion .kitchen.yml
Expand Up @@ -37,7 +37,11 @@ suites:
- name: 2.1.6
environment:
CONFIGURE_OPTS: --disable-install-rdoc
- name: 2.2.2
- name: 2.4.1
environment:
CONFIGURE_OPTS: --disable-install-rdoc
global: 2.1.6
gems:
'2.4.1':
- name: bundler
action: upgrade
2 changes: 1 addition & 1 deletion libraries/chef_provider_package_rbenvrubygems.rb
Expand Up @@ -82,7 +82,7 @@ def normalize_version
end

def rehash
e = ::Chef::Resource::RubyRbenvRehash.new(new_resource.name, @run_context)
e = ::Chef::Resource.resource_for_node(:rbenv_rehash, node).new(new_resource.name, @run_context)
e.root_path rbenv_root
e.user rbenv_user if rbenv_user
e.action :nothing
Expand Down
23 changes: 12 additions & 11 deletions resources/gem.rb
Expand Up @@ -24,17 +24,18 @@

provides :rbenv_gem

attribute :package_name, kind_of: String, name_attribute: true
attribute :rbenv_version, kind_of: String, default: 'global'
attribute :version, kind_of: String
attribute :response_file, kind_of: String
attribute :source, kind_of: String
attribute :options, kind_of: [String, Hash]
attribute :gem_binary, kind_of: String
attribute :user, kind_of: String
attribute :root_path, kind_of: String
attribute :clear_sources, kind_of: [TrueClass, FalseClass]
attribute :timeout, kind_of: Integer, default: 300
attribute :package_name, kind_of: String, name_attribute: true
attribute :rbenv_version, kind_of: String, default: 'global'
attribute :version, kind_of: String
attribute :response_file, kind_of: String
attribute :source, kind_of: String
attribute :options, kind_of: [String, Hash]
attribute :gem_binary, kind_of: String
attribute :user, kind_of: String
attribute :root_path, kind_of: String
attribute :clear_sources, kind_of: [TrueClass, FalseClass]
attribute :timeout, kind_of: Integer, default: 300
attribute :include_default_source, kind_of: [TrueClass, FalseClass]

include Chef::Rbenv::Mixin::ResourceString

Expand Down
2 changes: 1 addition & 1 deletion resources/rehash.rb
Expand Up @@ -22,7 +22,7 @@
actions :run
default_action :run

provides :rbenv_rehash
resource_name :rbenv_rehash

attribute :name, kind_of: String, name_attribute: true
attribute :user, kind_of: String
Expand Down

0 comments on commit 40f03cb

Please sign in to comment.