puppet_forge 5.0.1 → 5.0.3

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: 03c98f5fd125a4ff36b815a734d7ac6bf7d51578550a1b873fcea09c33d028be
4
- data.tar.gz: 34f9e9b0f8e55939349ea47f4fb9c2ad8324a179c73fbb728709f453d9f5bfdf
3
+ metadata.gz: 19f0c8305a2d1f23815f84d6310f55a8da5395f5a102dbb6d1597482344d0104
4
+ data.tar.gz: 26abbb2f25ab7408b8273f2d37b23464177f008c0ac7759d7b6de63486bac76d
5
5
  SHA512:
6
- metadata.gz: 026cf550bb188d6e04eda4dc97a053439f49745fef1413b71c7c1ae9f9e8ed950fe3f89ca2e7d93924e86929e91f7d40ebcd526696992f2c9ddb15adcb20def5
7
- data.tar.gz: eee31c229447d406879270db396987ccc75c9cf3fd554efa8805dbbd22d931df648240c08bed8cdd6789f322d40f6e937eade56edd9ea6ce2a27e336c31325fa
6
+ metadata.gz: d9a6e1354705f5741deb4bfd0b1f13234be53e349fb6f2ed3cff478d27f7f31bf570a2ecddb0601011e1628a75167c684e4bee4e067d81145cefec7712b026b9
7
+ data.tar.gz: b1f7adf37b59cc4f808b15f1c686e2950dd72bcee7264c260fb2314fc24a9c2d87e31022504b86d1b4937c1b466fc7aa2287cad236a6114dccdfe931328c729e
@@ -0,0 +1,10 @@
1
+ ## Summary
2
+ Provide a detailed description of all the changes present in this pull request.
3
+
4
+ ## Additional Context
5
+ Add any additional context about the problem here.
6
+ - [ ] Root cause and the steps to reproduce. (If applicable)
7
+ - [ ] Thought process behind the implementation.
8
+
9
+ ## Related Issues (if any)
10
+ Mention any related issues or pull requests.
@@ -0,0 +1,27 @@
1
+ name: Labeller
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+ - labeled
8
+ - unlabeled
9
+ pull_request_target:
10
+ types:
11
+ - opened
12
+ - labeled
13
+ - unlabeled
14
+
15
+ jobs:
16
+ label:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+
20
+ - uses: puppetlabs/community-labeller@v1.0.1
21
+ name: Label issues or pull requests
22
+ with:
23
+ label_name: community
24
+ label_color: '5319e7'
25
+ org_membership: puppetlabs
26
+ fail_if_member: 'true'
27
+ token: ${{ secrets.IAC_COMMUNITY_LABELER }}
@@ -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.events.inputs.version }}"
20
+ secrets: "inherit"
data/.gitignore CHANGED
@@ -20,3 +20,4 @@ _yardoc
20
20
  *.o
21
21
  *.a
22
22
  mkmf.log
23
+ /vendor/
data/CHANGELOG.md CHANGED
@@ -1,207 +1,176 @@
1
- # Change Log
1
+ <!-- markdownlint-disable MD024 -->
2
+ # Changelog
2
3
 
3
- Starting with v2.0.0, all notable changes to this project will be documented in this file.
4
- This project adheres to [Semantic Versioning](http://semver.org/).
4
+ All notable changes to this project will be documented in this file.
5
5
 
6
- ## v5.0.1 - 2023-07-10
7
- * Update README to reflect accurate Ruby requirement and `faraday` gem dependency
8
- ## v5.0.0 - 2023-05-07
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).
9
7
 
10
- * Ruby 3.2 support.
11
- * LRU caching for HTTP response caching.
12
- * Raise a ModuleNotFound error instead of just nil when a module is not found.
8
+ ## [v5.0.3](https://github.com/puppetlabs/forge-ruby/tree/v5.0.3) - 2023-10-13
13
9
 
14
- ## v4.1.0 - 2023-02-21
10
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.1...v5.0.3)
15
11
 
16
- * Add upload method functionality.
17
- * Allows the user to search by an array of endorsements.
12
+ ## [v5.0.1](https://github.com/puppetlabs/forge-ruby/tree/v5.0.1) - 2023-07-10
18
13
 
19
- ## v4.0.0 - 2022-11-30
14
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.0...v5.0.1)
20
15
 
21
- * Breaking: The `puppet_forge` gem now requires at least Ruby 2.6.0
22
- * Update `faraday` gem to 2.x series
16
+ ## [v5.0.0](https://github.com/puppetlabs/forge-ruby/tree/v5.0.0) - 2023-06-07
23
17
 
24
- ## v3.2.0 - 2021-11-09
18
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v4.1.0...v5.0.0)
25
19
 
26
- * Allow requests to follow redirects
27
- * Remove the `gettext-setup` gem dependency, which was unused
20
+ ## [v4.1.0](https://github.com/puppetlabs/forge-ruby/tree/v4.1.0) - 2023-02-21
28
21
 
29
- ## v3.1.0 - 2021-08-20
22
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v4.0.0...v4.1.0)
30
23
 
31
- ### Changed
24
+ ### Added
32
25
 
33
- * Update `PuppetForge::Connection.authorization` so that it prepends the
34
- required `Bearer ` string automatically to values that look like Forge API
35
- keys. This won't affect values that already include `Bearer `.
26
+ - (CONT-643) Add upload method functionality [#102](https://github.com/puppetlabs/forge-ruby/pull/102) ([chelnak](https://github.com/chelnak))
36
27
 
37
- ## v3.0.0 - 2021-01-28
28
+ ## [v4.0.0](https://github.com/puppetlabs/forge-ruby/tree/v4.0.0) - 2022-12-01
38
29
 
39
- * Breaking: The `puppet_forge` gem now requires at least Ruby 2.4.0.
40
- * Update `faraday` and `faraday_middleware` gem dependencies to 1.x series.
41
- * Update optional `typhoeus` dependency to `>= 1.4` to maintain compatibility with `faraday`.
30
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v3.2.0...v4.0.0)
42
31
 
43
- ## v2.3.4 - 2020-03-31
32
+ ## [v3.2.0](https://github.com/puppetlabs/forge-ruby/tree/v3.2.0) - 2021-11-09
44
33
 
45
- * Update the forge API url to `forgeapi.puppet.com` (instead of using the older puppetlabs.com domain).
46
- * Allow versions of the `faraday_middleware` dependency up to 0.15.
34
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v3.1.0...v3.2.0)
47
35
 
48
- ## v2.3.3 - 2020-02-20
36
+ ## [v3.1.0](https://github.com/puppetlabs/forge-ruby/tree/v3.1.0) - 2021-08-20
49
37
 
50
- ### Changed
38
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v3.0.0...v3.1.0)
51
39
 
52
- * Allow versions of faraday up to 0.18
40
+ ## [v3.0.0](https://github.com/puppetlabs/forge-ruby/tree/v3.0.0) - 2021-01-28
53
41
 
54
- ## v2.3.2 - 2020-02-05
42
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.4...v3.0.0)
55
43
 
56
- ### Fixed
44
+ ## [v2.3.4](https://github.com/puppetlabs/forge-ruby/tree/v2.3.4) - 2020-03-31
57
45
 
58
- * Catch and handle the new `Faraday::TimeoutError`s which are occasionally
59
- surfaced by the the typheous adapter with more recent verions of libcurl, and
60
- log them the same way that `Faraday::ConnectionFailed` errors are already
61
- logged.
46
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.3...v2.3.4)
62
47
 
63
- ### Changed
48
+ ## [v2.3.3](https://github.com/puppetlabs/forge-ruby/tree/v2.3.3) - 2020-02-20
64
49
 
65
- * Allow for using `faraday_middleware` versions in the 0.13.x series.
50
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.2...v2.3.3)
66
51
 
67
- ## v2.3.1 - 2019-11-15
52
+ ## [v2.3.2](https://github.com/puppetlabs/forge-ruby/tree/v2.3.2) - 2020-02-05
68
53
 
69
- ### Fixed
54
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.1...v2.3.2)
70
55
 
71
- * Fixed an issue where proxy configurations were being ignored by expanding the range of acceptable versions of the `faraday` gem dependency and specifically excluding the version that was ignoring proxy configuration options.
56
+ ## [v2.3.1](https://github.com/puppetlabs/forge-ruby/tree/v2.3.1) - 2019-11-15
72
57
 
73
- ## v2.3.0 - 2019-07-09
58
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.0...v2.3.1)
74
59
 
75
- ### Changed
60
+ ## [v2.3.0](https://github.com/puppetlabs/forge-ruby/tree/v2.3.0) - 2019-07-10
76
61
 
77
- * Updated `PuppetForge::V3::Release#verify` method to use `file_sha256` checksum from Forge API when available.
78
- * Added an `allow_md5` param to `PuppetForge::V3::Release#verify` method to control whether or not fallback to MD5 checksum will be allowed in cases where SHA-256 checksum is not available.
62
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.0.rc1...v2.3.0)
79
63
 
80
- ## v2.2.9 - 2017-12-01
64
+ ## [v2.3.0.rc1](https://github.com/puppetlabs/forge-ruby/tree/v2.3.0.rc1) - 2019-07-10
81
65
 
82
- ### Changed
66
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.9...v2.3.0.rc1)
83
67
 
84
- * Loosened dependency on `faraday` and `faraday_middleware` gems to include recent releases.
68
+ ## [v2.2.9](https://github.com/puppetlabs/forge-ruby/tree/v2.2.9) - 2017-12-01
85
69
 
86
- ## v2.2.8 - 2017-11-09
70
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.8...v2.2.9)
87
71
 
88
- ### Added
72
+ ## [v2.2.8](https://github.com/puppetlabs/forge-ruby/tree/v2.2.8) - 2017-11-09
89
73
 
90
- Created PuppetForge::Util class with a single method, version_valid?, in order to
91
- drop the r10k dependency on semantic_puppet.
74
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.7...v2.2.8)
92
75
 
93
- ## v2.2.7 - 2017-06-30
76
+ ### Added
94
77
 
95
- ### Changed
78
+ - (RK-306) Add helper method in puppet_forge for valid semantic version. [#51](https://github.com/puppetlabs/forge-ruby/pull/51) ([andersonmills](https://github.com/andersonmills))
96
79
 
97
- * Updated dependency on `semantic_puppet` to `~> 1.0`.
80
+ ## [v2.2.7](https://github.com/puppetlabs/forge-ruby/tree/v2.2.7) - 2017-06-30
98
81
 
99
- ## v2.2.6 - 2017-06-27
82
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.6...v2.2.7)
100
83
 
101
- ### Fixed
84
+ ## [v2.2.6](https://github.com/puppetlabs/forge-ruby/tree/v2.2.6) - 2017-06-27
102
85
 
103
- * Fixed an issue when attempting to assign a non-String value to `PuppetForge.host`.
86
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.5...v2.2.6)
104
87
 
105
- ## v2.2.5 - 2017-06-26
88
+ ## [v2.2.5](https://github.com/puppetlabs/forge-ruby/tree/v2.2.5) - 2017-06-26
106
89
 
107
- ### Fixed
90
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.4...v2.2.5)
108
91
 
109
- * (FORGE-338) Fixed an issue where `V3::Release.download_url` returned an incorrect value when `PuppetForge.host` included
110
- a path prefix. (Thanks to [Jainish Shah](https://github.com/jainishshah17) for the report and initial fix proposal.)
92
+ ## [v2.2.4](https://github.com/puppetlabs/forge-ruby/tree/v2.2.4) - 2017-04-17
111
93
 
112
- ## v2.2.4 - 2017-04-17
94
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.3...v2.2.4)
113
95
 
114
96
  ### Added
115
97
 
116
- * PuppetForge::Connection now has .accept\_language and .accept\_language= class methods providing a way to set the
117
- 'Accept-Language' header for outbound requests.
118
-
119
- ## v2.2.3 - 2017-01-17
98
+ - (MAINT) Add ability to set Accept-Language header for API requests. [#43](https://github.com/puppetlabs/forge-ruby/pull/43) ([scotje](https://github.com/scotje))
120
99
 
121
- ### Changed
100
+ ## [v2.2.3](https://github.com/puppetlabs/forge-ruby/tree/v2.2.3) - 2017-01-17
122
101
 
123
- * Fixed an issue that was preventing PuppetForge.host from honoring any given path prefix.
124
- * Upgraded gettext-setup dependency to 0.11 release.
102
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.6...v2.2.3)
125
103
 
126
- ## v2.2.2 - 2016-07-06
104
+ ## [v1.0.6](https://github.com/puppetlabs/forge-ruby/tree/v1.0.6) - 2016-07-25
127
105
 
128
- ### Changed
106
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.2...v1.0.6)
129
107
 
130
- * Externalized all user facing strings with gettext to support future localization work.
108
+ ## [v2.2.2](https://github.com/puppetlabs/forge-ruby/tree/v2.2.2) - 2016-07-06
131
109
 
132
- ## v2.2.1 - 2016-05-24
110
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.1...v2.2.2)
133
111
 
134
- ### Changed
112
+ ## [v2.2.1](https://github.com/puppetlabs/forge-ruby/tree/v2.2.1) - 2016-05-24
135
113
 
136
- * Fixed an issue where certain types of connection failures raised a spurious "method missing" error instead of the underlying
137
- exception.
138
- * When setting PuppetForge::Connection.proxy, an empty string will now be treated as nil. If no proxy has yet been configured,
139
- setting to an empty string will have no effect. If a proxy has already been configured, setting to nil will unset the existing
140
- value.
114
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.0...v2.2.1)
141
115
 
142
- ## v2.2.0 - 2016-05-10
116
+ ## [v2.2.0](https://github.com/puppetlabs/forge-ruby/tree/v2.2.0) - 2016-05-10
143
117
 
144
- ### Changed
118
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.5...v2.2.0)
145
119
 
146
- * puppet\_forge's optional dependency on Typhoeus now searches for a gem matching '~> 1.0.1' so it will pick up more recent versions.
147
- NOTE: This means if you have a version of Typhoeus installed that is less than 1.0.1, puppet\_forge will no longer use the Typhoeus
148
- adapter and will fall back to Ruby's Net::HTTP library.
120
+ ## [v2.1.5](https://github.com/puppetlabs/forge-ruby/tree/v2.1.5) - 2016-04-13
149
121
 
150
- ## v2.1.5 - 2016-04-13
122
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.4...v2.1.5)
151
123
 
152
- ### Added
124
+ ## [v2.1.4](https://github.com/puppetlabs/forge-ruby/tree/v2.1.4) - 2016-04-01
153
125
 
154
- * PuppetForge::Connection now has .proxy and .proxy= class methods providing a more reliable way of configuring an HTTP proxy.
126
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.3...v2.1.4)
155
127
 
156
- ### Changed
128
+ ## [v2.1.3](https://github.com/puppetlabs/forge-ruby/tree/v2.1.3) - 2016-01-25
157
129
 
158
- * Cached connection objects will now be automatically discarded when proxy or authorization config has changed.
130
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.2...v2.1.3)
159
131
 
160
- ## v2.1.4 - 2016-04-01
132
+ ## [v2.1.2](https://github.com/puppetlabs/forge-ruby/tree/v2.1.2) - 2015-12-17
161
133
 
162
- ### Changed
134
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.1...v2.1.2)
163
135
 
164
- * Bug in usage of minitar filenames led to ignored tar files with tar file length of >100 chars.
136
+ ## [v2.1.1](https://github.com/puppetlabs/forge-ruby/tree/v2.1.1) - 2015-10-06
165
137
 
166
- ## v2.1.3 - 2016-01-25
138
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.0...v2.1.1)
167
139
 
168
- ### Changed
140
+ ## [v2.1.0](https://github.com/puppetlabs/forge-ruby/tree/v2.1.0) - 2015-08-27
169
141
 
170
- * PuppetForge::V3::Release.download will now use the "file\_uri" field of the Release API response to calculate the URI to download from. (Thanks to [ericparton](https://github.com/ericparton) for the contribution.)
142
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.0.0...v2.1.0)
171
143
 
172
- ## v2.1.2 - 2015-12-16
144
+ ## [v2.0.0](https://github.com/puppetlabs/forge-ruby/tree/v2.0.0) - 2015-08-14
173
145
 
174
- ### Changed
146
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.5...v2.0.0)
175
147
 
176
- * Runtime dependency on "faraday\_middleware" gem updated to allow 0.10.x releases.
148
+ ### Added
177
149
 
178
- ## v2.1.1 - 2015-10-06
150
+ - (CODEMGMT-308) Add hash keys to symbols middleware [#14](https://github.com/puppetlabs/forge-ruby/pull/14) ([austb](https://github.com/austb))
151
+ - (CODEMGMT-296) Add PaginatedCollection ORM for where request [#11](https://github.com/puppetlabs/forge-ruby/pull/11) ([austb](https://github.com/austb))
152
+ - Add ORM for individual item (User/Module/Release) [#10](https://github.com/puppetlabs/forge-ruby/pull/10) ([austb](https://github.com/austb))
179
153
 
180
- ### Changed
154
+ ## [v1.0.5](https://github.com/puppetlabs/forge-ruby/tree/v1.0.5) - 2015-07-23
181
155
 
182
- * Bug in error message around missing release on forge caused inappropriate error.
156
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.4...v1.0.5)
183
157
 
184
- ## v2.1.0 - 2015-08-20
158
+ ## [v1.0.4](https://github.com/puppetlabs/forge-ruby/tree/v1.0.4) - 2014-12-17
185
159
 
186
- ### Added
160
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.3...v1.0.4)
187
161
 
188
- * PuppetForge::ReleaseForbidden added to acknowledge 403 status returned from release download request
162
+ ## [v1.0.3](https://github.com/puppetlabs/forge-ruby/tree/v1.0.3) - 2014-06-24
189
163
 
190
- ## v2.0.0 - 2015-08-13
164
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.2...v1.0.3)
191
165
 
192
- ### Added
166
+ ## [v1.0.2](https://github.com/puppetlabs/forge-ruby/tree/v1.0.2) - 2014-06-16
193
167
 
194
- * PuppetForge::V3::Release can now verify the md5, unpack, and install a release tarball.
195
- * PuppetForge::Middleware::SymbolifyJson to change Faraday response hash keys into symbols.
196
- * PuppetForge::V3::Metadata to represent a release's metadata as an object.
197
- * PuppetForge::Connection to provide Faraday connections.
168
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.1...v1.0.2)
198
169
 
199
- ### Changed
170
+ ## [v1.0.1](https://github.com/puppetlabs/forge-ruby/tree/v1.0.1) - 2014-06-02
200
171
 
201
- * Failed API requests, such as those for a module that doesn't exist, throw a Faraday::ResourceNotFound error.
202
- * API requests are sent through Faraday directly rather than through Her.
203
- * PuppetForge::V3::Base#where and PuppetForge::V3::Base#all now send an API request immediately and return a paginated collection.
172
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.0...v1.0.1)
204
173
 
205
- ### Removed
174
+ ## [v1.0.0](https://github.com/puppetlabs/forge-ruby/tree/v1.0.0) - 2014-05-16
206
175
 
207
- * Dependency on Her (also removes dependency on ActiveSupport).
176
+ [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/2f052f220f0b3f4e135d930491edecf222fc059f...v1.0.0)
data/History.md ADDED
@@ -0,0 +1,214 @@
1
+ # Change Log
2
+
3
+ Starting with v2.0.0, all notable changes to this project will be documented in this file.
4
+ This project adheres to [Semantic Versioning](http://semver.org/).
5
+
6
+
7
+ ## Following the release of version 5.0.2 on October 13, 2023, an automated changelog has been implemented, this document is an archived copy of the previous changelog
8
+
9
+ ## v5.0.2 - 2023-09-29
10
+ * Correct a Digest call making this thread-safe and allowing for concurrent r10k deploys.
11
+ Thanks to @cmd-ntrf for fixing it and to @baurmatt for tracking it down in the first place.
12
+
13
+ ## v5.0.1 - 2023-07-10
14
+ * Update README to reflect accurate Ruby requirement and `faraday` gem dependency
15
+ ## v5.0.0 - 2023-05-07
16
+
17
+ * Ruby 3.2 support.
18
+ * LRU caching for HTTP response caching.
19
+ * Raise a ModuleNotFound error instead of just nil when a module is not found.
20
+
21
+ ## v4.1.0 - 2023-02-21
22
+
23
+ * Add upload method functionality.
24
+ * Allows the user to search by an array of endorsements.
25
+
26
+ ## v4.0.0 - 2022-11-30
27
+
28
+ * Breaking: The `puppet_forge` gem now requires at least Ruby 2.6.0
29
+ * Update `faraday` gem to 2.x series
30
+
31
+ ## v3.2.0 - 2021-11-09
32
+
33
+ * Allow requests to follow redirects
34
+ * Remove the `gettext-setup` gem dependency, which was unused
35
+
36
+ ## v3.1.0 - 2021-08-20
37
+
38
+ ### Changed
39
+
40
+ * Update `PuppetForge::Connection.authorization` so that it prepends the
41
+ required `Bearer ` string automatically to values that look like Forge API
42
+ keys. This won't affect values that already include `Bearer `.
43
+
44
+ ## v3.0.0 - 2021-01-28
45
+
46
+ * Breaking: The `puppet_forge` gem now requires at least Ruby 2.4.0.
47
+ * Update `faraday` and `faraday_middleware` gem dependencies to 1.x series.
48
+ * Update optional `typhoeus` dependency to `>= 1.4` to maintain compatibility with `faraday`.
49
+
50
+ ## v2.3.4 - 2020-03-31
51
+
52
+ * Update the forge API url to `forgeapi.puppet.com` (instead of using the older puppetlabs.com domain).
53
+ * Allow versions of the `faraday_middleware` dependency up to 0.15.
54
+
55
+ ## v2.3.3 - 2020-02-20
56
+
57
+ ### Changed
58
+
59
+ * Allow versions of faraday up to 0.18
60
+
61
+ ## v2.3.2 - 2020-02-05
62
+
63
+ ### Fixed
64
+
65
+ * Catch and handle the new `Faraday::TimeoutError`s which are occasionally
66
+ surfaced by the the typheous adapter with more recent verions of libcurl, and
67
+ log them the same way that `Faraday::ConnectionFailed` errors are already
68
+ logged.
69
+
70
+ ### Changed
71
+
72
+ * Allow for using `faraday_middleware` versions in the 0.13.x series.
73
+
74
+ ## v2.3.1 - 2019-11-15
75
+
76
+ ### Fixed
77
+
78
+ * Fixed an issue where proxy configurations were being ignored by expanding the range of acceptable versions of the `faraday` gem dependency and specifically excluding the version that was ignoring proxy configuration options.
79
+
80
+ ## v2.3.0 - 2019-07-09
81
+
82
+ ### Changed
83
+
84
+ * Updated `PuppetForge::V3::Release#verify` method to use `file_sha256` checksum from Forge API when available.
85
+ * Added an `allow_md5` param to `PuppetForge::V3::Release#verify` method to control whether or not fallback to MD5 checksum will be allowed in cases where SHA-256 checksum is not available.
86
+
87
+ ## v2.2.9 - 2017-12-01
88
+
89
+ ### Changed
90
+
91
+ * Loosened dependency on `faraday` and `faraday_middleware` gems to include recent releases.
92
+
93
+ ## v2.2.8 - 2017-11-09
94
+
95
+ ### Added
96
+
97
+ Created PuppetForge::Util class with a single method, version_valid?, in order to
98
+ drop the r10k dependency on semantic_puppet.
99
+
100
+ ## v2.2.7 - 2017-06-30
101
+
102
+ ### Changed
103
+
104
+ * Updated dependency on `semantic_puppet` to `~> 1.0`.
105
+
106
+ ## v2.2.6 - 2017-06-27
107
+
108
+ ### Fixed
109
+
110
+ * Fixed an issue when attempting to assign a non-String value to `PuppetForge.host`.
111
+
112
+ ## v2.2.5 - 2017-06-26
113
+
114
+ ### Fixed
115
+
116
+ * (FORGE-338) Fixed an issue where `V3::Release.download_url` returned an incorrect value when `PuppetForge.host` included
117
+ a path prefix. (Thanks to [Jainish Shah](https://github.com/jainishshah17) for the report and initial fix proposal.)
118
+
119
+ ## v2.2.4 - 2017-04-17
120
+
121
+ ### Added
122
+
123
+ * PuppetForge::Connection now has .accept\_language and .accept\_language= class methods providing a way to set the
124
+ 'Accept-Language' header for outbound requests.
125
+
126
+ ## v2.2.3 - 2017-01-17
127
+
128
+ ### Changed
129
+
130
+ * Fixed an issue that was preventing PuppetForge.host from honoring any given path prefix.
131
+ * Upgraded gettext-setup dependency to 0.11 release.
132
+
133
+ ## v2.2.2 - 2016-07-06
134
+
135
+ ### Changed
136
+
137
+ * Externalized all user facing strings with gettext to support future localization work.
138
+
139
+ ## v2.2.1 - 2016-05-24
140
+
141
+ ### Changed
142
+
143
+ * Fixed an issue where certain types of connection failures raised a spurious "method missing" error instead of the underlying
144
+ exception.
145
+ * When setting PuppetForge::Connection.proxy, an empty string will now be treated as nil. If no proxy has yet been configured,
146
+ setting to an empty string will have no effect. If a proxy has already been configured, setting to nil will unset the existing
147
+ value.
148
+
149
+ ## v2.2.0 - 2016-05-10
150
+
151
+ ### Changed
152
+
153
+ * puppet\_forge's optional dependency on Typhoeus now searches for a gem matching '~> 1.0.1' so it will pick up more recent versions.
154
+ NOTE: This means if you have a version of Typhoeus installed that is less than 1.0.1, puppet\_forge will no longer use the Typhoeus
155
+ adapter and will fall back to Ruby's Net::HTTP library.
156
+
157
+ ## v2.1.5 - 2016-04-13
158
+
159
+ ### Added
160
+
161
+ * PuppetForge::Connection now has .proxy and .proxy= class methods providing a more reliable way of configuring an HTTP proxy.
162
+
163
+ ### Changed
164
+
165
+ * Cached connection objects will now be automatically discarded when proxy or authorization config has changed.
166
+
167
+ ## v2.1.4 - 2016-04-01
168
+
169
+ ### Changed
170
+
171
+ * Bug in usage of minitar filenames led to ignored tar files with tar file length of >100 chars.
172
+
173
+ ## v2.1.3 - 2016-01-25
174
+
175
+ ### Changed
176
+
177
+ * PuppetForge::V3::Release.download will now use the "file\_uri" field of the Release API response to calculate the URI to download from. (Thanks to [ericparton](https://github.com/ericparton) for the contribution.)
178
+
179
+ ## v2.1.2 - 2015-12-16
180
+
181
+ ### Changed
182
+
183
+ * Runtime dependency on "faraday\_middleware" gem updated to allow 0.10.x releases.
184
+
185
+ ## v2.1.1 - 2015-10-06
186
+
187
+ ### Changed
188
+
189
+ * Bug in error message around missing release on forge caused inappropriate error.
190
+
191
+ ## v2.1.0 - 2015-08-20
192
+
193
+ ### Added
194
+
195
+ * PuppetForge::ReleaseForbidden added to acknowledge 403 status returned from release download request
196
+
197
+ ## v2.0.0 - 2015-08-13
198
+
199
+ ### Added
200
+
201
+ * PuppetForge::V3::Release can now verify the md5, unpack, and install a release tarball.
202
+ * PuppetForge::Middleware::SymbolifyJson to change Faraday response hash keys into symbols.
203
+ * PuppetForge::V3::Metadata to represent a release's metadata as an object.
204
+ * PuppetForge::Connection to provide Faraday connections.
205
+
206
+ ### Changed
207
+
208
+ * Failed API requests, such as those for a module that doesn't exist, throw a Faraday::ResourceNotFound error.
209
+ * API requests are sent through Faraday directly rather than through Her.
210
+ * PuppetForge::V3::Base#where and PuppetForge::V3::Base#all now send an API request immediately and return a paginated collection.
211
+
212
+ ### Removed
213
+
214
+ * Dependency on Her (also removes dependency on ActiveSupport).
data/README.md CHANGED
@@ -244,10 +244,12 @@ to create a free account to add new tickets.
244
244
 
245
245
  ## Releasing
246
246
 
247
- 1. Make sure version, changelog, etc. have been updated.
248
- 1. Commit and tag with new version number: e.g. `v1.2.3`
249
- 1. Push tag to Github: `git push upstream --tags` (where `upstream` is the remote name of the puppetlabs fork of this repo)
250
- 1. Wait for Travis CI to test and push new release to Rubygems.
247
+ 1. Run the [release_prep] GitHub Action with the new version number, for example, 1.2.3. It will create a new pull request
248
+ 2. Please check the changelog and ensure all issues/prs have correct labels
249
+ 3. Run the GitHub Actions [release] workflow, and it will publish a new version on RubyGems
250
+
251
+ [release_prep]: https://github.com/puppetlabs/forge-ruby/actions/workflows/release_prep.yml
252
+ [release]: https://github.com/puppetlabs/forge-ruby/actions/workflows/release.yml
251
253
 
252
254
  ## Contributors
253
255
 
@@ -9,7 +9,7 @@ module PuppetForge
9
9
  # a convenience method for generating cache keys. Cache keys do not
10
10
  # have to be SHA256 hashes, but they must be unique.
11
11
  def self.new_key(*string_args)
12
- Digest::SHA256.hexdigest(string_args.map(&:to_s).join(':'))
12
+ Digest(:SHA256).hexdigest(string_args.map(&:to_s).join(':'))
13
13
  end
14
14
 
15
15
  # @return [Integer] the maximum number of items to cache.
@@ -1,3 +1,3 @@
1
1
  module PuppetForge
2
- VERSION = '5.0.1' # Library version
2
+ VERSION = '5.0.3' # Library version
3
3
  end
@@ -67,18 +67,26 @@ describe PuppetForge::LruCache do
67
67
  expect(cache.send(:lru)).to eq(['foo', 'baz'])
68
68
  end
69
69
 
70
- # The below test is non-deterministic but I'm not sure how to unit
71
- # test thread-safety.
72
- # it 'is thread-safe' do
73
- # cache = PuppetForge::LruCache.new
74
- # cache.put('foo', 'bar')
75
- # cache.put('baz', 'qux')
76
- # threads = []
77
- # threads << Thread.new { 100.times { cache.get('foo') } }
78
- # threads << Thread.new { 100.times { cache.get('baz') } }
79
- # threads.each(&:join)
80
- # expect(cache.send(:lru)).to eq(['baz', 'foo'])
81
- # end
70
+ it 'is thread-safe for get calls' do
71
+ cache = PuppetForge::LruCache.new
72
+
73
+ # Populate the cache with initial values
74
+ cache.put('foo', 'bar')
75
+ cache.put('baz', 'qux')
76
+
77
+ # Create two threads for concurrent cache get operations
78
+ thread_one = Thread.new do
79
+ 100.times { expect(cache.get('foo')).to eq('bar') }
80
+ end
81
+
82
+ thread_two = Thread.new do
83
+ 100.times { expect(cache.get('baz')).to eq('qux') }
84
+ end
85
+
86
+ # Wait for both threads to complete
87
+ thread_one.join
88
+ thread_two.join
89
+ end
82
90
  end
83
91
 
84
92
  context '#put' do
@@ -102,16 +110,30 @@ describe PuppetForge::LruCache do
102
110
  expect(cache.send(:lru)).to eq(['quux', 'baz'])
103
111
  end
104
112
 
105
- # The below test is non-deterministic but I'm not sure how to unit
106
- # test thread-safety.
107
- # it 'is thread-safe' do
108
- # cache = PuppetForge::LruCache.new
109
- # threads = []
110
- # threads << Thread.new { 100.times { cache.put('foo', 'bar') } }
111
- # threads << Thread.new { 100.times { cache.put('baz', 'qux') } }
112
- # threads.each(&:join)
113
- # expect(cache.send(:lru)).to eq(['baz', 'foo'])
114
- # end
113
+ it 'is thread-safe' do
114
+ cache = PuppetForge::LruCache.new
115
+
116
+ # Create two threads for concurrent cache operations
117
+ thread_one = Thread.new do
118
+ 100.times { cache.put('foo', 'bar') }
119
+ end
120
+
121
+ thread_two = Thread.new do
122
+ 100.times { cache.put('baz', 'qux') }
123
+ end
124
+
125
+ # Wait for both threads to complete
126
+ thread_one.join
127
+ thread_two.join
128
+
129
+ # At this point, we don't need to compare the LRU list,
130
+ # because the order may change due to concurrent puts.
131
+
132
+ # Instead, we simply expect the code to run without errors.
133
+ expect { thread_one.value }.not_to raise_error
134
+ expect { thread_two.value }.not_to raise_error
135
+ end
136
+
115
137
  end
116
138
 
117
139
  context '#clear' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_forge
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -172,12 +172,17 @@ executables: []
172
172
  extensions: []
173
173
  extra_rdoc_files: []
174
174
  files:
175
+ - ".github/pull_request_template.md"
176
+ - ".github/workflows/labeller.yml"
177
+ - ".github/workflows/release.yml"
178
+ - ".github/workflows/release_prep.yml"
175
179
  - ".github/workflows/ruby-rspec.yml"
176
180
  - ".github/workflows/snyk_merge.yml"
177
181
  - ".gitignore"
178
182
  - CHANGELOG.md
179
183
  - CODEOWNERS
180
184
  - Gemfile
185
+ - History.md
181
186
  - LICENSE.txt
182
187
  - README.md
183
188
  - Rakefile