Skip to content

Commit

Permalink
Merge pull request #117 from ghoneycutt/ruby231
Browse files Browse the repository at this point in the history
Add support for Ruby v2.3.1
  • Loading branch information
ghoneycutt authored Nov 7, 2016
2 parents f5a2dcc + 7cd2f0b commit b91682d
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
32 changes: 30 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.3.1

env:
matrix:
Expand All @@ -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
Expand All @@ -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
22 changes: 8 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,25 @@ 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'
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'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2013, 2014 Garrett Honeycutt <[email protected]>
Copyright (C) 2013-2016 Garrett Honeycutt <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
]
}
12 changes: 11 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b91682d

Please sign in to comment.