Skip to content

Commit

Permalink
Merge pull request #874 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 7.0.0
  • Loading branch information
evgeni authored Oct 3, 2023
2 parents 86a35ad + 6a2ccb8 commit 42f1338
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 111 deletions.
4 changes: 3 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ fixtures:
repositories:
apache: https://github.com/puppetlabs/puppetlabs-apache.git
apt: https://github.com/puppetlabs/puppetlabs-apt.git
firewall: https://github.com/puppetlabs/puppetlabs-firewall
firewall:
repo: https://github.com/puppetlabs/puppetlabs-firewall
ref: v6.0.0
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
concat: https://github.com/puppetlabs/puppetlabs-concat.git
postgresql: https://github.com/puppetlabs/puppet-postgresql.git
Expand Down
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
36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

pkg/
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
/.yardoc/
/Guardfile
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: '5.4.0'
modulesync_config_version: '7.0.0'
64 changes: 32 additions & 32 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.github/
.librarian/
Puppetfile.lock
/docs/
/pkg/
/Gemfile
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/
/Rakefile
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.github/
/.librarian/
/Puppetfile.lock
*.iml
.editorconfig
.fixtures.yml
.gitignore
.msync.yml
.overcommit.yml
.pmtignore
.rspec
.rspec_parallel
.rubocop.yml
.sync.yml
/.editorconfig
/.fixtures.yml
/.gitignore
/.msync.yml
/.overcommit.yml
/.pmtignore
/.rspec
/.rspec_parallel
/.rubocop.yml
/.sync.yml
.*.sw?
.yardoc/
.yardopts
Dockerfile
/.yardoc/
/.yardopts
/Dockerfile
23 changes: 13 additions & 10 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-03-09 21:00:49 UTC using RuboCop version 1.22.3.
# on 2023-08-17 21:27:12 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 @@ -19,26 +19,29 @@ Lint/MissingSuper:
Exclude:
- 'spec/serverspec_type_zabbixapi.rb'

# Offense count: 7
# Offense count: 1
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'lib/puppet/provider/zabbix_proxy/ruby.rb'
- 'lib/puppet/type/zabbix_host.rb'
- 'lib/puppet/type/zabbix_template.rb'

# Offense count: 4
# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/acceptance/zabbix_proxy_spec.rb'
- 'spec/unit/puppet/type/zabbix_template_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/EmptyExampleGroup:
Exclude:
- 'spec/classes/agent_spec.rb'
- 'spec/classes/javagateway_spec.rb'
- 'spec/classes/server_spec.rb'

# Offense count: 4
# Offense count: 2
RSpec/RepeatedExampleGroupDescription:
Exclude:
- 'spec/classes/database_mysql_spec.rb'
- 'spec/defines/startup_spec.rb'

# Offense count: 1
Expand Down
14 changes: 7 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 5.4', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 2.0', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
gem 'fakefs', :require => false
gem 'zabbixapi', :require => false
end
Expand All @@ -18,19 +18,19 @@ group :development do
end

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

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.2.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'voxpupuli-release', '~> 3.0', :require => false
gem 'faraday-retry', '~> 2.1', :require => false
end

gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24'
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
36 changes: 4 additions & 32 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ end
begin
require 'voxpupuli/release/rake_tasks'
rescue LoadError
# voxpupuli-release not present
else
GCGConfig.user = 'voxpupuli'
GCGConfig.project = 'puppet-zabbix'
end

desc "Run main 'test' task and report merged results to coveralls"
Expand All @@ -37,36 +41,4 @@ task test_with_coveralls: [:test] do
end
end

desc 'Generate REFERENCE.md'
task :reference, [:debug, :backtrace] do |t, args|
patterns = ''
Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
end

begin
require 'github_changelog_generator/task'
require 'puppet_blacksmith'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
metadata = Blacksmith::Modulefile.new
config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
config.user = 'voxpupuli'
config.project = 'puppet-zabbix'
end

# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
require 'rbconfig'
if RbConfig::CONFIG['host_os'] =~ /linux/
task :changelog do
puts 'Fixing line endings...'
changelog_file = File.join(__dir__, 'CHANGELOG.md')
changelog_txt = File.read(changelog_file)
new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
File.open(changelog_file, "w") {|file| file.puts new_contents }
end
end

rescue LoadError
end
# vim: syntax=ruby
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}
}

if ($facts['os']['release']['major'] == '7' and versioncmp($zabbix_version, '5.0') >= 0) {
if ($facts['os']['name'] == 'CentOS' and $facts['os']['release']['major'] == '7' and versioncmp($zabbix_version, '5.0') >= 0) {
package { 'zabbix-required-scl-repo':
ensure => 'latest',
name => 'centos-release-scl',
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"name": "puppetlabs/firewall",
"version_requirement": ">= 1.7.0 < 4.0.0"
"version_requirement": ">= 1.7.0 < 7.0.0"
},
{
"name": "puppetlabs/apt",
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
it { is_expected.to contain_yumrepo('zabbix-nonsupported').with_baseurl('https://repo.zabbix.com/non-supported/rhel/7/$basearch/') }
it { is_expected.to contain_yumrepo('zabbix-nonsupported').with_gpgkey('https://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-79EA5ED4') }

it { is_expected.to contain_package('zabbix-required-scl-repo').with_ensure('latest').with_name('centos-release-scl') }
it { is_expected.to contain_package('zabbix-required-scl-repo').with_ensure('latest').with_name('centos-release-scl') } if facts[:os]['name'] == 'CentOS'
end
when '9'

Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
require 'support/acceptance/supported_versions'

require 'spec_helper_methods'
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }
4 changes: 1 addition & 3 deletions spec/unit/puppet/type/zabbix_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@
content
EOS
FileUtils.mkdir_p '/path/to'
File.open(mock_template_source_file, 'w') do |f|
f.write mock_file_content
end
File.write(mock_template_source_file, mock_file_content)
expect(property.source_xml).to eq mock_file_content
end
end
Expand Down

0 comments on commit 42f1338

Please sign in to comment.