Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bac4877

Browse files
committed
modulesync 2.9.0
1 parent ead6301 commit bac4877

File tree

6 files changed

+46
-15
lines changed

6 files changed

+46
-15
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ BUNDLE_JOBS="$(nproc)"
7575

7676
### Note for OS X users
7777

78-
`nproc` isn't a valid command unter OS x. As an alternative, you can do:
78+
`nproc` isn't a valid command under OS x. As an alternative, you can do:
7979

8080
```sh
8181
--jobs "$(sysctl -n hw.ncpu)"

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
dist: xenial
2+
dist: bionic
33
language: ruby
44
cache: bundler
55
before_install:
@@ -25,43 +25,43 @@ matrix:
2525
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
2626
- rvm: 2.5.3
2727
bundler_args: --without development release
28-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
28+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
2929
services: docker
3030
- rvm: 2.5.3
3131
bundler_args: --without development release
32-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
32+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3333
services: docker
3434
- rvm: 2.5.3
3535
bundler_args: --without development release
36-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
36+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3737
services: docker
3838
- rvm: 2.5.3
3939
bundler_args: --without development release
40-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
40+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4141
services: docker
4242
- rvm: 2.5.3
4343
bundler_args: --without development release
44-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
44+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4545
services: docker
4646
- rvm: 2.5.3
4747
bundler_args: --without development release
48-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
48+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4949
services: docker
5050
- rvm: 2.5.3
5151
bundler_args: --without development release
52-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
52+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
5353
services: docker
5454
- rvm: 2.5.3
5555
bundler_args: --without development release
56-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
56+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
5757
services: docker
5858
- rvm: 2.5.3
5959
bundler_args: --without development release
60-
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
60+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
6161
services: docker
6262
- rvm: 2.5.3
6363
bundler_args: --without development release
64-
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
64+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
6565
services: docker
6666
branches:
6767
only:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN bundle install --without system_tests development release --path=${BUNDLE_PA
1515
COPY . .
1616

1717
RUN bundle install
18-
RUN bundle exec release_checks
18+
RUN bundle exec rake release_checks
1919

2020
# Container should not saved
2121
RUN exit 1

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212

1313
group :test do
1414
gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false
15-
gem 'rspec-puppet-facts', '>= 1.8.0', :require => false
15+
gem 'rspec-puppet-facts', '>= 1.9.5', :require => false
1616
gem 'rspec-puppet-utils', :require => false
1717
gem 'puppet-lint-leading_zero-check', :require => false
1818
gem 'puppet-lint-trailing_comma-check', :require => false
@@ -22,6 +22,7 @@ group :test do
2222
gem 'puppet-lint-variable_contains_upcase', :require => false
2323
gem 'puppet-lint-absolute_classname-check', :require => false
2424
gem 'puppet-lint-topscope-variable-check', :require => false
25+
gem 'puppet-lint-legacy_facts-check', :require => false
2526
gem 'metadata-json-lint', :require => false
2627
gem 'redcarpet', :require => false
2728
gem 'rubocop', '~> 0.49.1', :require => false
@@ -65,7 +66,7 @@ end
6566
group :release do
6667
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator'
6768
gem 'puppet-blacksmith', :require => false
68-
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
69+
gem 'voxpupuli-release', :require => false
6970
gem 'puppet-strings', '>= 2.2', :require => false
7071
end
7172

Rakefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ begin
7777
metadata = JSON.load(File.read(metadata_json))
7878
config.project = metadata['name']
7979
end
80+
81+
# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
82+
require 'rbconfig'
83+
if RbConfig::CONFIG['host_os'] =~ /linux/
84+
task :changelog do
85+
puts 'Fixing line endings...'
86+
changelog_file = File.join(__dir__, 'CHANGELOG.md')
87+
changelog_txt = File.read(changelog_file)
88+
new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
89+
File.open(changelog_file, "w") {|file| file.puts new_contents }
90+
end
91+
end
92+
8093
rescue LoadError
8194
end
8295
# vim: syntax=ruby

spec/spec_helper.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
require 'bundler'
1111
include RspecPuppetFacts
1212

13+
if ENV['DEBUG']
14+
Puppet::Util::Log.level = :debug
15+
Puppet::Util::Log.newdestination(:console)
16+
end
17+
1318
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
1419
facts = YAML.load(File.read(File.join(__dir__, 'default_module_facts.yml')))
1520
if facts
@@ -37,6 +42,18 @@
3742
end
3843

3944
RSpec.configure do |c|
45+
# getting the correct facter version is tricky. We use facterdb as a source to mock facts
46+
# see https://github.com/camptocamp/facterdb
47+
# people might provide a specific facter version. In that case we use it.
48+
# Otherwise we need to match the correct facter version to the used puppet version.
49+
# as of 2019-10-31, puppet 5 ships facter 3.11 and puppet 6 ships facter 3.14
50+
# https://puppet.com/docs/puppet/5.5/about_agent.html
51+
c.default_facter_version = if ENV['FACTERDB_FACTS_VERSION']
52+
ENV['FACTERDB_FACTS_VERSION']
53+
else
54+
Gem::Dependency.new('', ENV['PUPPET_VERSION']).match?('', '5') ? '3.11.0' : '3.14.0'
55+
end
56+
4057
# Coverage generation
4158
c.after(:suite) do
4259
RSpec::Puppet::Coverage.report!

0 commit comments

Comments
 (0)