Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modulesync 7.0.0 #93

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this
with:

```sh
BEAKER_setfile=debian11-64 bundle exec rake beaker
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```

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

* ubuntu1804
* ubuntu2004
* debian10
* ubuntu2204
* debian11
* centos7
* centos8
* centos9
* almalinux8
* almalinux9
* fedora36

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

Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '6.0.0'
modulesync_config_version: '7.0.0'
17 changes: 11 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-08-03 06:53:06 UTC using RuboCop version 1.22.3.
# on 2023-08-17 21:30:05 UTC using RuboCop version 1.50.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -13,6 +13,16 @@ Lint/ConstantDefinitionInBlock:
Exclude:
- 'lib/puppet/provider/sshd_config_match/augeas.rb'

# Offense count: 11
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/unit/puppet/provider/ssh_config/augeas_spec.rb'
- 'spec/unit/puppet/provider/sshd_config/augeas_spec.rb'
- 'spec/unit/puppet/provider/sshd_config_match/augeas_spec.rb'
- 'spec/unit/puppet/provider/sshd_config_subsystem/augeas_spec.rb'
- 'spec/unit/puppet/provider/sshkey/augeas_spec.rb'

# Offense count: 10
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Expand Down Expand Up @@ -44,8 +54,3 @@ Style/AsciiComments:
- 'lib/puppet/type/sshd_config.rb'
- 'lib/puppet/type/sshd_config_match.rb'
- 'lib/puppet/type/sshd_config_subsystem.rb'

# Offense count: 1
Style/MixinUsage:
Exclude:
- 'spec/spec_helper_local.rb'
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 6.0', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
Expand All @@ -18,7 +18,6 @@ end

group :system_tests do
gem 'voxpupuli-acceptance', '~> 2.0', :require => false
gem 'puppetlabs_spec_helper', :require => false
end

group :release do
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/ssh_config/augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def self.set_simple_value(aug, base, path, label, value)
aug.insert(lastsp, label, false)
else
# Prefer to create the node next to a commented out entry
commented = aug.match("#{base}/#comment[.=~regexp('#{label}([^a-z\.].*)?')]")
commented = aug.match("#{base}/#comment[.=~regexp('#{label}([^a-z.].*)?')]")
aug.insert(commented.first, label, false) unless commented.empty?
end
aug.set("#{path}[last()]", v)
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/sshd_config/augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def self.set_simple_value(aug, base, path, label, value)
aug.insert(lastsp, label, false)
else
# Prefer to create the node next to a commented out entry
commented = aug.match("#{base}/#comment[.=~regexp('#{label}([^a-z\.].*)?', 'i')]")
commented = aug.match("#{base}/#comment[.=~regexp('#{label}([^a-z.].*)?', 'i')]")
if commented.empty?
if aug.match("#{base}/Match").empty?
# insert as the last line
Expand Down
4 changes: 1 addition & 3 deletions lib/puppet/provider/sshkey/augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ def host_aliases
augopen do |aug|
if resource_hashed?(aug)
# We cannot know about unmanaged aliases when hashed
resource[:host_aliases].map do |a|
a if self.class.find_resource(aug, a)
end.compact
resource[:host_aliases].select { |a| self.class.find_resource(aug, a) }
else
aug.match('$resource/alias').map do |a|
aug.get(a)
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
$LOAD_PATH.unshift(File.join(__dir__, 'fixtures/modules/sshkeys_core/lib'))

$LOAD_PATH.unshift(File.join(__dir__, 'fixtures/modules/augeasproviders_ssh/lib'))
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker
configure_beaker(modules: :metadata)

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