]> gitweb.fluxo.info Git - puppet-mailalias_core.git/commitdiff
(maint) update to PDK 1.16.0
authormihaibuzgau <mihai.buzgau@puppet.com>
Thu, 6 Feb 2020 16:15:09 +0000 (18:15 +0200)
committermihaibuzgau <mihai.buzgau@puppet.com>
Mon, 10 Feb 2020 17:36:42 +0000 (19:36 +0200)
18 files changed:
.gitignore
.gitlab-ci.yml
.pdkignore
.project [deleted file]
.puppet-lint.rc
.rubocop.yml
.sync.yml
.travis.yml
.vscode/extensions.json [new file with mode: 0644]
CHANGELOG.md
Gemfile
Rakefile
appveyor.yml
data/common.yaml [new file with mode: 0644]
hiera.yaml [new file with mode: 0644]
metadata.json
spec/default_facts.yml
spec/spec_helper.rb

index 650022e58e7fcced551fb38f7bfdf73e65cb3e84..2767022cd600dd0eb9d85289e0af0fda19b3b2e6 100644 (file)
@@ -22,3 +22,6 @@
 /convert_report.txt
 /update_report.txt
 .DS_Store
+.project
+.envrc
+/inventory.yaml
index ea59806f8930dbc8fafe0b03eaacb6992a165e49..dd448e8ced808a3a617597f2acfdee5209b30799 100644 (file)
@@ -10,33 +10,35 @@ 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)
 
-parallel_spec-Ruby 2.1.9-Puppet ~> 4.0:
-  stage: unit
-  image: ruby:2.1.9
+syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.3-Puppet ~> 6:
+  stage: syntax
+  image: ruby:2.5.3
   script:
-    - bundle exec rake parallel_spec
+    - bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
   variables:
-    PUPPET_GEM_VERSION: '~> 4.0'
-    RUBYGEMS_VERSION: '2.7.8'
+    PUPPET_GEM_VERSION: '~> 6'
 
-syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.4.4-Puppet ~> 5.5:
-  stage: syntax
-  image: ruby:2.4.4
+parallel_spec-Ruby 2.5.3-Puppet ~> 6:
+  stage: unit
+  image: ruby:2.5.3
   script:
-    - bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
+    - bundle exec rake parallel_spec
   variables:
-    PUPPET_GEM_VERSION: '~> 5.5'
+    PUPPET_GEM_VERSION: '~> 6'
 
-parallel_spec-Ruby 2.4.4-Puppet ~> 5.5:
+parallel_spec-Ruby 2.4.5-Puppet ~> 5:
   stage: unit
-  image: ruby:2.4.4
+  image: ruby:2.4.5
   script:
     - bundle exec rake parallel_spec
   variables:
-    PUPPET_GEM_VERSION: '~> 5.5'
+    PUPPET_GEM_VERSION: '~> 5'
 
index b713b3b1f79b287fc7c489e7140f2a55dd89b5ba..e6215cd0cbfdfab41b9bb612a4d27a343b109f60 100644 (file)
@@ -22,6 +22,9 @@
 /convert_report.txt
 /update_report.txt
 .DS_Store
+.project
+.envrc
+/inventory.yaml
 /appveyor.yml
 /.fixtures.yml
 /Gemfile
 /.gitlab-ci.yml
 /.pdkignore
 /Rakefile
+/rakelib/
 /.rspec
 /.rubocop.yml
 /.travis.yml
 /.yardopts
 /spec/
+/.vscode/
diff --git a/.project b/.project
deleted file mode 100644 (file)
index c93c021..0000000
--- a/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>puppetlabs-mailalias_core</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
-               <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
-       </natures>
-</projectDescription>
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cc96ece0513d69709b87af611173e2a6e4532f62 100644 (file)
@@ -0,0 +1 @@
+--relative
index f5a6c2a412a28a8d7f91c6f672de9b87d3ba6ac1..bab25db5361fca376f4282262de0554e2f2338d2 100644 (file)
@@ -1,5 +1,7 @@
 ---
-require: rubocop-rspec
+require:
+- rubocop-rspec
+- rubocop-i18n
 AllCops:
   DisplayCopNames: true
   TargetRubyVersion: '2.1'
@@ -19,10 +21,13 @@ AllCops:
 Metrics/LineLength:
   Description: People have wide screens, use them.
   Max: 200
+GetText:
+  Enabled: false
 GetText/DecorateString:
   Description: We don't want to decorate test output.
   Exclude:
-  - spec/*
+  - 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.
@@ -84,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:
index 34b1c2f41327f45e7de812c087957421d666cabf..62975f924a1bcf8557264af5f7ef413a5d5c5519 100644 (file)
--- a/.sync.yml
+++ b/.sync.yml
@@ -1,5 +1,11 @@
 ---
 Gemfile:
+  optional:
+    ':development':
+      - gem: 'github_changelog_generator'
+        git: 'https://github.com/skywinder/github-changelog-generator'
+        ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
+        condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
   required:
     ':system_tests':
       - gem: 'puppet-module-posix-system-r#{minor_version}'
@@ -24,6 +30,7 @@ Gemfile:
       - gem: puppet-strings
 
 Rakefile:
+  changelog_version_tag_pattern: '%s'
   requires:
     - puppet-lint/tasks/puppet-lint
 
index fdb8668ada6aa8fc9425f696825f3a1fc8e787a0..cc78f7dbbb1f50bb4599cf53fe080abd5817c0db 100644 (file)
@@ -1,49 +1,48 @@
 ---
-dist: trusty
+dist: xenial
 language: ruby
 cache: bundler
 before_install:
-  - if [ $BUNDLER_VERSION ]; then
-      gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri;
-    fi
   - 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.1
-env:
-  global:
-    - BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
+  - 2.5.3
+stages:
+  - static
+  - spec
+  - acceptance
+  -
+    if: tag =~ ^v\d
+    name: deploy
 matrix:
   fast_finish: true
   include:
     -
-      env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
-    -
-      env: CHECK=parallel_spec
+      env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
+      stage: static
     -
       env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
-      rvm: 2.4.4
+      rvm: 2.4.5
+      stage: spec
+    -
+      env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
+      rvm: 2.5.3
+      stage: spec
     -
-      env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec RUBYGEMS_VERSION=2.7.8 BUNDLER_VERSION=1.17.3
-      rvm: 2.1.9
+      env: DEPLOY_TO_FORGE=yes
+      stage: deploy
 branches:
   only:
     - master
     - /^v\d/
 notifications:
   email: false
-deploy:
-  provider: puppetforge
-  user: puppet
-  password:
-    secure: ""
-  on:
-    tags: true
-    all_branches: true
-    condition: "$DEPLOY_TO_FORGE = yes"
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644 (file)
index 0000000..6177782
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "recommendations": [
+    "jpogran.puppet-vscode",
+    "rebornix.Ruby"
+  ]
+}
index 09f7137f7ff1ad9cfb529c340c98416dc33888ac..aaea6e5b4d9cd40735bbde07b2107ce815f7c6bf 100644 (file)
@@ -1,46 +1,53 @@
-# Changelog
+# Change log
 
-All notable changes to this project will be documented in this file.
+All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
 
-The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
+## [1.0.6](https://github.com/puppetlabs/puppetlabs-mailalias_core/tree/1.0.6) (2020-02-10)
 
-## [1.0.5] - 2019-01-11
-### Added
-- Added LICENSE file
-- Added test matrix to test against puppet 6
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.5...1.0.6)
+
+### Fixed
+
+- \(MODULES-7202\) fixes comma handling in value [\#21](https://github.com/puppetlabs/puppetlabs-mailalias_core/pull/21) ([ciprianbadescu](https://github.com/ciprianbadescu))
+
+## [1.0.5](https://github.com/puppetlabs/puppetlabs-mailalias_core/tree/1.0.5) (2019-01-11)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.4...1.0.5)
 
-## [1.0.4] - 2018-08-17
 ### Added
-- (PUP-9053) Enable localization
-### Changed
-- (PUP-9052) Bump puppet req to at least puppet 6
 
-## [1.0.3] - 2018-05-18
-### Changed
-- Update PDK to 1.5.0
-- Change mocks to use rspec rather than mocha
-- Update acceptance tests to run successfully in a random order
+- \(maint\) add LICENSE file [\#17](https://github.com/puppetlabs/puppetlabs-mailalias_core/pull/17) ([melissa](https://github.com/melissa))
+- Add anchors for l10n [\#16](https://github.com/puppetlabs/puppetlabs-mailalias_core/pull/16) ([joshcooper](https://github.com/joshcooper))
+
+### UNCATEGORIZED PRS; GO LABEL THEM
+
+- Drop version requirement down a few notches [\#14](https://github.com/puppetlabs/puppetlabs-mailalias_core/pull/14) ([binford2k](https://github.com/binford2k))
+
+## [1.0.4](https://github.com/puppetlabs/puppetlabs-mailalias_core/tree/1.0.4) (2018-08-17)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.3...1.0.4)
 
-## [1.0.2] - 2018-04-30
 ### Added
-- Gem dependency on puppet-blacksmith, which is required to ship to the module
-  to forge.puppet.com
-### Changed
-- The Gemfile and spec/spec_helper.rb are managed by pdk. Any additional content
-  for these files should be defined in .syn.yml and spec/spec_helper_local.rb
-  respectively
-
-## [1.0.1] - 2018-04-30
-### Summary
-This is an empty release to test the release pipeline
-
-## [1.0.0] - 2018-04-27
-### Summary
-This is the initial release of the extracted mailalias module
-
-[1.0.5]: https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.4...1.0.5
-[1.0.4]: https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.3...1.0.4
-[1.0.3]: https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.2...1.0.3
-[1.0.2]: https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.1...1.0.2
-[1.0.1]: https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.0...1.0.1
-[1.0.0]: https://github.com/puppetlabs/puppetlabs-mailalias_core/releases/tag/1.0.0
+
+- Pass hosts array to install\_modules\_on [\#11](https://github.com/puppetlabs/puppetlabs-mailalias_core/pull/11) ([joshcooper](https://github.com/joshcooper))
+- Bump puppet version contraint to \< 7 [\#9](https://github.com/puppetlabs/puppetlabs-mailalias_core/pull/9) ([melissa](https://github.com/melissa))
+
+## [1.0.3](https://github.com/puppetlabs/puppetlabs-mailalias_core/tree/1.0.3) (2018-05-21)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.2...1.0.3)
+
+## [1.0.2](https://github.com/puppetlabs/puppetlabs-mailalias_core/tree/1.0.2) (2018-04-30)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.1...1.0.2)
+
+## [1.0.1](https://github.com/puppetlabs/puppetlabs-mailalias_core/tree/1.0.1) (2018-04-30)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/1.0.0...1.0.1)
+
+## [1.0.0](https://github.com/puppetlabs/puppetlabs-mailalias_core/tree/1.0.0) (2018-04-27)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-mailalias_core/compare/7c51be1c0d8ace7cb679f16ee4d8e3697ea95ae8...1.0.0)
+
+
+
+\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
diff --git a/Gemfile b/Gemfile
index 8f4f302d6c1f316c28fdea67b37f53400b56e535..3eda1e6f17004ee0f957ad33fd9e6110f2056142 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -17,17 +17,19 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
 minor_version = ruby_version_segments[0..1].join('.')
 
 group :development do
-  gem "fast_gettext", '1.1.0',                         require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
-  gem "fast_gettext",                                  require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
-  gem "json_pure", '<= 2.0.1',                         require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
-  gem "json", '= 1.8.1',                               require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
-  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 "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
-  gem "puppet-module-posix-dev-r#{minor_version}",     require: false, platforms: [:ruby]
-  gem "puppet-module-win-default-r#{minor_version}",   require: false, platforms: [:mswin, :mingw, :x64_mingw]
-  gem "puppet-module-win-dev-r#{minor_version}",       require: false, platforms: [:mswin, :mingw, :x64_mingw]
-  gem "puppet-strings",                                require: false
+  gem "fast_gettext", '1.1.0',                                   require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
+  gem "fast_gettext",                                            require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
+  gem "json_pure", '<= 2.0.1',                                   require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
+  gem "json", '= 1.8.1',                                         require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
+  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.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]
+  gem "puppet-strings",                                          require: false
+  gem "github_changelog_generator",                              require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
 end
 group :system_tests do
   gem "puppet-module-posix-system-r#{minor_version}",                            require: false, platforms: [:ruby]
index 2d60dbbda632893569cdebf9e20ba9fd80fe0ab3..79e935e7a267fd6d9dae4687ee0a9e834d3b7ca5 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,6 @@
+# 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'
 require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
@@ -15,15 +18,24 @@ end
 
 def changelog_project
   return unless Rake.application.top_level_tasks.include? "changelog"
-  returnVal = nil || JSON.load(File.read('metadata.json'))['name']
-  raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
+
+  returnVal = nil
+  returnVal ||= begin
+    metadata_source = JSON.load(File.read('metadata.json'))['source']
+    metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
+
+    metadata_source_match && metadata_source_match[1]
+  end
+
+  raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
+
   puts "GitHubChangelogGenerator project:#{returnVal}"
   returnVal
 end
 
 def changelog_future_release
   return unless Rake.application.top_level_tasks.include? "changelog"
-  returnVal = JSON.load(File.read('metadata.json'))['version']
+  returnVal = "%s" % JSON.load(File.read('metadata.json'))['version']
   raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
   puts "GitHubChangelogGenerator future_release:#{returnVal}"
   returnVal
index f14e28d98ad16ca3d98a9cf6777ce3c2c6574e2a..ec389492f610e19f8dafb0461bcdb341cd4c636d 100644 (file)
@@ -3,6 +3,7 @@ version: 1.1.x.{build}
 branches:
   only:
     - master
+    - release
 skip_commits:
   message: /^\(?doc\)?.*/
 clone_depth: 10
@@ -17,14 +18,6 @@ environment:
     -
       RUBY_VERSION: 24-x64
       CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
-    -
-      PUPPET_GEM_VERSION: ~> 4.0
-      RUBY_VERSION: 21
-      CHECK: parallel_spec
-    -
-      PUPPET_GEM_VERSION: ~> 4.0
-      RUBY_VERSION: 21-x64
-      CHECK: parallel_spec
     -
       PUPPET_GEM_VERSION: ~> 5.0
       RUBY_VERSION: 24
diff --git a/data/common.yaml b/data/common.yaml
new file mode 100644 (file)
index 0000000..ed97d53
--- /dev/null
@@ -0,0 +1 @@
+---
diff --git a/hiera.yaml b/hiera.yaml
new file mode 100644 (file)
index 0000000..2251c23
--- /dev/null
@@ -0,0 +1,21 @@
+---
+version: 5
+
+defaults:  # Used for any hierarchy level that omits these keys.
+  datadir: data         # This path is relative to hiera.yaml's directory.
+  data_hash: yaml_data  # Use the built-in YAML backend.
+
+hierarchy:
+  - name: "osfamily/major release"
+    paths:
+      - "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
+        # Used for Solaris
+      - "os/%{facts.os.family}/%{facts.kernelrelease}.yaml"
+        # Used to distinguish between Debian and Ubuntu
+      - "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
+  - name: "osfamily"
+    paths:
+      - "os/%{facts.os.family}.yaml"
+      - "os/%{facts.os.name}.yaml"
+  - name: 'common'
+    path: 'common.yaml'
index 7b18a524d527846af9b5d7336ec99b632bc0a67e..812b12d70a91f40a89787beb926a985ed8923f31 100644 (file)
@@ -1,7 +1,7 @@
 {
   "name": "puppetlabs-mailalias_core",
-  "version": "1.0.5",
-  "author": "Puppet Labs",
+  "version": "1.0.6",
+  "author": "puppetlabs",
   "summary": "Creates an email alias in the local alias database.",
   "license": "Apache-2.0",
   "source": "https://github.com/puppetlabs/puppetlabs-mailalias_core",
@@ -78,7 +78,7 @@
       "version_requirement": ">= 4.10.0 < 7.0.0"
     }
   ],
-  "pdk-version": "1.8.0",
-  "template-url": "https://github.com/puppetlabs/pdk-templates",
-  "template-ref": "heads/master-0-gd61c0a4"
-}
\ No newline at end of file
+  "pdk-version": "1.16.0",
+  "template-url": "https://github.com/puppetlabs/pdk-templates#1.16.0",
+  "template-ref": "1.16.0-0-gaf44904"
+}
index ea1e4808e3a67f50ea6d64d23a0eb8b3fd25437f..f777abfc9905202e7ccf5b5fcc76b9b4c59a39fb 100644 (file)
@@ -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"
index 0a030e67292b31afcf7bba9f9f06d7daf280f31a..e92dced858a9e28e50f4df85c01e6d0881d53ed5 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 RSpec.configure do |c|
   c.mock_with :rspec
 end
@@ -23,12 +25,17 @@ default_fact_files.each do |f|
   next unless File.exist?(f) && File.readable?(f) && File.size?(f)
 
   begin
-    default_facts.merge!(YAML.safe_load(File.read(f)))
+    default_facts.merge!(YAML.safe_load(File.read(f), [], [], true))
   rescue => e
     RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
   end
 end
 
+# read default_facts and merge them over what is provided by facterdb
+default_facts.each do |fact, value|
+  add_custom_fact fact, value
+end
+
 RSpec.configure do |c|
   c.default_facts = default_facts
   c.before :each do
@@ -36,8 +43,13 @@ RSpec.configure do |c|
     # by default Puppet runs at warning level
     Puppet.settings[:strict] = :warning
   end
+  c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
+  c.after(:suite) do
+  end
 end
 
+# Ensures that a module is defined
+# @param module_name Name of the module
 def ensure_module_defined(module_name)
   module_name.split('::').reduce(Object) do |last_module, next_module|
     last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)