puppetlabs_spec_helper 2.13.1 → 3.0.0

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
- SHA1:
3
- metadata.gz: 67e8e6e26b94e0e75ff8666f4717b44b5fc86a3b
4
- data.tar.gz: 746dbb92c29158633c4de0f425670560d8f1f2e7
2
+ SHA256:
3
+ metadata.gz: ef65ff61efb2a4ba220a726fd2ac309dc077a37ba9a2a2951430cebdd449b3c3
4
+ data.tar.gz: e079aa402cc3c638d7fb0f9dae179afb884a894ba20334ce781289523177446c
5
5
  SHA512:
6
- metadata.gz: b9aa9308506dede8697180e61dd7e00d240247a9ff3b6a6345a9033cac781ea994f13a72453a54911091bfc4955158ce65949840bfcd71836be3422aba2cde1e
7
- data.tar.gz: 51e2a367e8ccf3658eb72866b4377892ab58a5b342fbd6dba266692b59e4295db7f51821a555e61207d1eb04a272a333cbe8b6cc75caf7139f485437208451a0
6
+ metadata.gz: 616b63b83dafabafeb3d6ece228f76d94f21ac01266093100fd8fa2c75b14a99c8e2fa5ba3bff1a6e0203a4321486fa2e3133aeb7edc35541d139e31ce1495b3
7
+ data.tar.gz: cb0399bf3984b9bab34d202819493c1829cabf6050f9f2d19ada65a41aaa268e7901e62382c77dfbaf948bff8bd944d42c80d25941a366115fdf79e67e9c5f93
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
1
  --format documentation
2
- --color
3
2
  --order rand
data/.rubocop.yml CHANGED
@@ -2,7 +2,9 @@ require: rubocop-rspec
2
2
  inherit_from: .rubocop_todo.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 1.9
5
+ TargetRubyVersion: 2.4
6
+ # let dependabot find the rough spots for us
7
+ NewCops: enable
6
8
  Exclude:
7
9
  # binstubs, and other utilities
8
10
  - bin/**/*
@@ -14,10 +16,6 @@ AllCops:
14
16
  - package-testing/vendor/**/*
15
17
  - package-testing/vendor/**/.*
16
18
 
17
- Layout/IndentHeredoc:
18
- Description: The `squiggly` style would be preferable, but is only available from ruby 2.3. We'll enable this when we can.
19
- Enabled: False
20
-
21
19
  # Metrics, excludes complexity and sizing metrics for now, as ruby's defaults are very strict
22
20
  Metrics/AbcSize:
23
21
  Enabled: False
@@ -128,7 +126,11 @@ Style/TrailingCommaInArguments:
128
126
  Description: Prefer always trailing comma on multiline argument lists. This makes diffs, and re-ordering nicer.
129
127
  EnforcedStyleForMultiline: comma
130
128
 
131
- Style/TrailingCommaInLiteral:
129
+ Style/TrailingCommaInArrayLiteral:
130
+ Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer.
131
+ EnforcedStyleForMultiline: comma
132
+
133
+ Style/TrailingCommaInHashLiteral:
132
134
  Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer.
133
135
  EnforcedStyleForMultiline: comma
134
136
 
@@ -136,3 +138,18 @@ Style/SymbolArray:
136
138
  Description: Using percent style obscures symbolic intent of array's contents.
137
139
  Enabled: true
138
140
  EnforcedStyle: brackets
141
+
142
+ # Enforce LF line endings, even when on Windows
143
+ Layout/EndOfLine:
144
+ EnforcedStyle: lf
145
+
146
+ Style/AccessModifierDeclarations:
147
+ EnforcedStyle: inline
148
+
149
+ RSpec/ContextWording:
150
+ Prefixes:
151
+ - and
152
+ - but
153
+ - when
154
+ - with
155
+ - without
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,19 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-06-17 09:41:41 +0200 using RuboCop version 0.49.1.
3
+ # on 2021-02-09 10:30:38 +0000 using RuboCop version 0.57.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
12
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
13
+ Layout/EndAlignment:
14
+ Exclude:
15
+ - 'spec/watchr.rb'
16
+
9
17
  # Offense count: 4
10
18
  # Configuration parameters: AllowSafeAssignment.
11
19
  Lint/AssignmentInCondition:
@@ -14,26 +22,16 @@ Lint/AssignmentInCondition:
14
22
  - 'lib/puppetlabs_spec_helper/puppetlabs_spec/fixtures.rb'
15
23
  - 'lib/puppetlabs_spec_helper/rake_tasks.rb'
16
24
 
17
- # Offense count: 2
18
- # Cop supports --auto-correct.
19
- # Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith, AutoCorrect.
20
- # SupportedStylesAlignWith: keyword, variable, start_of_line
21
- Lint/EndAlignment:
22
- Exclude:
23
- - 'lib/puppetlabs_spec_helper/rake_tasks.rb'
24
- - 'spec/watchr.rb'
25
-
26
- # Offense count: 4
25
+ # Offense count: 7
27
26
  Lint/HandleExceptions:
28
27
  Exclude:
29
28
  - 'lib/puppetlabs_spec_helper/puppet_spec_helper.rb'
30
29
  - 'lib/puppetlabs_spec_helper/puppetlabs_spec/files.rb'
31
30
  - 'lib/puppetlabs_spec_helper/rake_tasks.rb'
32
31
 
33
- # Offense count: 2
32
+ # Offense count: 1
34
33
  Lint/UselessAssignment:
35
34
  Exclude:
36
- - 'lib/puppetlabs_spec_helper/puppet_spec_helper.rb'
37
35
  - 'lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb'
38
36
 
39
37
  # Offense count: 2
@@ -50,10 +48,11 @@ RSpec/InstanceVariable:
50
48
  - 'spec/acceptance/smoke_spec.rb'
51
49
 
52
50
  # Offense count: 6
51
+ # Configuration parameters: AggregateFailuresByDefault.
53
52
  RSpec/MultipleExpectations:
54
53
  Max: 3
55
54
 
56
- # Offense count: 13
55
+ # Offense count: 18
57
56
  RSpec/NamedSubject:
58
57
  Exclude:
59
58
  - 'spec/unit/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals_spec.rb'
@@ -71,7 +70,8 @@ Security/Eval:
71
70
  - 'lib/puppetlabs_spec_helper/tasks/fixtures.rb'
72
71
 
73
72
  # Offense count: 4
74
- # Configuration parameters: EnforcedStyle, SupportedStyles.
73
+ # Cop supports --auto-correct.
74
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
75
75
  # SupportedStyles: nested, compact
76
76
  Style/ClassAndModuleChildren:
77
77
  Exclude:
@@ -79,7 +79,7 @@ Style/ClassAndModuleChildren:
79
79
  - 'lib/puppetlabs_spec_helper/puppetlabs_spec/matchers.rb'
80
80
  - 'lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb'
81
81
 
82
- # Offense count: 11
82
+ # Offense count: 14
83
83
  Style/Documentation:
84
84
  Exclude:
85
85
  - 'spec/**/*'
@@ -88,8 +88,8 @@ Style/Documentation:
88
88
  - 'lib/puppetlabs_spec_helper/puppetlabs_spec/matchers.rb'
89
89
  - 'lib/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals.rb'
90
90
  - 'lib/puppetlabs_spec_helper/tasks/beaker.rb'
91
- - 'lib/puppetlabs_spec_helper/tasks/fixtures.rb'
92
91
  - 'lib/puppetlabs_spec_helper/tasks/check_symlinks.rb'
92
+ - 'lib/puppetlabs_spec_helper/tasks/fixtures.rb'
93
93
 
94
94
  # Offense count: 1
95
95
  Style/DoubleNegation:
@@ -111,7 +111,7 @@ Style/GuardClause:
111
111
 
112
112
  # Offense count: 1
113
113
  # Cop supports --auto-correct.
114
- # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
114
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
115
115
  # SupportedStyles: predicate, comparison
116
116
  Style/NumericPredicate:
117
117
  Exclude:
data/.travis.yml CHANGED
@@ -1,35 +1,23 @@
1
- sudo: false
1
+ os: linux
2
+ dist: xenial
2
3
  language: ruby
3
4
  cache: bundler
4
- before_install:
5
- bundle -v
6
- script: env COVERAGE=yes bundle exec rake
7
- matrix:
5
+ before_install: bundle -v
6
+ script: bundle exec rake
7
+ jobs:
8
8
  fast_finish: true
9
9
  include:
10
+ - rvm: '2.7'
11
+ env: PUPPET_GEM_VERSION='https://github.com/puppetlabs/puppet.git#main'
12
+ - rvm: '2.7'
13
+ env: PUPPET_GEM_VERSION='~> 7.0' COVERAGE=yes
14
+ - rvm: '2.6'
15
+ env: PUPPET_GEM_VERSION='~> 6.0' COVERAGE=yes
10
16
  - rvm: '2.5'
11
- env: PUPPET_GEM_VERSION='~> 6.0'
17
+ env: PUPPET_GEM_VERSION='~> 6.0' COVERAGE=yes
12
18
  - rvm: '2.4'
13
- env: PUPPET_GEM_VERSION='~> 6.0'
14
- - rvm: '2.3'
15
- env: PUPPET_GEM_VERSION='~> 6.0'
19
+ env: PUPPET_GEM_VERSION='~> 6.0' COVERAGE=yes
16
20
  - rvm: '2.4'
17
- env: PUPPET_GEM_VERSION='~> 5.0'
18
- - rvm: '2.3'
19
- env: PUPPET_GEM_VERSION='~> 5.0'
20
- - rvm: '2.1'
21
- env: PUPPET_GEM_VERSION='~> 5.0'
22
- - rvm: '2.4'
23
- env: PUPPET_GEM_VERSION='~> 4.0'
24
- - rvm: '2.3'
25
- env: PUPPET_GEM_VERSION='~> 4.0'
26
- - rvm: '2.1'
27
- env: PUPPET_GEM_VERSION='~> 4.0'
28
- - rvm: '2.1'
29
- env: PUPPET_GEM_VERSION='~> 3.0'
30
- - rvm: '2.0'
31
- env: PUPPET_GEM_VERSION='~> 3.0'
32
- - rvm: '1.9'
33
- env: PUPPET_GEM_VERSION='~> 3.0'
21
+ env: PUPPET_GEM_VERSION='~> 5.0' COVERAGE=yes
34
22
  notifications:
35
23
  email: false
data/CHANGELOG.md CHANGED
@@ -3,14 +3,103 @@
3
3
  All significant changes to this repo will be summarized in this file.
4
4
 
5
5
 
6
+ ## [v3.0.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v3.0.0) (2021-02-10)
7
+
8
+ [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.16.0...v3.0.0)
9
+
10
+ **Implemented enhancements:**
11
+
12
+ - dropping rubies before 2.4 [\#332](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/332) ([DavidS](https://github.com/DavidS))
13
+ - Remove i18n/gettext task [\#331](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/331) ([DavidS](https://github.com/DavidS))
14
+ - Restructure PuppetLint rake tasks so they can be configurable [\#330](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/330) ([nmaludy](https://github.com/nmaludy))
15
+
16
+ ## [v2.16.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.16.0) (2021-01-18)
17
+
18
+ [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.15.0...v2.16.0)
19
+
20
+ **Implemented enhancements:**
21
+
22
+ - Add a check task [\#327](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/327) ([ekohl](https://github.com/ekohl))
23
+ - Update fixtures from forge when the module version doesn't match; fix git \< 2.7 compatibility [\#269](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/269) ([nabertrand](https://github.com/nabertrand))
24
+ - Add all spec/lib directories from fixtures to LOAD\_PATH [\#233](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/233) ([nabertrand](https://github.com/nabertrand))
25
+
26
+ **Merged pull requests:**
27
+
28
+ - Release prep for v2.16.0 [\#329](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/329) ([DavidS](https://github.com/DavidS))
29
+ - Update pathspec requirement from ~\> 0.2.1 to \>= 0.2.1, \< 1.1.0 [\#328](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/328) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
30
+ - Update rubocop requirement from = 0.49 to 0.57.2; prepare for future move to 1.3.1 [\#322](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/322) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
31
+
32
+ ## [v2.15.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.15.0) (2020-06-12)
33
+
34
+ [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.14.1...v2.15.0)
35
+
36
+ **Implemented enhancements:**
37
+
38
+ - Add Ruby 2.6/Puppet6 to CI matrix [\#311](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/311) ([bastelfreak](https://github.com/bastelfreak))
39
+ - \(GH-297\) Don't allow git refs with forward slashes [\#299](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/299) ([glennsarti](https://github.com/glennsarti))
40
+ - Accept `:tag` for consistency with r10k [\#296](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/296) ([binford2k](https://github.com/binford2k))
41
+ - \(maint\) migrate the changelog task from pdk-templates [\#278](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/278) ([DavidS](https://github.com/DavidS))
42
+
43
+ **Fixed bugs:**
44
+
45
+ - \(MAINT\) Fix initialize of Gettext call [\#292](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/292) ([ThoughtCrhyme](https://github.com/ThoughtCrhyme))
46
+
47
+ **Merged pull requests:**
48
+
49
+ - \(IAC-885\) - Release Prep 2.15.0 [\#318](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/318) ([pmcmaw](https://github.com/pmcmaw))
50
+ - \(IAC-859\) Update all the gems and ruby to 2.7 [\#316](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/316) ([DavidS](https://github.com/DavidS))
51
+ - Support git fixture branches containing slashes [\#297](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/297) ([trevor-vaughan](https://github.com/trevor-vaughan))
52
+ - \(maint\) Require pdk/util in build:pdk rake task [\#295](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/295) ([rodjek](https://github.com/rodjek))
53
+ - Ignore plans folder and any subfolder [\#294](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/294) ([cyberious](https://github.com/cyberious))
54
+ - \(maint\) add codeowners file [\#293](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/293) ([tphoney](https://github.com/tphoney))
55
+ - \(MAINT\) Removes old rubies and puppet versions [\#290](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/290) ([logicminds](https://github.com/logicminds))
56
+ - Remove coveralls docs [\#289](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/289) ([DavidS](https://github.com/DavidS))
57
+ - Download forge modules in parallel [\#284](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/284) ([logicminds](https://github.com/logicminds))
58
+
59
+ ## [v2.14.1](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.14.1) (2019-03-26)
60
+
61
+ [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.14.0...v2.14.1)
62
+
63
+ **Fixed bugs:**
64
+
65
+ - Revert "\(feat\) dont load the beaker if litmus is there" [\#286](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/286) ([pmcmaw](https://github.com/pmcmaw))
66
+
67
+ **Merged pull requests:**
68
+
69
+ - \(MODULES-8778\) - Release Prep 2.14.1 [\#287](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/287) ([pmcmaw](https://github.com/pmcmaw))
70
+
71
+ ## [v2.14.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.14.0) (2019-03-25)
72
+
73
+ [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.13.1...v2.14.0)
74
+
75
+ **Implemented enhancements:**
76
+
77
+ - \(feat\) dont load the beaker if litmus is there [\#281](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/281) ([tphoney](https://github.com/tphoney))
78
+ - \(maint\) load rake tasks from optional libraries [\#279](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/279) ([DavidS](https://github.com/DavidS))
79
+ - Document how to set default values for fixture loading [\#277](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/277) ([Felixoid](https://github.com/Felixoid))
80
+
81
+ **Fixed bugs:**
82
+
83
+ - Remove `--color` from everywhere, use RSpec default detection instead [\#280](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/280) ([DavidS](https://github.com/DavidS))
84
+
85
+ **Merged pull requests:**
86
+
87
+ - \(MODULES-8771\) - Release Prep 2.14.0 [\#282](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/282) ([pmcmaw](https://github.com/pmcmaw))
88
+
6
89
  ## [v2.13.1](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.13.1) (2019-01-15)
90
+
7
91
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.13.0...v2.13.1)
8
92
 
9
93
  **Fixed bugs:**
10
94
 
11
95
  - Revert "\(MODULES-8242\) - Fix CI\_SPEC\_OPTIONS failing" [\#275](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/275) ([rodjek](https://github.com/rodjek))
12
96
 
97
+ **Merged pull requests:**
98
+
99
+ - Release Prep 2.13.1 [\#276](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/276) ([bmjen](https://github.com/bmjen))
100
+
13
101
  ## [v2.13.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.13.0) (2019-01-11)
102
+
14
103
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.12.0...v2.13.0)
15
104
 
16
105
  **Implemented enhancements:**
@@ -30,6 +119,7 @@ All significant changes to this repo will be summarized in this file.
30
119
  - \(MAINT\) Add Plans Path Exclusion [\#270](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/270) ([RandomNoun7](https://github.com/RandomNoun7))
31
120
 
32
121
  ## [v2.12.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.12.0) (2018-11-08)
122
+
33
123
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.11.0...v2.12.0)
34
124
 
35
125
  **Implemented enhancements:**
@@ -47,6 +137,7 @@ All significant changes to this repo will be summarized in this file.
47
137
  - 2.12.0 Release Prep [\#264](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/264) ([tphoney](https://github.com/tphoney))
48
138
 
49
139
  ## [v2.11.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.11.0) (2018-09-26)
140
+
50
141
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.10.0...v2.11.0)
51
142
 
52
143
  **Implemented enhancements:**
@@ -62,6 +153,7 @@ All significant changes to this repo will be summarized in this file.
62
153
  - \(MODULES-7858\) - 2.11.0 Release Prep [\#259](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/259) ([pmcmaw](https://github.com/pmcmaw))
63
154
 
64
155
  ## [v2.10.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.10.0) (2018-08-30)
156
+
65
157
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.9.1...v2.10.0)
66
158
 
67
159
  **Implemented enhancements:**
@@ -76,6 +168,7 @@ All significant changes to this repo will be summarized in this file.
76
168
  - update README [\#252](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/252) ([b4ldr](https://github.com/b4ldr))
77
169
 
78
170
  ## [v2.9.1](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.9.1) (2018-06-20)
171
+
79
172
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.9.0...v2.9.1)
80
173
 
81
174
  **Fixed bugs:**
@@ -88,6 +181,7 @@ All significant changes to this repo will be summarized in this file.
88
181
  - \(maint\) - Release prep for 2.9.1 [\#251](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/251) ([pmcmaw](https://github.com/pmcmaw))
89
182
 
90
183
  ## [v2.9.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.9.0) (2018-06-18)
184
+
91
185
  [Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.8.0...v2.9.0)
92
186
 
93
187
  **Implemented enhancements:**
@@ -599,4 +693,4 @@ compatible yet.
599
693
  [0.1.0]: https://github.com/puppetlabs/puppetlabs_spec_helper/compare/0.0.0...0.1.0
600
694
 
601
695
 
602
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
696
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/CODEOWNERS ADDED
@@ -0,0 +1,2 @@
1
+ # Default owners.
2
+ * @puppetlabs/pdk @puppetlabs/modules
data/Gemfile CHANGED
@@ -1,24 +1,42 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+
3
+ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
4
+
5
+ def location_for(place_or_version, fake_version = nil)
6
+ git_url_regex = %r{\A(?<url>(?:https?|git)[:@][^#]*)(?:#(?<branch>.*))?}
7
+ file_url_regex = %r{\Afile://(?<path>.*)}
8
+
9
+ if place_or_version && (git_url = place_or_version.match(git_url_regex))
10
+ [fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
11
+ elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
12
+ ['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
13
+ else
14
+ [place_or_version, { require: false }]
15
+ end
16
+ end
2
17
 
3
18
  # Specify the global dependencies in puppetlabs_spec_helper.gemspec
4
19
  # Note that only ruby 1.9 compatible dependencies may go there, everything else needs to be documented and pulled in manually, and optionally by everyone who wants to use the extended features.
5
20
  gemspec
6
21
 
22
+ def infer_puppet_version
23
+ # Infer the Puppet Gem version based on the Ruby Version
24
+ ruby_ver = Gem::Version.new(RUBY_VERSION.dup)
25
+ return '~> 7.0' if ruby_ver >= Gem::Version.new('2.7.0')
26
+ return '~> 6.0' if ruby_ver >= Gem::Version.new('2.5.0')
27
+ '~> 5.0'
28
+ end
29
+
7
30
  group :development do
8
31
  gem 'codecov'
9
32
  gem 'github_changelog_generator' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.0')
10
- gem 'puppet', ENV['PUPPET_GEM_VERSION'] || ENV['PUPPET_VERSION'] || '~> 4.0'
33
+ gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'] || ENV['PUPPET_VERSION'] || infer_puppet_version)
11
34
  gem 'simplecov', '~> 0'
12
35
  gem 'simplecov-console'
13
- if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
14
- gem 'rubocop', '< 0.50'
15
- gem 'rubocop-rspec', '~> 1'
36
+ if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.4')
37
+ gem 'rubocop', '0.57.2'
38
+ gem 'rubocop-rspec'
16
39
  end
17
40
  end
18
41
 
19
- # json_pure 2.0.2 added a requirement on ruby >= 2. We pin to json_pure 2.0.1
20
- # if using ruby 1.x
21
- gem 'json_pure', '<=2.0.1' if RUBY_VERSION =~ %r{^1\.}
22
- gem 'rack', '~> 1'
23
-
24
42
  # vim:filetype=ruby
data/README.md CHANGED
@@ -59,7 +59,7 @@ Host github.com
59
59
 
60
60
  ```
61
61
 
62
- Note: parallel downloads is only available for repositories and not forge modules.
62
+ Note: parallel downloads are available for repositories and forge modules.
63
63
 
64
64
  ### Parallel tests
65
65
  It is also possible to use the `parallel_tests` Gem via the `:parallel_spec` Rake task to run rspec commands in parallel on groups of spec files.
@@ -156,7 +156,7 @@ variables for the spec run. These are:
156
156
  * ``TRUSTED_NODE_DATA`` _(Puppet 3.x, starting with 3.4)_ - set to "yes" to enable [the $facts hash and trusted node data](https://puppet.com/docs/puppet/3.8/lang_facts_and_builtin_vars.html#trusted-facts),
157
157
  which enabled ``$facts`` and ``$trusted`` hashes. This is equivalent to setting
158
158
  [trusted_node_data=true](https://puppet.com/docs/puppet/3.8/configuration.html#trustednodedata)
159
- in puppet.conf.
159
+ in puppet.conf.
160
160
  * ``STRINGIFY_FACTS`` _(Puppet 3.x, starting with 3.5)_ - set to "no" to enable [structured facts](http://docs.puppetlabs.com/facter/2.0/fact_overview.html#writing-structured-facts),
161
161
  otherwise leave unset to retain the current default behavior. This is equivalent to setting
162
162
  [stringify_facts=false](https://puppet.com/docs/puppet/3.8/configuration.html#stringifyfacts)
@@ -193,35 +193,38 @@ working directory is `<module directory>/spec/fixtures/work-dir`.
193
193
 
194
194
  When specifying the repo source of the fixture you have a few options as to which revision of the codebase you wish to use, and optionally, the puppet versions where the fixture is needed.
195
195
 
196
- * repo - the url to the repo
197
- * scm - options include git or hg. This is an optional step as the helper code will figure out which scm is used.
196
+ * `repo` - the url to the repo
197
+ * `scm` - options include git or hg. This is an optional step as the helper code will figure out which scm is used.
198
198
 
199
199
  ```yaml
200
200
  scm: git
201
201
  scm: hg
202
202
  ```
203
203
 
204
- * target - the directory name to clone the repo into ie. `target: mymodule` defaults to the repo name (Optional)
205
- * subdir - directory to be removed from the cloned repo. Its contents will be moved to the root directory (Optional)
206
- * ref - used to specify the tag name like version hash of commit (Optional)
204
+ * `target` - the directory name to clone the repo into ie. `target: mymodule` defaults to the repo name (Optional)
205
+ * `subdir` - directory to be removed from the cloned repo. Its contents will be moved to the root directory (Optional)
206
+ * `ref` - used to specify the tag name (like version) or commit hash to be checked out (Optional). Branch names should use the `branch` option instead.
207
207
 
208
208
  ```yaml
209
209
  ref: 1.0.0
210
210
  ref: 880fca52c
211
211
  ```
212
- * branch - used to specify the branch name you want to use ie. `branch: development`
213
- * flags - additional flags passed to the module installer (both puppet and scm)
212
+ * `branch` - used to specify the branch name you want to use ie. `branch: development`
213
+ * `flags` - additional flags passed to the module installer (both puppet and scm)
214
214
 
215
215
  ```yaml
216
216
  flags: --verbose
217
217
  ```
218
- * puppet_version - versions of puppet for which the fixture should be installed. Ruby version constraints are supported. Only works when the `semantic_puppet` gem is available (shipped with puppet 4.0 and up, by default).
218
+ * `puppet_version` - versions of puppet for which the fixture should be installed. Ruby version constraints are supported. Only works when the `semantic_puppet` gem is available (shipped with puppet 4.0 and up, by default).
219
219
 
220
220
  ```yaml
221
221
  puppet_version: '>= 6.0.0'
222
222
  ```
223
223
 
224
- **Note:** ref and branch can be used together to get a specific revision on a specific branch
224
+ **Notes:**
225
+
226
+ * `ref` and `branch` can be used together to get a specific revision on a specific branch
227
+ * Top level `defaults` option could be used to set global options
225
228
 
226
229
  Fixtures Examples
227
230
  -----------------
@@ -257,7 +260,7 @@ fixtures:
257
260
  target: "spec/fixtures/control_repos"
258
261
  ```
259
262
 
260
- Specify that the git tag `2.4.2` of `stdlib' should be checked out:
263
+ Specify that the git tag `2.4.2` of `stdlib` should be checked out:
261
264
 
262
265
  ```yaml
263
266
  fixtures:
@@ -315,6 +318,27 @@ fixtures:
315
318
  flags: "--verbose"
316
319
  ```
317
320
 
321
+ Use `defaults` to define global parameters:
322
+
323
+ ```yaml
324
+ defaults:
325
+ forge_modules:
326
+ flags: "--module_repository https://my_repo.com"
327
+ fixtures:
328
+ forge_modules:
329
+ stdlib:
330
+ repo: "puppetlabs/stdlib"
331
+ ref: "2.6.0"
332
+ repositories:
333
+ firewall:
334
+ repo: "git://github.com/puppetlabs/puppetlabs-firewall"
335
+ ref: "2.6.0"
336
+ ```
337
+
338
+ Fixture Loading
339
+ ---------------
340
+ Any module that has a `spec/lib` directory will be available on the ruby `LOAD_PATH` for tests to consume. This allows modules to provide additional helper code to be supplied. The [augeasprovider_core](https://github.com/hercules-team/augeasproviders_core) module has [some examples](https://github.com/hercules-team/augeasproviders_core/tree/master/spec/lib).
341
+
318
342
  Testing Parser Functions
319
343
  ========================
320
344
 
@@ -369,7 +393,7 @@ environment variable``TEST_TIERS=high,medium``
369
393
 
370
394
  By default ``TEST_TIERS`` only accepts low, medium and high as valid tiers. If you would like to use your own keywords to set the environment variable ``TEST_TIERS_ALLOWED``.
371
395
 
372
- For example: to use the keywords dev, rnd, staging and production you can set
396
+ For example: to use the keywords dev, rnd, staging and production you can set
373
397
  ``TEST_TIERS_ALLOWED=dev,rnd,staging,production``. Then you would be able to run tests marked ``tier_dev => true``, ``tier_production => true`` with ``TEST_TIERS=dev,production``
374
398
 
375
399
  Note, if the ``TEST_TIERS`` environment variable is set to empty string or nil, all tiers will be executed.
@@ -396,34 +420,7 @@ You can enable it, set the following environment variable:s
396
420
 
397
421
  ``SIMPLECOV=yes``
398
422
 
399
- Remember to add the simplecov-console and codecov gems to your `Gemfile`.
400
-
401
- Using Coveralls
402
- ---------------
403
-
404
- You can also use [Coveralls](https://coveralls.io/) together with SimpleCov:
405
-
406
- ```Ruby
407
- # First line of spec/spec_helper.rb
408
- require 'simplecov'
409
- require 'coveralls'
410
-
411
- SimpleCov.formatters = [
412
- SimpleCov::Formatter::HTMLFormatter,
413
- Coveralls::SimpleCov::Formatter
414
- ]
415
-
416
- SimpleCov.start do
417
- add_filter '/spec/'
418
- # Exclude bundled Gems in `/.vendor/`
419
- add_filter '/.vendor/'
420
- end
421
-
422
- require 'puppetlabs_spec_helper/module_spec_helper'
423
- # Further content
424
- ```
425
-
426
- Remember to add `gem 'coveralls', require: false` to your `Gemfile`.
423
+ Remember to add the simplecov-console and codecov gems to your `Gemfile`. If you run `spec:simplecov` on Travis-CI or any of the other supported CI services, reports gets automatically uploaded to https://codecov.io/ .
427
424
 
428
425
  Some Notes for Windows Users
429
426
  ============================