summaryrefslogtreecommitdiff
path: root/lib/chef/platform
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-14 14:08:03 +0000
committerThom May <thom@chef.io>2016-01-14 14:08:03 +0000
commit51cfbdc4d16739caac4d946fadbe678444aafe34 (patch)
tree56dfd8f1cd9fd933de27268b32402e955a43ac2b /lib/chef/platform
parent05064423057d4cf46f4713b81b08829cf6d20af6 (diff)
downloadchef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
Diffstat (limited to 'lib/chef/platform')
-rw-r--r--lib/chef/platform/handler_map.rb2
-rw-r--r--lib/chef/platform/priority_map.rb2
-rw-r--r--lib/chef/platform/provider_handler_map.rb4
-rw-r--r--lib/chef/platform/provider_mapping.rb12
-rw-r--r--lib/chef/platform/provider_priority_map.rb4
-rw-r--r--lib/chef/platform/query_helpers.rb16
-rw-r--r--lib/chef/platform/rebooter.rb6
-rw-r--r--lib/chef/platform/resource_handler_map.rb4
-rw-r--r--lib/chef/platform/resource_priority_map.rb4
-rw-r--r--lib/chef/platform/service_helpers.rb2
10 files changed, 28 insertions, 28 deletions
diff --git a/lib/chef/platform/handler_map.rb b/lib/chef/platform/handler_map.rb
index a9551a344b..48e118d599 100644
--- a/lib/chef/platform/handler_map.rb
+++ b/lib/chef/platform/handler_map.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/node_map'
+require "chef/node_map"
class Chef
class Platform
diff --git a/lib/chef/platform/priority_map.rb b/lib/chef/platform/priority_map.rb
index 0b050deb59..004aa01c16 100644
--- a/lib/chef/platform/priority_map.rb
+++ b/lib/chef/platform/priority_map.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/node_map'
+require "chef/node_map"
class Chef
class Platform
diff --git a/lib/chef/platform/provider_handler_map.rb b/lib/chef/platform/provider_handler_map.rb
index 4549d7994e..ecd1da1f1e 100644
--- a/lib/chef/platform/provider_handler_map.rb
+++ b/lib/chef/platform/provider_handler_map.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'singleton'
-require 'chef/platform/handler_map'
+require "singleton"
+require "chef/platform/handler_map"
class Chef
class Platform
diff --git a/lib/chef/platform/provider_mapping.rb b/lib/chef/platform/provider_mapping.rb
index a4811ccc33..235fd4d471 100644
--- a/lib/chef/platform/provider_mapping.rb
+++ b/lib/chef/platform/provider_mapping.rb
@@ -16,11 +16,11 @@
# limitations under the License.
#
-require 'chef/log'
-require 'chef/exceptions'
-require 'chef/mixin/params_validate'
-require 'chef/version_constraint/platform'
-require 'chef/provider'
+require "chef/log"
+require "chef/exceptions"
+require "chef/mixin/params_validate"
+require "chef/version_constraint/platform"
+require "chef/provider"
class Chef
class Platform
@@ -197,7 +197,7 @@ class Chef
def resource_matching_provider(platform, version, resource_type)
if resource_type.kind_of?(Chef::Resource)
- class_name = resource_type.class.name ? resource_type.class.name.split('::').last :
+ class_name = resource_type.class.name ? resource_type.class.name.split("::").last :
convert_to_class_name(resource_type.resource_name.to_s)
if Chef::Provider.const_defined?(class_name)
diff --git a/lib/chef/platform/provider_priority_map.rb b/lib/chef/platform/provider_priority_map.rb
index 5599c74c2d..0c8a728618 100644
--- a/lib/chef/platform/provider_priority_map.rb
+++ b/lib/chef/platform/provider_priority_map.rb
@@ -1,5 +1,5 @@
-require 'singleton'
-require 'chef/platform/priority_map'
+require "singleton"
+require "chef/platform/priority_map"
class Chef
class Platform
diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb
index 699e98737c..3abd1a2a8b 100644
--- a/lib/chef/platform/query_helpers.rb
+++ b/lib/chef/platform/query_helpers.rb
@@ -27,18 +27,18 @@ class Chef
def windows_server_2003?
# WMI startup shouldn't be performed unless we're on Windows.
return false unless windows?
- require 'wmi-lite/wmi'
+ require "wmi-lite/wmi"
wmi = WmiLite::Wmi.new
- host = wmi.first_of('Win32_OperatingSystem')
- is_server_2003 = (host['version'] && host['version'].start_with?("5.2"))
+ host = wmi.first_of("Win32_OperatingSystem")
+ is_server_2003 = (host["version"] && host["version"].start_with?("5.2"))
is_server_2003
end
def windows_nano_server?
return false unless windows?
- require 'win32/registry'
+ require "win32/registry"
# This method may be called before ohai runs (e.g., it may be used to
# determine settings in config.rb). Chef::Win32::Registry.new uses
@@ -60,7 +60,7 @@ class Chef
def supports_msi?
return false unless windows?
- require 'win32/registry'
+ require "win32/registry"
key = "System\\CurrentControlSet\\Services\\msiserver"
access = ::Win32::Registry::KEY_QUERY_VALUE
@@ -94,16 +94,16 @@ class Chef
end
def dsc_refresh_mode_disabled?(node)
- require 'chef/util/powershell/cmdlet'
+ require "chef/util/powershell/cmdlet"
cmdlet = Chef::Util::Powershell::Cmdlet.new(node, "Get-DscLocalConfigurationManager", :object)
metadata = cmdlet.run!.return_value
- metadata['RefreshMode'] == 'Disabled'
+ metadata["RefreshMode"] == "Disabled"
end
def supported_powershell_version?(node, version_string)
return false unless node[:languages] && node[:languages][:powershell]
- require 'rubygems'
+ require "rubygems"
Gem::Version.new(node[:languages][:powershell][:version]) >=
Gem::Version.new(version_string)
end
diff --git a/lib/chef/platform/rebooter.rb b/lib/chef/platform/rebooter.rb
index ce357bf993..83d4730075 100644
--- a/lib/chef/platform/rebooter.rb
+++ b/lib/chef/platform/rebooter.rb
@@ -16,9 +16,9 @@
# limitations under the License.
#
-require 'chef/dsl/reboot_pending'
-require 'chef/log'
-require 'chef/platform'
+require "chef/dsl/reboot_pending"
+require "chef/log"
+require "chef/platform"
class Chef
class Platform
diff --git a/lib/chef/platform/resource_handler_map.rb b/lib/chef/platform/resource_handler_map.rb
index 27a7bb1342..166ee73173 100644
--- a/lib/chef/platform/resource_handler_map.rb
+++ b/lib/chef/platform/resource_handler_map.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'singleton'
-require 'chef/platform/handler_map'
+require "singleton"
+require "chef/platform/handler_map"
class Chef
class Platform
diff --git a/lib/chef/platform/resource_priority_map.rb b/lib/chef/platform/resource_priority_map.rb
index 5cc86fd2e7..1871dcd5c6 100644
--- a/lib/chef/platform/resource_priority_map.rb
+++ b/lib/chef/platform/resource_priority_map.rb
@@ -1,5 +1,5 @@
-require 'singleton'
-require 'chef/platform/priority_map'
+require "singleton"
+require "chef/platform/priority_map"
class Chef
class Platform
diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb
index ae95520e47..09b6acb897 100644
--- a/lib/chef/platform/service_helpers.rb
+++ b/lib/chef/platform/service_helpers.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/chef_class'
+require "chef/chef_class"
class Chef
class Platform