Skip to content

Commit

Permalink
Merge pull request #350 from leaprail/chef-13
Browse files Browse the repository at this point in the history
Chef 13 compatibility
  • Loading branch information
brianbianco authored Aug 14, 2017
2 parents 190a0e0 + a89d5de commit 5ccfdff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions providers/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def configure
node_memory_kb = node['memory']['total']
# On BSD platforms Ohai reports total memory as a Fixnum
if node_memory_kb.is_a? String
node_memory_kb.slice! 'kB'
node_memory_kb = node_memory_kb.to_i
node_memory_kb = node_memory_kb.sub('kB', '').to_i
end

# Here we determine what the logfile is. It has these possible states
Expand Down Expand Up @@ -407,6 +406,6 @@ def configure
end

def load_current_resource
@current_resource = Chef::Resource::RedisioConfigure.new(new_resource.name)
@current_resource = Chef::Resource.resource_for_node(:redisio_configure, node).new(new_resource.name)
@current_resource
end
2 changes: 1 addition & 1 deletion providers/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def version
end

def load_current_resource
@current_resource = Chef::Resource::RedisioInstall.new(new_resource.name)
@current_resource = Chef::Resource.resource_for_node(:redisio_install, node).new(new_resource.name)
@current_resource.version(version)
@current_resource
end
2 changes: 1 addition & 1 deletion providers/sentinel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def version
end

def load_current_resource
@current_resource = Chef::Resource::RedisioSentinel.new(new_resource.name)
@current_resource = Chef::Resource.resource_for_node(:redisio_sentinel, node).new(new_resource.name)
@current_resource.version(version)
@current_resource
end

0 comments on commit 5ccfdff

Please sign in to comment.