diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
commit | 35603c7ce1bd3ccf35334ed65152140f0ecaf080 (patch) | |
tree | 452c84ce196ce00d672c71a8fa65f86c5a074fac /lib/chef/provider/service | |
parent | eda2808dce8146bfdb308dd658b1dd565df3562b (diff) | |
download | chef-35603c7ce1bd3ccf35334ed65152140f0ecaf080.tar.gz |
fix Style/HashSyntax
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/service')
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service/solaris.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/service/systemd.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/windows.rb | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index 1da3d7c01a..18ef245083 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -81,7 +81,7 @@ class Chef super if ::File.exists?("/sbin/chkconfig") - chkconfig = shell_out!("/sbin/chkconfig --list #{current_resource.service_name}", :returns => [0, 1]) + chkconfig = shell_out!("/sbin/chkconfig --list #{current_resource.service_name}", returns: [0, 1]) unless run_levels.nil? || run_levels.empty? all_levels_match = true chkconfig.stdout.split(/\s+/)[1..-1].each do |level| diff --git a/lib/chef/provider/service/solaris.rb b/lib/chef/provider/service/solaris.rb index f2b1ec4262..51105bd06f 100644 --- a/lib/chef/provider/service/solaris.rb +++ b/lib/chef/provider/service/solaris.rb @@ -80,7 +80,7 @@ class Chef end def service_status - cmd = shell_out!(@status_command, "-l", @current_resource.service_name, :returns => [0, 1]) + cmd = shell_out!(@status_command, "-l", @current_resource.service_name, returns: [0, 1]) # Example output # $ svcs -l rsyslog # fmri svc:/application/rsyslog:default diff --git a/lib/chef/provider/service/systemd.rb b/lib/chef/provider/service/systemd.rb index badd7695a5..6d5bc338c7 100644 --- a/lib/chef/provider/service/systemd.rb +++ b/lib/chef/provider/service/systemd.rb @@ -79,10 +79,10 @@ class Chef::Provider::Service::Systemd < Chef::Provider::Service::Simple if new_resource.user uid = Etc.getpwnam(new_resource.user).uid options = { - :environment => { + environment: { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/#{uid}/bus", }, - :user => new_resource.user, + user: new_resource.user, } args = "--user" else diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index 487940e84e..3e177d744b 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -361,8 +361,8 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service logger.trace "#{@new_resource.name} setting start_type to #{type}" Win32::Service.configure( - :service_name => @new_resource.service_name, - :start_type => startup_type + service_name: @new_resource.service_name, + start_type: startup_type ) @new_resource.updated_by_last_action(true) end |