diff --git a/.fixtures.yml b/.fixtures.yml index c116304..18b8749 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -8,6 +8,6 @@ fixtures: ref: 'v1.0.0' common: repo: 'https://github.com/ghoneycutt/puppet-module-common.git' - ref: 'v1.3.0' + ref: 'v1.6.0' symlinks: rsyslog: "#{source_dir}" diff --git a/.gitignore b/.gitignore index e6122c7..222e35e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,11 +21,14 @@ doc/ # Vim *.swp +# Eclipse +.project + # OS X .DS_Store # Puppet coverage/ -spec/fixtures/modules/* spec/fixtures/manifests/* +spec/fixtures/modules/* Gemfile.lock diff --git a/.travis.yml b/.travis.yml index 5b53a88..20f28b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ rvm: - 1.9.3 - 2.0.0 - 2.1.0 + - 2.3.1 env: matrix: @@ -17,18 +18,21 @@ env: - PUPPET_GEM_VERSION="~> 3.6.0" - PUPPET_GEM_VERSION="~> 3.7.0" - PUPPET_GEM_VERSION="~> 3.8.0" - - PUPPET_GEM_VERSION="~> 3" PARSER="future" + - PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes" - PUPPET_GEM_VERSION="~> 4.0.0" - PUPPET_GEM_VERSION="~> 4.1.0" - PUPPET_GEM_VERSION="~> 4.2.0" - PUPPET_GEM_VERSION="~> 4.3.0" - PUPPET_GEM_VERSION="~> 4.4.0" - PUPPET_GEM_VERSION="~> 4.5.0" + - PUPPET_GEM_VERSION="~> 4.6.0" + - PUPPET_GEM_VERSION="~> 4.7.0" + - PUPPET_GEM_VERSION="~> 4.8.0" - PUPPET_GEM_VERSION="~> 4" sudo: false -script: 'bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec' +script: 'SPEC_OPTS="--format documentation" bundle exec rake validate lint spec' matrix: fast_finish: true @@ -55,8 +59,32 @@ matrix: env: PUPPET_GEM_VERSION="~> 4.4.0" - rvm: 1.8.7 env: PUPPET_GEM_VERSION="~> 4.5.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4.6.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4.7.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4.8.0" - rvm: 1.8.7 env: PUPPET_GEM_VERSION="~> 4" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.2.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.3.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.4.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.5.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.6.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.7.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.8.0" + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes" notifications: email: false diff --git a/Gemfile b/Gemfile index 8978fae..57f5d73 100644 --- a/Gemfile +++ b/Gemfile @@ -6,17 +6,15 @@ else gem 'puppet', :require => false end -gem 'metadata-json-lint' -gem 'puppetlabs_spec_helper', '>= 1.1.1' +gem 'puppetlabs_spec_helper', '>= 1.2.0' gem 'facter', '>= 1.7.0' gem 'rspec-puppet' -gem 'puppet-lint', '>= 1.0', '< 3.0' +gem 'puppet-lint', '~> 2.0' gem 'puppet-lint-absolute_classname-check' gem 'puppet-lint-alias-check' gem 'puppet-lint-empty_string-check' gem 'puppet-lint-file_ensure-check' gem 'puppet-lint-file_source_rights-check' -gem 'puppet-lint-fileserver-check' gem 'puppet-lint-leading_zero-check' gem 'puppet-lint-spaceship_operator_without_tag-check' gem 'puppet-lint-trailing_comma-check' @@ -24,13 +22,9 @@ gem 'puppet-lint-undef_in_function-check' gem 'puppet-lint-unquoted_string-check' gem 'puppet-lint-variable_contains_upcase' -# rspec must be v2 for ruby 1.8.7 -if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' - # rake >=11 does not support ruby 1.8.7 - gem 'rspec', '~> 2.0' - gem 'rake', '~> 10.0' -end - -if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '2.0' - gem 'json', '~> 1.0' -end +gem 'rspec', '~> 2.0' if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' +gem 'rake', '~> 10.0' if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' +gem 'json', '<= 1.8' if RUBY_VERSION < '2.0.0' +gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0' +gem 'metadata-json-lint', '0.0.11' if RUBY_VERSION < '1.9' +gem 'metadata-json-lint' if RUBY_VERSION >= '1.9' diff --git a/LICENSE b/LICENSE index ebad7fb..5aad1e4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2013, 2014 Garrett Honeycutt +Copyright (C) 2013-2016 Garrett Honeycutt Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index db2e188..40b5b9b 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ This module will ensure that sysklogd is absent, which is needed on EL5. # Compatibility # -This module has been tested to work on the following systems with Puppet v3 -(with and without the future parser) and Puppet v4 with Ruby versions 1.8.7, -1.9.3, 2.0.0 and 2.1.0. +This module has been tested to work on the following systems with Puppet +v3 (with and without the future parser) and Puppet v4 with Ruby versions +1.8.7, 1.9.3, 2.0.0, 2.1.0 and 2.3.1. * Debian 7 * EL 5 diff --git a/manifests/init.pp b/manifests/init.pp index f08d7d7..c48a814 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -246,6 +246,8 @@ $default_logrotate_present = false $default_mod_imjournal = false $default_manage_devlog = false + $default_sysconfig_path = undef + $default_syslogd_options = undef case $::kernelrelease { '5.10', '5.11' : { $default_service_name = 'network/cswrsyslog' diff --git a/metadata.json b/metadata.json index 8695e95..cbb4a40 100644 --- a/metadata.json +++ b/metadata.json @@ -73,7 +73,7 @@ ], "dependencies": [ {"name":"ghoneycutt/sysklogd","version_requirement":">= 1.0.0 < 2.0.0"}, - {"name":"ghoneycutt/common","version_requirement":">= 1.0.0 < 2.0.0"}, + {"name":"ghoneycutt/common","version_requirement":">= 1.6.0 < 2.0.0"}, {"name":"puppetlabs/stdlib","version_requirement":">= 4.6.0 < 6.0.0"} ] } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 748cdad..0877a51 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,17 @@ require 'puppetlabs_spec_helper/module_spec_helper' RSpec.configure do |config| + config.hiera_config = 'spec/fixtures/hiera/hiera.yaml' config.before :each do - Puppet[:parser] = 'future' if ENV['PARSER'] == 'future' + # Ensure that we don't accidentally cache facts and environment between + # test cases. This requires each example group to explicitly load the + # facts being exercised with something like + # Facter.collection.loader.load(:ipaddress) + Facter.clear + Facter.clear_messages end + config.default_facts = { + :environment => 'rp_env', + :rsyslog_version => '7', + } end