mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Update Rubocop to TargetRubyVersion 2.3 (#2311)
Bumps the Rubocop engine to use 2.3 and addresses the big changes between 2.0 and 2.3. Signed-off-by: Adam Leff <adam@leff.co>
This commit is contained in:
parent
832c66087a
commit
dde4a116d6
5 changed files with 12 additions and 9 deletions
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.3
|
||||
Exclude:
|
||||
- Gemfile
|
||||
- Rakefile
|
||||
|
@ -13,6 +14,8 @@ AlignParameters:
|
|||
Enabled: true
|
||||
Encoding:
|
||||
Enabled: true
|
||||
FrozenStringLiteralComment:
|
||||
Enabled: false
|
||||
HashSyntax:
|
||||
Enabled: true
|
||||
LineLength:
|
||||
|
|
|
@ -79,17 +79,17 @@ module Artifact
|
|||
KEY_BITS=2048
|
||||
KEY_ALG=OpenSSL::PKey::RSA
|
||||
|
||||
INSPEC_PROFILE_VERSION_1='INSPEC-PROFILE-1'.freeze
|
||||
INSPEC_REPORT_VERSION_1='INSPEC-REPORT-1'.freeze
|
||||
INSPEC_PROFILE_VERSION_1='INSPEC-PROFILE-1'
|
||||
INSPEC_REPORT_VERSION_1='INSPEC-REPORT-1'
|
||||
|
||||
ARTIFACT_DIGEST=OpenSSL::Digest::SHA512
|
||||
ARTIFACT_DIGEST_NAME='SHA512'.freeze
|
||||
ARTIFACT_DIGEST_NAME='SHA512'
|
||||
|
||||
VALID_PROFILE_VERSIONS=Set.new [INSPEC_PROFILE_VERSION_1]
|
||||
VALID_PROFILE_DIGESTS=Set.new [ARTIFACT_DIGEST_NAME]
|
||||
|
||||
SIGNED_PROFILE_SUFFIX='iaf'.freeze
|
||||
SIGNED_REPORT_SUFFIX='iar'.freeze
|
||||
SIGNED_PROFILE_SUFFIX='iaf'
|
||||
SIGNED_REPORT_SUFFIX='iar'
|
||||
|
||||
# rubocop:disable Metrics/ClassLength
|
||||
class CLI < Inspec::BaseCLI
|
||||
|
|
|
@ -8,7 +8,7 @@ require 'addressable/uri'
|
|||
|
||||
module Supermarket
|
||||
class API
|
||||
SUPERMARKET_URL = 'https://supermarket.chef.io'.freeze
|
||||
SUPERMARKET_URL = 'https://supermarket.chef.io'
|
||||
|
||||
# displays a list of profiles
|
||||
def self.profiles(supermarket_url = SUPERMARKET_URL)
|
||||
|
|
|
@ -189,7 +189,7 @@ module Inspec
|
|||
logger.warn(
|
||||
"Do not use deprecated `supports: #{x}` syntax. Instead use:\n"\
|
||||
"supports:\n - os-family: #{x}\n\n")
|
||||
{ :'os-family' => x }
|
||||
{ :'os-family' => x } # rubocop:disable Style/HashSyntax
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -203,7 +203,7 @@ module Inspec
|
|||
logger.warn(
|
||||
"Do not use deprecated `supports: #{x}` syntax. Instead use:\n"\
|
||||
"supports:\n - os-family: #{x}\n\n")
|
||||
[{ :'os-family' => x }]
|
||||
[{ :'os-family' => x }] # rubocop:disable Style/HashSyntax
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
# author: Christoph Hartmann
|
||||
|
||||
module Inspec
|
||||
VERSION = '1.45.7'.freeze
|
||||
VERSION = '1.45.7'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue