From 764689dfc2b282615dc86ff63793f155931c9635 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 8 Apr 2019 18:40:25 +0200 Subject: [PATCH] modulesync 2.7.0 --- .msync.yml | 2 +- .travis.yml | 28 ---------------------------- Dockerfile | 2 +- Gemfile | 5 +++-- Rakefile | 41 ++++++++--------------------------------- spec/spec_helper.rb | 4 ++++ 6 files changed, 17 insertions(+), 65 deletions(-) diff --git a/.msync.yml b/.msync.yml index 4c6463a5..55198916 100644 --- a/.msync.yml +++ b/.msync.yml @@ -1 +1 @@ -modulesync_config_version: '2.5.1' +modulesync_config_version: '2.7.0' diff --git a/.travis.yml b/.travis.yml index 5f51969d..b19073a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,10 +31,6 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - - rvm: 2.5.3 - bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker - services: docker - rvm: 2.5.3 bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker @@ -43,10 +39,6 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - - rvm: 2.5.3 - bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker - services: docker - rvm: 2.5.3 bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker @@ -55,10 +47,6 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - - rvm: 2.5.3 - bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker - services: docker - rvm: 2.5.3 bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker @@ -67,10 +55,6 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - - rvm: 2.5.3 - bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker - services: docker - rvm: 2.5.3 bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker @@ -79,10 +63,6 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - - rvm: 2.5.3 - bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker - services: docker - rvm: 2.5.3 bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker @@ -91,10 +71,6 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - - rvm: 2.5.3 - bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker - services: docker - rvm: 2.5.3 bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker @@ -103,10 +79,6 @@ matrix: bundler_args: --without development release env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker services: docker - - rvm: 2.5.3 - bundler_args: --without development release - env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker - services: docker branches: only: - master diff --git a/Dockerfile b/Dockerfile index 27a33cf6..67048bb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.5.1 +FROM ruby:2.5.3 WORKDIR /opt/puppet diff --git a/Gemfile b/Gemfile index 9524f1ab..24dbb7ff 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil) end group :test do - gem 'puppetlabs_spec_helper', '>= 2.11.0', :require => false + gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false gem 'rspec-puppet-facts', '>= 1.8.0', :require => false gem 'rspec-puppet-utils', :require => false gem 'puppet-lint-leading_zero-check', :require => false @@ -20,6 +20,7 @@ group :test do gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false gem 'puppet-lint-unquoted_string-check', :require => false gem 'puppet-lint-variable_contains_upcase', :require => false + gem 'puppet-lint-absolute_classname-check', :require => false gem 'metadata-json-lint', :require => false gem 'redcarpet', :require => false gem 'rubocop', '~> 0.49.1', :require => false @@ -64,7 +65,7 @@ group :release do gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator' gem 'puppet-blacksmith', :require => false gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem' - gem 'puppet-strings', '>= 1.0', :require => false + gem 'puppet-strings', '>= 2.2', :require => false end diff --git a/Rakefile b/Rakefile index 13ef17c0..09701d0f 100644 --- a/Rakefile +++ b/Rakefile @@ -3,19 +3,12 @@ require 'puppetlabs_spec_helper/rake_tasks' # load optional tasks for releases # only available if gem group releases is installed begin - require 'puppet_blacksmith/rake_tasks' require 'voxpupuli/release/rake_tasks' - require 'puppet-strings/tasks' rescue LoadError end PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}' -PuppetLint.configuration.fail_on_warnings = true -PuppetLint.configuration.send('relative') -PuppetLint.configuration.send('disable_140chars') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_documentation') -PuppetLint.configuration.send('disable_single_quote_string_with_variables') +PuppetLint.configuration.absolute_classname_reverse = true exclude_paths = %w( pkg/**/* @@ -28,8 +21,7 @@ PuppetSyntax.exclude_paths = exclude_paths desc 'Auto-correct puppet-lint offenses' task 'lint:auto_correct' do - PuppetLint.configuration.fix = true - Rake::Task[:lint].invoke + Rake::Task[:lint_fix].invoke end desc 'Run acceptance tests' @@ -37,10 +29,8 @@ RSpec::Core::RakeTask.new(:acceptance) do |t| t.pattern = 'spec/acceptance' end -desc 'Run tests release_checks' -task test: [ - :release_checks, -] +desc 'Run tests' +task test: [:release_checks] namespace :check do desc 'Check for trailing whitespace' @@ -69,25 +59,10 @@ task test_with_coveralls: [:test] do end end -desc "Print supported beaker sets" -task 'beaker_sets', [:directory] do |t, args| - directory = args[:directory] - - metadata = JSON.load(File.read('metadata.json')) - - (metadata['operatingsystem_support'] || []).each do |os| - (os['operatingsystemrelease'] || []).each do |release| - if directory - beaker_set = "#{directory}/#{os['operatingsystem'].downcase}-#{release}" - else - beaker_set = "#{os['operatingsystem'].downcase}-#{release}-x64" - end - - filename = "spec/acceptance/nodesets/#{beaker_set}.yml" - - puts beaker_set if File.exists? filename - end - end +desc 'Generate REFERENCE.md' +task :reference, [:debug, :backtrace] do |t, args| + patterns = '' + Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace]) end begin diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2f2279d2..c53e7031 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,10 @@ # This file is managed via modulesync # https://github.com/voxpupuli/modulesync # https://github.com/voxpupuli/modulesync_config +RSpec.configure do |c| + c.mock_with :rspec +end + require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet-facts' include RspecPuppetFacts