Skip to content

Commit f0b9060

Browse files
committed
pdksync_heads/master-0-gabccfb1
1 parent d7c3502 commit f0b9060

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
version: 1.1.x.{build}
3+
branches:
4+
only:
5+
- master
36
skip_commits:
47
message: /^\(?doc\)?.*/
58
clone_depth: 10

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@
9898
],
9999
"description": "Uses a combination of keytool and Ruby openssl library to manage entries in a Java keystore.",
100100
"template-url": "https://github.com/puppetlabs/pdk-templates",
101-
"template-ref": "heads/master-0-g8fc95db",
101+
"template-ref": "heads/master-0-gabccfb1",
102102
"pdk-version": "1.7.0"
103103
}

spec/spec_helper.rb

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
require 'puppetlabs_spec_helper/module_spec_helper'
22
require 'rspec-puppet-facts'
33

4-
begin
5-
require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb'))
6-
rescue LoadError => loaderror
7-
warn "Could not require spec_helper_local: #{loaderror.message}"
8-
end
4+
require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb'))
95

106
include RspecPuppetFacts
117

@@ -14,15 +10,19 @@
1410
facterversion: Facter.version,
1511
}
1612

17-
default_facts_path = File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml'))
18-
default_module_facts_path = File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml'))
13+
default_fact_files = [
14+
File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')),
15+
File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')),
16+
]
1917

20-
if File.exist?(default_facts_path) && File.readable?(default_facts_path)
21-
default_facts.merge!(YAML.safe_load(File.read(default_facts_path)))
22-
end
18+
default_fact_files.each do |f|
19+
next unless File.exist?(f) && File.readable?(f) && File.size?(f)
2320

24-
if File.exist?(default_module_facts_path) && File.readable?(default_module_facts_path)
25-
default_facts.merge!(YAML.safe_load(File.read(default_module_facts_path)))
21+
begin
22+
default_facts.merge!(YAML.safe_load(File.read(f)))
23+
rescue => e
24+
RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
25+
end
2626
end
2727

2828
RSpec.configure do |c|

0 commit comments

Comments
 (0)