Merge pull request #49 from genebean/dependabot/bundler/rubocop-0.86.0

Bump rubocop from 0.79.0 to 0.86.0
This commit is contained in:
Gene Liverman 2020-07-03 14:52:31 -04:00 committed by GitHub
commit 441d3bf83a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 42 deletions

View file

@ -3,6 +3,7 @@ AllCops:
- 'vendor/**/*' - 'vendor/**/*'
- 'spec/fixtures/**/*' - 'spec/fixtures/**/*'
TargetRubyVersion: 2.5 TargetRubyVersion: 2.5
NewCops: enable
Style/CommentedKeyword: Style/CommentedKeyword:
Enabled: false Enabled: false

View file

@ -3,13 +3,13 @@
# vim:ft=ruby # vim:ft=ruby
source 'https://rubygems.org' source 'https://rubygems.org'
# rubocop:disable ConditionalAssignment # rubocop:disable Style/ConditionalAssignment
if ENV.key?('PUPPET_VERSION') if ENV.key?('PUPPET_VERSION')
puppetversion = ENV['PUPPET_VERSION'].to_s puppetversion = ENV['PUPPET_VERSION'].to_s
else else
puppetversion = ['>= 5', '< 6'] puppetversion = ['>= 6', '< 7']
end end
# rubocop:enable ConditionalAssignment # rubocop:enable Style/ConditionalAssignment
group :production do group :production do
gem 'os', '~> 1.1' gem 'os', '~> 1.1'
@ -24,7 +24,7 @@ group :development, :unit_tests do
gem 'metadata-json-lint', '~> 2.4' gem 'metadata-json-lint', '~> 2.4'
gem 'puppetlabs_spec_helper', '~> 2.15' gem 'puppetlabs_spec_helper', '~> 2.15'
gem 'rspec-puppet', '~> 2.6' gem 'rspec-puppet', '~> 2.6'
gem 'rubocop', '~> 0.79' gem 'rubocop', '~> 0.86'
gem 'tty-command', '~> 0.6' gem 'tty-command', '~> 0.6'
gem 'tty-file', '~> 0.9' gem 'tty-file', '~> 0.9'
gem 'tty-prompt', '~> 0.21' gem 'tty-prompt', '~> 0.21'

View file

@ -4,14 +4,16 @@ GEM
CFPropertyList (2.3.6) CFPropertyList (2.3.6)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
ast (2.4.0) ast (2.4.1)
colored2 (3.1.2) colored2 (3.1.2)
concurrent-ruby (1.1.6)
cri (2.15.10) cri (2.15.10)
diff-lcs (1.3) deep_merge (1.2.1)
diff-lcs (1.4.4)
equatable (0.6.1) equatable (0.6.1)
facter (2.5.7) facter (4.0.29)
facter (2.5.7-universal-darwin) hocon (~> 1.3)
CFPropertyList (~> 2.2) thor (>= 1.0.1, < 2.0)
faraday (0.17.3) faraday (0.17.3)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
faraday_middleware (0.14.0) faraday_middleware (0.14.0)
@ -25,7 +27,8 @@ GEM
gettext (>= 3.0.2, < 3.3.0) gettext (>= 3.0.2, < 3.3.0)
locale locale
hiera (3.6.0) hiera (3.6.0)
jaro_winkler (1.5.4) hocon (1.3.1)
httpclient (2.8.3)
json (2.3.1) json (2.3.1)
json-schema (2.8.1) json-schema (2.8.1)
addressable (>= 2.4) addressable (>= 2.4)
@ -40,27 +43,37 @@ GEM
multipart-post (2.1.1) multipart-post (2.1.1)
necromancer (0.5.1) necromancer (0.5.1)
os (1.1.0) os (1.1.0)
parallel (1.19.1) parallel (1.19.2)
parser (2.7.0.1) parser (2.7.1.4)
ast (~> 2.4.0) ast (~> 2.4.1)
pastel (0.7.3) pastel (0.7.4)
equatable (~> 0.6) equatable (~> 0.6)
tty-color (~> 0.5) tty-color (~> 0.5)
pathspec (0.2.1) pathspec (0.2.1)
public_suffix (4.0.5) public_suffix (4.0.5)
puppet (5.5.20) puppet (6.16.0)
facter (> 2.0.1, < 4) concurrent-ruby (~> 1.0)
fast_gettext (~> 1.1.2) deep_merge (~> 1.0)
facter (> 2.0.1, < 5)
fast_gettext (~> 1.1)
hiera (>= 3.2.1, < 4) hiera (>= 3.2.1, < 4)
httpclient (~> 2.8)
locale (~> 2.1) locale (~> 2.1)
multi_json (~> 1.10) multi_json (~> 1.10)
puppet (5.5.20-universal-darwin) puppet-resource_api (~> 1.5)
semantic_puppet (~> 1.0)
puppet (6.16.0-universal-darwin)
CFPropertyList (~> 2.2) CFPropertyList (~> 2.2)
facter (> 2.0.1, < 4) concurrent-ruby (~> 1.0)
fast_gettext (~> 1.1.2) deep_merge (~> 1.0)
facter (> 2.0.1, < 5)
fast_gettext (~> 1.1)
hiera (>= 3.2.1, < 4) hiera (>= 3.2.1, < 4)
httpclient (~> 2.8)
locale (~> 2.1) locale (~> 2.1)
multi_json (~> 1.10) multi_json (~> 1.10)
puppet-resource_api (~> 1.5)
semantic_puppet (~> 1.0)
puppet-lint (2.4.2) puppet-lint (2.4.2)
puppet-lint-absolute_classname-check (2.0.0) puppet-lint-absolute_classname-check (2.0.0)
puppet-lint (>= 1.0, < 3.0) puppet-lint (>= 1.0, < 3.0)
@ -82,7 +95,9 @@ GEM
puppet-lint (>= 2.1, < 3.0) puppet-lint (>= 2.1, < 3.0)
puppet-lint-variable_contains_upcase (1.2.0) puppet-lint-variable_contains_upcase (1.2.0)
puppet-lint (>= 1.0, < 3.0) puppet-lint (>= 1.0, < 3.0)
puppet-syntax (3.0.1) puppet-resource_api (1.8.13)
hocon (>= 1.0)
puppet-syntax (3.1.0)
puppet (>= 5) puppet (>= 5)
rake rake
puppet_forge (2.3.4) puppet_forge (2.3.4)
@ -108,6 +123,8 @@ GEM
puppet_forge (~> 2.3.0) puppet_forge (~> 2.3.0)
rainbow (3.0.0) rainbow (3.0.0)
rake (13.0.1) rake (13.0.1)
regexp_parser (1.7.1)
rexml (3.2.4)
rspec (3.9.0) rspec (3.9.0)
rspec-core (~> 3.9.0) rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0) rspec-expectations (~> 3.9.0)
@ -123,18 +140,23 @@ GEM
rspec-puppet (2.7.8) rspec-puppet (2.7.8)
rspec rspec
rspec-support (3.9.3) rspec-support (3.9.3)
rubocop (0.79.0) rubocop (0.86.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.7.0.1) parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.0.3, < 1.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7) unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.1.0)
parser (>= 2.7.0.1)
ruby-progressbar (1.10.1) ruby-progressbar (1.10.1)
rugged (1.0.1) rugged (1.0.1)
semantic_puppet (1.0.2) semantic_puppet (1.0.2)
spdx-licenses (1.2.0) spdx-licenses (1.2.0)
text (1.3.1) text (1.3.1)
thor (1.0.1)
trollop (2.9.10) trollop (2.9.10)
tty-color (0.5.1) tty-color (0.5.1)
tty-command (0.9.0) tty-command (0.9.0)
@ -152,8 +174,8 @@ GEM
tty-cursor (~> 0.7) tty-cursor (~> 0.7)
tty-screen (~> 0.7) tty-screen (~> 0.7)
wisper (~> 2.0.0) wisper (~> 2.0.0)
tty-screen (0.7.1) tty-screen (0.8.0)
unicode-display_width (1.6.0) unicode-display_width (1.7.0)
wisper (2.0.1) wisper (2.0.1)
xmlrpc (0.3.0) xmlrpc (0.3.0)
yamllint (0.0.9) yamllint (0.0.9)
@ -168,7 +190,7 @@ DEPENDENCIES
json (>= 2.0.2) json (>= 2.0.2)
metadata-json-lint (~> 2.4) metadata-json-lint (~> 2.4)
os (~> 1.1) os (~> 1.1)
puppet (>= 5, < 6) puppet (>= 6, < 7)
puppet-lint (~> 2.3) puppet-lint (~> 2.3)
puppet-lint-absolute_classname-check (~> 2.0) puppet-lint-absolute_classname-check (~> 2.0)
puppet-lint-absolute_template_path (~> 1.0) puppet-lint-absolute_template_path (~> 1.0)
@ -183,7 +205,7 @@ DEPENDENCIES
puppetlabs_spec_helper (~> 2.15) puppetlabs_spec_helper (~> 2.15)
r10k (~> 3.5) r10k (~> 3.5)
rspec-puppet (~> 2.6) rspec-puppet (~> 2.6)
rubocop (~> 0.79) rubocop (~> 0.86)
rugged (~> 1.0) rugged (~> 1.0)
tty-command (~> 0.6) tty-command (~> 0.6)
tty-file (~> 0.9) tty-file (~> 0.9)
@ -192,4 +214,4 @@ DEPENDENCIES
yamllint (~> 0.0.9) yamllint (~> 0.0.9)
BUNDLED WITH BUNDLED WITH
2.0.2 2.1.2

View file

@ -14,13 +14,8 @@ exclude_paths = [
'spec/**/*' 'spec/**/*'
] ]
RuboCop::RakeTask.new(:rubocop) do |task| # https://docs.rubocop.org/rubocop/0.86/integration_with_other_tools.html#rake-integration
# task.patterns = ['lib/**/*.rb'] RuboCop::RakeTask.new
# only show the files with failures
# task.formatters = ['files']
# don't abort rake on failure
# task.fail_on_error = false
end
PuppetLint::RakeTask.new :lint do |config| PuppetLint::RakeTask.new :lint do |config|
config.fail_on_warnings = true config.fail_on_warnings = true
@ -37,9 +32,9 @@ task :validate do
end end
Dir['bin/**/*.rb', Dir['bin/**/*.rb',
'spec/**/*.rb'].each do |ruby_file| 'spec/**/*.rb'].each do |ruby_file|
# rubocop:disable RegexpLiteral # rubocop:disable Style/RegexpLiteral
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
# rubocop:enable RegexpLiteral # rubocop:enable Style/RegexpLiteral
end end
Dir['puppet/site/*/templates/**/*.erb'].each do |template| Dir['puppet/site/*/templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c" sh "erb -P -x -T '-' #{template} | ruby -c"

View file

@ -143,6 +143,9 @@ if [[ `uname` == 'Darwin' ]]; then
# use homebrew's ruby # use homebrew's ruby
[ -d /usr/local/opt/ruby/bin ] && export PATH=/usr/local/opt/ruby/bin:$PATH [ -d /usr/local/opt/ruby/bin ] && export PATH=/usr/local/opt/ruby/bin:$PATH
# hide ruby 2.7's extra output
export RUBYOPT='-W:no-deprecated -W:no-experimental'
# add gems to path # add gems to path
GEMBIN="$(gem environment gemdir)/bin" GEMBIN="$(gem environment gemdir)/bin"
export PATH=$PATH:$GEMBIN export PATH=$PATH:$GEMBIN

View file

@ -1,11 +1,8 @@
# frozen_string_literal: true # frozen_string_literal: true
forge 'http://forge.puppetlabs.com' forge 'http://forge.puppetlabs.com'
# rubocop:disable Metrics/LineLength
# The next line translates to '../../vendor/puppet_modules' aka ~/.dotfiles/vendor/puppet_modules # The next line translates to '../../vendor/puppet_modules' aka ~/.dotfiles/vendor/puppet_modules
moduledir "#{File.dirname(File.dirname(File.dirname(__FILE__)))}/vendor/puppet_modules" moduledir "#{File.dirname(File.dirname(File.dirname(__FILE__)))}/vendor/puppet_modules"
# rubocop:enable Metrics/LineLength
mod 'puppetlabs-apt', '7.3.0' mod 'puppetlabs-apt', '7.3.0'
mod 'puppetlabs-stdlib', '4.25.1' mod 'puppetlabs-stdlib', '4.25.1'

View file

@ -13,7 +13,7 @@ Facter.add(:os_release) do
line_data = line.split('=') line_data = line.split('=')
key = line_data[0].downcase key = line_data[0].downcase
value = line_data[1].strip.gsub(/(^\")|(\"$)/, '') value = line_data[1].strip.gsub(/(^")|("$)/, '')
os_release_hash[key] = value os_release_hash[key] = value
end end
end end