puppet_forge 5.0.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +5 -0
- data/.github/workflows/release_prep.yml +6 -1
- data/.github/workflows/ruby-rspec.yml +0 -3
- data/CHANGELOG.md +9 -0
- data/lib/puppet_forge/tar/mini.rb +4 -4
- data/lib/puppet_forge/version.rb +1 -1
- data/puppet_forge.gemspec +2 -2
- data/spec/unit/forge/tar/mini_spec.rb +4 -4
- metadata +14 -10
- data/.github/workflows/labeller.yml +0 -27
- data/.github/workflows/snyk_merge.yml +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aa6e1bc1ae0b853f727a72ea5dd4f5bb971be49cbae5da1c1a2e2ec170f0d4e
|
4
|
+
data.tar.gz: baa47d4cc612aa468ba51860a3d206e946bd3b85335efa2ecc402107187e3cd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28bba9b23c15cc68d8b892253e29d4399426ebd3cddc542fd0f7afdd996cb1c8bb9778c0dc10fc443f6a75ebe77fb1467c3bde4ae81b7555f67700752cb74bea
|
7
|
+
data.tar.gz: 753c20bede9fa4db5248386ba9746ccab0c4d839ce08828b5b7a547e180ee5a554997e4b8f35cf45cec2a3dbe954c53dc9bd4d4f61e3d183e5f0e8a533fe4d59
|
@@ -7,10 +7,15 @@ on:
|
|
7
7
|
description: "The target for the release. This can be a commit sha or a branch."
|
8
8
|
required: false
|
9
9
|
default: "main"
|
10
|
+
ruby-version:
|
11
|
+
description: "Ruby version to use."
|
12
|
+
required: false
|
13
|
+
default: "3.1"
|
10
14
|
|
11
15
|
jobs:
|
12
16
|
release:
|
13
17
|
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release.yml@main"
|
14
18
|
with:
|
15
19
|
target: "${{ github.event.inputs.target }}"
|
20
|
+
ruby-version: "${{ github.event.inputs.ruby-version }}"
|
16
21
|
secrets: "inherit"
|
@@ -10,11 +10,16 @@ on:
|
|
10
10
|
version:
|
11
11
|
description: "Version of gem to be released."
|
12
12
|
required: true
|
13
|
+
ruby-version:
|
14
|
+
description: "Ruby version to use."
|
15
|
+
required: false
|
16
|
+
default: "3.1"
|
13
17
|
|
14
18
|
jobs:
|
15
19
|
release_prep:
|
16
20
|
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main"
|
17
21
|
with:
|
18
22
|
target: "${{ github.event.inputs.target }}"
|
19
|
-
version: "${{ github.
|
23
|
+
version: "${{ github.event.inputs.version }}"
|
24
|
+
ruby-version: "${{ github.event.inputs.ruby-version }}"
|
20
25
|
secrets: "inherit"
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
|
6
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).
|
7
7
|
|
8
|
+
## [v6.0.0](https://github.com/puppetlabs/forge-ruby/tree/v6.0.0) - 2024-09-20
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.4...v6.0.0)
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- remove ruby 2.6, 2.7 and 3.0 [#124](https://github.com/puppetlabs/forge-ruby/pull/124) ([malikparvez](https://github.com/malikparvez))
|
15
|
+
- Removing Archive::Tar::Minitar [#122](https://github.com/puppetlabs/forge-ruby/pull/122) ([malikparvez](https://github.com/malikparvez))
|
16
|
+
|
8
17
|
## [v5.0.4](https://github.com/puppetlabs/forge-ruby/tree/v5.0.4) - 2024-08-13
|
9
18
|
|
10
19
|
[Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.3...v5.0.4)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'zlib'
|
2
|
-
require '
|
2
|
+
require 'minitar'
|
3
3
|
|
4
4
|
module PuppetForge
|
5
5
|
class Tar
|
@@ -15,7 +15,7 @@ module PuppetForge
|
|
15
15
|
file_lists = {}
|
16
16
|
Zlib::GzipReader.open(sourcefile) do |reader|
|
17
17
|
file_lists = validate_files(reader)
|
18
|
-
|
18
|
+
Minitar.unpack(reader, destdir, file_lists[:valid]) do |action, name, stats|
|
19
19
|
case action
|
20
20
|
when :file_done
|
21
21
|
FileUtils.chmod('u+rw,g+r,a-st', "#{destdir}/#{name}")
|
@@ -33,7 +33,7 @@ module PuppetForge
|
|
33
33
|
|
34
34
|
def pack(sourcedir, destfile)
|
35
35
|
Zlib::GzipWriter.open(destfile) do |writer|
|
36
|
-
|
36
|
+
Minitar.pack(sourcedir, writer)
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -50,7 +50,7 @@ module PuppetForge
|
|
50
50
|
# @return [Hash{:symbol => Array<String>}] a hash with file-category keys pointing to lists of filenames.
|
51
51
|
def validate_files(tarfile)
|
52
52
|
file_lists = {:valid => [], :invalid => [], :symlinks => []}
|
53
|
-
|
53
|
+
Minitar.open(tarfile).each do |entry|
|
54
54
|
flag = entry.typeflag
|
55
55
|
if flag.nil? || flag =~ /[[:digit:]]/ && SYMLINK_FLAGS.include?(flag.to_i)
|
56
56
|
file_lists[:symlinks] << entry.full_name
|
data/lib/puppet_forge/version.rb
CHANGED
data/puppet_forge.gemspec
CHANGED
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>=
|
21
|
+
spec.required_ruby_version = '>= 3.1.0'
|
22
22
|
|
23
23
|
spec.add_runtime_dependency "faraday", "~> 2.0"
|
24
24
|
spec.add_runtime_dependency "faraday-follow_redirects", "~> 0.3.0"
|
25
25
|
spec.add_dependency "semantic_puppet", "~> 1.0"
|
26
|
-
spec.add_dependency "minitar",
|
26
|
+
spec.add_dependency "minitar", '~> 1.0', '>= 1.0.2'
|
27
27
|
|
28
28
|
spec.add_development_dependency "rake"
|
29
29
|
spec.add_development_dependency "rspec", "~> 3.0"
|
@@ -57,7 +57,7 @@ describe PuppetForge::Tar::Mini do
|
|
57
57
|
writer = double('GzipWriter')
|
58
58
|
|
59
59
|
expect(Zlib::GzipWriter).to receive(:open).with(destfile).and_yield(writer)
|
60
|
-
expect(
|
60
|
+
expect(Minitar).to receive(:pack).with(sourcedir, writer)
|
61
61
|
|
62
62
|
minitar.pack(sourcedir, destfile)
|
63
63
|
end
|
@@ -66,8 +66,8 @@ describe PuppetForge::Tar::Mini do
|
|
66
66
|
reader = double('GzipReader')
|
67
67
|
|
68
68
|
expect(Zlib::GzipReader).to receive(:open).with(sourcefile).and_yield(reader)
|
69
|
-
expect(
|
70
|
-
expect(
|
69
|
+
expect(Minitar).to receive(:open).with(reader).and_return(tarfile_contents)
|
70
|
+
expect(Minitar).to receive(:unpack).with(reader, destdir, ['full_file']).and_yield(:file_start, 'thefile', nil)
|
71
71
|
|
72
72
|
file_lists = minitar.unpack(sourcefile, destdir)
|
73
73
|
|
@@ -81,6 +81,6 @@ describe PuppetForge::Tar::Mini do
|
|
81
81
|
|
82
82
|
expect(Zlib::GzipReader).to receive(:open).with(sourcefile).and_yield(reader)
|
83
83
|
expect(minitar).to receive(:validate_files).with(reader).and_return({:valid => [name]})
|
84
|
-
expect(
|
84
|
+
expect(Minitar).to receive(:unpack).with(reader, destdir, [name]).and_yield(type, name, nil)
|
85
85
|
end
|
86
86
|
end
|
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:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -56,16 +56,22 @@ dependencies:
|
|
56
56
|
name: minitar
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
- - ">="
|
60
63
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.0.
|
64
|
+
version: 1.0.2
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- - "
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '1.0'
|
72
|
+
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.0.
|
74
|
+
version: 1.0.2
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rake
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,11 +179,9 @@ extensions: []
|
|
173
179
|
extra_rdoc_files: []
|
174
180
|
files:
|
175
181
|
- ".github/pull_request_template.md"
|
176
|
-
- ".github/workflows/labeller.yml"
|
177
182
|
- ".github/workflows/release.yml"
|
178
183
|
- ".github/workflows/release_prep.yml"
|
179
184
|
- ".github/workflows/ruby-rspec.yml"
|
180
|
-
- ".github/workflows/snyk_merge.yml"
|
181
185
|
- ".gitignore"
|
182
186
|
- CHANGELOG.md
|
183
187
|
- CODEOWNERS
|
@@ -266,14 +270,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
266
270
|
requirements:
|
267
271
|
- - ">="
|
268
272
|
- !ruby/object:Gem::Version
|
269
|
-
version:
|
273
|
+
version: 3.1.0
|
270
274
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
275
|
requirements:
|
272
276
|
- - ">="
|
273
277
|
- !ruby/object:Gem::Version
|
274
278
|
version: '0'
|
275
279
|
requirements: []
|
276
|
-
rubygems_version: 3.
|
280
|
+
rubygems_version: 3.3.27
|
277
281
|
signing_key:
|
278
282
|
specification_version: 4
|
279
283
|
summary: Access the Puppet Forge API from Ruby for resource information and to download
|
@@ -1,27 +0,0 @@
|
|
1
|
-
name: Labeller
|
2
|
-
|
3
|
-
on:
|
4
|
-
issues:
|
5
|
-
types:
|
6
|
-
- opened
|
7
|
-
- labeled
|
8
|
-
- unlabeled
|
9
|
-
pull_request:
|
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 }}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
name: snyk_merge
|
2
|
-
on:
|
3
|
-
workflow_dispatch:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
jobs:
|
8
|
-
security:
|
9
|
-
runs-on: ubuntu-latest
|
10
|
-
steps:
|
11
|
-
- uses: actions/checkout@master
|
12
|
-
- name: setup ruby
|
13
|
-
uses: ruby/setup-ruby@v1
|
14
|
-
with:
|
15
|
-
ruby-version: 2.7
|
16
|
-
- name: create lock
|
17
|
-
run: bundle lock
|
18
|
-
- name: Run Snyk to check for vulnerabilities
|
19
|
-
uses: snyk/actions/ruby@master
|
20
|
-
env:
|
21
|
-
SNYK_TOKEN: ${{ secrets.SNYK_FORGE_KEY }}
|
22
|
-
with:
|
23
|
-
command: monitor
|
24
|
-
args: --org=puppet-forge
|