Skip to content

Commit 7c9734e

Browse files
authored
Merge pull request #504 from voxpupuli/modulesync
modulesync 7.0.0
2 parents c684945 + 3296b7a commit 7c9734e

14 files changed

Lines changed: 42 additions & 16 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this
232232
with:
233233

234234
```sh
235-
BEAKER_setfile=debian11-64 bundle exec rake beaker
235+
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
236236
```
237237

238-
You can replace the string `debian10` with any common operating system.
238+
You can replace the string `debian11` with any common operating system.
239239
The following strings are known to work:
240240

241-
* ubuntu1804
242241
* ubuntu2004
243-
* debian10
242+
* ubuntu2204
244243
* debian11
245244
* centos7
246245
* centos8
246+
* centos9
247+
* almalinux8
248+
* almalinux9
249+
* fedora36
247250

248251
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).
249252

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Managed by modulesync - DO NOT EDIT
33
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
44

5-
modulesync_config_version: '6.0.0'
5+
modulesync_config_version: '7.0.0'

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
inherit_from: .rubocop_todo.yml
3+
24
# Managed by modulesync - DO NOT EDIT
35
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
46

.rubocop_todo.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2023-08-17 21:26:09 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: 2
10+
# This cop supports unsafe autocorrection (--autocorrect-all).
11+
Lint/NonAtomicFileOperation:
12+
Exclude:
13+
- 'lib/puppet/provider/archive/ruby.rb'
14+
15+
# Offense count: 1
16+
# This cop supports unsafe autocorrection (--autocorrect-all).
17+
# Configuration parameters: AllowComments.
18+
Style/RedundantInitialize:
19+
Exclude:
20+
- 'lib/puppet_x/bodeco/util.rb'

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
55

66
group :test do
7-
gem 'voxpupuli-test', '~> 6.0', :require => false
7+
gem 'voxpupuli-test', '~> 7.0', :require => false
88
gem 'coveralls', :require => false
99
gem 'simplecov-console', :require => false
1010
gem 'puppet_metadata', '~> 3.0', :require => false

lib/puppet/type/archive.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def should_to_s(value)
208208
desc 'optional header(s) to pass.'
209209

210210
validate do |val|
211-
raise ArgumentError, "headers must be an array: #{val}" unless val.is_a?(::Array)
211+
raise ArgumentError, "headers must be an array: #{val}" unless val.is_a?(Array)
212212
end
213213
end
214214

@@ -238,12 +238,12 @@ def should_to_s(value)
238238
desc 'provider download options (affects curl, wget, gs, and only s3 downloads for ruby provider)'
239239

240240
validate do |val|
241-
raise ArgumentError, "download_options should be String or Array: #{val}" unless val.is_a?(::String) || val.is_a?(::Array)
241+
raise ArgumentError, "download_options should be String or Array: #{val}" unless val.is_a?(String) || val.is_a?(Array)
242242
end
243243

244244
munge do |val|
245245
case val
246-
when ::String
246+
when String
247247
[val]
248248
else
249249
val

lib/puppet_x/bodeco/archive.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def win_7zip
7979
Add-Type -AssemblyName System.IO.Compression.FileSystem -erroraction "silentlycontinue"
8080
$zipFile = [System.IO.Compression.ZipFile]::openread(#{@file_path})
8181
foreach ($zipFileEntry in $zipFile.Entries) {
82-
$pwd = (Get-Item -Path ".\" -Verbose).FullName
82+
$pwd = (Get-Item -Path "." -Verbose).FullName
8383
$outputFile = [io.path]::combine($pwd, $zipFileEntry.FullName)
8484
$dir = ([io.fileinfo]$outputFile).DirectoryName
8585

lib/puppet_x/bodeco/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def self.puppet_download(url, filepath)
3333
status = load_file_with_any_terminus(url)
3434
raise ArgumentError, "Previous error(s) resulted in Puppet being unable to retrieve information from environment #{Puppet['environment']} source(s) #{url}'\nMost probable cause is file not found." unless status
3535

36-
File.open(filepath, 'wb') { |file| file.write(status.content) }
36+
File.binwrite(filepath, status.content)
3737
end
3838

3939
# @private

spec/functions/archive_go_md5_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
context 'when file doesn\'t exist' do
1818
it 'raises error' do
1919
allow(PuppetX::Bodeco::Util).to receive(:content).with(uri, username: 'user', password: 'pass').and_return(example_md5)
20-
expect(subject).to run.with_params('user', 'pass', 'non-existent-file', url).and_raise_error(RuntimeError, "Could not parse md5 from url https://gocd\.lan/path/file\.md5 response: #{example_md5}")
20+
expect(subject).to run.with_params('user', 'pass', 'non-existent-file', url).and_raise_error(RuntimeError, "Could not parse md5 from url https://gocd.lan/path/file.md5 response: #{example_md5}")
2121
end
2222
end
2323
end

spec/spec_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
end
2020

2121
Dir['./spec/support/**/*.rb'].sort.each { |f| require f }
22+
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }

0 commit comments

Comments
 (0)