Skip to content

Commit 4e8b866

Browse files
authored
Merge pull request #533 from voxpupuli/modulesync
modulesync 2.7.0 and drop puppet 4
2 parents 66c0f6a + 8290f49 commit 4e8b866

File tree

14 files changed

+69
-103
lines changed

14 files changed

+69
-103
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ You can install all needed gems for spec tests into the modules directory by
5151
running:
5252

5353
```sh
54-
bundle install --path .vendor/ --without development --without system_tests --without release
54+
bundle install --path .vendor/ --without development system_tests release
5555
```
5656

5757
If you also want to run acceptance tests:
5858

5959
```sh
60-
bundle install --path .vendor/ --without development --with system_tests --without release
60+
bundle install --path .vendor/ --with system_tests --without development release
6161
```
6262

6363
Our all in one solution if you don't know if you need to install or update gems:
6464

6565
```sh
66-
bundle install --path .vendor/ --without development --with system_tests --without release; bundle update; bundle clean
66+
bundle install --path .vendor/ --with system_tests --without development release; bundle update; bundle clean
6767
```
6868

6969
## Syntax and style

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Thank you for contributing to this project!
88
-->
99
#### Pull Request (PR) description
1010
<!--
11-
Replace this comment with a description of your pull request.
11+
Replace this comment with a description of your pull request.
1212
-->
1313

1414
#### This Pull Request (PR) fixes the following issues
1515
<!--
16-
Replace this comment with the list of issues or n/a.
17-
Use format:
18-
Fixes #123
19-
Fixes #124
16+
Replace this comment with the list of issues or n/a.
17+
Use format:
18+
Fixes #123
19+
Fixes #124
2020
-->

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
modulesync_config_version: '2.3.1'
1+
modulesync_config_version: '2.7.0'

.sync.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@
66
- set: centos7-64
77
appveyor.yml:
88
delete: true
9-
spec/spec_helper.rb:
10-
mock_with: ':rspec'

.travis.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,36 @@
11
---
2-
sudo: false
3-
dist: trusty
2+
dist: xenial
43
language: ruby
54
cache: bundler
65
before_install:
7-
- rm -f Gemfile.lock
6+
- gem update --system
7+
- gem update bundler
8+
- bundle --version
89
script:
910
- 'bundle exec rake $CHECK'
1011
matrix:
1112
fast_finish: true
1213
include:
13-
- rvm: 2.1.9
14-
bundler_args: --without system_tests development release
15-
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12
1614
- rvm: 2.4.4
1715
bundler_args: --without system_tests development release
1816
env: PUPPET_VERSION="~> 5.0" CHECK=test
19-
- rvm: 2.5.1
17+
- rvm: 2.5.3
2018
bundler_args: --without system_tests development release
2119
env: PUPPET_VERSION="~> 6.0" CHECK=test_with_coveralls
22-
- rvm: 2.5.1
20+
- rvm: 2.5.3
2321
bundler_args: --without system_tests development release
2422
env: PUPPET_VERSION="~> 6.0" CHECK=rubocop
2523
- rvm: 2.4.4
2624
bundler_args: --without system_tests development release
2725
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
28-
- rvm: 2.5.1
26+
- rvm: 2.5.3
2927
bundler_args: --without development release
30-
dist: trusty
3128
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3229
services: docker
33-
sudo: required
34-
- rvm: 2.5.1
30+
- rvm: 2.5.3
3531
bundler_args: --without development release
36-
dist: trusty
3732
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3833
services: docker
39-
sudo: required
40-
- rvm: 2.5.1
41-
bundler_args: --without development release
42-
dist: trusty
43-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
44-
services: docker
45-
sudo: required
4634
branches:
4735
only:
4836
- master

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ Added Replica Set Type and Provider
413413
## Unsupported Release [0.6.0]
414414
### Summary
415415

416-
Added support for installing MongoDB client on
416+
Added support for installing MongoDB client on
417417
RHEL family systems.
418418

419419
## Unsupported Release [0.5.0]
@@ -423,8 +423,8 @@ Added types for providers for Mongo users and databases.
423423

424424
## Unsupported Release [0.4.0]
425425

426-
Major refactoring of the MongoDB module. Includes a new 'mongodb::globals'
427-
that consolidates many shared parameters into one location. This is an
426+
Major refactoring of the MongoDB module. Includes a new 'mongodb::globals'
427+
that consolidates many shared parameters into one location. This is an
428428
API-breaking release in anticipation of a 1.0 release.
429429

430430
## Unsupported Release [0.3.0]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.5.1
1+
FROM ruby:2.5.3
22

33
WORKDIR /opt/puppet
44

Gemfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
1111
end
1212

1313
group :test do
14-
gem 'puppetlabs_spec_helper', '>= 2.11.0', :require => false
14+
gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false
1515
gem 'rspec-puppet-facts', '>= 1.8.0', :require => false
1616
gem 'rspec-puppet-utils', :require => false
1717
gem 'puppet-lint-leading_zero-check', :require => false
@@ -20,16 +20,15 @@ group :test do
2020
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
2121
gem 'puppet-lint-unquoted_string-check', :require => false
2222
gem 'puppet-lint-variable_contains_upcase', :require => false
23+
gem 'puppet-lint-absolute_classname-check', :require => false
2324
gem 'metadata-json-lint', :require => false
2425
gem 'redcarpet', :require => false
25-
gem 'rubocop', '~> 0.49.1', :require => false if RUBY_VERSION >= '2.3.0'
26-
gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0'
26+
gem 'rubocop', '~> 0.49.1', :require => false
27+
gem 'rubocop-rspec', '~> 1.15.0', :require => false
2728
gem 'mocha', '~> 1.4.0', :require => false
2829
gem 'coveralls', :require => false
2930
gem 'simplecov-console', :require => false
30-
gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2'
31-
gem 'parallel_tests', '2.24.0', :require => false if RUBY_VERSION < '2.2.0'
32-
gem 'parallel_tests', :require => false if RUBY_VERSION >= '2.2.0'
31+
gem 'parallel_tests', :require => false
3332
end
3433

3534
group :development do
@@ -57,16 +56,16 @@ group :system_tests do
5756
gem 'beaker-puppet', :require => false
5857
gem 'beaker-puppet_install_helper', :require => false
5958
gem 'beaker-module_install_helper', :require => false
60-
gem 'rbnacl', '>= 4', :require => false if RUBY_VERSION >= '2.2.6'
61-
gem 'rbnacl-libsodium', :require => false if RUBY_VERSION >= '2.2.6'
59+
gem 'rbnacl', '>= 4', :require => false
60+
gem 'rbnacl-libsodium', :require => false
6261
gem 'bcrypt_pbkdf', :require => false
6362
end
6463

6564
group :release do
66-
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator' if RUBY_VERSION >= '2.2.2'
65+
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator'
6766
gem 'puppet-blacksmith', :require => false
6867
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
69-
gem 'puppet-strings', '>= 1.0', :require => false
68+
gem 'puppet-strings', '>= 2.2', :require => false
7069
end
7170

7271

@@ -77,7 +76,7 @@ else
7776
gem 'facter', :require => false, :groups => [:test]
7877
end
7978

80-
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 5.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
79+
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
8180
gem 'puppet', puppetversion, :require => false, :groups => [:test]
8281

8382
# vim: syntax=ruby

HISTORY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Added Replica Set Type and Provider
223223
## Unsupported Release [0.6.0]
224224
### Summary
225225

226-
Added support for installing MongoDB client on
226+
Added support for installing MongoDB client on
227227
RHEL family systems.
228228

229229
## Unsupported Release [0.5.0]
@@ -233,8 +233,8 @@ Added types for providers for Mongo users and databases.
233233

234234
## Unsupported Release [0.4.0]
235235

236-
Major refactoring of the MongoDB module. Includes a new 'mongodb::globals'
237-
that consolidates many shared parameters into one location. This is an
236+
Major refactoring of the MongoDB module. Includes a new 'mongodb::globals'
237+
that consolidates many shared parameters into one location. This is an
238238
API-breaking release in anticipation of a 1.0 release.
239239

240240
## Unsupported Release [0.3.0]

Rakefile

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,12 @@ require 'puppetlabs_spec_helper/rake_tasks'
33
# load optional tasks for releases
44
# only available if gem group releases is installed
55
begin
6-
require 'puppet_blacksmith/rake_tasks'
76
require 'voxpupuli/release/rake_tasks'
8-
require 'puppet-strings/tasks'
97
rescue LoadError
108
end
119

1210
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
13-
PuppetLint.configuration.fail_on_warnings = true
14-
PuppetLint.configuration.send('relative')
15-
PuppetLint.configuration.send('disable_140chars')
16-
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
17-
PuppetLint.configuration.send('disable_documentation')
18-
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
11+
PuppetLint.configuration.absolute_classname_reverse = true
1912

2013
exclude_paths = %w(
2114
pkg/**/*
@@ -28,20 +21,32 @@ PuppetSyntax.exclude_paths = exclude_paths
2821

2922
desc 'Auto-correct puppet-lint offenses'
3023
task 'lint:auto_correct' do
31-
PuppetLint.configuration.fix = true
32-
Rake::Task[:lint].invoke
24+
Rake::Task[:lint_fix].invoke
3325
end
3426

3527
desc 'Run acceptance tests'
3628
RSpec::Core::RakeTask.new(:acceptance) do |t|
3729
t.pattern = 'spec/acceptance'
3830
end
3931

40-
desc 'Run tests metadata_lint, release_checks'
41-
task test: [
42-
:metadata_lint,
43-
:release_checks,
44-
]
32+
desc 'Run tests'
33+
task test: [:release_checks]
34+
35+
namespace :check do
36+
desc 'Check for trailing whitespace'
37+
task :trailing_whitespace do
38+
Dir.glob('**/*.md', File::FNM_DOTMATCH).sort.each do |filename|
39+
next if filename =~ %r{^((modules|acceptance|\.?vendor|spec/fixtures|pkg)/|REFERENCE.md)}
40+
File.foreach(filename).each_with_index do |line, index|
41+
if line =~ %r{\s\n$}
42+
puts "#{filename} has trailing whitespace on line #{index + 1}"
43+
exit 1
44+
end
45+
end
46+
end
47+
end
48+
end
49+
Rake::Task[:release_checks].enhance ['check:trailing_whitespace']
4550

4651
desc "Run main 'test' task and report merged results to coveralls"
4752
task test_with_coveralls: [:test] do
@@ -54,25 +59,10 @@ task test_with_coveralls: [:test] do
5459
end
5560
end
5661

57-
desc "Print supported beaker sets"
58-
task 'beaker_sets', [:directory] do |t, args|
59-
directory = args[:directory]
60-
61-
metadata = JSON.load(File.read('metadata.json'))
62-
63-
(metadata['operatingsystem_support'] || []).each do |os|
64-
(os['operatingsystemrelease'] || []).each do |release|
65-
if directory
66-
beaker_set = "#{directory}/#{os['operatingsystem'].downcase}-#{release}"
67-
else
68-
beaker_set = "#{os['operatingsystem'].downcase}-#{release}-x64"
69-
end
70-
71-
filename = "spec/acceptance/nodesets/#{beaker_set}.yml"
72-
73-
puts beaker_set if File.exists? filename
74-
end
75-
end
62+
desc 'Generate REFERENCE.md'
63+
task :reference, [:debug, :backtrace] do |t, args|
64+
patterns = ''
65+
Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
7666
end
7767

7868
begin

0 commit comments

Comments
 (0)