rspec-puppet-facts 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f494cc52eaa0fbbf2d5952102217bd27c69b34bc666f1659e69c6b39d7b3eae
4
- data.tar.gz: 31e403eebc924e18e6006742df384c3440f1fa2a58577136fe60cae004ef6f51
3
+ metadata.gz: 5abb33ab4c828904545dfb7880ea691eee1703dc1cc752d813bf5a75ad253719
4
+ data.tar.gz: 5bc5af1d2e497f8ce4ccb89fb8b44ce95d8e899fa3c2e6f990fb5295ca36cabd
5
5
  SHA512:
6
- metadata.gz: 17a91fcd73abddbda463b69ccb2d508e05a46a0b4b5387b462324562aed7d5051f57ec33265ac1609d180364f0568ea3f5d89ae104195092ced96bf91f065c68
7
- data.tar.gz: a57b973bed790b73701e65366b5c6276ff9aa6d1b06aefcb81cda664223d9abace313bfbf2a3790cbfa861055695700c868030811bbb36f32f774a27cb4dbc5d
6
+ metadata.gz: 76ea0db9e3c0093daa7f642395c87e0d641b536b61075887a4880a3b2f7d60eacda4b3f2b9afeaec1c20a531ff4896e169521f55c3c0a9cd4eda43013ca465d3
7
+ data.tar.gz: 33008991d7da69ce99987f66214d65631328816e63e40b3edf1fddf616f31f0a0e69a4a66e5eeacdc52b7bc7fd7dd535f4a5e55dba8d9d91e17cb073ed8e9662
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "04:00"
8
+ open-pull-requests-limit: 10
@@ -0,0 +1,32 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ if: github.repository_owner == 'voxpupuli'
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Install Ruby 3.0
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: '3.0'
18
+ env:
19
+ BUNDLE_WITHOUT: release
20
+ - name: Build gem
21
+ run: gem build *.gemspec
22
+ - name: Publish gem to rubygems.org
23
+ run: gem push *.gem
24
+ env:
25
+ GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
26
+ - name: Setup GitHub packages access
27
+ run: |
28
+ mkdir -p ~/.gem
29
+ echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
30
+ chmod 0600 ~/.gem/credentials
31
+ - name: Publish gem to GitHub packages
32
+ run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
@@ -0,0 +1,37 @@
1
+ name: Test
2
+
3
+ on:
4
+ - pull_request
5
+ - push
6
+
7
+ env:
8
+ BUNDLE_WITHOUT: release
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ include:
17
+ - ruby: '2.4'
18
+ - ruby: '2.5'
19
+ - ruby: '2.6'
20
+ - ruby: '2.7'
21
+ - ruby: '3.0'
22
+ coverage: 'yes'
23
+ env:
24
+ COVERAGE: ${{ matrix.coverage }}
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ - name: Install Ruby ${{ matrix.ruby }}
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ bundler-cache: true
32
+ - name: Run unit tests
33
+ run: bundle exec rake spec
34
+ - name: Test against Puppet component versions
35
+ run: bundle exec rake puppet_versions:test
36
+ - name: Test gem build
37
+ run: bundle exec rake build
data/.gitignore CHANGED
@@ -8,3 +8,4 @@ coverage/
8
8
  doc
9
9
  .yardoc
10
10
  vendor/
11
+ .vendor/
data/CHANGELOG.md CHANGED
@@ -1,9 +1,32 @@
1
- ## 2021-01-08 - Release 2.0.1
1
+ # Changelog
2
2
 
3
- - Cache results from `on_supported_os` to reduce facterdb lookup times on
4
- full test suite runs.
3
+ ## [2.0.2](https://github.com/voxpupuli/rspec-puppet-facts/tree/2.0.2) (2021-07-21)
5
4
 
6
- ## 2020-08-04 - Release 2.0.0
5
+ [Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/2.0.1...2.0.2)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Implement github action testing and codecov coverage reporting [\#129](https://github.com/voxpupuli/rspec-puppet-facts/pull/129) ([bastelfreak](https://github.com/bastelfreak))
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Move facterversion\_obj declaration out of the loop [\#131](https://github.com/voxpupuli/rspec-puppet-facts/pull/131) ([ekohl](https://github.com/ekohl))
14
+ - Upgrade to GitHub-native Dependabot [\#126](https://github.com/voxpupuli/rspec-puppet-facts/pull/126) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
15
+
16
+ ## [2.0.1](https://github.com/voxpupuli/rspec-puppet-facts/tree/2.0.1) (2021-01-09)
17
+
18
+ [Full Changelog](https://github.com/voxpupuli/rspec-puppet-facts/compare/2.0.0...2.0.1)
19
+
20
+ **Closed issues:**
21
+
22
+ - Memoizing facts [\#114](https://github.com/voxpupuli/rspec-puppet-facts/issues/114)
23
+ - Commit 21442e7 looks to introduce hard to debug behavior [\#97](https://github.com/voxpupuli/rspec-puppet-facts/issues/97)
24
+
25
+ **Merged pull requests:**
26
+
27
+ - Implement fact memoization [\#122](https://github.com/voxpupuli/rspec-puppet-facts/pull/122) ([ekohl](https://github.com/ekohl))
28
+
29
+ ## [2.0.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/2.0.0) (2020-08-05)
7
30
 
8
31
  - Require Ruby >= 2.4
9
32
  - Automatically find the latest facter version in the database. Previously a
@@ -212,3 +235,6 @@
212
235
 
213
236
  ## 2014-12-12 - First Release 0.1.0
214
237
  - Initial release
238
+
239
+
240
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source ENV['GEM_SOURCE'] || "https://rubygems.org"
1
+ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
@@ -7,3 +7,12 @@ if facterversion = ENV['FACTER_GEM_VERSION']
7
7
  else
8
8
  gem 'facter', :require => false
9
9
  end
10
+
11
+ group :release do
12
+ gem 'github_changelog_generator', require: false
13
+ end
14
+
15
+ group :coverage, optional: ENV['COVERAGE']!='yes' do
16
+ gem 'simplecov-console', :require => false
17
+ gem 'codecov', :require => false
18
+ end
data/HISTORY.md ADDED
@@ -0,0 +1,209 @@
1
+ ## [2.0.0](https://github.com/voxpupuli/rspec-puppet-facts/tree/2.0.0) (2020-08-05)
2
+
3
+ - Require Ruby >= 2.4
4
+ - Automatically find the latest facter version in the database. Previously a
5
+ very slow and undeterministic approach was taken when an exact match of the
6
+ Facter version wasn't found.. The new approach is to take the closest version
7
+ that is still older than the specified version.
8
+ - Fix Amazon Linux 2 fact lookup
9
+ - Log which facts could not be found
10
+ - Remove json as a dependency
11
+
12
+ ## 2019-12-11 - Release 1.10.0
13
+ - Automatically select the default Facter version based on the Puppet version.
14
+ The available Puppet version is matched against a mapping of Puppet and
15
+ Facter versions included in the `puppet-agent` all-in-one packages to find
16
+ the most suitable Facter version.
17
+
18
+ ## 2019-07-31 - Release 1.9.6
19
+ - Suppress the warning message generated when the Augeas gem is not available.
20
+ - Searching through older Facter releases for a fact set that does not exist no
21
+ longer causes it to hang indefinitely.
22
+ - The `operatingsystemrelease` values are now correctly escaped when building
23
+ the FacterDB filters, allowing the use of `operatingsystemrelease` values
24
+ that contain special regular expression characters like parentheses.
25
+
26
+ ## 2019-07-29 - Release 1.9.5
27
+ - The default version of Facter to search for is now configurable with
28
+ `RSpec.configuration.default_facter_version`.
29
+ - When passing a `:supported_os` hash to `on_supported_os()`, single
30
+ `operatingsystemrelease` values can now be specified as a String rather than
31
+ an Array with a single String.
32
+ - Dependency on the `mcollective-client` gem removed. The `mco_version` fact
33
+ will now optionally be set if the gem is installed.
34
+ - The fact names can now be provided to tests as Strings instead of Symbols by
35
+ setting `RSpec.configuration.facterdb_string_keys` to `true`.
36
+ - Dropped support for Ruby < 2.1.0
37
+
38
+ ## 2019-03-22 - Release 1.9.4
39
+ - Take two on getting rubygems autodeploy going. So much for docs,
40
+ looking at other projects for this one.
41
+ ## 2019-03-22 - Release 1.9.3
42
+ - Various CI updates - [Garrett Honeycutt](https://github.com/ghoneycutt/)
43
+ - Symbolize hash keys in `register_custom_fact`
44
+ [https://github.com/mcanevet/rspec-puppet-facts/pull/77](https://github.com/mcanevet/rspec-puppet-facts/pull/77)
45
+
46
+ ## 2018-10-24 - Release 1.9.2
47
+ - Catch the right `LoadError` on missing augeas gem. Thanks to [baurmatt](https://github.com/baurmatt) for the quick fix, and [rodjek](https://github.com/rodjek) for dealing with the testing
48
+
49
+ ## 2018-10-24 - Release 1.9.1
50
+ - Do not rely on features of Augeas because Puppet 6
51
+
52
+ ## 2018-01-31 - Release 1.9.0
53
+ - Bumps facterdb requirement to 0.5.0
54
+ - Adds docs for using custom external facts
55
+ - hardwaremodel output changed on Windows with Facter 3.x
56
+ - Add additional rqspec tests
57
+ - Correctly select windows releases that contain spaces
58
+ - Facter < 3.4 does not return a proper release name for Windows 2016
59
+ - Strip 'Server' prefix from windows release name if present
60
+ - Downcase windows to match facter output
61
+ - Fix specs for current facterdb release
62
+ - Make version fallback testing independent of installed facter gem
63
+ - Add SPEC_FACTS_STRICT setting
64
+ - Cleanup README
65
+ - Add specific test to test minor version ahead of current facter version
66
+ - Update test to check for range in case facter version is not currently in FacterDB
67
+ - Step down through versions if the current version is not available
68
+ - Fix wrong example in README
69
+
70
+ ## 2017-06-23 - Release 1.8.0
71
+ - Support specifying facter version
72
+
73
+ ## 2017-01-04 - Release 1.7.1
74
+ - Ignore case when choosing H/W models
75
+
76
+ ## 2016-09-16 - Release 1.7.0
77
+ - Support custom facts defined by spec_helper
78
+
79
+ ## 2016-05-19 - Release 1.6.1
80
+ - Fix a bug where not all specified Ubuntu or OpenBSD were captured
81
+
82
+ ## 2016-05-17 - Release 1.6.0
83
+ - Cleanup and refactor methods
84
+ - Add YARD documentation
85
+ - Refactor and fix rspec
86
+ - Add the OS filter support
87
+
88
+ ## 2016-03-29 - Release 1.5.0
89
+ - Add some Microsft Windows support
90
+
91
+ ## 2016-02-04 - Release 1.4.1
92
+ - Add missing mcollective-client dependency
93
+
94
+ ## 2016-02-04 - Release 1.4.0
95
+ - Dynamically set mco_version
96
+
97
+ ## 2015-11-12 - Release 1.3.0
98
+ - Dynamically set rubysitedir
99
+
100
+ ## 2015-11-05 - Release 1.2.0
101
+ - Requires facterdb 0.3.0
102
+
103
+ ## 2015-09-15 - Release 1.1.1
104
+ - Fix OpenBSD support
105
+
106
+ ## 2015-09-09 - Release 1.1.0
107
+ - Populate augeasversion, puppetversion and rubyversion
108
+
109
+ ## 2015-09-03 - Release 1.0.3
110
+ - Fix FreeBSD support
111
+
112
+ ## 2015-08-31 - Release 1.0.2
113
+ - Keys where not symbolized anymore since v1.0.0
114
+
115
+ ## 2015-08-29 - Release 1.0.1
116
+ - Fix for old versions of Facter that does not provide operatingsystemmajrelease for some OSes
117
+
118
+ ## 2015-08-27 - Release 1.0.0
119
+ - Use facterdb
120
+
121
+ ## 2015-08-10 - Release 0.12.0
122
+ - Add Facter3 support
123
+
124
+ ## 2015-06-16 - Release 0.11.0
125
+ - Add facts for OpenBSD 5.7
126
+
127
+ ## 2015-05-27 - Release 0.10.0
128
+ - Add facts for Solaris 11
129
+
130
+ ## 2015-05-26 - Release 0.9.0
131
+ - Add facts for Ubuntu 14.10
132
+ - Add facts for Ubuntu 15.04
133
+
134
+ ## 2015-04-27 - Release 0.8.0
135
+ - Remove support for Operating System minor release (causes problems with Ubuntu naming)
136
+ - Add Gentoo support
137
+
138
+ ## 2015-04-26 - Release 0.7.0
139
+ - Add support for Operating System minor release
140
+ - Update README.md
141
+
142
+ ## 2015-03-06 - Release 0.6.0
143
+ - Add facts for FreeBSD 9
144
+
145
+ ## 2015-03-06 - Release 0.5.0
146
+ - Add facts for FreeBSD 10
147
+
148
+ ## 2015-02-22 - Release 0.4.1
149
+ - Really useless release :-)
150
+
151
+ ## 2015-01-23 - Release 0.4.0
152
+ - Add facts for facter 2.4
153
+ - Format json with python's json.tool
154
+ - Improve code coverage in unit tests
155
+ - Test on more version of facter in travis matrix
156
+
157
+ ## 2015-01-05 - Release 0.3.3
158
+ - Add facts for OpenSuse 12
159
+ - Add facts for OpenSuse 13
160
+
161
+ ## 2015-01-04 - Release 0.3.2
162
+ * Symbolize hash keys
163
+
164
+ ## 2015-01-03 - Release 0.3.1
165
+ - Set fqdn to foo.example.com
166
+ - Add json as runtime dependency
167
+
168
+ ## 2015-01-02 - Release 0.3.0
169
+ - Use json output for facter
170
+
171
+ ## 2014-12-20 - Release 0.2.5
172
+ - Don't fail if facts not found
173
+
174
+ ## 2014-12-20 - Release 0.2.4
175
+ - Add facts for SLES 11
176
+ - Add facts for Ubuntu 10.04
177
+ - Fix for SLES 11 SP1
178
+
179
+ ## 2014-12-20 - Release 0.2.3
180
+ - Add facts for ArchLinux
181
+
182
+ ## 2014-12-19 - Release 0.2.2
183
+ - Fix some bugs
184
+ - Add unit tests
185
+
186
+ ## 2014-12-19 - Release 0.2.1
187
+ - Add facts for Debian 8
188
+
189
+ ## 2014-12-15 - Release 0.2.0
190
+ - Add opts hash parameter
191
+ - Tests only with x86_64 by default
192
+
193
+ ## 2014-12-12 - Release 0.1.4
194
+ - Fix for Ubuntu
195
+
196
+ ## 2014-12-12 - Release 0.1.4
197
+ - Fix for Fedora
198
+
199
+ ## 2014-12-12 - Release 0.1.3
200
+ - Add facts for Fedora 19
201
+
202
+ ## 2014-12-12 - Release 0.1.2
203
+ - Add facts for Scientific Linux
204
+
205
+ ## 2014-12-12 - Release 0.1.1
206
+ - Add more facts
207
+
208
+ ## 2014-12-12 - First Release 0.1.0
209
+ - Initial release
data/README.md CHANGED
@@ -1,13 +1,19 @@
1
1
  rspec-puppet-facts
2
2
  ==================
3
3
 
4
- [![Build Status](https://img.shields.io/travis/mcanevet/rspec-puppet-facts/master.svg)](https://travis-ci.org/mcanevet/rspec-puppet-facts)
5
- [![Code Climate](https://img.shields.io/codeclimate/github/mcanevet/rspec-puppet-facts.svg)](https://codeclimate.com/github/mcanevet/rspec-puppet-facts)
6
- [![Gem Version](https://img.shields.io/gem/v/rspec-puppet-facts.svg)](https://rubygems.org/gems/rspec-puppet-facts)
7
- [![Gem Downloads](https://img.shields.io/gem/dt/rspec-puppet-facts.svg)](https://rubygems.org/gems/rspec-puppet-facts)
8
- [![Coverage Status](https://img.shields.io/coveralls/mcanevet/rspec-puppet-facts.svg)](https://coveralls.io/r/mcanevet/rspec-puppet-facts?branch=master)
9
-
10
- Based on an original idea from [apenney](https://github.com/apenney/puppet_facts/), this gem provides a method of running your [rspec-puppet](https://github.com/rodjek/rspec-puppet) tests against the facts for all your supported operating systems (provided by [facterdb](https://github.com/camptocamp/facterdb)). This simplifies unit testing because you don't need to specify the facts yourself.
4
+ [![License](https://img.shields.io/github/license/voxpupuli/rspec-puppet-facts.svg)](https://github.com/voxpupuli/rspec-puppet-facts/blob/master/LICENSE)
5
+ [![Test](https://github.com/voxpupuli/rspec-puppet-facts/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/rspec-puppet-facts/actions/workflows/test.yml)
6
+ [![codecov](https://codecov.io/gh/voxpupuli/rspec-puppet-facts/branch/master/graph/badge.svg)](https://codecov.io/gh/voxpupuli/rspec-puppet-facts)
7
+ [![Release](https://github.com/voxpupuli/rspec-puppet-facts/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/rspec-puppet-facts/actions/workflows/release.yml)
8
+ [![RubyGem Version](https://img.shields.io/gem/v/rspec-puppet-facts.svg)](https://rubygems.org/gems/rspec-puppet-facts)
9
+ [![RubyGem Downloads](https://img.shields.io/gem/dt/rspec-puppet-facts.svg)](https://rubygems.org/gems/rspec-puppet-facts)
10
+ [![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice)
11
+
12
+ Based on an original idea from [apenney](https://github.com/apenney/puppet_facts/),
13
+ this gem provides a method of running your [rspec-puppet](https://github.com/rodjek/rspec-puppet)
14
+ tests against the facts for all your supported operating systems (provided by
15
+ [facterdb](https://github.com/voxpupuli/facterdb)).
16
+ This simplifies unit testing because you don't need to specify the facts yourself.
11
17
 
12
18
  ## Installation
13
19
 
@@ -513,3 +519,31 @@ SPEC_FACTS_OS='ubuntu-14' rake spec
513
519
  ```
514
520
 
515
521
  When no facts are available for the specific facter/operating system combination, the library will fall back to facts from earlier versions of the requested operating system, to allow testing to continue when new versions of facter are released. Set `SPEC_FACTS_STRICT=yes` to instead trigger a failure.
522
+
523
+ ## Maintenance
524
+
525
+ This gem uses information about puppet AIO component versions to build/test.
526
+ They are vendored at `ext/puppet_agent_components.json`. If they are outdated,
527
+ the `puppet_versions:test` rake task will fail and they need to be updated.
528
+ This is as easy as running: `bundle exec rake puppet_versions:update`
529
+
530
+ ## License
531
+
532
+ This project is licensed under the [Apache-2 license](./LICENSE).
533
+
534
+ ## Transfer Notice
535
+
536
+ This plugin was originally authored by [Camptocamp](http://www.camptocamp.com).
537
+ The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance.
538
+ Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp.
539
+
540
+ Previously: https://github.com/mcanevet/rspec-puppet-facts
541
+
542
+ ## Release information
543
+
544
+ To make a new release, please do:
545
+ * Update the version in the `lib/rspec-puppet-facts/version.rb` file
546
+ * Install gems with `bundle install --with release --path .vendor`
547
+ * generate the changelog with `bundle exec rake changelog`
548
+ * Create a PR with it
549
+ * After it got merged, push a tag. A github workflow will do the actual release
data/Rakefile CHANGED
@@ -47,3 +47,17 @@ namespace :puppet_versions do
47
47
  end
48
48
  end
49
49
  end
50
+
51
+ begin
52
+ require 'rubygems'
53
+ require 'github_changelog_generator/task'
54
+
55
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
56
+ config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
57
+ config.user = 'voxpupuli'
58
+ config.project = 'rspec-puppet-facts'
59
+ gem_version = Gem::Specification.load("#{config.project}.gemspec").version
60
+ config.future_release = gem_version
61
+ end
62
+ rescue LoadError
63
+ end