diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-09 12:22:47 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-16 18:41:25 -0700 |
commit | 5d07da13f9909ea500ed8d76e83512f91ea3e461 (patch) | |
tree | d98ace468cdafb4fe0b981ea7254695acdbc13bd | |
parent | ec4d196b7bdbcf3533a18b28f7a143b0004d0d27 (diff) | |
download | chef-5d07da13f9909ea500ed8d76e83512f91ea3e461.tar.gz |
autofixing Style/MultilineIfThen cop
-rw-r--r-- | lib/chef/formatters/doc.rb | 4 | ||||
-rw-r--r-- | lib/chef/knife/core/gem_glob_loader.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/package.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/solaris.rb | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb index d43f1993b2..7dbbf1d948 100644 --- a/lib/chef/formatters/doc.rb +++ b/lib/chef/formatters/doc.rb @@ -32,9 +32,9 @@ class Chef def pretty_elapsed_time time = elapsed_time - if time < 60 then + if time < 60 message = Time.at(time).utc.strftime("%S seconds") - elsif time < 3600 then + elsif time < 3600 message = Time.at(time).utc.strftime("%M minutes %S seconds") else message = Time.at(time).utc.strftime("%H hours %M minutes %S seconds") diff --git a/lib/chef/knife/core/gem_glob_loader.rb b/lib/chef/knife/core/gem_glob_loader.rb index f5eff26903..bb129a652d 100644 --- a/lib/chef/knife/core/gem_glob_loader.rb +++ b/lib/chef/knife/core/gem_glob_loader.rb @@ -110,7 +110,7 @@ class Chef end def check_spec_for_glob(spec, glob) - dirs = if spec.require_paths.size > 1 then + dirs = if spec.require_paths.size > 1 "{#{spec.require_paths.join(',')}}" else spec.require_paths.first diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index cac0fb6eb0..82b85fb1e4 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -194,12 +194,12 @@ class Chef end def action_reconfig - if @current_resource.version == nil then + if @current_resource.version == nil Chef::Log.debug("#{@new_resource} is NOT installed - nothing to do") return end - unless @new_resource.response_file then + unless @new_resource.response_file Chef::Log.debug("#{@new_resource} no response_file provided - nothing to do") return end diff --git a/lib/chef/provider/service/solaris.rb b/lib/chef/provider/service/solaris.rb index 1e5398eba8..868b3e1ac1 100644 --- a/lib/chef/provider/service/solaris.rb +++ b/lib/chef/provider/service/solaris.rb @@ -40,7 +40,7 @@ class Chef @current_resource.service_name(@new_resource.service_name) [@init_command, @status_command].each do |cmd| - unless ::File.executable? cmd then + unless ::File.executable? cmd raise Chef::Exceptions::Service, "#{cmd} not executable!" end end |