diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 18:20:06 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 18:20:06 -0700 |
commit | 2da413fe65595e95b16e9e01afa240d5c668a03a (patch) | |
tree | aaa60ecf50befabe0c6a5444c593275e411873d5 /lib/chef/application | |
parent | 5f45c98f1e2ae9ec7b95760a41d617a7a698cc19 (diff) | |
download | chef-2da413fe65595e95b16e9e01afa240d5c668a03a.tar.gz |
fix Style/MutableConstant
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/application')
-rw-r--r-- | lib/chef/application/client.rb | 2 | ||||
-rw-r--r-- | lib/chef/application/exit_code.rb | 4 | ||||
-rw-r--r-- | lib/chef/application/knife.rb | 2 | ||||
-rw-r--r-- | lib/chef/application/windows_service.rb | 2 | ||||
-rw-r--r-- | lib/chef/application/windows_service_manager.rb | 6 |
5 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 21a926eca1..7bea2bd845 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -35,7 +35,7 @@ class Chef::Application::Client < Chef::Application include ChefConfig::Mixin::DotD # Mimic self_pipe sleep from Unicorn to capture signals safely - SELF_PIPE = [] + SELF_PIPE = [] # rubocop:disable Style/MutableConstant option :config_file, short: "-c CONFIG", diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb index 917aa16e62..c87592f06b 100644 --- a/lib/chef/application/exit_code.rb +++ b/lib/chef/application/exit_code.rb @@ -36,11 +36,11 @@ class Chef REBOOT_FAILED: 41, AUDIT_MODE_FAILURE: 42, CLIENT_UPGRADED: 213, - } + }.freeze DEPRECATED_RFC_062_EXIT_CODES = { DEPRECATED_FAILURE: -1, - } + }.freeze class << self diff --git a/lib/chef/application/knife.rb b/lib/chef/application/knife.rb index 2c8d886b27..d8818cd5aa 100644 --- a/lib/chef/application/knife.rb +++ b/lib/chef/application/knife.rb @@ -23,7 +23,7 @@ require "chef/monkey_patches/net_http.rb" class Chef::Application::Knife < Chef::Application - NO_COMMAND_GIVEN = "You need to pass a sub-command (e.g., knife SUB-COMMAND)\n" + NO_COMMAND_GIVEN = "You need to pass a sub-command (e.g., knife SUB-COMMAND)\n".freeze banner "Usage: knife sub-command (options)" diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index b49c12c312..3c73a4925d 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -59,7 +59,7 @@ class Chef description: "Set the number of seconds to wait between chef-client runs", proc: lambda { |s| s.to_i } - DEFAULT_LOG_LOCATION ||= "#{ENV['SYSTEMDRIVE']}/chef/client.log" + DEFAULT_LOG_LOCATION ||= "#{ENV['SYSTEMDRIVE']}/chef/client.log".freeze def service_init @service_action_mutex = Mutex.new diff --git a/lib/chef/application/windows_service_manager.rb b/lib/chef/application/windows_service_manager.rb index 0572169ca3..2ba1861a5b 100644 --- a/lib/chef/application/windows_service_manager.rb +++ b/lib/chef/application/windows_service_manager.rb @@ -163,9 +163,9 @@ class Chef private # Just some state constants - STOPPED = "stopped" - RUNNING = "running" - PAUSED = "paused" + STOPPED = "stopped".freeze + RUNNING = "running".freeze + PAUSED = "paused".freeze def service_exists? ::Win32::Service.exists?(@service_name) |