Skip to content

Commit

Permalink
Merge pull request #7 from ghoneycutt/ruby231
Browse files Browse the repository at this point in the history
Support Puppet v4 AIO with Ruby 2.3.1
  • Loading branch information
proelke authored Nov 7, 2016
2 parents d6a4403 + 7a17f15 commit e6b665b
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fixtures:
repositories:
stdlib:
repo: 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
repo: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
ref: '4.9.0'
symlinks:
rngd: "#{source_dir}"
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ spec/reports
test/tmp
test/version_tmp
tmp
Gemfile.lock

# YARD artifacts
.yardoc
Expand All @@ -22,10 +21,17 @@ doc/
# Vim
*.swp

# Eclipse
.project

# Visual Studio Code
.vscode/

# OS X
.DS_Store

# Puppet
coverage/
spec/fixtures/modules/*
spec/fixtures/manifests/*
spec/fixtures/modules/*
Gemfile.lock
44 changes: 35 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.3.1

env:
matrix:
- PUPPET_GEM_VERSION="~> 2.7.0"
- PUPPET_GEM_VERSION="~> 3.1.0"
- PUPPET_GEM_VERSION="~> 3.2.0"
- PUPPET_GEM_VERSION="~> 3.3.0"
Expand All @@ -23,20 +23,20 @@ env:
- 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"
- PUPPET_GEM_VERSION="~> 4" STRICT_VARIABLES="yes"

sudo: false

script: 'bundle exec metadata-json-lint metadata.json && 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
exclude:
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 2.7.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 2.7.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.0
Expand All @@ -56,9 +56,35 @@ matrix:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.3.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4"
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" STRICT_VARIABLES="yes"
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
18 changes: 9 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
source 'https://rubygems.org'
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end

gem 'metadata-json-lint'
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 1.0.0'
gem 'puppetlabs_spec_helper', '>= 1.2.0'
gem 'facter', '>= 1.7.0'
gem 'rspec-puppet'
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'
gem 'rspec', '~> 2.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'
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ The rngd module handles installing, configuring, and running RNGD across a range
#Compatibility
This module is built for use with Puppet v3 (with and without the future
parser) and Puppet v4 on the following platforms and supports Ruby versions
1.8.7, 1.9.3, 2.0.0 and 2.1.0.
1.8.7, 1.9.3, 2.0.0, 2.1.0 and 2.3.1.

* EL 5
* EL 6
* EL 7


#Setup
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_140chars')
PuppetLint.configuration.relative = true
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

Expand Down
31 changes: 20 additions & 11 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@
"issues_url": "https://github.com/proelke/proelke-rngd/issues",
"description": "Manages rngd - random number generator daemon",
"requirements": [
{
"name": "pe",
"version_requirement": ">= 3.2.0 < 5.0.0"
},
{
"name": "puppet",
"version_requirement": ">= 3.0.0 < 5.0.0"
}
{"name":"puppet","version_requirement":">= 3.0.0 < 5.0.0" }
],
"dependencies": [
{ "name":"puppetlabs/stdlib", "version_requirement":">= 4.9.0 < 5.0.0" }
],
"operatingsystem_support": [
{
Expand All @@ -34,9 +30,22 @@
"6",
"7"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"5",
"6",
"7"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"5",
"6",
"7"
]
}
],
"dependencies": [
{ "name":"puppetlabs/stdlib", "version_requirement":">= 4.9.0 < 5.0.0" }
]
}
15 changes: 15 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
require 'puppetlabs_spec_helper/module_spec_helper'

RSpec.configure do |config|
config.hiera_config = 'spec/fixtures/hiera/hiera.yaml'
config.before :each do
# 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',
}
end

0 comments on commit e6b665b

Please sign in to comment.