Browse Source

pdk update to 1.8.0

tags/0.1.6
Bernd Zeimetz 1 year ago
parent
commit
ef55fbd3e8
7 changed files with 23 additions and 19 deletions
  1. 1
    0
      .gitattributes
  2. 1
    1
      .travis.yml
  3. 1
    0
      Rakefile
  4. 3
    0
      appveyor.yml
  5. 3
    3
      metadata.json
  6. 0
    1
      spec/default_facts.yml
  7. 14
    14
      spec/spec_helper.rb

+ 1
- 0
.gitattributes View File

@@ -2,3 +2,4 @@
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
*.epp eol=lf

+ 1
- 1
.travis.yml View File

@@ -13,7 +13,7 @@ script:
- 'bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- 2.5.0
- 2.5.1
env:
global:
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"

+ 1
- 0
Rakefile View File

@@ -2,6 +2,7 @@ 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?
require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
require 'puppet-lint/tasks/puppet-lint'
require 'puppetlabs_spec_helper/rake_tasks'


+ 3
- 0
appveyor.yml View File

@@ -1,5 +1,8 @@
---
version: 1.1.x.{build}
branches:
only:
- master
skip_commits:
message: /^\(?doc\)?.*/
clone_depth: 10

+ 3
- 3
metadata.json View File

@@ -96,7 +96,7 @@
"version_requirement": ">= 4.7.0 < 6.0.0"
}
],
"pdk-version": "1.7.1",
"pdk-version": "1.8.0",
"template-url": "file:///opt/puppetlabs/pdk/share/cache/pdk-templates.git",
"template-ref": "1.7.1-0-g810b982"
}
"template-ref": "1.8.0-0-g0d9da00"
}

+ 0
- 1
spec/default_facts.yml View File

@@ -2,7 +2,6 @@
#
# Facts specified here will override the values provided by rspec-puppet-facts.
---
concat_basedir: ""
ipaddress: "172.16.254.254"
is_pe: false
macaddress: "AA:AA:AA:AA:AA:AA"

+ 14
- 14
spec/spec_helper.rb View File

@@ -1,11 +1,7 @@
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
require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb'))

include RspecPuppetFacts

@@ -14,15 +10,19 @@ default_facts = {
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'))
default_fact_files = [
File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')),
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
default_fact_files.each do |f|
next unless File.exist?(f) && File.readable?(f) && File.size?(f)

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)))
begin
default_facts.merge!(YAML.safe_load(File.read(f)))
rescue => e
RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
end
end

RSpec.configure do |c|
@@ -36,8 +36,8 @@ 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)
last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)
last_module.const_get(next_module, false)
end
end


Loading…
Cancel
Save