File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env rake
2- # encoding: utf-8
32# frozen_string_literal: true
43
54require 'cookstyle'
@@ -51,5 +50,4 @@ task :changelog do
5150 Rake ::Task [ :changelog ] . execute
5251rescue LoadError
5352 puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
54-
5553end
Original file line number Diff line number Diff line change 1- # encoding: utf-8
21# frozen_string_literal: true
32
43# copyright: 2016, Christoph Hartmann
Original file line number Diff line number Diff line change 1- # encoding: utf-8
21# frozen_string_literal: true
32
43# copyright: 2016, Christoph Hartmann
@@ -49,7 +48,7 @@ def updates
4948 end
5049
5150 def uptodate?
52- return nil if @update_mgmt . nil?
51+ return if @update_mgmt . nil?
5352
5453 u = @update_mgmt . updates
5554 return false if u . nil? || !u [ 'available' ] . empty?
@@ -198,7 +197,6 @@ def debian_base
198197
199198class RHELUpdateFetcher < UpdateFetcher
200199 def packages
201- # rubocop:disable Style/FormatStringToken
202200 rhel_packages = <<~PRINT_JSON
203201 sleep 2 && echo " "
204202 echo -n '{"installed":['
@@ -207,7 +205,6 @@ def packages
207205 echo -n ']}'
208206 PRINT_JSON
209207 parse_json ( rhel_packages )
210- # rubocop:enable Style/FormatStringToken
211208 end
212209
213210 def updates
@@ -219,7 +216,7 @@ def updates
219216 unless cmd . exit_status . zero?
220217 # essentially we want https://github.com/chef/inspec/issues/1205
221218 warn 'Could not determine patch status.'
222- return nil
219+ return
223220 end
224221
225222 first = cmd . stdout . index ( '{' )
You can’t perform that action at this time.
0 commit comments