facter 4.0.16 → 4.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +13 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +10 -0
- data/Rakefile +32 -0
- data/VERSION +1 -1
- data/lib/facter.rb +6 -3
- data/lib/framework/core/fact_loaders/external_fact_loader.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5045cd46bc46b826aee23e2da1e62dc583e5daf0216a3ca31098970f55bd3d77
|
4
|
+
data.tar.gz: 6ebd3870b201a82fad831783ee0d3b2cc84fa0bce81e4600b56f6d2ec8ecdc4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61874498a45ac854b2da205e441bed65880f9cf92ff094c7c04ad3d984189873bfb25be34ac9221f3266839a7f977eda610323fb1db033eafc58a918d71eaf02
|
7
|
+
data.tar.gz: 5ee49a1e8742b4ba9f63a6436a637366d316c170f43c5da677130ad9a6036442c81456265b37935d5c527feb82df78bfaa2e69c05918fd1fb70e55c442e51fbc
|
@@ -0,0 +1,13 @@
|
|
1
|
+
PLEASE LABEL YOUR PULL REQUEST ACCORDINGLY!
|
2
|
+
|
3
|
+
Choose only one of the following:
|
4
|
+
|
5
|
+
"backwards-incompatible" - use this label for PRs that breaks some old functionality
|
6
|
+
|
7
|
+
"feature" - use this label for new added functionality
|
8
|
+
|
9
|
+
"bugfix" - use this label for PRs that contain fixes
|
10
|
+
|
11
|
+
"maintenance" - use this label for PRs that contain trivial changes (eg. changes in unit tests)
|
12
|
+
|
13
|
+
Also please add "community" additional label if you're part of puppet community (special attention will be provided for those PRs).
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
|
2
2
|
|
3
|
+
## [4.0.17](https://github.com/puppetlabs/facter-ng/tree/4.0.17) (2020-04-21)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/puppetlabs/facter-ng/compare/4.0.16...4.0.17)
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- \(FACT-2562\) Correctly load custom and external fact directories [\#458](https://github.com/puppetlabs/facter-ng/pull/458) ([IrimieBogdan](https://github.com/IrimieBogdan))
|
10
|
+
|
11
|
+
|
12
|
+
|
3
13
|
## [4.0.16](https://github.com/puppetlabs/facter-ng/tree/4.0.16) (2020-04-15)
|
4
14
|
|
5
15
|
[Full Changelog](https://github.com/puppetlabs/facter-ng/compare/4.0.15...4.0.16)
|
data/Rakefile
CHANGED
@@ -8,7 +8,39 @@ Dir.glob(File.join('tasks/**/*.rake')).each { |file| load file }
|
|
8
8
|
|
9
9
|
task default: :spec
|
10
10
|
|
11
|
+
desc 'verify that commit messages match CONTRIBUTING.md requirements'
|
12
|
+
task(:commits) do
|
13
|
+
# This rake task looks at the summary from every commit from this branch not
|
14
|
+
# in the branch targeted for a PR. This is accomplished by using the
|
15
|
+
# TRAVIS_COMMIT_RANGE environment variable, which is present in travis CI and
|
16
|
+
# populated with the range of commits the PR contains. If not available, this
|
17
|
+
# falls back to `master..HEAD` as a next best bet as `master` is unlikely to
|
18
|
+
# ever be absent.
|
19
|
+
commit_range = ENV['TRAVIS_COMMIT_RANGE'].nil? ? 'master..HEAD' : ENV['TRAVIS_COMMIT_RANGE'].sub(/\.\.\./, '..')
|
20
|
+
puts "Checking commits #{commit_range}"
|
21
|
+
`git log --no-merges --pretty=%s #{commit_range}`.each_line do |commit_summary|
|
22
|
+
# This regex tests for the currently supported commit summary tokens: maint, doc, gem, or fact-<number>.
|
23
|
+
# The exception tries to explain it in more full.
|
24
|
+
if /^\((maint|doc|docs|gem|fact-\d+)\)|revert/i.match(commit_summary).nil?
|
25
|
+
raise "\n\n\n\tThis commit summary didn't match CONTRIBUTING.md guidelines:\n" \
|
26
|
+
"\n\t\t#{commit_summary}\n" \
|
27
|
+
"\tThe commit summary (i.e. the first line of the commit message) should start with one of:\n" \
|
28
|
+
"\t\t(FACT-<digits>) # this is most common and should be a ticket at tickets.puppet.com\n" \
|
29
|
+
"\t\t(docs)\n" \
|
30
|
+
"\t\t(docs)(DOCUMENT-<digits>)\n" \
|
31
|
+
"\t\t(maint)\n" \
|
32
|
+
"\t\t(gem)\n" \
|
33
|
+
"\n\tThis test for the commit summary is case-insensitive.\n\n\n"
|
34
|
+
else
|
35
|
+
puts commit_summary.to_s
|
36
|
+
end
|
37
|
+
puts '...passed'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
11
41
|
def retrieve_from_keyboard
|
42
|
+
return unless ARGV =~ /changelog/
|
43
|
+
|
12
44
|
puts "Please provide the next release tag:\n"
|
13
45
|
next_version = $stdin.gets.chomp
|
14
46
|
raise(ArgumentError, ' The string that you entered is invalid!') unless /[0-9]+\.[0-9]+\.[0-9]+/.match?(next_version)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.0.
|
1
|
+
4.0.17
|
data/lib/facter.rb
CHANGED
@@ -131,6 +131,8 @@ module Facter
|
|
131
131
|
# @api public
|
132
132
|
def reset
|
133
133
|
LegacyFacter.reset
|
134
|
+
Options[:custom_dir] = []
|
135
|
+
Options[:external_dir] = []
|
134
136
|
LegacyFacter.search(*Options.custom_dir)
|
135
137
|
LegacyFacter.search_external(Options.external_dir)
|
136
138
|
nil
|
@@ -145,6 +147,7 @@ module Facter
|
|
145
147
|
#
|
146
148
|
# @api public
|
147
149
|
def search(*dirs)
|
150
|
+
Options[:custom_dir] += dirs
|
148
151
|
LegacyFacter.search(*dirs)
|
149
152
|
end
|
150
153
|
|
@@ -156,6 +159,7 @@ module Facter
|
|
156
159
|
#
|
157
160
|
# @api public
|
158
161
|
def search_external(dirs)
|
162
|
+
Options[:external_dir] += dirs
|
159
163
|
LegacyFacter.search_external(dirs)
|
160
164
|
end
|
161
165
|
|
@@ -165,7 +169,7 @@ module Facter
|
|
165
169
|
#
|
166
170
|
# @api public
|
167
171
|
def search_external_path
|
168
|
-
|
172
|
+
Options.external_dir
|
169
173
|
end
|
170
174
|
|
171
175
|
# Returns the registered search directories for custom facts.
|
@@ -174,7 +178,7 @@ module Facter
|
|
174
178
|
#
|
175
179
|
# @api public
|
176
180
|
def search_path
|
177
|
-
|
181
|
+
Options.custom_dir
|
178
182
|
end
|
179
183
|
|
180
184
|
# Gets a hash mapping fact names to their values
|
@@ -186,7 +190,6 @@ module Facter
|
|
186
190
|
def to_hash
|
187
191
|
log_blocked_facts
|
188
192
|
|
189
|
-
reset
|
190
193
|
resolved_facts = Facter::FactManager.instance.resolve_facts
|
191
194
|
Facter::SessionCache.invalidate_all_caches
|
192
195
|
Facter::FactCollection.new.build_fact_collection!(resolved_facts)
|
@@ -19,6 +19,7 @@ module Facter
|
|
19
19
|
# The search paths must be set before creating the fact collection.
|
20
20
|
# If we set them after, they will not be visible.
|
21
21
|
def load_search_paths
|
22
|
+
LegacyFacter.reset_search_path!
|
22
23
|
LegacyFacter.search(*Options.custom_dir) if Options.custom_dir?
|
23
24
|
LegacyFacter.search_external(Options.external_dir) if Options.external_dir?
|
24
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -192,6 +192,7 @@ executables:
|
|
192
192
|
extensions: []
|
193
193
|
extra_rdoc_files: []
|
194
194
|
files:
|
195
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
195
196
|
- ".github/workflows/rtc.yml"
|
196
197
|
- ".gitignore"
|
197
198
|
- ".jrubyrc"
|