diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-01-15 13:07:58 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-01-15 13:07:58 -0800 |
commit | 990974ca5cd44df0c77bb6a12fc57a3c32b92e23 (patch) | |
tree | 5779719f58254764e57eb9cacde85837295fd2f6 /lib/chef/provider/service | |
parent | 4be1ebe66460efb0535e500d6ecb52a147346519 (diff) | |
download | chef-990974ca5cd44df0c77bb6a12fc57a3c32b92e23.tar.gz |
changes for rubocop engine upgrades.lcg/rubocop-upgrades
this is the result of changes to rules we already previously had
enabled.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/service')
-rw-r--r-- | lib/chef/provider/service/aixinit.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service/debian.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/upstart.rb | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/provider/service/aixinit.rb b/lib/chef/provider/service/aixinit.rb index dd8514cf20..43e6b3ac1b 100644 --- a/lib/chef/provider/service/aixinit.rb +++ b/lib/chef/provider/service/aixinit.rb @@ -22,7 +22,7 @@ class Chef class Provider class Service class AixInit < Chef::Provider::Service::Init - RC_D_SCRIPT_NAME = /\/etc\/rc.d\/rc2.d\/([SK])(\d\d|)/i + RC_D_SCRIPT_NAME = /\/etc\/rc.d\/rc2.d\/([SK])(\d\d|)/i.freeze def initialize(new_resource, run_context) super diff --git a/lib/chef/provider/service/debian.rb b/lib/chef/provider/service/debian.rb index 351075111b..b6a938a7e8 100644 --- a/lib/chef/provider/service/debian.rb +++ b/lib/chef/provider/service/debian.rb @@ -26,8 +26,8 @@ class Chef Chef::Platform::ServiceHelpers.service_resource_providers.include?(:debian) end - UPDATE_RC_D_ENABLED_MATCHES = /\/rc[\dS].d\/S|not installed/i - UPDATE_RC_D_PRIORITIES = /\/rc([\dS]).d\/([SK])(\d\d)/i + UPDATE_RC_D_ENABLED_MATCHES = /\/rc[\dS].d\/S|not installed/i.freeze + UPDATE_RC_D_PRIORITIES = /\/rc([\dS]).d\/([SK])(\d\d)/i.freeze def self.supports?(resource, action) Chef::Platform::ServiceHelpers.config_for_service(resource.service_name).include?(:initd) diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index 18ef245083..9e8ff30216 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -32,8 +32,8 @@ class Chef Chef::Platform::ServiceHelpers.service_resource_providers.include?(:redhat) end - CHKCONFIG_ON = /\d:on/ - CHKCONFIG_MISSING = /No such/ + CHKCONFIG_ON = /\d:on/.freeze + CHKCONFIG_MISSING = /No such/.freeze def self.supports?(resource, action) Chef::Platform::ServiceHelpers.config_for_service(resource.service_name).include?(:initd) diff --git a/lib/chef/provider/service/upstart.rb b/lib/chef/provider/service/upstart.rb index 68f97d1ff2..96ed16dc8f 100644 --- a/lib/chef/provider/service/upstart.rb +++ b/lib/chef/provider/service/upstart.rb @@ -32,7 +32,7 @@ class Chef Chef::Platform::ServiceHelpers.service_resource_providers.include?(:upstart) end - UPSTART_STATE_FORMAT = /\S+ \(?(start|stop)?\)? ?[\/ ](\w+)/ + UPSTART_STATE_FORMAT = /\S+ \(?(start|stop)?\)? ?[\/ ](\w+)/.freeze # Returns true if the configs for the service name has upstart variable def self.supports?(resource, action) |