Skip to content

Commit 06789a7

Browse files
committed
apply cookstyle fixes
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
1 parent 84e1480 commit 06789a7

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

Rakefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env rake
2-
# encoding: utf-8
32
# frozen_string_literal: true
43

54
require 'cookstyle'
@@ -51,5 +50,4 @@ task :changelog do
5150
Rake::Task[:changelog].execute
5251
rescue LoadError
5352
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
54-
5553
end

controls/patches.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# encoding: utf-8
21
# frozen_string_literal: true
32

43
# copyright: 2016, Christoph Hartmann

libraries/linux_updates.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
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

199198
class 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('{')

0 commit comments

Comments
 (0)