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:
Adam Leff 2017-11-16 11:26:19 -05:00 committed by GitHub
parent 832c66087a
commit dde4a116d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 9 deletions

View file

@ -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:

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -4,5 +4,5 @@
# author: Christoph Hartmann
module Inspec
VERSION = '1.45.7'.freeze
VERSION = '1.45.7'
end