diff --git a/Rakefile b/Rakefile index 045b0fd..f4238d7 100755 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,4 @@ #!/usr/bin/env rake -# encoding: utf-8 # frozen_string_literal: true require 'rake/testtask' @@ -46,5 +45,4 @@ task :changelog do Rake::Task[:changelog].execute rescue LoadError puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks' - end diff --git a/controls/patches.rb b/controls/patches.rb index 509b0ce..509ccbf 100644 --- a/controls/patches.rb +++ b/controls/patches.rb @@ -1,4 +1,3 @@ -# encoding: utf-8 # frozen_string_literal: true # copyright: 2016, Christoph Hartmann diff --git a/libraries/linux_updates.rb b/libraries/linux_updates.rb index d173fd5..b1bb1ba 100644 --- a/libraries/linux_updates.rb +++ b/libraries/linux_updates.rb @@ -1,4 +1,3 @@ -# encoding: utf-8 # frozen_string_literal: true # copyright: 2016, Christoph Hartmann @@ -49,7 +48,7 @@ def updates end def uptodate? - return nil if @update_mgmt.nil? + return if @update_mgmt.nil? u = @update_mgmt.updates return false if u.nil? || !u['available'].empty? @@ -219,7 +218,7 @@ def updates unless cmd.exit_status.zero? # essentially we want https://github.com/chef/inspec/issues/1205 warn 'Could not determine patch status.' - return nil + return end first = cmd.stdout.index('{')