puppet-modulebuilder 0.3.0 → 1.0.0.rc.1

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: caf535563497b6e0a7bd98c749821dd30c60e33174497449459c754fc8ebffd1
4
- data.tar.gz: e72590d578145ced4d745cab78f32ea581208e537022b9d68ce6856bb3950664
3
+ metadata.gz: fef044bf578d47eaeaae72be420c4fbeff9680d57c7d857c717aff287d353353
4
+ data.tar.gz: ff7be7ef4e34fd8854c330dd437a6f3e901d9ef5b36dcbc3f6d01da82ba10f0a
5
5
  SHA512:
6
- metadata.gz: 3d3d125ef17ee7c5598ead12a03c8cd210435d9dd11ee89289233f51ff2231d7dd46ddd2901f4301550a889eac540e8f8ece5ff43610a313f312b9563854261f
7
- data.tar.gz: 16e26fef2258fbc132962aeb8bce6c0ede396fcd0d498778be63450e4df3b10ec9a2870e3043e8a11d2e16a1dcf42bd551dbd62e82d46ae7054f401f8178486f
6
+ metadata.gz: 38a7bbf226d1fba4dcc7ab1bb974da4f3399c7711ecd9675fac2f38d46a0579cb187f087274911bc5362518d33aa906ecb331f5f40cc75096bb2780a114c5ace
7
+ data.tar.gz: 55e4a68f956e52f440c0b30031475bff2d45996d88abe78629fa6c3f8c5f1fd98b036510e0660b3c763a5b42770c1734a0c86730aace89a71da8bc312b50d9f7
@@ -0,0 +1,54 @@
1
+ name: "ci"
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - "main"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ spec:
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby_version:
15
+ - "2.7"
16
+ - "3.2"
17
+ include:
18
+ - ruby-version: '2.7'
19
+ puppet_gem_version: '~> 7.0'
20
+ - ruby_version: '3.2'
21
+ puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
22
+ runs_on:
23
+ - "ubuntu-latest"
24
+ - "windows-latest"
25
+ name: "spec (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})"
26
+ uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
27
+ secrets: "inherit"
28
+ with:
29
+ ruby_version: ${{ matrix.ruby_version }}
30
+ puppet_gem_version: ${{ matrix.puppet_gem_version }}
31
+ runs_on: ${{ matrix.runs_on }}
32
+
33
+ acceptance:
34
+ needs: "spec"
35
+ strategy:
36
+ matrix:
37
+ ruby_version:
38
+ - "2.7"
39
+ - "3.2"
40
+ include:
41
+ - ruby-version: '2.7'
42
+ puppet_gem_version: '~> 7.0'
43
+ - ruby_version: '3.2'
44
+ puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
45
+ runs_on:
46
+ - "ubuntu-latest"
47
+ - "windows-latest"
48
+ name: "acceptance (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})"
49
+ uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
50
+ secrets: "inherit"
51
+ with:
52
+ ruby_version: ${{ matrix.ruby_version }}
53
+ puppet_version: ${{ matrix.puppet_gem_version }}
54
+ runs_on: ${{ matrix.runs_on }}
@@ -0,0 +1,22 @@
1
+ name: community-labeller
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+ pull_request_target:
8
+ types:
9
+ - opened
10
+
11
+ jobs:
12
+ label:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+
16
+ - uses: puppetlabs/community-labeller@v0
17
+ name: Label issues or pull requests
18
+ with:
19
+ label_name: community
20
+ label_color: '5319e7'
21
+ org_membership: puppetlabs
22
+ token: ${{ secrets.IAC_COMMUNITY_LABELER }}
@@ -0,0 +1,15 @@
1
+ name: "mend"
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - "main"
7
+ schedule:
8
+ - cron: "0 0 * * *"
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+
13
+ mend:
14
+ uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main"
15
+ secrets: "inherit"
@@ -0,0 +1,52 @@
1
+ name: "nightly"
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 * * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ spec:
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ ruby_version:
14
+ - "2.7"
15
+ - "3.2"
16
+ include:
17
+ - ruby-version: '2.7'
18
+ puppet_gem_version: '~> 7.0'
19
+ - ruby_version: '3.2'
20
+ puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
21
+ runs_on:
22
+ - "ubuntu-latest"
23
+ - "windows-latest"
24
+ name: "spec (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})"
25
+ uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
26
+ secrets: "inherit"
27
+ with:
28
+ ruby_version: ${{ matrix.ruby_version }}
29
+ puppet_gem_version: ${{ matrix.puppet_gem_version }}
30
+ runs_on: ${{ matrix.runs_on }}
31
+
32
+ acceptance:
33
+ needs: "spec"
34
+ strategy:
35
+ matrix:
36
+ ruby_version:
37
+ - "2.7"
38
+ - "3.2"
39
+ include:
40
+ - ruby-version: '2.7'
41
+ puppet_gem_version: '~> 7.0'
42
+ - ruby_version: '3.2'
43
+ puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8'
44
+ runs_on:
45
+ - "ubuntu-latest"
46
+ - "windows-latest"
47
+ uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
48
+ secrets: "inherit"
49
+ with:
50
+ ruby_version: ${{ matrix.ruby_version }}
51
+ puppet_version: ${{ matrix.puppet_gem_version }}
52
+ runs_on: ${{ matrix.runs_on }}
@@ -0,0 +1,16 @@
1
+ name: "Release"
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ target:
7
+ description: "The target for the release. This can be a commit sha or a branch."
8
+ required: false
9
+ default: "main"
10
+
11
+ jobs:
12
+ release:
13
+ uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release.yml@main"
14
+ with:
15
+ target: "${{ github.event.inputs.target }}"
16
+ secrets: "inherit"
@@ -0,0 +1,20 @@
1
+ name: "Release Prep"
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ target:
7
+ description: "The target for the release. This can be a commit sha or a branch."
8
+ required: false
9
+ default: "main"
10
+ version:
11
+ description: "Version of gem to be released."
12
+ required: true
13
+
14
+ jobs:
15
+ release_prep:
16
+ uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main"
17
+ with:
18
+ target: "${{ github.event.inputs.target }}"
19
+ version: "${{ github.event.inputs.version }}"
20
+ secrets: "inherit"
data/.gitignore CHANGED
@@ -12,4 +12,5 @@ Gemfile.local
12
12
  # rspec failure tracking
13
13
  .rspec_status
14
14
 
15
+ vendor/
15
16
  Gemfile.lock
data/.rubocop.yml CHANGED
@@ -1,180 +1,19 @@
1
- require: rubocop-rspec
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require:
4
+ - rubocop-performance
5
+ - rubocop-rspec
2
6
 
3
7
  AllCops:
4
- TargetRubyVersion: 2.3
5
8
  Exclude:
6
- # binstubs, and other utilities
7
- - bin/**/*
8
- - vendor/**/*
9
- - vendor/**/.*
10
- # package testing gems
11
- - package-testing/vendor/**/*
12
- - package-testing/vendor/**/.*
13
- # Any thing in test fixtures
9
+ - Gemfile
10
+ - Rakefile
14
11
  - spec/fixtures/**/*
12
+ - vendor/bundle/**/*
13
+ NewCops: enable
14
+ SuggestExtensions: false
15
+ TargetRubyVersion: '2.7'
15
16
 
16
- # Metrics, excludes complexity and sizing metrics for now, as ruby's defaults are very strict
17
- Metrics/AbcSize:
18
- Enabled: False
19
-
20
- Metrics/BlockLength:
21
- Description: rspec uses long describe blocks, so allow long blocks under spec/
22
- Enabled: False
23
- Exclude:
24
- - 'spec/**/*.rb'
25
-
26
- Metrics/ClassLength:
27
- Enabled: False
28
-
29
- Metrics/CyclomaticComplexity:
30
- Enabled: False
31
-
32
- Layout/LineLength:
33
- Description: People have wide screens, use them.
34
- Max: 200
35
-
36
- Metrics/MethodLength:
37
- Enabled: False
38
-
39
- Metrics/ModuleLength:
40
- Enabled: False
41
-
42
- Metrics/ParameterLists:
43
- Enabled: False
44
-
45
- Metrics/PerceivedComplexity:
46
- Enabled: False
47
-
48
- # RSpec cops
49
- RSpec/BeforeAfterAll:
50
- Description: Beware of using after(:all) as it may cause state to leak between tests. A necessary evil in acceptance testing.
51
- Exclude:
52
- - 'spec/acceptance/**/*.rb'
53
- - 'package-testing/spec/package/**/*.rb'
54
-
55
- RSpec/DescribeClass:
56
- Description: This cop does not account for rspec-puppet, and beaker-rspec usage.
57
- Enabled: False
58
-
59
- RSpec/HookArgument:
60
- Description: Prefer explicit :each argument, matching existing module's style
61
- EnforcedStyle: each
62
-
63
- RSpec/NestedGroups:
64
- Description: Nested groups can lead to cleaner tests with less duplication
65
- Max: 10
66
-
67
- RSpec/ExampleLength:
68
- Description: Forcing short examples leads to the creation of one-time use let() helpers
69
- Enabled: False
70
-
71
- RSpec/MessageSpies:
72
- EnforcedStyle: receive
73
-
74
- RSpec/ScatteredSetup:
75
- Enabled: False
76
-
77
- # This is fine
78
- RSpec/ImplicitSubject:
79
- Enabled: false
80
-
81
- # Set a reasonble max level
82
- RSpec/MultipleExpectations:
83
- Max: 10
84
-
85
- # Nested contexts don't comply
86
- RSpec/ContextWording:
87
- Enabled: false
88
-
89
- # This is allowed
90
- RSpec/SubjectStub:
91
- Enabled: false
92
-
93
- # Doesn't help readability
94
- RSpec/PredicateMatcher:
95
- Enabled: false
96
-
97
- # Style Cops
98
- Style/AsciiComments:
99
- Description: Names, non-english speaking communities.
100
- Enabled: False
101
-
102
- Style/BlockDelimiters:
103
- Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to be consistent then.
104
- EnforcedStyle: braces_for_chaining
105
-
17
+ # Disabled
106
18
  Style/ClassAndModuleChildren:
107
- Description: Compact style reduces the required amount of indentation.
108
- EnforcedStyle: compact
109
-
110
- Style/EmptyElse:
111
- Description: Enforce against empty else clauses, but allow `nil` for clarity.
112
- EnforcedStyle: empty
113
-
114
- Style/FormatString:
115
- Description: Following the main puppet project's style, prefer the % format format.
116
- EnforcedStyle: percent
117
-
118
- Style/FormatStringToken:
119
- Description: Following the main puppet project's style, prefer the simpler template tokens over annotated ones.
120
- EnforcedStyle: template
121
-
122
- Style/IfUnlessModifier:
123
- Description: Post-fix `if` modifiers are hard to parse for newcomers. We don't want to encourage them. Post-fix `unless` modifiers could be nice in some cases, but the Cop doesn't differentiate.
124
19
  Enabled: false
125
-
126
- Style/Lambda:
127
- Description: Prefer the keyword for easier discoverability.
128
- EnforcedStyle: literal
129
-
130
- Style/MethodCalledOnDoEndBlock:
131
- Enabled: true
132
-
133
- Style/RegexpLiteral:
134
- Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
135
- EnforcedStyle: percent_r
136
-
137
- Style/SymbolProc:
138
- Description: SymbolProc notation is not discoverable
139
- Enabled: false
140
-
141
- Style/TernaryParentheses:
142
- Description: Checks for use of parentheses around ternary conditions. Enforce parentheses on complex expressions for better readability, but seriously consider breaking it up.
143
- EnforcedStyle: require_parentheses_when_complex
144
-
145
- Style/TrailingCommaInArguments:
146
- Description: Prefer always trailing comma on multiline argument lists. This makes diffs, and re-ordering nicer.
147
- EnforcedStyleForMultiline: comma
148
-
149
- Style/TrailingCommaInArrayLiteral:
150
- Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer.
151
- EnforcedStyleForMultiline: comma
152
-
153
- Style/TrailingCommaInHashLiteral:
154
- Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer.
155
- EnforcedStyleForMultiline: comma
156
-
157
- Style/SymbolArray:
158
- Description: Using percent style obscures symbolic intent of array's contents.
159
- Enabled: true
160
- EnforcedStyle: brackets
161
-
162
- Style/HashEachMethods:
163
- Enabled: true
164
-
165
- Style/HashTransformKeys:
166
- Enabled: true
167
-
168
- Style/HashTransformValues:
169
- Enabled: true
170
-
171
- # Enforce LF line endings, even when on Windows
172
- Layout/EndOfLine:
173
- EnforcedStyle: lf
174
-
175
- # new as of rubocop 0.81
176
- Lint/RaiseException:
177
- Enabled: true
178
-
179
- Lint/StructNewOverride:
180
- Enabled: true
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,95 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-04-18 09:21:48 UTC using RuboCop version 1.50.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: Severity, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/RequireMFA:
14
+ Exclude:
15
+ - 'puppet-modulebuilder.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: Severity, Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RequiredRubyVersion:
21
+ Exclude:
22
+ - 'puppet-modulebuilder.gemspec'
23
+
24
+ # Offense count: 5
25
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
26
+ Metrics/AbcSize:
27
+ Max: 31
28
+
29
+ # Offense count: 1
30
+ # Configuration parameters: CountComments, CountAsOne.
31
+ Metrics/ClassLength:
32
+ Max: 255
33
+
34
+ # Offense count: 6
35
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
36
+ Metrics/MethodLength:
37
+ Max: 25
38
+
39
+ # Offense count: 1
40
+ # Configuration parameters: MinSize.
41
+ Performance/CollectionLiteralInLoop:
42
+ Exclude:
43
+ - 'spec/acceptance/puppet/modulebuilder/builder_spec.rb'
44
+
45
+ # Offense count: 4
46
+ # Configuration parameters: Prefixes, AllowedPatterns.
47
+ # Prefixes: when, with, without
48
+ RSpec/ContextWording:
49
+ Exclude:
50
+ - 'spec/acceptance/puppet/modulebuilder/builder_spec.rb'
51
+ - 'spec/unit/puppet/modulebuilder/builder_spec.rb'
52
+
53
+ # Offense count: 2
54
+ # Configuration parameters: CountAsOne.
55
+ RSpec/ExampleLength:
56
+ Max: 11
57
+
58
+ # Offense count: 10
59
+ # Configuration parameters: .
60
+ # SupportedStyles: have_received, receive
61
+ RSpec/MessageSpies:
62
+ EnforcedStyle: receive
63
+
64
+ # Offense count: 6
65
+ RSpec/MultipleExpectations:
66
+ Max: 11
67
+
68
+ # Offense count: 13
69
+ # Configuration parameters: AllowSubject.
70
+ RSpec/MultipleMemoizedHelpers:
71
+ Max: 8
72
+
73
+ # Offense count: 8
74
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
75
+ # SupportedStyles: always, named_only
76
+ RSpec/NamedSubject:
77
+ Exclude:
78
+ - 'spec/unit/puppet/modulebuilder/builder_spec.rb'
79
+
80
+ # Offense count: 3
81
+ # Configuration parameters: AllowedGroups.
82
+ RSpec/NestedGroups:
83
+ Max: 5
84
+
85
+ # Offense count: 33
86
+ RSpec/SubjectStub:
87
+ Exclude:
88
+ - 'spec/unit/puppet/modulebuilder/builder_spec.rb'
89
+
90
+ # Offense count: 9
91
+ # This cop supports safe autocorrection (--autocorrect).
92
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
93
+ # URISchemes: http, https
94
+ Layout/LineLength:
95
+ Max: 188
data/CHANGELOG.md CHANGED
@@ -1,49 +1,54 @@
1
- # Change log
1
+ <!-- markdownlint-disable MD024 -->
2
+ # Changelog
2
3
 
3
- All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
4
+ All notable changes to this project will be documented in this file.
4
5
 
6
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
5
7
 
6
- ## [v0.3.0](https://github.com/puppetlabs/puppet-modulebuilder/tree/v0.3.0) (2021-05-17)
8
+ ## [v1.0.0-rc.1](https://github.com/puppetlabs/puppet-modulebuilder/tree/v1.0.0-rc.1) - 2023-04-18
9
+
10
+ [Full Changelog](https://github.com/puppetlabs/puppet-modulebuilder/compare/v0.3.0...v1.0.0-rc.1)
11
+
12
+ ### Changed
13
+ - (CONT-881) Ruby 3 / Puppet 8 Support [#50](https://github.com/puppetlabs/puppet-modulebuilder/pull/50) ([chelnak](https://github.com/chelnak))
14
+
15
+ ## [v0.3.0](https://github.com/puppetlabs/puppet-modulebuilder/tree/v0.3.0) - 2021-05-17
7
16
 
8
17
  [Full Changelog](https://github.com/puppetlabs/puppet-modulebuilder/compare/v0.2.1...v0.3.0)
9
18
 
10
- **Implemented enhancements:**
19
+ ### Added
11
20
 
12
- - Refresh dependency matrix; drop ruby 2.3 and earlier [\#35](https://github.com/puppetlabs/puppet-modulebuilder/pull/35) ([DavidS](https://github.com/DavidS))
13
- - Use Puppet 7 in development on Ruby 2.7+ [\#32](https://github.com/puppetlabs/puppet-modulebuilder/pull/32) ([ekohl](https://github.com/ekohl))
14
- - Add a setter for release\_name [\#31](https://github.com/puppetlabs/puppet-modulebuilder/pull/31) ([ekohl](https://github.com/ekohl))
15
- - Preserve directory mtimes [\#27](https://github.com/puppetlabs/puppet-modulebuilder/pull/27) ([ekohl](https://github.com/ekohl))
16
- - Use match\_path instead of match\_paths [\#26](https://github.com/puppetlabs/puppet-modulebuilder/pull/26) ([ekohl](https://github.com/ekohl))
21
+ - Use Puppet 7 in development on Ruby 2.7+ [#32](https://github.com/puppetlabs/puppet-modulebuilder/pull/32) ([ekohl](https://github.com/ekohl))
22
+ - Add a setter for release_name [#31](https://github.com/puppetlabs/puppet-modulebuilder/pull/31) ([ekohl](https://github.com/ekohl))
23
+ - Preserve directory mtimes [#27](https://github.com/puppetlabs/puppet-modulebuilder/pull/27) ([ekohl](https://github.com/ekohl))
24
+ - Use match_path instead of match_paths [#26](https://github.com/puppetlabs/puppet-modulebuilder/pull/26) ([ekohl](https://github.com/ekohl))
17
25
 
18
- **Fixed bugs:**
26
+ ### Fixed
19
27
 
20
- - Use correct source variable when warning about symlinks [\#36](https://github.com/puppetlabs/puppet-modulebuilder/pull/36) ([DavidS](https://github.com/DavidS))
21
- - Ignore all hidden files in the root dir [\#29](https://github.com/puppetlabs/puppet-modulebuilder/pull/29) ([ekohl](https://github.com/ekohl))
28
+ - Use correct source variable when warning about symlinks [#36](https://github.com/puppetlabs/puppet-modulebuilder/pull/36) ([DavidS](https://github.com/DavidS))
29
+ - Ignore all hidden files in the root dir [#29](https://github.com/puppetlabs/puppet-modulebuilder/pull/29) ([ekohl](https://github.com/ekohl))
22
30
 
23
- ## [v0.2.1](https://github.com/puppetlabs/puppet-modulebuilder/tree/v0.2.1) (2020-06-08)
31
+ ## [v0.2.1](https://github.com/puppetlabs/puppet-modulebuilder/tree/v0.2.1) - 2020-06-08
24
32
 
25
33
  [Full Changelog](https://github.com/puppetlabs/puppet-modulebuilder/compare/v0.2.0...v0.2.1)
26
34
 
27
- **Fixed bugs:**
35
+ ### Fixed
28
36
 
29
- - \(IAC-864\) fix symlinked source [\#23](https://github.com/puppetlabs/puppet-modulebuilder/pull/23) ([DavidS](https://github.com/DavidS))
30
- - \(IAC-859\) add Ruby 2.7 testing; address deprecation warnings [\#22](https://github.com/puppetlabs/puppet-modulebuilder/pull/22) ([DavidS](https://github.com/DavidS))
37
+ - (IAC-864) fix symlinked source [#23](https://github.com/puppetlabs/puppet-modulebuilder/pull/23) ([DavidS](https://github.com/DavidS))
38
+ - (IAC-859) add Ruby 2.7 testing; address deprecation warnings [#22](https://github.com/puppetlabs/puppet-modulebuilder/pull/22) ([DavidS](https://github.com/DavidS))
31
39
 
32
- ## [v0.2.0](https://github.com/puppetlabs/puppet-modulebuilder/tree/v0.2.0) (2020-04-30)
40
+ ## [v0.2.0](https://github.com/puppetlabs/puppet-modulebuilder/tree/v0.2.0) - 2020-04-30
33
41
 
34
42
  [Full Changelog](https://github.com/puppetlabs/puppet-modulebuilder/compare/v0.1.0...v0.2.0)
35
43
 
36
- **Implemented enhancements:**
37
-
38
- - Set defaults for Builder [\#11](https://github.com/puppetlabs/puppet-modulebuilder/pull/11) ([ekohl](https://github.com/ekohl))
39
-
40
- **Fixed bugs:**
44
+ ### Added
41
45
 
42
- - Always ignore .git [\#15](https://github.com/puppetlabs/puppet-modulebuilder/pull/15) ([ekohl](https://github.com/ekohl))
46
+ - Set defaults for Builder [#11](https://github.com/puppetlabs/puppet-modulebuilder/pull/11) ([ekohl](https://github.com/ekohl))
43
47
 
44
- ## v0.1.0
48
+ ### Fixed
45
49
 
46
- This is the initial release of the project.
50
+ - Always ignore .git [#15](https://github.com/puppetlabs/puppet-modulebuilder/pull/15) ([ekohl](https://github.com/ekohl))
47
51
 
52
+ ## [v0.1.0](https://github.com/puppetlabs/puppet-modulebuilder/tree/v0.1.0) - 2020-02-27
48
53
 
49
- \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
54
+ [Full Changelog](https://github.com/puppetlabs/puppet-modulebuilder/compare/01ac316defabe60fb7d3c95ec2b219ad5e8e1591...v0.1.0)
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @puppetlabs/modules
data/Gemfile CHANGED
@@ -5,39 +5,34 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in puppet-modulebuilder.gemspec
6
6
  gemspec
7
7
 
8
- group :development do
9
- ruby_version = Gem::Version.new(RUBY_VERSION)
10
-
11
- gem 'rake', '~> 12.0'
12
- gem 'rspec', '~> 3.0'
8
+ def location_for(place_or_version, fake_version = nil)
9
+ git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
10
+ file_url_regex = %r{\Afile:\/\/(?<path>.*)}
11
+
12
+ if place_or_version && (git_url = place_or_version.match(git_url_regex))
13
+ [fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
14
+ elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
15
+ ['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
16
+ else
17
+ [place_or_version, { require: false }]
18
+ end
19
+ end
13
20
 
14
- gem 'rubocop', ['~> 0.68', '< 0.82.0']
15
- gem 'rubocop-rspec', '~> 1.38'
21
+ group :development do
22
+ gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
16
23
 
17
- gem 'codecov', '~> 0.1'
18
- gem 'github_changelog_generator', '~> 1.15', require: false
19
- gem 'simplecov', '~> 0.18'
20
- gem 'simplecov-console', '~> 0.6'
24
+ gem 'rake'
25
+ gem 'rspec', '~> 3.1'
21
26
 
22
- puppet_version = if ruby_version >= Gem::Version.new('2.7.0')
23
- '~> 7.0'
24
- elsif ruby_version >= Gem::Version.new('2.5.0')
25
- '~> 6.0'
26
- else
27
- '~> 5.0'
28
- end
27
+ gem 'rubocop', '~> 1.48', require: false
28
+ gem 'rubocop-performance', '~> 1.16', require: false
29
+ gem 'rubocop-rspec', '~> 2.19', require: false
29
30
 
30
- gem 'puppet', puppet_version
31
- end
31
+ gem 'codecov'
32
+ gem 'simplecov'
33
+ gem 'simplecov-console'
32
34
 
33
- # Evaluate Gemfile.local and ~/.gemfile if they exist
34
- extra_gemfiles = [
35
- "#{__FILE__}.local",
36
- File.join(Dir.home, '.gemfile'),
37
- ]
38
35
 
39
- extra_gemfiles.each do |gemfile|
40
- if File.file?(gemfile) && File.readable?(gemfile)
41
- eval(File.read(gemfile), binding) # rubocop:disable Security/Eval
42
- end
36
+ # Required for testing on Windows
37
+ gem 'ffi', :platforms => [:x64_mingw]
43
38
  end
data/README.md CHANGED
@@ -1,5 +1,3 @@
1
- [![Build Status](https://travis-ci.com/puppetlabs/puppet-modulebuilder.svg?branch=main)](https://travis-ci.com/puppetlabs/puppet-modulebuilder) [![Build status](https://ci.appveyor.com/api/projects/status/j9tosvq4a09iw0bx/branch/main?svg=true)](https://ci.appveyor.com/project/puppetlabs/puppet-modulebuilder/branch/main)
2
-
3
1
  # Puppet::Modulebuilder
4
2
 
5
3
  The `puppet-modulebuilder` gem contains the reference implementation for building Puppet modules from source.
data/Rakefile CHANGED
@@ -2,18 +2,6 @@
2
2
 
3
3
  require 'bundler/gem_tasks'
4
4
  require 'rspec/core/rake_task'
5
- begin
6
- # make rubocop optional to deal with ruby 2.1
7
- require 'rubocop/rake_task'
8
-
9
- RuboCop::RakeTask.new(:rubocop) do |task|
10
- task.options = %w[-D -S -E]
11
- end
12
-
13
- task default: [:rubocop]
14
- rescue LoadError => e
15
- puts "Can't load 'rubocop/rake_task': #{e.inspect}"
16
- end
17
5
 
18
6
  RSpec::Core::RakeTask.new(:spec) do |t|
19
7
  t.pattern = 'spec/unit/**/*_spec.rb'
@@ -24,24 +12,3 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
24
12
  end
25
13
 
26
14
  task default: [:spec, :acceptance]
27
-
28
- if Bundler.rubygems.find_name('github_changelog_generator').any?
29
- require 'github_changelog_generator/task'
30
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
31
- config.user = 'puppetlabs'
32
- config.project = 'puppet-modulebuilder'
33
- require 'puppet/modulebuilder/version'
34
- config.future_release = "v#{Puppet::Modulebuilder::VERSION}"
35
- config.exclude_labels = ['maintenance']
36
- config.header = <<-HEADER
37
- # Change log
38
-
39
- All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
40
- HEADER
41
- .gsub(%r{^ *}, '')
42
-
43
- config.add_pr_wo_labels = true
44
- config.issues = false
45
- config.merge_prefix = '### UNCATEGORIZED PRS; GO LABEL THEM'
46
- end
47
- end
@@ -13,15 +13,17 @@ module Puppet::Modulebuilder
13
13
  '/checksums.json',
14
14
  '/REVISION',
15
15
  '/spec/fixtures/modules/',
16
- '/vendor/',
16
+ '/vendor/'
17
17
  ].freeze
18
18
 
19
- attr_reader :destination
20
-
21
- attr_reader :logger
19
+ attr_reader :destination, :logger
22
20
 
23
21
  def initialize(source, destination = nil, logger = nil)
24
- raise ArgumentError, 'logger is expected to be nil or a Logger. Got %{klass}' % { klass: logger.class } unless logger.nil? || logger.is_a?(Logger)
22
+ unless logger.nil? || logger.is_a?(Logger)
23
+ raise ArgumentError,
24
+ format('logger is expected to be nil or a Logger. Got %<klass>s',
25
+ klass: logger.class)
26
+ end
25
27
 
26
28
  @source_validated = false
27
29
  @source = source
@@ -63,7 +65,7 @@ module Puppet::Modulebuilder
63
65
  def build_context
64
66
  {
65
67
  parent_dir: destination,
66
- build_dir_name: release_name,
68
+ build_dir_name: release_name
67
69
  }.freeze
68
70
  end
69
71
 
@@ -121,7 +123,9 @@ module Puppet::Modulebuilder
121
123
  fileutils_cp(path, dest_path, preserve: true)
122
124
  end
123
125
  rescue ArgumentError => e
124
- raise '%{message} Rename the file or exclude it from the package by adding it to the .pdkignore file in your module.' % { message: e.message }
126
+ raise format(
127
+ '%<message>s Rename the file or exclude it from the package by adding it to the .pdkignore file in your module.', message: e.message
128
+ )
125
129
  end
126
130
  end
127
131
 
@@ -143,7 +147,7 @@ module Puppet::Modulebuilder
143
147
  #
144
148
  # @return [Boolean] true if the path matches and should be ignored.
145
149
  def ignored_path?(path)
146
- path = path.to_s + '/' if File.directory?(path)
150
+ path = "#{path}/" if File.directory?(path)
147
151
 
148
152
  ignored_files.match_path(path, source)
149
153
  end
@@ -160,10 +164,8 @@ module Puppet::Modulebuilder
160
164
  symlink_path = Pathname.new(path)
161
165
  module_path = Pathname.new(source)
162
166
 
163
- logger.warn 'Symlinks in modules are not supported and will not be included in the package. Please investigate symlink %{from} -> %{to}.' % {
164
- from: symlink_path.relative_path_from(module_path),
165
- to: symlink_path.realpath.relative_path_from(module_path),
166
- }
167
+ logger.warn format('Symlinks in modules are not supported and will not be included in the package. Please investigate symlink %<from>s -> %<to>s.',
168
+ from: symlink_path.relative_path_from(module_path), to: symlink_path.realpath.relative_path_from(module_path))
167
169
  end
168
170
 
169
171
  # Select the most appropriate ignore file in the module directory.
@@ -177,7 +179,7 @@ module Puppet::Modulebuilder
177
179
  @ignore_file ||= [
178
180
  File.join(source, '.pdkignore'),
179
181
  File.join(source, '.pmtignore'),
180
- File.join(source, '.gitignore'),
182
+ File.join(source, '.gitignore')
181
183
  ].find { |file| file_exists?(file) && file_readable?(file) }
182
184
  end
183
185
 
@@ -194,10 +196,10 @@ module Puppet::Modulebuilder
194
196
  #
195
197
  # @return [nil]
196
198
  def validate_path_encoding!(path)
197
- return unless path =~ %r{[^\x00-\x7F]}
199
+ return unless /[^\x00-\x7F]/.match?(path)
198
200
 
199
- raise ArgumentError, "'%{path}' can only include ASCII characters in its path or " \
200
- 'filename in order to be compatible with a wide range of hosts.' % { path: path }
201
+ raise ArgumentError, format("'%<path>s' can only include ASCII characters in its path or " \
202
+ 'filename in order to be compatible with a wide range of hosts.', path: path)
201
203
  end
202
204
 
203
205
  # Creates a gzip compressed tarball of the build directory.
@@ -221,7 +223,7 @@ module Puppet::Modulebuilder
221
223
  tar = Minitar::Output.new(gz)
222
224
  Find.find(build_context[:build_dir_name]) do |entry|
223
225
  entry_meta = {
224
- name: entry,
226
+ name: entry
225
227
  }
226
228
 
227
229
  orig_mode = File.stat(entry).mode
@@ -230,10 +232,8 @@ module Puppet::Modulebuilder
230
232
  entry_meta[:mode] = orig_mode | min_mode
231
233
 
232
234
  if entry_meta[:mode] != orig_mode
233
- logger.debug('Updated permissions of packaged \'%{entry}\' to %{new_mode}' % {
234
- entry: entry,
235
- new_mode: (entry_meta[:mode] & 0o7777).to_s(8),
236
- })
235
+ logger.debug(format('Updated permissions of packaged \'%<entry>s\' to %<new_mode>s', entry: entry,
236
+ new_mode: (entry_meta[:mode] & 0o7777).to_s(8)))
237
237
  end
238
238
 
239
239
  Minitar.pack_file(entry_meta, tar)
@@ -259,9 +259,7 @@ module Puppet::Modulebuilder
259
259
  PathSpec.new(read_file(ignore_file, open_args: 'rb:UTF-8'))
260
260
  end
261
261
 
262
- if File.realdirpath(destination).start_with?(File.realdirpath(source))
263
- ignored = ignored.add("\/#{File.basename(destination)}\/")
264
- end
262
+ ignored = ignored.add("/#{File.basename(destination)}/") if File.realdirpath(destination).start_with?(File.realdirpath(source))
265
263
 
266
264
  DEFAULT_IGNORED.each { |r| ignored.add(r) }
267
265
 
@@ -296,18 +294,22 @@ module Puppet::Modulebuilder
296
294
  metadata_json_path = File.join(source, 'metadata.json')
297
295
 
298
296
  unless file_exists?(metadata_json_path)
299
- raise ArgumentError, "'%{file}' does not exist or is not a file." % { file: metadata_json_path }
297
+ raise ArgumentError,
298
+ format("'%<file>s' does not exist or is not a file.",
299
+ file: metadata_json_path)
300
300
  end
301
301
 
302
302
  unless file_readable?(metadata_json_path)
303
- raise ArgumentError, "Unable to open '%{file}' for reading." % { file: metadata_json_path }
303
+ raise ArgumentError,
304
+ format("Unable to open '%<file>s' for reading.",
305
+ file: metadata_json_path)
304
306
  end
305
307
 
306
308
  require 'json'
307
309
  begin
308
310
  @metadata = JSON.parse(read_file(metadata_json_path))
309
311
  rescue JSON::JSONError => e
310
- raise ArgumentError, 'Invalid JSON in metadata.json: %{msg}' % { msg: e.message }
312
+ raise ArgumentError, format('Invalid JSON in metadata.json: %<msg>s', msg: e.message)
311
313
  end
312
314
  @metadata.freeze
313
315
  end
@@ -334,7 +336,7 @@ module Puppet::Modulebuilder
334
336
  def release_name
335
337
  @release_name ||= [
336
338
  metadata['name'],
337
- metadata['version'],
339
+ metadata['version']
338
340
  ].join('-')
339
341
  end
340
342
 
@@ -360,11 +362,7 @@ module Puppet::Modulebuilder
360
362
  #
361
363
  # @return [nil]
362
364
  def validate_ustar_path!(path)
363
- if path.bytesize > 256
364
- raise ArgumentError, "The path '%{path}' is longer than 256 bytes." % {
365
- path: path,
366
- }
367
- end
365
+ raise ArgumentError, format("The path '%<path>s' is longer than 256 bytes.", path: path) if path.bytesize > 256
368
366
 
369
367
  if path.bytesize <= 100
370
368
  prefix = ''
@@ -387,9 +385,9 @@ module Puppet::Modulebuilder
387
385
  return unless path.bytesize > 100 || prefix.bytesize > 155
388
386
 
389
387
  raise ArgumentError, \
390
- "'%{path}' could not be split at a directory separator into two " \
391
- 'parts, the first having a maximum length of 155 bytes and the ' \
392
- 'second having a maximum length of 100 bytes.' % { path: path }
388
+ format("'%<path>s' could not be split at a directory separator into two " \
389
+ 'parts, the first having a maximum length of 155 bytes and the ' \
390
+ 'second having a maximum length of 100 bytes.', path: path)
393
391
  end
394
392
 
395
393
  private
@@ -397,7 +395,8 @@ module Puppet::Modulebuilder
397
395
  # Validates that source is able to be built
398
396
  def validate_source!
399
397
  unless file_directory?(@source) && file_readable?(@source)
400
- raise ArgumentError, "Module source '%{source}' does not exist as a directory is or is not readable" % { source: @source }
398
+ raise ArgumentError,
399
+ format("Module source '%<source>s' does not exist as a directory is or is not readable", source: @source)
401
400
  end
402
401
 
403
402
  @source_validated = true
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Puppet # rubocop:disable Style/ClassAndModuleChildren
3
+ module Puppet
4
4
  module Modulebuilder
5
- VERSION = '0.3.0'
5
+ VERSION = '1.0.0.rc.1'
6
6
  end
7
7
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ['sheena@puppet.com', 'https://puppetlabs.github.io/iac/']
10
10
  spec.summary = 'A gem to set up puppet-modulebuilder'
11
11
  spec.homepage = 'https://github.com/puppetlabs/puppet-modulebuilder'
12
- spec.required_ruby_version = Gem::Requirement.new('>= 2.1.0')
12
+ spec.license = 'Apache-2.0'
13
13
 
14
14
  spec.metadata['homepage_uri'] = spec.homepage
15
15
  spec.metadata['source_code_uri'] = 'https://github.com/puppetlabs/puppet-modulebuilder'
@@ -26,4 +26,6 @@ Gem::Specification.new do |spec|
26
26
  # minitar and pathspec is required for building Puppet modules
27
27
  spec.add_runtime_dependency 'minitar', '~> 0.9'
28
28
  spec.add_runtime_dependency 'pathspec', '>= 0.2.1', '< 2.0.0'
29
+
30
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
29
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-modulebuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheena
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-05-17 00:00:00.000000000 Z
12
+ date: 2023-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitar
@@ -53,25 +53,29 @@ executables: []
53
53
  extensions: []
54
54
  extra_rdoc_files: []
55
55
  files:
56
- - ".github/CODEOWNERS"
57
- - ".github/dependabot.yml"
56
+ - ".github/workflows/ci.yml"
57
+ - ".github/workflows/labeller.yml"
58
+ - ".github/workflows/mend.yml"
59
+ - ".github/workflows/nightly.yml"
60
+ - ".github/workflows/release.yml"
61
+ - ".github/workflows/release_prep.yml"
58
62
  - ".gitignore"
59
63
  - ".rspec"
60
64
  - ".rubocop.yml"
61
- - ".travis.yml"
65
+ - ".rubocop_todo.yml"
62
66
  - CHANGELOG.md
67
+ - CODEOWNERS
63
68
  - Gemfile
64
- - HISTORY.md
65
69
  - LICENSE
66
70
  - README.md
67
71
  - Rakefile
68
- - appveyor.yml
69
72
  - lib/puppet/modulebuilder.rb
70
73
  - lib/puppet/modulebuilder/builder.rb
71
74
  - lib/puppet/modulebuilder/version.rb
72
75
  - puppet-modulebuilder.gemspec
73
76
  homepage: https://github.com/puppetlabs/puppet-modulebuilder
74
- licenses: []
77
+ licenses:
78
+ - Apache-2.0
75
79
  metadata:
76
80
  homepage_uri: https://github.com/puppetlabs/puppet-modulebuilder
77
81
  source_code_uri: https://github.com/puppetlabs/puppet-modulebuilder
@@ -84,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
88
  requirements:
85
89
  - - ">="
86
90
  - !ruby/object:Gem::Version
87
- version: 2.1.0
91
+ version: 2.7.0
88
92
  required_rubygems_version: !ruby/object:Gem::Requirement
89
93
  requirements:
90
- - - ">="
94
+ - - ">"
91
95
  - !ruby/object:Gem::Version
92
- version: '0'
96
+ version: 1.3.1
93
97
  requirements: []
94
- rubygems_version: 3.0.3
98
+ rubygems_version: 3.1.6
95
99
  signing_key:
96
100
  specification_version: 4
97
101
  summary: A gem to set up puppet-modulebuilder
data/.github/CODEOWNERS DELETED
@@ -1,2 +0,0 @@
1
- # Setting ownership to the modules team
2
- * @puppetlabs/modules @puppetlabs/pdk
@@ -1,15 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- time: "13:00"
8
- open-pull-requests-limit: 10
9
- ignore:
10
- - dependency-name: rake
11
- versions:
12
- - ">= 13.a, < 14"
13
- - dependency-name: rubocop
14
- versions:
15
- - "> 0.68"
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- ---
2
- os: linux
3
- language: ruby
4
- cache: bundler
5
- env:
6
- - SIMPLECOV=yes
7
- jobs:
8
- include:
9
- - rvm: 2.7
10
- - rvm: 2.5
11
- - rvm: 2.4
data/HISTORY.md DELETED
@@ -1,3 +0,0 @@
1
- ## v0.1.0
2
-
3
- This is the initial release of the project.
data/appveyor.yml DELETED
@@ -1,30 +0,0 @@
1
- ---
2
- environment:
3
- matrix:
4
- - RUBY_VERSION: 25-x64
5
- - RUBY_VERSION: 24-x64
6
-
7
- install:
8
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
9
- - set SIMPLECOV=yes
10
- - gem install bundler -v 2.1.4
11
- - bundle -v
12
- - bundle install --retry 2
13
-
14
- build: off
15
-
16
- branches:
17
- only:
18
- - main
19
-
20
- before_test:
21
- - bundle env
22
- - type Gemfile.lock
23
-
24
- test_script:
25
- - bundle exec rake
26
-
27
- # Uncomment this block to enable RDP access to the AppVeyor test instance for
28
- # debugging purposes.
29
- # on_finish:
30
- # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))