Skip to content

Commit

Permalink
Repo and org changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloconnor committed Aug 22, 2014
1 parent af4eb35 commit 87bd3f0
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 38 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
source 'https://rubygems.org'

puppetversion = ENV['PUPPET_VERSION']
rspecversion = ENV.key?('RSPEC_VERSION') ? "= #{ENV['RSPEC_VERSION']}" : ['>= 2.9 ', '< 3.0.0']
gem 'puppet', puppetversion, :require => false
gem 'puppet-lint'
gem 'rspec-puppet'
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-syntax'
gem 'puppet-syntax'
34 changes: 16 additions & 18 deletions Gemfile.lock
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,35 @@ GEM
json_pure
json_pure (1.8.1)
metaclass (0.0.4)
mocha (0.12.10)
mocha (1.1.0)
metaclass (~> 0.0.1)
puppet (3.6.2)
facter (> 1.6, < 3)
hiera (~> 1.0)
json_pure
rgen (~> 0.6.5)
puppet-lint (0.3.2)
puppet-syntax (1.2.2)
puppet-syntax (1.3.0)
rake
puppetlabs_spec_helper (0.3.0)
mocha (>= 0.10.5)
puppetlabs_spec_helper (0.8.0)
mocha
puppet-lint
puppet-syntax
rake
rspec (>= 2.9.0)
rspec-puppet (>= 0.1.1)
rspec
rspec-puppet
rake (10.3.2)
rgen (0.6.6)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.3)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.3)
rspec-support (~> 3.0.0)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
rspec-core (2.99.1)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.2)
rspec-puppet (1.0.1)
rspec
rspec-support (3.0.3)

PLATFORMS
ruby
Expand Down
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Tested with Travis CI

[![Build Status](https://travis-ci.org/pauloconnor/pauloconnor-uchiwa.png)](https://travis-ci.org/pauloconnor/pauloconnor-uchiwa)
[![Build Status](https://travis-ci.org/yelp/yelp-uchiwa.png)](https://travis-ci.org/yelp/yelp-uchiwa)

## Upgrade Note

Versions greater than 0.2.0 are incompatible with previous versions of the Sensu-Puppet module.

## Installation

$ puppet module install pauloconnor-uchiwa
$ puppet module install yelp-uchiwa

## Prerequisites
- One or more working Sensu installations
Expand Down
5 changes: 4 additions & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
case $::osfamily {
'Debian': {
class { 'uchiwa::repo::apt': }
$repo_require = Apt::Source['sensu']
}

'RedHat': {
class { 'uchiwa::repo::yum': }
$repo_require = Yumrepo['sensu']
}

default: { alert("${::osfamily} not supported yet") }
Expand All @@ -29,7 +31,8 @@
}

package { $uchiwa::package_name:
ensure => $uchiwa::version,
ensure => $uchiwa::version,
require => $repo_require,
}

}
9 changes: 3 additions & 6 deletions manifests/repo/apt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

if $uchiwa::install_repo {
if defined(apt::source) and defined(apt::key) {
if defined(apt::source) {

$ensure = $uchiwa::install_repo ? {
true => 'present',
Expand All @@ -22,17 +22,14 @@
$url = 'http://repos.sensuapp.org/apt'
}

apt::key { 'sensu':
key => $uchiwa::repo_key_id,
key_source => $uchiwa::repo_key_source,
}

apt::source { 'sensu':
ensure => $ensure,
location => $url,
release => 'sensu',
repos => $uchiwa::repo,
include_src => false,
key => $uchiwa::repo_key_id,
key_source => $uchiwa::repo_key_source,
before => Package['uchiwa'],
}

Expand Down
8 changes: 4 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
"version_requirement": "3.x"
}
],
"name": "pauloconnor-uchiwa",
"name": "yelp-uchiwa",
"version": "0.2.4",
"author": "pauloconnor",
"summary": "Puppet module for installing Uchiwa",
"license": "Apache 2.0",
"source": "github.com/pauloconnor/pauloconnor-uchiwa",
"project_page": "https://github.com/pauloconnor/pauloconnor-uchiwa",
"issues_url": "https://github.com/pauloconnor/pauloconnor-uchiwa/issues",
"source": "github.com/yelp/puppet-uchiwa",
"project_page": "https://github.com/yelp/puppet-uchiwa",
"issues_url": "https://github.com/yelp/puppet-uchiwa/issues",
"description": "Puppet module for installing Uchiwa",
"dependencies": [
{"name":"puppetlabs/apt"},
Expand Down
9 changes: 3 additions & 6 deletions spec/classes/uchiwa_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}

context 'with puppet-apt installed' do
let(:pre_condition) { [ 'define apt::source ($ensure, $location, $release, $repos, $include_src) {}', 'define apt::key ($key, $key_source) {}' ] }
let(:pre_condition) { [ 'define apt::source ($ensure, $location, $release, $repos, $include_src, $key, $key_source) {}' ] }

context 'default' do
it { should contain_apt__source('sensu').with(
Expand All @@ -50,12 +50,9 @@
:release => 'sensu',
:repos => 'main',
:include_src => false,
:before => 'Package[uchiwa]'
) }

it { should contain_apt__key('sensu').with(
:key => '7580C77F',
:key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg'
:key_source => 'http://repos.sensuapp.org/apt/pubkey.gpg',
:before => 'Package[uchiwa]'
) }
end

Expand Down

0 comments on commit 87bd3f0

Please sign in to comment.