diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d651650..e369e3c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,41 +1,41 @@ --- stages: - syntax - unit cache: paths: - vendor/bundle before_script: - bundle -v - rm Gemfile.lock || true - gem update --system - gem --version - bundle -v - bundle install --without system_tests --path vendor/bundle --jobs $(nproc) parallel_spec-Ruby 2.1.9-Puppet ~> 4.0: - stage: syntax + stage: unit image: ruby:2.1.9 script: - bundle exec rake parallel_spec variables: PUPPET_GEM_VERSION: '~> 4.0' 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 script: - bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop variables: PUPPET_GEM_VERSION: '~> 5.5' parallel_spec-Ruby 2.4.4-Puppet ~> 5.5: - stage: syntax + stage: unit image: ruby:2.4.4 script: - bundle exec rake parallel_spec variables: PUPPET_GEM_VERSION: '~> 5.5' diff --git a/.travis.yml b/.travis.yml index 81f77dd..4ea920d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,44 +1,44 @@ --- sudo: false dist: trusty language: ruby cache: bundler before_install: - bundle -v - rm -f Gemfile.lock - gem update --system - gem --version - bundle -v script: - 'bundle exec rake $CHECK' bundler_args: --without system_tests rvm: - - 2.4.1 + - 2.4.4 env: global: - BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0" 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: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec rvm: 2.1.9 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/metadata.json b/metadata.json index 5a2237b..a6ef209 100644 --- a/metadata.json +++ b/metadata.json @@ -1,44 +1,44 @@ { "name": "stm-debconf", "version": "2.2.1", "author": "stm", "summary": "Manage debconf database items on Debian based systems.", "license": "BSD-2-Clause", "source": "https://github.com/smoeding/puppet-debconf", "project_page": "https://github.com/smoeding/puppet-debconf", "issues_url": "https://github.com/smoeding/puppet-debconf/issues", "dependencies": [ ], "operatingsystem_support": [ { "operatingsystem": "Debian", "operatingsystemrelease": [ "7", "8", "9" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "14.04", "16.04", "17.10", "18.04" ] } ], "requirements": [ { "name": "puppet", "version_requirement": ">= 3.0.0 < 6.0.0" } ], "tags": [ "debconf" ], - "pdk-version": "1.6.0", + "pdk-version": "1.7.0", "template-url": "https://github.com/puppetlabs/pdk-templates", - "template-ref": "heads/master-0-gc87eee3" + "template-ref": "1.7.0-0-g57412ed" } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e69d11d..5e721b7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,45 +1,44 @@ - require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet-facts' begin require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb')) rescue LoadError => loaderror warn "Could not require spec_helper_local: #{loaderror.message}" end include RspecPuppetFacts default_facts = { puppetversion: Puppet.version, facterversion: Facter.version, } default_facts_path = File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')) default_module_facts_path = File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')) if File.exist?(default_facts_path) && File.readable?(default_facts_path) default_facts.merge!(YAML.safe_load(File.read(default_facts_path))) end if File.exist?(default_module_facts_path) && File.readable?(default_module_facts_path) default_facts.merge!(YAML.safe_load(File.read(default_module_facts_path))) end RSpec.configure do |c| c.default_facts = default_facts c.before :each do # set to strictest setting for testing # by default Puppet runs at warning level Puppet.settings[:strict] = :warning end end 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) last_module.const_get(next_module) end end # 'spec_overrides' from sync.yml will appear below this line