From af5c5ad4aa1bfbe48cf1ad1571b15df86efc9a19 Mon Sep 17 00:00:00 2001 From: martyewings Date: Tue, 19 May 2020 14:38:58 +0100 Subject: [PATCH] pdk update --- .gitlab-ci.yml | 13 ++++++++----- .rubocop.yml | 7 +++++++ .travis.yml | 12 ++++++++---- Gemfile | 8 ++++---- Rakefile | 2 ++ metadata.json | 4 ++-- spec/default_facts.yml | 1 + spec/spec_helper.rb | 2 ++ 8 files changed, 34 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81e6d76..4868bf7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,22 +10,25 @@ cache: before_script: - bundle -v - rm Gemfile.lock || true - - gem update --system $RUBYGEMS_VERSION + - "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner" + - "# Set `rubygems_version` in the .sync.yml to set a value" + - "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set" + - '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION' - gem --version - bundle -v - bundle install --without system_tests --path vendor/bundle --jobs $(nproc) -syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.3-Puppet ~> 6: +syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.7-Puppet ~> 6: stage: syntax - image: ruby:2.5.3 + image: ruby:2.5.7 script: - bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop variables: PUPPET_GEM_VERSION: '~> 6' -parallel_spec-Ruby 2.5.3-Puppet ~> 6: +parallel_spec-Ruby 2.5.7-Puppet ~> 6: stage: unit - image: ruby:2.5.3 + image: ruby:2.5.7 script: - bundle exec rake parallel_spec variables: diff --git a/.rubocop.yml b/.rubocop.yml index 3cd2b0e..bab25db 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,6 +27,7 @@ GetText/DecorateString: Description: We don't want to decorate test output. Exclude: - spec/**/* + Enabled: false RSpec/BeforeAfterAll: Description: Beware of using after(:all) as it may cause state to leak between tests. A necessary evil in acceptance testing. @@ -88,6 +89,12 @@ Style/MethodCalledOnDoEndBlock: Enabled: true Style/StringMethods: Enabled: true +GetText/DecorateFunctionMessage: + Enabled: false +GetText/DecorateStringFormattingUsingInterpolation: + Enabled: false +GetText/DecorateStringFormattingUsingPercent: + Enabled: false Layout/EndOfLine: Enabled: false Layout/IndentHeredoc: diff --git a/.travis.yml b/.travis.yml index ed27d4d..68d3e96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,22 @@ --- +os: linux dist: xenial language: ruby cache: bundler before_install: - bundle -v - rm -f Gemfile.lock - - gem update --system $RUBYGEMS_VERSION + - "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner" + - "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used" + - "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set" + - '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION' - gem --version - bundle -v script: - 'bundle exec rake $CHECK' bundler_args: --without system_tests rvm: - - 2.5.3 + - 2.5.7 stages: - static - spec @@ -20,7 +24,7 @@ stages: - if: tag =~ ^v\d name: deploy -matrix: +jobs: fast_finish: true include: - @@ -32,7 +36,7 @@ matrix: stage: spec - env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec - rvm: 2.5.3 + rvm: 2.5.7 stage: spec - env: DEPLOY_TO_FORGE=yes diff --git a/Gemfile b/Gemfile index 2aeab8e..8007ad0 100644 --- a/Gemfile +++ b/Gemfile @@ -24,10 +24,10 @@ group :development do gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] - gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby] - gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby] - gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw] - gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw] + gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby] + gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby] + gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw] + gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw] end puppet_version = ENV['PUPPET_GEM_VERSION'] diff --git a/Rakefile b/Rakefile index 395df54..cb7ed0c 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any? require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-syntax/tasks/puppet-syntax' diff --git a/metadata.json b/metadata.json index f56a152..ee7aea5 100644 --- a/metadata.json +++ b/metadata.json @@ -61,6 +61,6 @@ } ], "pdk-version": "1.17.0", - "template-url": "https://github.com/puppetlabs/pdk-templates#1.13.0", - "template-ref": "tags/1.13.0-0-g66e1443" + "template-url": "https://github.com/puppetlabs/pdk-templates#1.17.0", + "template-ref": "tags/1.17.0-0-gd3a4319" } diff --git a/spec/default_facts.yml b/spec/default_facts.yml index ea1e480..f777abf 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -3,5 +3,6 @@ # Facts specified here will override the values provided by rspec-puppet-facts. --- ipaddress: "172.16.254.254" +ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" is_pe: false macaddress: "AA:AA:AA:AA:AA:AA" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index feb5720..35a1408 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet-facts'