Skip to content

Commit

Permalink
Merge pull request #376 from ghoneycutt/support_latest_puppet_versions
Browse files Browse the repository at this point in the history
Support latest puppet versions
  • Loading branch information
ghoneycutt authored Jul 5, 2017
2 parents 0a03cf2 + 70dabff commit 718e9bc
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 95 deletions.
89 changes: 16 additions & 73 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,90 +11,33 @@ before_install:
- gem --version
- bundle -v

rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.0
- 2.3.1

env:
matrix:
- PUPPET_GEM_VERSION="~> 3.1.0"
- PUPPET_GEM_VERSION="~> 3.2.0"
- PUPPET_GEM_VERSION="~> 3.3.0"
- PUPPET_GEM_VERSION="~> 3.4.0"
- PUPPET_GEM_VERSION="~> 3.5.0"
- PUPPET_GEM_VERSION="~> 3.6.0"
- PUPPET_GEM_VERSION="~> 3.7.0"
- PUPPET_GEM_VERSION="~> 3.8.0"
- 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: 'SPEC_OPTS="--format documentation" bundle exec rake validate lint spec'

matrix:
fast_finish: true
exclude:
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.2.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.3.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.4.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.0.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.1.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.2.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.3.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.4.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.5.0"
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.6.0"
- rvm: 1.8.7
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.7.0"
- rvm: 1.8.7
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.8.0"
- rvm: 1.8.7
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.9.0"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.10.0"
- rvm: 2.1.9
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
12 changes: 8 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ else
gem 'facter', :require => false
end

gem 'puppetlabs_spec_helper', '>= 1.2.0', :require => false
gem 'rspec-puppet', :require => false
gem 'rspec-puppet', '~> 2.0', :require => false
gem 'puppet-lint', '~> 2.0', :require => false
gem 'simplecov', :require => false

gem 'rspec', '~> 2.0', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'rake', '~> 10.0', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'json', '<= 1.8', :require => false if RUBY_VERSION < '2.0.0'
gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0'
gem 'metadata-json-lint', '0.0.11', :require => false if RUBY_VERSION < '1.9'
gem 'metadata-json-lint', :require => false if RUBY_VERSION >= '1.9'
gem 'metadata-json-lint', '0.0.11' if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'metadata-json-lint', '1.0.0' if RUBY_VERSION >= '1.9' && RUBY_VERSION < '2.0'
gem 'metadata-json-lint' if RUBY_VERSION >= '2.0'

gem 'puppetlabs_spec_helper', '2.0.2', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'puppetlabs_spec_helper', '>= 2.0.0', :require => false if RUBY_VERSION >= '1.9'
gem 'parallel_tests', '<= 2.9.0', :require => false if RUBY_VERSION < '2.0.0'

# vim:ft=ruby
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ Puppet module for installing and managing python, pip, virtualenvs and Gunicorn

# Compatibility #

* Puppet v3 (with and without the future parser)
See `.travis.yml` for compatibility matrix.

* Puppet v3 (with the future parser)
* Puppet v4

## Ruby versions

* 1.8.7
* 1.9.3
* 2.0.0
* 2.1.0
* 2.3.1
* 1.8.7 - Puppet 3
* 1.9.3 - Puppet 3
* 2.0.0 - Puppet 3
* 2.1.9 - Puppet 3 & 4

## OS Distributions ##

Expand Down
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

exclude_paths = [
"pkg/**/*",
Expand All @@ -27,6 +26,13 @@ exclude_paths = [
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

desc 'Validate manifests, templates, ruby files and shell scripts'
task :validate do
Dir['spec/**/*.rb'].each do |ruby_file|
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
end
end

desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
Expand Down
8 changes: 4 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@
}

# Anchor pattern to contain dependencies
anchor { 'python::begin': } ->
class { 'python::install': } ->
class { 'python::config': } ->
anchor { 'python::end': }
anchor { 'python::begin': }
-> class { 'python::install': }
-> class { 'python::config': }
-> anchor { 'python::end': }

# Allow hiera configuration of python resources
create_resources('python::pip', $python_pips)
Expand Down
8 changes: 4 additions & 4 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@
}

if $::python::rhscl_use_public_repository {
Package <| tag == 'python-scl-repo' |> ->
Package <| tag == 'python-scl-package' |>
Package <| tag == 'python-scl-repo' |>
-> Package <| tag == 'python-scl-package' |>
}

Package <| tag == 'python-scl-package' |> ->
Package <| tag == 'python-pip-package' |>
Package <| tag == 'python-scl-package' |>
-> Package <| tag == 'python-pip-package' |>
}
default: {

Expand Down
6 changes: 3 additions & 3 deletions spec/defines/pip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
describe "proxy as" do
context "defaults to empty" do
let (:params) {{ }}
it { is_expected.to contain_exec("pip_install_rpyc").without_command(/--proxy/) }
it { should_not contain_exec("pip_install_rpyc").with_command(/--proxy/) }
end
context "does not add proxy to search command if set to latest and proxy is unset" do
let (:params) {{ :ensure => 'latest' }}
it { is_expected.to contain_exec("pip_install_rpyc").without_command(/--proxy/) }
it { should_not contain_exec("pip_install_rpyc").with_command(/--proxy/) }
it { is_expected.to contain_exec("pip_install_rpyc").without_unless(/--proxy/) }
end
context "adds proxy to install command if proxy set" do
Expand All @@ -55,7 +55,7 @@
describe 'index as' do
context 'defaults to empty' do
let (:params) {{ }}
it { is_expected.to contain_exec('pip_install_rpyc').without_command(/--index-url/) }
it { should_not contain_exec('pip_install_rpyc').with_command(/--index-url/) }
end
context 'adds index to install command if index set' do
let (:params) {{ :index => 'http://www.example.com/simple/' }}
Expand Down

0 comments on commit 718e9bc

Please sign in to comment.