summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/habitat_install.rb6
-rw-r--r--lib/chef/resource/inspec_waiver.rb2
-rw-r--r--lib/chef/resource/inspec_waiver_file_entry.rb2
-rw-r--r--lib/chef/resource/windows_auto_run.rb2
-rw-r--r--lib/chef/resource/windows_dfs_namespace.rb4
-rw-r--r--lib/chef/resource/windows_update_settings.rb6
6 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/resource/habitat_install.rb b/lib/chef/resource/habitat_install.rb
index 5fe77aca10..daecc8d60a 100644
--- a/lib/chef/resource/habitat_install.rb
+++ b/lib/chef/resource/habitat_install.rb
@@ -95,10 +95,10 @@ class Chef
path habfile
destination "#{Chef::Config[:file_cache_path]}/habitat"
action :extract
- not_if { ::Dir.exist?('c:\habitat') }
+ not_if { ::Dir.exist?("c:\\habitat") }
end
- directory 'c:\habitat' do
+ directory "c:\\habitat" do
notifies :run, "powershell_script[installing from archive]", :immediately
end
@@ -110,7 +110,7 @@ class Chef
end
# TODO: This won't self heal if missing until the next upgrade
- windows_path 'C:\habitat' do
+ windows_path "C:\\habitat" do
action :add
end
else
diff --git a/lib/chef/resource/inspec_waiver.rb b/lib/chef/resource/inspec_waiver.rb
index bf50684547..f518d80d7a 100644
--- a/lib/chef/resource/inspec_waiver.rb
+++ b/lib/chef/resource/inspec_waiver.rb
@@ -116,7 +116,7 @@ class Chef
description: "The expiration date of the waiver - provided in YYYY-MM-DD format",
callbacks: {
"Expiration date should be a valid calendar date and match the following format: YYYY-MM-DD" => proc { |e|
- re = Regexp.new('\d{4}-\d{2}-\d{2}$').freeze
+ re = Regexp.new("\\d{4}-\\d{2}-\\d{2}$").freeze
if re.match?(e)
Date.valid_date?(*e.split("-").map(&:to_i))
else
diff --git a/lib/chef/resource/inspec_waiver_file_entry.rb b/lib/chef/resource/inspec_waiver_file_entry.rb
index 5f81be73da..8b8a0b9415 100644
--- a/lib/chef/resource/inspec_waiver_file_entry.rb
+++ b/lib/chef/resource/inspec_waiver_file_entry.rb
@@ -74,7 +74,7 @@ class Chef
description: "The expiration date of the given waiver - provided in YYYY-MM-DD format",
callbacks: {
"Expiration date should be a valid calendar date and match the following format: YYYY-MM-DD" => proc { |e|
- re = Regexp.new('\d{4}-\d{2}-\d{2}$').freeze
+ re = Regexp.new("\\d{4}-\\d{2}-\\d{2}$").freeze
if re.match?(e)
Date.valid_date?(*e.split("-").map(&:to_i))
else
diff --git a/lib/chef/resource/windows_auto_run.rb b/lib/chef/resource/windows_auto_run.rb
index 9e46b58b53..394960b88e 100644
--- a/lib/chef/resource/windows_auto_run.rb
+++ b/lib/chef/resource/windows_auto_run.rb
@@ -88,7 +88,7 @@ class Chef
# @return [String]
def registry_path
{ machine: "HKLM", user: "HKCU" }[new_resource.root] + \
- '\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run'
+ "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"
end
end
end
diff --git a/lib/chef/resource/windows_dfs_namespace.rb b/lib/chef/resource/windows_dfs_namespace.rb
index 2fdfd8ebb6..3d1a08f3a3 100644
--- a/lib/chef/resource/windows_dfs_namespace.rb
+++ b/lib/chef/resource/windows_dfs_namespace.rb
@@ -38,7 +38,7 @@ class Chef
property :full_users, Array,
description: "Determines which users should have full access to the share.",
- default: ['BUILTIN\\administrators']
+ default: ["BUILTIN\\administrators"]
property :change_users, Array,
description: "Determines which users should have change access to the share.",
@@ -50,7 +50,7 @@ class Chef
property :root, String,
description: "The root from which to create the DFS tree. Defaults to C:\\DFSRoots.",
- default: 'C:\\DFSRoots'
+ default: "C:\\DFSRoots"
action :create, description: "Creates the dfs namespace on the server." do
directory file_path do
diff --git a/lib/chef/resource/windows_update_settings.rb b/lib/chef/resource/windows_update_settings.rb
index 3f8cf95acb..4d9d76463b 100644
--- a/lib/chef/resource/windows_update_settings.rb
+++ b/lib/chef/resource/windows_update_settings.rb
@@ -145,7 +145,7 @@ class Chef
action :set, description: "Set Windows Update settings." do
actual_day = convert_day(new_resource.scheduled_install_day)
- registry_key 'HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate' do
+ registry_key "HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate" do
recursive true
values [{
name: "DisableOSUpgrade",
@@ -180,7 +180,7 @@ class Chef
action :create
end
- registry_key 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer' do
+ registry_key "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer" do
recursive true
values [{
name: "NoWindowsUpdate",
@@ -190,7 +190,7 @@ class Chef
action :create
end
- registry_key 'HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU' do
+ registry_key "HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU" do
recursive true
values [{
name: "AUOptions",