Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,3 @@
AllCops:
Exclude:
- vendor/**/*
Documentation:
Enabled: false
Layout/ParameterAlignment:
Enabled: true
HashSyntax:
Enabled: true
LineLength:
Enabled: false
EmptyLinesAroundBlockBody:
Enabled: false
Style/Encoding:
Enabled: false
MethodLength:
Max: 40
NumericLiterals:
MinDigits: 10
Metrics/BlockLength:
Max: 35
Metrics/CyclomaticComplexity:
Max: 10
Metrics/PerceivedComplexity:
Max: 10
Metrics/AbcSize:
Max: 30
# Lint/AmbiguousBlockAssociation is incompatible with RSpec
# https://github.com/rubocop-hq/rubocop/issues/4222
Lint/AmbiguousBlockAssociation:
Enabled: false
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

source 'https://rubygems.org'

gem 'cookstyle'
gem 'highline'
gem 'rack'
gem 'rake'
Expand Down
7 changes: 5 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env rake
# encoding: utf-8
# frozen_string_literal: true

require 'cookstyle'
require 'rake/testtask'
require 'rubocop/rake_task'

Expand All @@ -11,6 +11,10 @@ task :rubocop do
RuboCop::RakeTask.new
end

RuboCop::RakeTask.new(:cookstyle) do |task|
task.options << '--display-cop-names'
end

# lint the project
desc 'Run robocop linter'
task lint: [:rubocop]
Expand Down Expand Up @@ -46,5 +50,4 @@ task :changelog do
Rake::Task[:changelog].execute
rescue LoadError
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'

end
1 change: 0 additions & 1 deletion controls/patches.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
# frozen_string_literal: true

# copyright: 2016, Christoph Hartmann
Expand Down
7 changes: 2 additions & 5 deletions libraries/linux_updates.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
# frozen_string_literal: true

# copyright: 2016, Christoph Hartmann
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -198,7 +197,6 @@ def debian_base

class RHELUpdateFetcher < UpdateFetcher
def packages
# rubocop:disable Style/FormatStringToken
rhel_packages = <<~PRINT_JSON
sleep 2 && echo " "
echo -n '{"installed":['
Expand All @@ -207,7 +205,6 @@ def packages
echo -n ']}'
PRINT_JSON
parse_json(rhel_packages)
# rubocop:enable Style/FormatStringToken
end

def updates
Expand All @@ -219,7 +216,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('{')
Expand Down