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 2.5.1 and drop Puppet4 #118

Merged
merged 4 commits into from
Jan 27, 2019
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
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Thank you for contributing to this project!
-->
#### Pull Request (PR) description
<!--
Replace this comment with a description of your pull request.
Replace this comment with a description of your pull request.
-->

#### This Pull Request (PR) fixes the following issues
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '2.4.0'
modulesync_config_version: '2.5.1'
60 changes: 17 additions & 43 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,76 @@
---
sudo: false
dist: xenial
language: ruby
cache: bundler
before_install:
- rm -f Gemfile.lock
- sh ./.travis/setup.sh
script:
- 'bundle exec rake $CHECK'
matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 6.0" CHECK=test_with_coveralls
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 6.0" CHECK=rubocop
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
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
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
allow_failures:
- env: BEAKER_PUPPET_COLLECTION=puppet6-nightly
branches:
only:
- master
Expand Down
12 changes: 12 additions & 0 deletions .travis/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# THIS FILE IS MANAGED BY MODULESYNC

rm -f Gemfile.lock
if [ "${PUPPET_VERSION}" = '~> 4.0' ]; then
gem install bundler -v '< 2' --no-rdoc --no-ri;
else
gem update --system;
gem update bundler;
bundle --version;
fi
16 changes: 7 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ group :test do
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'metadata-json-lint', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop', '~> 0.49.1', :require => false
gem 'rubocop-rspec', '~> 1.15.0', :require => false
gem 'mocha', '~> 1.4.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2'
gem 'parallel_tests', '2.24.0', :require => false if RUBY_VERSION < '2.2.0'
gem 'parallel_tests', :require => false if RUBY_VERSION >= '2.2.0'
gem 'parallel_tests', :require => false
end

group :development do
Expand Down Expand Up @@ -57,13 +55,13 @@ group :system_tests do
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '>= 4', :require => false if RUBY_VERSION >= '2.2.6'
gem 'rbnacl-libsodium', :require => false if RUBY_VERSION >= '2.2.6'
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator' if RUBY_VERSION >= '2.2.2'
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
gem 'puppet-strings', '>= 1.0', :require => false
Expand All @@ -77,7 +75,7 @@ else
gem 'facter', :require => false, :groups => [:test]
end

ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 5.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ squid::http_access{ '!Safe_ports':
action => deny,
}
```
This module will set the SELINUX-context for the cache_dir and/or port, requires [puppet-selinux](https://github.com/voxpupuli/puppet-selinux)
This module will set the SELINUX-context for the cache_dir and/or port, requires [puppet-selinux](https://github.com/voxpupuli/puppet-selinux)

### Parameters for squid Class
Parameters to the squid class almost map 1 to 1 to squid.conf parameters themselves.
Expand Down Expand Up @@ -163,7 +163,7 @@ endif
* `process_number` if specfied as an integer the cache will be wrapped
in a `if $proceess_number` statement so the cache will be used by only
one process. Default is undef.
* `manage_dir` Boolean value, if true puppet will attempt to create the
* `manage_dir` Boolean value, if true puppet will attempt to create the
directory, if false you will have to create it yourself. Make sure the
directory has the correct owner, group and mode. Defaults to true.

Expand Down Expand Up @@ -244,7 +244,7 @@ squid::snmp_access { 'monitoring hosts':
}
```

Adds a squid.conf line
Adds a squid.conf line

```
# snmp_access fragment for monitoring hosts
Expand Down Expand Up @@ -276,7 +276,7 @@ squid::icp_access { 'our_networks hosts':
}
```

Adds a squid.conf line
Adds a squid.conf line

```
icp_access allow our_networks hosts
Expand Down Expand Up @@ -477,7 +477,7 @@ squid::ssl_bump { 'all':
}
```

Adds a squid.conf line
Adds a squid.conf line

```
ssl_bump bump all
Expand All @@ -499,7 +499,7 @@ squid::sslproxy_cert_error { 'all':
}
```

Adds a squid.conf line
Adds a squid.conf line

```
sslproxy_cert_error allow all
Expand Down
19 changes: 17 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,27 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
end

desc 'Run tests metadata_lint, release_checks'
desc 'Run tests release_checks'
task test: [
:metadata_lint,
:release_checks,
]

namespace :check do
desc 'Check for trailing whitespace'
task :trailing_whitespace do
Dir.glob('**/*.md', File::FNM_DOTMATCH).sort.each do |filename|
next if filename =~ %r{^((modules|acceptance|\.?vendor|spec/fixtures|pkg)/|REFERENCE.md)}
File.foreach(filename).each_with_index do |line, index|
if line =~ %r{\s\n$}
puts "#{filename} has trailing whitespace on line #{index + 1}"
exit 1
end
end
end
end
end
Rake::Task[:release_checks].enhance ['check:trailing_whitespace']

desc "Run main 'test' task and report merged results to coveralls"
task test_with_coveralls: [:test] do
if Dir.exist?(File.expand_path('../lib', __FILE__))
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.10.0 < 7.0.0"
"version_requirement": ">= 5.5.8 < 7.0.0"
}
],
"dependencies": [
Expand Down
13 changes: 0 additions & 13 deletions spec/default_facts.yml

This file was deleted.

14 changes: 9 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
require 'rspec-puppet-facts'
include RspecPuppetFacts

if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
facts = YAML.load(File.read(File.join(__dir__, 'default_module_facts.yml')))
if facts
facts.each do |name, value|
add_custom_fact name.to_sym, value
end
end
end

if Dir.exist?(File.expand_path('../../lib', __FILE__))
require 'coveralls'
require 'simplecov'
Expand All @@ -22,11 +31,6 @@
end

RSpec.configure do |c|
default_facts = {}
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__))
default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__))
c.default_facts = default_facts

# Coverage generation
c.after(:suite) do
RSpec::Puppet::Coverage.report!
Expand Down