diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-09 08:17:32 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-09 08:17:32 -0800 |
commit | 37e02399a6e1dd281808a556f1420f8cf6e846fd (patch) | |
tree | 86834a5371fccfc474004233e45ab00dd7355574 /lib/chef | |
parent | f073747786abbe6ada55ed24b696a03e39c3c45d (diff) | |
download | chef-37e02399a6e1dd281808a556f1420f8cf6e846fd.tar.gz |
autofixing auto-inserted delimiterslcg/chefstyle-batch
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 4 | ||||
-rw-r--r-- | lib/chef/cookbook/metadata.rb | 2 | ||||
-rw-r--r-- | lib/chef/event_loggers/windows_eventlog.rb | 2 | ||||
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 2 | ||||
-rw-r--r-- | lib/chef/mixin/windows_architecture_helper.rb | 4 | ||||
-rw-r--r-- | lib/chef/mixin/windows_env_helper.rb | 4 | ||||
-rw-r--r-- | lib/chef/node.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/group/groupmod.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/mount/mount.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/pacman.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package/rpm.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/freebsd.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/user/useradd.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/rpm_package.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/yum_package.rb | 2 |
16 files changed, 20 insertions, 20 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index f1a114e7f1..2d3330088f 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -610,7 +610,7 @@ class Chef private def use_memory_store?(path) - return path[0] == "sandboxes" || path[0] == "file_store" && path[1] == "checksums" || path == %w(environments _default) + return path[0] == "sandboxes" || path[0] == "file_store" && path[1] == "checksums" || path == %w{environments _default} end def write_cookbook(path, data, *options) @@ -704,7 +704,7 @@ class Chef # /acls/containers|nodes|.../x.json # /acls/organization.json - if path.length == 3 || path == %w(acls organization) + if path.length == 3 || path == %w{acls organization} path = path.dup path[-1] = "#{path[-1]}.json" end diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb index 73d1cf8379..62e17d4f3b 100644 --- a/lib/chef/cookbook/metadata.rb +++ b/lib/chef/cookbook/metadata.rb @@ -485,7 +485,7 @@ class Chef :description => { :kind_of => String }, :choice => { :kind_of => [ Array ], :default => [] }, :calculated => { :equal_to => [ true, false ], :default => false }, - :type => { :equal_to => %w(string array hash symbol boolean numeric), :default => "string" }, + :type => { :equal_to => %w{string array hash symbol boolean numeric}, :default => "string" }, :required => { :equal_to => [ "required", "recommended", "optional", true, false ], :default => "optional" }, :recipes => { :kind_of => [ Array ], :default => [] }, :default => { :kind_of => [ String, Array, Hash, Symbol, Numeric, TrueClass, FalseClass ] }, diff --git a/lib/chef/event_loggers/windows_eventlog.rb b/lib/chef/event_loggers/windows_eventlog.rb index 514fc7b087..84aa906dc7 100644 --- a/lib/chef/event_loggers/windows_eventlog.rb +++ b/lib/chef/event_loggers/windows_eventlog.rb @@ -83,7 +83,7 @@ class Chef [@run_status.run_id, @run_status.elapsed_time.to_s] else - %w(UNKNOWN UNKNOWN) + %w{UNKNOWN UNKNOWN} end @eventlog.report_event( diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 27f7a4ddc3..971257bf9e 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -220,7 +220,7 @@ class Chef :long => "--node-ssl-verify-mode [peer|none]", :description => "Whether or not to verify the SSL cert for all HTTPS requests.", :proc => Proc.new { |v| - valid_values = %w(none peer) + valid_values = %w{none peer} unless valid_values.include?(v) raise "Invalid value '#{v}' for --node-ssl-verify-mode. Valid values are: #{valid_values.join(", ")}" end diff --git a/lib/chef/mixin/windows_architecture_helper.rb b/lib/chef/mixin/windows_architecture_helper.rb index ea058537ea..c55f92b362 100644 --- a/lib/chef/mixin/windows_architecture_helper.rb +++ b/lib/chef/mixin/windows_architecture_helper.rb @@ -98,13 +98,13 @@ class Chef end def disable_wow64_file_redirection( node ) - if ( node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows? + if ( node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows? Chef::ReservedNames::Win32::System.wow64_disable_wow64_fs_redirection end end def restore_wow64_file_redirection( node, original_redirection_state ) - if (node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows? + if (node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows? Chef::ReservedNames::Win32::System.wow64_revert_wow64_fs_redirection(original_redirection_state) end end diff --git a/lib/chef/mixin/windows_env_helper.rb b/lib/chef/mixin/windows_env_helper.rb index 51806da31d..65b4b33cf0 100644 --- a/lib/chef/mixin/windows_env_helper.rb +++ b/lib/chef/mixin/windows_env_helper.rb @@ -43,12 +43,12 @@ class Chef flags = SMTO_BLOCK | SMTO_ABORTIFHUNG | SMTO_NOTIMEOUTIFNOTHUNG # for why two calls, see: # http://stackoverflow.com/questions/4968373/why-doesnt-sendmessagetimeout-update-the-environment-variables - if SendMessageTimeoutA(HWND_BROADCAST, WM_SETTINGCHANGE, 0, FFI::MemoryPointer.from_string("Environment").address, flags, 5000, nil) == 0 + if SendMessageTimeoutA(HWND_BROADCAST, WM_SETTINGCHANGE, 0, FFI::MemoryPointer.from_string("Environment").address, flags, 5000, nil) == 0 Chef::ReservedNames::Win32::Error.raise! end if SendMessageTimeoutW(HWND_BROADCAST, WM_SETTINGCHANGE, 0, FFI::MemoryPointer.from_string( utf8_to_wide("Environment") - ).address, flags, 5000, nil) == 0 + ).address, flags, 5000, nil) == 0 Chef::ReservedNames::Win32::Error.raise! end end diff --git a/lib/chef/node.rb b/lib/chef/node.rb index 4afba1aeb8..0471fe1171 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -685,7 +685,7 @@ class Chef def data_for_save data = for_json - %w(automatic default normal override).each do |level| + %w{automatic default normal override}.each do |level| whitelist_config_option = "#{level}_attribute_whitelist".to_sym whitelist = Chef::Config[whitelist_config_option] unless whitelist.nil? # nil => save everything diff --git a/lib/chef/provider/group/groupmod.rb b/lib/chef/provider/group/groupmod.rb index 98846aa418..295d3b3425 100644 --- a/lib/chef/provider/group/groupmod.rb +++ b/lib/chef/provider/group/groupmod.rb @@ -25,7 +25,7 @@ class Chef def load_current_resource super - %w(group user).each do |binary| + %w{group user}.each do |binary| raise Chef::Exceptions::Group, "Could not find binary /usr/sbin/#{binary} for #{@new_resource}" unless ::File.exists?("/usr/sbin/#{binary}") end end diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb index 8f9f8b05d4..635a4f6ea2 100644 --- a/lib/chef/provider/mount/mount.rb +++ b/lib/chef/provider/mount/mount.rb @@ -42,7 +42,7 @@ class Chef def mountable? # only check for existence of non-remote devices - if device_should_exist? && !::File.exists?(device_real) + if device_should_exist? && !::File.exists?(device_real) raise Chef::Exceptions::Mount, "Device #{@new_resource.device} does not exist" elsif( @new_resource.mount_point != "none" && !::File.exists?(@new_resource.mount_point) ) raise Chef::Exceptions::Mount, "Mount point #{@new_resource.mount_point} does not exist" diff --git a/lib/chef/provider/package/pacman.rb b/lib/chef/provider/package/pacman.rb index 460f4c4ea2..fe321037bd 100644 --- a/lib/chef/provider/package/pacman.rb +++ b/lib/chef/provider/package/pacman.rb @@ -52,7 +52,7 @@ class Chef def candidate_version return @candidate_version if @candidate_version - repos = %w(extra core community) + repos = %w{extra core community} if(::File.exists?("/etc/pacman.conf")) pacman = ::File.read("/etc/pacman.conf") diff --git a/lib/chef/provider/package/rpm.rb b/lib/chef/provider/package/rpm.rb index c00f0ebbd4..777cc6d209 100644 --- a/lib/chef/provider/package/rpm.rb +++ b/lib/chef/provider/package/rpm.rb @@ -25,7 +25,7 @@ class Chef class Package class Rpm < Chef::Provider::Package - provides :rpm_package, os: %w(linux aix) + provides :rpm_package, os: %w{linux aix} include Chef::Mixin::GetSourceFromPackage diff --git a/lib/chef/provider/service.rb b/lib/chef/provider/service.rb index 3b78cb4afc..d716e44342 100644 --- a/lib/chef/provider/service.rb +++ b/lib/chef/provider/service.rb @@ -50,10 +50,10 @@ class Chef # XXX?: the #nil? check below will likely fail if this is a cloned resource or if # we just run multiple actions. def load_new_resource_state - if @new_resource.enabled.nil? + if @new_resource.enabled.nil? @new_resource.enabled(@current_resource.enabled) end - if @new_resource.running.nil? + if @new_resource.running.nil? @new_resource.running(@current_resource.running) end end diff --git a/lib/chef/provider/service/freebsd.rb b/lib/chef/provider/service/freebsd.rb index e556eccf22..76d8c1d17b 100644 --- a/lib/chef/provider/service/freebsd.rb +++ b/lib/chef/provider/service/freebsd.rb @@ -27,7 +27,7 @@ class Chef attr_reader :enabled_state_found - provides :service, os: %w(freebsd netbsd) + provides :service, os: %w{freebsd netbsd} include Chef::Mixin::ShellOut diff --git a/lib/chef/provider/user/useradd.rb b/lib/chef/provider/user/useradd.rb index 708631e4ab..e2f5b5897a 100644 --- a/lib/chef/provider/user/useradd.rb +++ b/lib/chef/provider/user/useradd.rb @@ -75,7 +75,7 @@ class Chef unless passwd_s.exitstatus == 0 raise_lock_error = false - if %w(redhat centos).include?(node[:platform]) + if %w{redhat centos}.include?(node[:platform]) passwd_version_check = shell_out!("rpm -q passwd") passwd_version = passwd_version_check.stdout.chomp diff --git a/lib/chef/resource/rpm_package.rb b/lib/chef/resource/rpm_package.rb index 72598b6a83..c93dfecaf5 100644 --- a/lib/chef/resource/rpm_package.rb +++ b/lib/chef/resource/rpm_package.rb @@ -23,7 +23,7 @@ class Chef class Resource class RpmPackage < Chef::Resource::Package resource_name :rpm_package - provides :rpm_package, os: %w(linux aix) + provides :rpm_package, os: %w{linux aix} property :allow_downgrade, [ true, false ], default: false, desired_state: false diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb index c7d18f0dc2..1f749b93c0 100644 --- a/lib/chef/resource/yum_package.rb +++ b/lib/chef/resource/yum_package.rb @@ -23,7 +23,7 @@ class Chef class Resource class YumPackage < Chef::Resource::Package resource_name :yum_package - provides :package, os: "linux", platform_family: %w(rhel fedora) + provides :package, os: "linux", platform_family: %w{rhel fedora} # Install a specific arch property :arch, [ String, Array ] |