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 +4 -4
- data/.github/pull_request_template.md +10 -0
- data/.github/workflows/labeller.yml +27 -0
- data/.github/workflows/release.yml +16 -0
- data/.github/workflows/release_prep.yml +20 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +89 -120
- data/History.md +214 -0
- data/README.md +6 -4
- data/lib/puppet_forge/lru_cache.rb +1 -1
- data/lib/puppet_forge/version.rb +1 -1
- data/spec/unit/forge/lru_cache_spec.rb +44 -22
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19f0c8305a2d1f23815f84d6310f55a8da5395f5a102dbb6d1597482344d0104
|
4
|
+
data.tar.gz: 26abbb2f25ab7408b8273f2d37b23464177f008c0ac7759d7b6de63486bac76d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/CHANGELOG.md
CHANGED
@@ -1,207 +1,176 @@
|
|
1
|
-
|
1
|
+
<!-- markdownlint-disable MD024 -->
|
2
|
+
# Changelog
|
2
3
|
|
3
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
10
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.1...v5.0.3)
|
15
11
|
|
16
|
-
|
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
|
-
|
14
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.0...v5.0.1)
|
20
15
|
|
21
|
-
|
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
|
-
|
18
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v4.1.0...v5.0.0)
|
25
19
|
|
26
|
-
|
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
|
-
|
22
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v4.0.0...v4.1.0)
|
30
23
|
|
31
|
-
###
|
24
|
+
### Added
|
32
25
|
|
33
|
-
|
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
|
-
##
|
28
|
+
## [v4.0.0](https://github.com/puppetlabs/forge-ruby/tree/v4.0.0) - 2022-12-01
|
38
29
|
|
39
|
-
|
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
|
-
##
|
32
|
+
## [v3.2.0](https://github.com/puppetlabs/forge-ruby/tree/v3.2.0) - 2021-11-09
|
44
33
|
|
45
|
-
|
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
|
-
##
|
36
|
+
## [v3.1.0](https://github.com/puppetlabs/forge-ruby/tree/v3.1.0) - 2021-08-20
|
49
37
|
|
50
|
-
|
38
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v3.0.0...v3.1.0)
|
51
39
|
|
52
|
-
|
40
|
+
## [v3.0.0](https://github.com/puppetlabs/forge-ruby/tree/v3.0.0) - 2021-01-28
|
53
41
|
|
54
|
-
|
42
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.4...v3.0.0)
|
55
43
|
|
56
|
-
|
44
|
+
## [v2.3.4](https://github.com/puppetlabs/forge-ruby/tree/v2.3.4) - 2020-03-31
|
57
45
|
|
58
|
-
|
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
|
-
|
48
|
+
## [v2.3.3](https://github.com/puppetlabs/forge-ruby/tree/v2.3.3) - 2020-02-20
|
64
49
|
|
65
|
-
|
50
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.2...v2.3.3)
|
66
51
|
|
67
|
-
## v2.3.
|
52
|
+
## [v2.3.2](https://github.com/puppetlabs/forge-ruby/tree/v2.3.2) - 2020-02-05
|
68
53
|
|
69
|
-
|
54
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.1...v2.3.2)
|
70
55
|
|
71
|
-
|
56
|
+
## [v2.3.1](https://github.com/puppetlabs/forge-ruby/tree/v2.3.1) - 2019-11-15
|
72
57
|
|
73
|
-
|
58
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.0...v2.3.1)
|
74
59
|
|
75
|
-
|
60
|
+
## [v2.3.0](https://github.com/puppetlabs/forge-ruby/tree/v2.3.0) - 2019-07-10
|
76
61
|
|
77
|
-
|
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.
|
64
|
+
## [v2.3.0.rc1](https://github.com/puppetlabs/forge-ruby/tree/v2.3.0.rc1) - 2019-07-10
|
81
65
|
|
82
|
-
|
66
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.9...v2.3.0.rc1)
|
83
67
|
|
84
|
-
|
68
|
+
## [v2.2.9](https://github.com/puppetlabs/forge-ruby/tree/v2.2.9) - 2017-12-01
|
85
69
|
|
86
|
-
|
70
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.8...v2.2.9)
|
87
71
|
|
88
|
-
|
72
|
+
## [v2.2.8](https://github.com/puppetlabs/forge-ruby/tree/v2.2.8) - 2017-11-09
|
89
73
|
|
90
|
-
|
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
|
-
|
76
|
+
### Added
|
94
77
|
|
95
|
-
|
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
|
-
|
80
|
+
## [v2.2.7](https://github.com/puppetlabs/forge-ruby/tree/v2.2.7) - 2017-06-30
|
98
81
|
|
99
|
-
|
82
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.6...v2.2.7)
|
100
83
|
|
101
|
-
|
84
|
+
## [v2.2.6](https://github.com/puppetlabs/forge-ruby/tree/v2.2.6) - 2017-06-27
|
102
85
|
|
103
|
-
|
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
|
-
|
90
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.4...v2.2.5)
|
108
91
|
|
109
|
-
|
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
|
-
|
94
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.3...v2.2.4)
|
113
95
|
|
114
96
|
### Added
|
115
97
|
|
116
|
-
|
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
|
-
|
100
|
+
## [v2.2.3](https://github.com/puppetlabs/forge-ruby/tree/v2.2.3) - 2017-01-17
|
122
101
|
|
123
|
-
|
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
|
-
##
|
104
|
+
## [v1.0.6](https://github.com/puppetlabs/forge-ruby/tree/v1.0.6) - 2016-07-25
|
127
105
|
|
128
|
-
|
106
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.2...v1.0.6)
|
129
107
|
|
130
|
-
|
108
|
+
## [v2.2.2](https://github.com/puppetlabs/forge-ruby/tree/v2.2.2) - 2016-07-06
|
131
109
|
|
132
|
-
|
110
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.1...v2.2.2)
|
133
111
|
|
134
|
-
|
112
|
+
## [v2.2.1](https://github.com/puppetlabs/forge-ruby/tree/v2.2.1) - 2016-05-24
|
135
113
|
|
136
|
-
|
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
|
-
|
118
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.5...v2.2.0)
|
145
119
|
|
146
|
-
|
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
|
-
|
122
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.4...v2.1.5)
|
151
123
|
|
152
|
-
|
124
|
+
## [v2.1.4](https://github.com/puppetlabs/forge-ruby/tree/v2.1.4) - 2016-04-01
|
153
125
|
|
154
|
-
|
126
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.3...v2.1.4)
|
155
127
|
|
156
|
-
|
128
|
+
## [v2.1.3](https://github.com/puppetlabs/forge-ruby/tree/v2.1.3) - 2016-01-25
|
157
129
|
|
158
|
-
|
130
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.2...v2.1.3)
|
159
131
|
|
160
|
-
## v2.1.
|
132
|
+
## [v2.1.2](https://github.com/puppetlabs/forge-ruby/tree/v2.1.2) - 2015-12-17
|
161
133
|
|
162
|
-
|
134
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.1...v2.1.2)
|
163
135
|
|
164
|
-
|
136
|
+
## [v2.1.1](https://github.com/puppetlabs/forge-ruby/tree/v2.1.1) - 2015-10-06
|
165
137
|
|
166
|
-
|
138
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.0...v2.1.1)
|
167
139
|
|
168
|
-
|
140
|
+
## [v2.1.0](https://github.com/puppetlabs/forge-ruby/tree/v2.1.0) - 2015-08-27
|
169
141
|
|
170
|
-
|
142
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.0.0...v2.1.0)
|
171
143
|
|
172
|
-
## v2.
|
144
|
+
## [v2.0.0](https://github.com/puppetlabs/forge-ruby/tree/v2.0.0) - 2015-08-14
|
173
145
|
|
174
|
-
|
146
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.5...v2.0.0)
|
175
147
|
|
176
|
-
|
148
|
+
### Added
|
177
149
|
|
178
|
-
|
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
|
-
|
154
|
+
## [v1.0.5](https://github.com/puppetlabs/forge-ruby/tree/v1.0.5) - 2015-07-23
|
181
155
|
|
182
|
-
|
156
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.4...v1.0.5)
|
183
157
|
|
184
|
-
##
|
158
|
+
## [v1.0.4](https://github.com/puppetlabs/forge-ruby/tree/v1.0.4) - 2014-12-17
|
185
159
|
|
186
|
-
|
160
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.3...v1.0.4)
|
187
161
|
|
188
|
-
|
162
|
+
## [v1.0.3](https://github.com/puppetlabs/forge-ruby/tree/v1.0.3) - 2014-06-24
|
189
163
|
|
190
|
-
|
164
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.2...v1.0.3)
|
191
165
|
|
192
|
-
|
166
|
+
## [v1.0.2](https://github.com/puppetlabs/forge-ruby/tree/v1.0.2) - 2014-06-16
|
193
167
|
|
194
|
-
|
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
|
-
|
170
|
+
## [v1.0.1](https://github.com/puppetlabs/forge-ruby/tree/v1.0.1) - 2014-06-02
|
200
171
|
|
201
|
-
|
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
|
-
|
174
|
+
## [v1.0.0](https://github.com/puppetlabs/forge-ruby/tree/v1.0.0) - 2014-05-16
|
206
175
|
|
207
|
-
|
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.
|
248
|
-
|
249
|
-
|
250
|
-
|
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
|
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.
|
data/lib/puppet_forge/version.rb
CHANGED
@@ -67,18 +67,26 @@ describe PuppetForge::LruCache do
|
|
67
67
|
expect(cache.send(:lru)).to eq(['foo', 'baz'])
|
68
68
|
end
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
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
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
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.
|
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-
|
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
|