Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 718e9bc

Browse files
authored
Merge pull request voxpupuli#376 from ghoneycutt/support_latest_puppet_versions
Support latest puppet versions
2 parents 0a03cf2 + 70dabff commit 718e9bc

7 files changed

Lines changed: 49 additions & 95 deletions

File tree

.travis.yml

Lines changed: 16 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -11,90 +11,33 @@ before_install:
1111
- gem --version
1212
- bundle -v
1313

14-
rvm:
15-
- 1.8.7
16-
- 1.9.3
17-
- 2.0.0
18-
- 2.1.0
19-
- 2.3.1
20-
21-
env:
22-
matrix:
23-
- PUPPET_GEM_VERSION="~> 3.1.0"
24-
- PUPPET_GEM_VERSION="~> 3.2.0"
25-
- PUPPET_GEM_VERSION="~> 3.3.0"
26-
- PUPPET_GEM_VERSION="~> 3.4.0"
27-
- PUPPET_GEM_VERSION="~> 3.5.0"
28-
- PUPPET_GEM_VERSION="~> 3.6.0"
29-
- PUPPET_GEM_VERSION="~> 3.7.0"
30-
- PUPPET_GEM_VERSION="~> 3.8.0"
31-
- PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
32-
- PUPPET_GEM_VERSION="~> 4.0.0"
33-
- PUPPET_GEM_VERSION="~> 4.1.0"
34-
- PUPPET_GEM_VERSION="~> 4.2.0"
35-
- PUPPET_GEM_VERSION="~> 4.3.0"
36-
- PUPPET_GEM_VERSION="~> 4.4.0"
37-
- PUPPET_GEM_VERSION="~> 4.5.0"
38-
- PUPPET_GEM_VERSION="~> 4.6.0"
39-
- PUPPET_GEM_VERSION="~> 4.7.0"
40-
- PUPPET_GEM_VERSION="~> 4.8.0"
41-
- PUPPET_GEM_VERSION="~> 4"
42-
4314
sudo: false
4415

4516
script: 'SPEC_OPTS="--format documentation" bundle exec rake validate lint spec'
4617

4718
matrix:
4819
fast_finish: true
49-
exclude:
50-
- rvm: 2.0.0
51-
env: PUPPET_GEM_VERSION="~> 3.1.0"
52-
- rvm: 2.1.0
53-
env: PUPPET_GEM_VERSION="~> 3.1.0"
54-
- rvm: 2.1.0
55-
env: PUPPET_GEM_VERSION="~> 3.2.0"
56-
- rvm: 2.1.0
57-
env: PUPPET_GEM_VERSION="~> 3.3.0"
58-
- rvm: 2.1.0
59-
env: PUPPET_GEM_VERSION="~> 3.4.0"
60-
- rvm: 1.8.7
61-
env: PUPPET_GEM_VERSION="~> 4.0.0"
62-
- rvm: 1.8.7
63-
env: PUPPET_GEM_VERSION="~> 4.1.0"
64-
- rvm: 1.8.7
65-
env: PUPPET_GEM_VERSION="~> 4.2.0"
66-
- rvm: 1.8.7
67-
env: PUPPET_GEM_VERSION="~> 4.3.0"
68-
- rvm: 1.8.7
69-
env: PUPPET_GEM_VERSION="~> 4.4.0"
70-
- rvm: 1.8.7
71-
env: PUPPET_GEM_VERSION="~> 4.5.0"
20+
include:
7221
- rvm: 1.8.7
22+
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
23+
- rvm: 1.9.3
24+
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
25+
- rvm: 2.0.0
26+
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
27+
- rvm: 2.1.9
28+
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
29+
- rvm: 2.1.9
7330
env: PUPPET_GEM_VERSION="~> 4.6.0"
74-
- rvm: 1.8.7
31+
- rvm: 2.1.9
7532
env: PUPPET_GEM_VERSION="~> 4.7.0"
76-
- rvm: 1.8.7
33+
- rvm: 2.1.9
7734
env: PUPPET_GEM_VERSION="~> 4.8.0"
78-
- rvm: 1.8.7
35+
- rvm: 2.1.9
36+
env: PUPPET_GEM_VERSION="~> 4.9.0"
37+
- rvm: 2.1.9
38+
env: PUPPET_GEM_VERSION="~> 4.10.0"
39+
- rvm: 2.1.9
7940
env: PUPPET_GEM_VERSION="~> 4"
80-
- rvm: 2.3.1
81-
env: PUPPET_GEM_VERSION="~> 3.1.0"
82-
- rvm: 2.3.1
83-
env: PUPPET_GEM_VERSION="~> 3.2.0"
84-
- rvm: 2.3.1
85-
env: PUPPET_GEM_VERSION="~> 3.3.0"
86-
- rvm: 2.3.1
87-
env: PUPPET_GEM_VERSION="~> 3.4.0"
88-
- rvm: 2.3.1
89-
env: PUPPET_GEM_VERSION="~> 3.5.0"
90-
- rvm: 2.3.1
91-
env: PUPPET_GEM_VERSION="~> 3.6.0"
92-
- rvm: 2.3.1
93-
env: PUPPET_GEM_VERSION="~> 3.7.0"
94-
- rvm: 2.3.1
95-
env: PUPPET_GEM_VERSION="~> 3.8.0"
96-
- rvm: 2.3.1
97-
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
9841

9942
notifications:
10043
email: false

Gemfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,20 @@ else
1818
gem 'facter', :require => false
1919
end
2020

21-
gem 'puppetlabs_spec_helper', '>= 1.2.0', :require => false
22-
gem 'rspec-puppet', :require => false
21+
gem 'rspec-puppet', '~> 2.0', :require => false
2322
gem 'puppet-lint', '~> 2.0', :require => false
2423
gem 'simplecov', :require => false
2524

2625
gem 'rspec', '~> 2.0', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
2726
gem 'rake', '~> 10.0', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
2827
gem 'json', '<= 1.8', :require => false if RUBY_VERSION < '2.0.0'
2928
gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0'
30-
gem 'metadata-json-lint', '0.0.11', :require => false if RUBY_VERSION < '1.9'
31-
gem 'metadata-json-lint', :require => false if RUBY_VERSION >= '1.9'
29+
gem 'metadata-json-lint', '0.0.11' if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
30+
gem 'metadata-json-lint', '1.0.0' if RUBY_VERSION >= '1.9' && RUBY_VERSION < '2.0'
31+
gem 'metadata-json-lint' if RUBY_VERSION >= '2.0'
32+
33+
gem 'puppetlabs_spec_helper', '2.0.2', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
34+
gem 'puppetlabs_spec_helper', '>= 2.0.0', :require => false if RUBY_VERSION >= '1.9'
35+
gem 'parallel_tests', '<= 2.9.0', :require => false if RUBY_VERSION < '2.0.0'
3236

3337
# vim:ft=ruby

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ Puppet module for installing and managing python, pip, virtualenvs and Gunicorn
66

77
# Compatibility #
88

9-
* Puppet v3 (with and without the future parser)
9+
See `.travis.yml` for compatibility matrix.
10+
11+
* Puppet v3 (with the future parser)
1012
* Puppet v4
1113

1214
## Ruby versions
1315

14-
* 1.8.7
15-
* 1.9.3
16-
* 2.0.0
17-
* 2.1.0
18-
* 2.3.1
16+
* 1.8.7 - Puppet 3
17+
* 1.9.3 - Puppet 3
18+
* 2.0.0 - Puppet 3
19+
* 2.1.9 - Puppet 3 & 4
1920

2021
## OS Distributions ##
2122

Rakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ PuppetLint.configuration.send('disable_class_inherits_from_params_class')
1717
PuppetLint.configuration.send('disable_class_parameter_defaults')
1818
PuppetLint.configuration.send('disable_documentation')
1919
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
20-
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
2120

2221
exclude_paths = [
2322
"pkg/**/*",
@@ -27,6 +26,13 @@ exclude_paths = [
2726
PuppetLint.configuration.ignore_paths = exclude_paths
2827
PuppetSyntax.exclude_paths = exclude_paths
2928

29+
desc 'Validate manifests, templates, ruby files and shell scripts'
30+
task :validate do
31+
Dir['spec/**/*.rb'].each do |ruby_file|
32+
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
33+
end
34+
end
35+
3036
desc "Run acceptance tests"
3137
RSpec::Core::RakeTask.new(:acceptance) do |t|
3238
t.pattern = 'spec/acceptance'

manifests/init.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@
133133
}
134134

135135
# Anchor pattern to contain dependencies
136-
anchor { 'python::begin': } ->
137-
class { 'python::install': } ->
138-
class { 'python::config': } ->
139-
anchor { 'python::end': }
136+
anchor { 'python::begin': }
137+
-> class { 'python::install': }
138+
-> class { 'python::config': }
139+
-> anchor { 'python::end': }
140140

141141
# Allow hiera configuration of python resources
142142
create_resources('python::pip', $python_pips)

manifests/install.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@
164164
}
165165

166166
if $::python::rhscl_use_public_repository {
167-
Package <| tag == 'python-scl-repo' |> ->
168-
Package <| tag == 'python-scl-package' |>
167+
Package <| tag == 'python-scl-repo' |>
168+
-> Package <| tag == 'python-scl-package' |>
169169
}
170170

171-
Package <| tag == 'python-scl-package' |> ->
172-
Package <| tag == 'python-pip-package' |>
171+
Package <| tag == 'python-scl-package' |>
172+
-> Package <| tag == 'python-pip-package' |>
173173
}
174174
default: {
175175

spec/defines/pip_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
describe "proxy as" do
3535
context "defaults to empty" do
3636
let (:params) {{ }}
37-
it { is_expected.to contain_exec("pip_install_rpyc").without_command(/--proxy/) }
37+
it { should_not contain_exec("pip_install_rpyc").with_command(/--proxy/) }
3838
end
3939
context "does not add proxy to search command if set to latest and proxy is unset" do
4040
let (:params) {{ :ensure => 'latest' }}
41-
it { is_expected.to contain_exec("pip_install_rpyc").without_command(/--proxy/) }
41+
it { should_not contain_exec("pip_install_rpyc").with_command(/--proxy/) }
4242
it { is_expected.to contain_exec("pip_install_rpyc").without_unless(/--proxy/) }
4343
end
4444
context "adds proxy to install command if proxy set" do
@@ -55,7 +55,7 @@
5555
describe 'index as' do
5656
context 'defaults to empty' do
5757
let (:params) {{ }}
58-
it { is_expected.to contain_exec('pip_install_rpyc').without_command(/--index-url/) }
58+
it { should_not contain_exec('pip_install_rpyc').with_command(/--index-url/) }
5959
end
6060
context 'adds index to install command if index set' do
6161
let (:params) {{ :index => 'http://www.example.com/simple/' }}

0 commit comments

Comments
 (0)