26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ branches:
- master
language: ruby
bundler_args: --without development
script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
script:
- "rake lint"
- "rake syntax"
- "rake spec SPEC_OPTS='--format documentation'"
after_success:
- git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng
- .forge-releng/publish
Expand All @@ -13,23 +16,20 @@ rvm:
- 1.9.3
- 2.0.0
env:
matrix:
- PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
- PUPPET_GEM_VERSION="~> 3.0"
global:
- PUPPET_VERSION="~> 2.7.0"
- PUPPET_VERSION="~> 3.1.0"
- PUPPET_VERSION="~> 3.2.0"
- PUPPET_VERSION="~> 3.3.0"
- PUPPET_VERSION="~> 3.4.0"
global:
- PUBLISHER_LOGIN=acidprime
matrix:
exclude:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
env: PUPPET_VERSION="~> 2.7.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
env: PUPPET_VERSION="~> 2.7.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3.2.0"
env: PUPPET_VERSION="~> 3.1.0"
notifications:
email: false
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2014-02-10 - Justin Lambert & welterde - 1.0.1
* Minor fix for basedir and rspec-puppet updates
2013-10-20 - Zack Smith <zack@puppetlabs.com> - 0.0.9
* Final params list for version 1.0.0 set & Bugfixes
2013-10-15 - Theo Chatzimichos <tampakrap> - 0.0.8
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ group :development, :test do
gem 'rspec-system-puppet', :require => false
gem 'rspec-system-serverspec', :require => false
gem 'puppet-lint', :require => false
gem 'puppet-syntax', :require => false
end

if facterversion = ENV['FACTER_GEM_VERSION']
Expand Down
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'zack-r10k'
version '1.0.0'
version '1.0.1'
source 'https://github.com/acidprime/r10k'
author 'zack'
license 'Apache License, Version 2.0'
Expand Down
26 changes: 26 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'

exclude_paths = [
"pkg/**/*",
"vendor/**/*",
"spec/**/*",
]

PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}"
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

#task :default => [:test]

#desc "Run syntax, lint, and spec tests."
#task :test => [
# :syntax,
# :lint,
# :spec,
#]

1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
modulepath => $modulepath,
remote => $remote,
manage_modulepath => $manage_modulepath,
r10k_basedir => $r10k_basedir,
}

if $mcollective {
Expand Down
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
install_options => $install_options,
}
}
default: { fail("$provider is not supported. Valid values are: 'gem', 'pe_gem', 'bundle', 'portage', 'yum', 'zypper'") }
default: { fail("${provider} is not supported. Valid values are: 'gem', 'pe_gem', 'bundle', 'portage', 'yum', 'zypper'") }
}
}
1 change: 1 addition & 0 deletions manifests/install/bundle.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This class installs the r10k bundle
class r10k::install::bundle(
$revision = 'master',
$source = 'https://github.com/adrienthebo/r10k.git',
Expand Down
5 changes: 3 additions & 2 deletions manifests/install/pe_gem.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# This class links the r10k binary for PE
class r10k::install::pe_gem {

require git

file { '/usr/bin/r10k':
ensure => link,
target => '/opt/puppet/bin/r10k',
ensure => link,
target => '/opt/puppet/bin/r10k',
require => Package['r10k'],
}
}
1 change: 1 addition & 0 deletions manifests/install/portage.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This class is used to install r10k from portage
class r10k::install::portage (
$package_name,
$keywords,
Expand Down
2 changes: 1 addition & 1 deletion manifests/mcollective/application.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
file { "${app_path}/${app_name}" :
source => "puppet:///modules/${module_name}/application/${agent_name}",
}

file { "${agent_path}/${agent_ddl}" :
source => "puppet:///modules/${module_name}/agent/${agent_ddl}",
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Include the mcollective agent
$mcollective = false

if $::is_pe == 'true' {
if $::is_pe == true {
# Puppet Enterprise specific settings
$puppetconf_path = '/etc/puppetlabs/puppet'

Expand Down
6 changes: 3 additions & 3 deletions spec/classes/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:is_pe => 'true'
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should contain_file("r10k.yaml").with(
'ensure' => 'file',
'owner' => 'root',
Expand All @@ -40,10 +40,10 @@
:osfamily => 'RedHat',
:operatingsystemrelease => '5',
:operatingsystem => 'Centos',
:is_pe => 'true',
:is_pe => true,
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should contain_file("r10k.yaml").with(
'ensure' => 'file',
'owner' => 'root',
Expand Down
12 changes: 6 additions & 6 deletions spec/classes/install/gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
'rubygems_update' => false
)
}
it { should include_class("ruby::dev") }
it { should contain_class("ruby::dev") }

it { should_not include_class("gcc") }
it { should_not include_class("make") }
it { should_not contain_class("gcc") }
it { should_not contain_class("make") }
end
context "on a RedHat 5 OS installing 1.1.0 via gem with puppet FOSS 3.2.3" do
let :params do
Expand All @@ -39,7 +39,7 @@
'rubygems_update' => true
)
}
it { should include_class("ruby::dev") }
it { should contain_class("ruby::dev") }
end
context "on a RedHat 5 OS installing 0.0.9 via gem with puppet FOSS 2.7.19" do
let :params do
Expand All @@ -58,7 +58,7 @@
'package { "r10k":
ensure => present,
}' }
it { should include_class("make") }
it { should include_class("gcc") }
it { should contain_class("make") }
it { should contain_class("gcc") }
end
end
24 changes: 12 additions & 12 deletions spec/classes/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
:operatingsystemrelease => '5',
}
end
it { should include_class("git") }
it { should contain_class("git") }

# New versions of this gem do not require these packages
it { should_not include_class("make")}
it { should_not contain_class("make")}
it { should_not contain_package("gcc")}

it { should contain_class("r10k::install::gem").with(
Expand Down Expand Up @@ -49,11 +49,11 @@
:operatingsystemrelease => '5',
}
end
it { should include_class("git") }
it { should contain_class("git") }

# On older versions of r10k we need gcc & make
it { should include_class("gcc") }
it { should include_class("make") }
it { should contain_class("gcc") }
it { should contain_class("make") }

it { should contain_class("r10k::install::gem").with(
'version' => '0.0.9'
Expand Down Expand Up @@ -81,8 +81,8 @@
:operatingsystemrelease => '5',
}
end
it { should include_class("git") }
it { should include_class("r10k::install::pe_gem") }
it { should contain_class("git") }
it { should contain_class("r10k::install::pe_gem") }
it { should contain_package("r10k").with(
'ensure' => '1.1.0',
'provider' => 'pe_gem'
Expand All @@ -105,8 +105,8 @@
:operatingsystemrelease => '5',
}
end
it { should include_class("git") }
it { should include_class("r10k::install::bundle") }
it { should contain_class("git") }
it { should contain_class("r10k::install::bundle") }
it { should_not contain_package("r10k")}
end
context "on a RedHat 5 OS installing latest with yum provider" do
Expand All @@ -125,7 +125,7 @@
:operatingsystemrelease => '5',
}
end
it { should_not include_class("git") }
it { should_not contain_class("git") }
it { should contain_package("rubygem-r10k")}
end
context "on a SLES 11.3 OS installing latest with zypper provider" do
Expand All @@ -144,7 +144,7 @@
:operatingsystemrelease => '11.3',
}
end
it { should_not include_class("git") }
it { should_not contain_class("git") }
it { should contain_package("r10k")}
end
context "on a Gentoo OS installing 1.1.0 with portage provider" do
Expand All @@ -163,7 +163,7 @@
:operatingsystemrelease => '2.1',
}
end
it { should_not include_class("git") }
it { should_not contain_class("git") }
it { should contain_class("r10k::install::portage").with(
:package_name => 'app-admin/r10k',
:keywords => ['~amd64', '~x86'],
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/mcollective/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
:osfamily => 'RedHat',
:operatingsystemrelease => '5',
:operatingsystem => 'Centos',
:is_pe => 'true'
:is_pe => true
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should contain_file("/opt/puppet/libexec/mcollective/mcollective/application/r10k.rb").with(
'ensure' => 'present',
'owner' => 'root',
Expand All @@ -33,10 +33,10 @@
:osfamily => 'RedHat',
:operatingsystemrelease => '5',
:operatingsystem => 'Centos',
:is_pe => 'false'
:is_pe => false
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should contain_file("/usr/libexec/mcollective/mcollective/application/r10k.rb").with(
'ensure' => 'present',
'owner' => 'root',
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/mcollective_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
:osfamily => 'RedHat',
:operatingsystemrelease => '5',
:operatingsystem => 'Centos',
:is_pe => 'true'
:is_pe => true
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should contain_file("/opt/puppet/libexec/mcollective/mcollective/application/r10k.rb").with(
'ensure' => 'present',
'owner' => 'root',
Expand Down Expand Up @@ -46,7 +46,7 @@
:is_pe => ''
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should contain_file("/usr/libexec/mcollective/mcollective/application/r10k.rb").with(
'ensure' => 'present',
'owner' => 'root',
Expand Down Expand Up @@ -82,7 +82,7 @@
:is_pe => ''
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should_not contain_file("/usr/libexec/mcollective/mcollective/application/r10k.rb") }

it { should contain_file("/usr/share/mcollective/plugins/mcollective/application/r10k.rb").with(
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/prerun_command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
:osfamily => 'RedHat',
:operatingsystemrelease => '5',
:operatingsystem => 'Centos',
:is_pe => 'true'
:is_pe => true
}
end
it { should include_class("r10k::params") }
it { should contain_class("r10k::params") }
it { should contain_ini_setting("r10k_prerun_command").with(
'ensure' => 'present',
'section' => 'agent',
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/r10k_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
:operatingsystemrelease => '5',
}
end
it { should include_class('r10k::params') }
it { should include_class('r10k::install') }
it { should include_class('r10k::config') }
it { should contain_class('r10k::params') }
it { should contain_class('r10k::install') }
it { should contain_class('r10k::config') }
it { should_not contain_class('r10k::mcollective') }
end

Expand Down