Skip to content

Commit 32287a0

Browse files
Merge branch 'OpenVoxProject:main' into filecontentchecksumbug
2 parents 2e20fa4 + 2aee693 commit 32287a0

File tree

21 files changed

+52
-66
lines changed

21 files changed

+52
-66
lines changed

.github/workflows/gem_release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Build the gem
1616
runs-on: ubuntu-24.04
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
- name: Install Ruby
2020
uses: ruby/setup-ruby@v1
2121
with:
@@ -39,7 +39,7 @@ jobs:
3939
contents: write # clone repo and create release
4040
steps:
4141
- name: Download gem from GitHub cache
42-
uses: actions/download-artifact@v4
42+
uses: actions/download-artifact@v5
4343
with:
4444
name: gem-artifact
4545
- name: Create Release
@@ -56,7 +56,7 @@ jobs:
5656
packages: write # publish to rubygems.pkg.github.com
5757
steps:
5858
- name: Download gem from GitHub cache
59-
uses: actions/download-artifact@v4
59+
uses: actions/download-artifact@v5
6060
with:
6161
name: gem-artifact
6262
- name: Publish gem to GitHub packages
@@ -73,7 +73,7 @@ jobs:
7373
id-token: write # rubygems.org authentication
7474
steps:
7575
- name: Download gem from GitHub cache
76-
uses: actions/download-artifact@v4
76+
uses: actions/download-artifact@v5
7777
with:
7878
name: gem-artifact
7979
- uses: rubygems/[email protected]
@@ -92,7 +92,7 @@ jobs:
9292
- release-to-rubygems
9393
steps:
9494
- name: Download gem from GitHub cache
95-
uses: actions/download-artifact@v4
95+
uses: actions/download-artifact@v5
9696
with:
9797
name: gem-artifact
9898
- name: Install Ruby

.github/workflows/tests.yaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ${{ matrix.cfg.os }}
2626
steps:
2727
- name: Checkout current PR
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929

3030
- name: Install ruby version ${{ matrix.cfg.ruby }}
3131
uses: ruby/setup-ruby@v1
@@ -42,19 +42,20 @@ jobs:
4242
fail-fast: false
4343
matrix:
4444
cfg:
45-
- {os: ubuntu-24.04, ruby: '3.2'} # openssl 3
46-
- {os: ubuntu-24.04, ruby: '3.3'} # openssl 3
47-
- {os: ubuntu-24.04, ruby: '3.4'} # openssl 3
45+
- {os: ubuntu-24.04, ruby: '3.2'}
46+
- {os: ubuntu-24.04, ruby: '3.3'}
47+
- {os: ubuntu-24.04, ruby: '3.4'}
4848
- {os: ubuntu-24.04, ruby: 'jruby-9.4'}
49-
- {os: windows-2025, ruby: '3.1'}
50-
- {os: windows-2025, ruby: '3.2'} # openssl 3
51-
- {os: windows-2025, ruby: '3.3'} # openssl 3
52-
- {os: windows-2025, ruby: '3.4'} # openssl 3
49+
- {os: ubuntu-24.04, ruby: 'jruby-9.4.8.0'}
50+
- {os: ubuntu-24.04, ruby: 'jruby-9.4.13.0'}
51+
- {os: windows-2025, ruby: '3.2'}
52+
- {os: windows-2025, ruby: '3.3'}
53+
- {os: windows-2025, ruby: '3.4'}
5354

5455
runs-on: ${{ matrix.cfg.os }}
5556
steps:
5657
- name: Checkout current PR
57-
uses: actions/checkout@v4
58+
uses: actions/checkout@v5
5859

5960
- name: Install ruby version ${{ matrix.cfg.ruby }}
6061
uses: ruby/setup-ruby@v1
@@ -78,13 +79,11 @@ jobs:
7879
chcp
7980
Get-WinSystemLocale
8081
Get-ChildItem Env: | % { Write-Output "$($_.Key): $($_.Value)" }
82+
# Enable Windows filesystem 8.3 support, see https://github.com/OpenVoxProject/openvox/pull/180
83+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /t REG_DWORD /v NtfsDisable8dot3NameCreation /d 0 /f
8184
# list current OpenSSL install
8285
gem list openssl
8386
ruby -ropenssl -e 'puts "OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}"; puts "OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}"'
84-
Get-Content Gemfile.lock
85-
ruby -v
86-
gem --version
87-
bundle --version
8887
8988
# Run tests
9089
bundle exec rake parallel:spec[2]
@@ -93,12 +92,7 @@ jobs:
9392
if: runner.os == 'Linux'
9493
run: |
9594
# debug information
96-
gem list openssl
9795
ruby -ropenssl -e 'puts "OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}"; puts "OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}"'
98-
cat Gemfile.lock
99-
ruby -v
100-
gem --version
101-
bundle --version
10296
10397
if [[ ${{ matrix.cfg.ruby }} =~ "jruby" ]]; then
10498
export _JAVA_OPTIONS='-Xmx1024m -Xms512m'

.rubocop_todo.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
3-
# using RuboCop version 1.79.0.
3+
# using RuboCop version 1.80.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -11,7 +11,6 @@ I18n/GetText/DecorateFunctionMessage:
1111
Enabled: false
1212

1313
# This cop supports safe autocorrection (--autocorrect).
14-
# Configuration parameters: AutoCorrect.
1514
I18n/GetText/DecorateString:
1615
Enabled: false
1716

@@ -130,19 +129,13 @@ Lint/ToJSON:
130129
- 'lib/puppet/pops/serialization/json.rb'
131130

132131
# This cop supports safe autocorrection (--autocorrect).
133-
# Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
132+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
134133
# NotImplementedExceptions: NotImplementedError
135134
Lint/UnusedMethodArgument:
136135
Enabled: false
137136

138137
# This cop supports safe autocorrection (--autocorrect).
139-
# Configuration parameters: AutoCorrect.
140-
Lint/UselessAssignment:
141-
Exclude:
142-
- 'lib/puppet/application/face_base.rb'
143-
144-
# This cop supports safe autocorrection (--autocorrect).
145-
# Configuration parameters: AutoCorrect, CheckForMethodsWithNoSideEffects.
138+
# Configuration parameters: CheckForMethodsWithNoSideEffects.
146139
Lint/Void:
147140
Exclude:
148141
- 'lib/puppet/type/schedule.rb'
@@ -324,7 +317,7 @@ Style/DoubleNegation:
324317
- 'lib/puppet/util/feature.rb'
325318

326319
# This cop supports safe autocorrection (--autocorrect).
327-
# Configuration parameters: AutoCorrect, EnforcedStyle, AllowComments.
320+
# Configuration parameters: EnforcedStyle, AllowComments.
328321
# SupportedStyles: empty, nil, both
329322
Style/EmptyElse:
330323
Enabled: false
@@ -341,7 +334,7 @@ Style/EmptyLiteral:
341334
- 'lib/puppet/type.rb'
342335

343336
# This cop supports safe autocorrection (--autocorrect).
344-
# Configuration parameters: AutoCorrect, EnforcedStyle.
337+
# Configuration parameters: EnforcedStyle.
345338
# SupportedStyles: compact, expanded
346339
Style/EmptyMethod:
347340
Enabled: false
@@ -496,7 +489,6 @@ Style/MultilineMemoization:
496489
Exclude:
497490
- 'lib/puppet/application.rb'
498491
- 'lib/puppet/pops/types/types.rb'
499-
- 'lib/puppet/type.rb'
500492

501493
# This cop supports safe autocorrection (--autocorrect).
502494
Style/MultilineTernaryOperator:
@@ -574,6 +566,11 @@ Style/RedundantParentheses:
574566
- 'lib/puppet/type/tidy.rb'
575567
- 'lib/puppet/util/windows/com.rb'
576568

569+
# This cop supports unsafe autocorrection (--autocorrect-all).
570+
Style/RedundantSort:
571+
Exclude:
572+
- 'lib/puppet/provider/package/nim.rb'
573+
577574
# This cop supports safe autocorrection (--autocorrect).
578575
# Configuration parameters: EnforcedStyle.
579576
# SupportedStyles: implicit, explicit

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ group(:test) do
5353
gem 'webrick', '~> 1.7', require: false
5454
gem 'yard', require: false
5555

56-
gem 'rubocop', '~> 1.79.0', require: false, platforms: [:ruby]
56+
gem 'rubocop', '~> 1.80.0', require: false, platforms: [:ruby]
5757
gem 'rubocop-i18n', '~> 3.0', require: false, platforms: [:ruby]
5858
gem 'rubocop-performance', '~> 1.0', require: false, platforms: [:ruby]
5959
gem 'rubocop-rake', '~> 0.6', require: false, platforms: [:ruby]

lib/puppet/file_system.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def self.readlink(path)
288288
# @api public
289289
#
290290
def self.unlink(*paths)
291-
@impl.unlink(*(paths.map { |p| assert_path(p) }))
291+
@impl.unlink(*paths.map { |p| assert_path(p) })
292292
end
293293

294294
# @return [File::Stat] object for the named file.

lib/puppet/indirector/catalog/compiler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def inlineable?(resource, sources)
169169
elsif sources.empty?
170170
# TRANSLATORS Inlining refers to adding additional metadata (in this case we are not inlining)
171171
Puppet::Util::Profiler.profile(_("Not inlining resource without sources"), [:compiler, :static_compile_inlining, :skipped_file_metadata, :no_sources]) { false }
172-
elsif !(sources.all? { |source| source =~ /^puppet:/ })
172+
elsif !sources.all? { |source| source =~ /^puppet:/ }
173173
# TRANSLATORS Inlining refers to adding additional metadata (in this case we are not inlining)
174174
Puppet::Util::Profiler.profile(_("Not inlining unsupported source scheme"), [:compiler, :static_compile_inlining, :skipped_file_metadata, :unsupported_scheme]) { false }
175175
else

lib/puppet/indirector/file_bucket_file/file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def path_for(bucket_path, digest, subfile = nil)
234234
# @api private
235235
def verify_identical_file(contents_file, bucket_file)
236236
(bucket_file.to_binary.bytesize == Puppet::FileSystem.size(contents_file)) &&
237-
(bucket_file.stream() { |s| Puppet::FileSystem.compare_stream(contents_file, s) })
237+
bucket_file.stream() { |s| Puppet::FileSystem.compare_stream(contents_file, s) }
238238
end
239239

240240
# @param contents_file [Pathname] Opaque file path to intended backup

lib/puppet/pops/validation/checker4_0.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def initialize(diagnostics_producer)
4343
@acceptor = diagnostics_producer
4444

4545
# Use null migration checker unless given in context
46-
@migration_checker = (Puppet.lookup(:migration_checker) { Migration::MigrationChecker.new() })
46+
@migration_checker = Puppet.lookup(:migration_checker) { Migration::MigrationChecker.new() }
4747
end
4848

4949
# Validates the entire model by visiting each model element and calling `check`.

lib/puppet/provider/package/nim.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def determine_latest_version(showres_output, package_name)
274274
[packages[package_name][version], nil]
275275
else
276276
versions = packages[package_name].keys
277-
latest_version = (versions.sort { |a, b| Puppet::Util::Package.versioncmp(b, a) })[0]
277+
latest_version = versions.sort { |a, b| Puppet::Util::Package.versioncmp(b, a) }[0]
278278
[packages[package_name][latest_version], latest_version]
279279
end
280280
end

lib/puppet/type.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,9 @@ def copy_metaparams(parameters)
374374
# @see uniqueness_key
375375
# @return [Array<Puppet::Parameter>] WARNING: this return type is uncertain
376376
def self.key_attribute_parameters
377-
@key_attribute_parameters ||= (
378-
@parameters.find_all { |param|
379-
param.isnamevar? or param.name == :name
380-
}
381-
)
377+
@key_attribute_parameters ||= @parameters.find_all { |param|
378+
param.isnamevar? or param.name == :name
379+
}
382380
end
383381

384382
# Returns cached {key_attribute_parameters} names.

0 commit comments

Comments
 (0)