Skip to content

Commit

Permalink
Fix failure due to windows? helper not existing.
Browse files Browse the repository at this point in the history
This only exists when chef-sugar is in the run-list. Its safer just to
use the node.platform? method.
  • Loading branch information
John Bellone committed May 18, 2016
1 parent 7a03bb1 commit 16d83ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions libraries/consul_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def tls?
notifying_block do
directory ::File.dirname(new_resource.path) do
recursive true
unless windows?
unless node.platform?('windows')
owner new_resource.owner
group new_resource.group
mode '0755'
Expand All @@ -120,7 +120,7 @@ def tls?
end

file new_resource.path do
unless windows?
unless node.platform?('windows')
owner new_resource.owner
group new_resource.group
mode '0640'
Expand Down
4 changes: 2 additions & 2 deletions libraries/consul_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def to_json
notifying_block do
directory ::File.dirname(new_resource.path) do
recursive true
unless windows?
unless node.platform?('windows')
owner new_resource.user
group new_resource.group
mode '0755'
Expand All @@ -54,7 +54,7 @@ def to_json

file new_resource.path do
content new_resource.to_json
unless windows?
unless node.platform?('windows')
owner new_resource.user
group new_resource.group
mode '0640'
Expand Down
4 changes: 2 additions & 2 deletions libraries/consul_watch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def to_json
notifying_block do
directory ::File.dirname(new_resource.path) do
recursive true
unless windows?
unless node.platform?('windows')
owner new_resource.user
group new_resource.group
mode '0755'
Expand All @@ -52,7 +52,7 @@ def to_json

file new_resource.path do
content new_resource.to_json
unless windows?
unless node.platform?('windows')
owner new_resource.user
group new_resource.group
mode '0640'
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Application cookbook which installs and configures Consul.'
long_description 'Application cookbook which installs and configures Consul.'
version '2.1.1'
version '2.1.3'

recipe 'consul::default', 'Installs and configures the Consul service.'
recipe 'consul::client_gem', 'Installs the Consul Ruby client as a gem.'
Expand Down

0 comments on commit 16d83ac

Please sign in to comment.