diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-12 08:22:09 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-12 08:22:09 -0800 |
commit | c844e1c87374b18ee634a06a5325518631607c90 (patch) | |
tree | 59526dce9d78c30e40282e595d914cf703858663 /lib/chef/provider/service | |
parent | 0944320b72ee1ab16a18a149f5ecb743ace0c0d3 (diff) | |
download | chef-c844e1c87374b18ee634a06a5325518631607c90.tar.gz |
chefstyle: fix Lint/StringConversionInInterpolation
useless use of `"#{foo.to_s}"`
Diffstat (limited to 'lib/chef/provider/service')
-rw-r--r-- | lib/chef/provider/service/macosx.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service/simple.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/provider/service/macosx.rb b/lib/chef/provider/service/macosx.rb index 0a8fca4262..9c733da493 100644 --- a/lib/chef/provider/service/macosx.rb +++ b/lib/chef/provider/service/macosx.rb @@ -74,7 +74,7 @@ class Chef def define_resource_requirements requirements.assert(:reload) do |a| - a.failure_message Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :reload" + a.failure_message Chef::Exceptions::UnsupportedAction, "#{self} does not support :reload" end requirements.assert(:all_actions) do |a| diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb index d295513b42..bb3d819b3d 100644 --- a/lib/chef/provider/service/simple.rb +++ b/lib/chef/provider/service/simple.rb @@ -58,21 +58,21 @@ class Chef shared_resource_requirements requirements.assert(:start) do |a| a.assertion { @new_resource.start_command } - a.failure_message Chef::Exceptions::Service, "#{self.to_s} requires that start_command be set" + a.failure_message Chef::Exceptions::Service, "#{self} requires that start_command be set" end requirements.assert(:stop) do |a| a.assertion { @new_resource.stop_command } - a.failure_message Chef::Exceptions::Service, "#{self.to_s} requires that stop_command be set" + a.failure_message Chef::Exceptions::Service, "#{self} requires that stop_command be set" end requirements.assert(:restart) do |a| a.assertion { @new_resource.restart_command || ( @new_resource.start_command && @new_resource.stop_command ) } - a.failure_message Chef::Exceptions::Service, "#{self.to_s} requires a restart_command or both start_command and stop_command be set in order to perform a restart" + a.failure_message Chef::Exceptions::Service, "#{self} requires a restart_command or both start_command and stop_command be set in order to perform a restart" end requirements.assert(:reload) do |a| a.assertion { @new_resource.reload_command } - a.failure_message Chef::Exceptions::UnsupportedAction, "#{self.to_s} requires a reload_command be set in order to perform a reload" + a.failure_message Chef::Exceptions::UnsupportedAction, "#{self} requires a reload_command be set in order to perform a reload" end requirements.assert(:all_actions) do |a| |