Skip to content

Commit

Permalink
Merge pull request redhat-openstack#244 from hunner/patch_2.7
Browse files Browse the repository at this point in the history
(MODULES-1411) Puppet 2.7 doesn't have has_command
  • Loading branch information
Morgan Haskel committed Oct 17, 2014
2 parents 54e1d2c + 2fbe530 commit 882b0c7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 28 deletions.
36 changes: 11 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@
---
branches:
only:
- master
language: ruby
bundler_args: --without development
script: bundle exec rake spec SPEC_OPTS='--format documentation'
after_success:
- git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng
- .forge-releng/publish
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1
env:
matrix:
- PUPPET_GEM_VERSION="~> 3.4.0"
- PUPPET_GEM_VERSION="~> 3.5.0"
global:
- PUBLISHER_LOGIN=puppetlabs
- secure: |-
mSHk+9ReN6wxJ9sOgySOSKEjaXOdtT9B1BtvsOGcm/FQI3p57meid3B6z37r\nNv9PbxwGb
mcZafMxNAfwr8nUb/bqxeXnZaGiY0E9pvg9aRr3g4knczn+siW+\nDkKlvM0rex2zzF0PDc
495e61kP5cxcKNVdDJSiUPPK6fNGQ1xX8=
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
matrix:
exclude:
- rvm: 2.1.1
env: PUPPET_GEM_VERSION="~> 3.4.0"
fast_finish: true
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0"
notifications:
email: false
13 changes: 10 additions & 3 deletions lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
require 'puppet'
Puppet::Type.type(:rabbitmq_exchange).provide(:rabbitmqadmin) do

commands :rabbitmqctl => '/usr/sbin/rabbitmqctl'
has_command(:rabbitmqadmin, '/usr/local/bin/rabbitmqadmin') do
environment( { 'HOME' => '' })
if Puppet::PUPPETVERSION.to_f < 3
commands :rabbitmqctl => 'rabbitmqctl'
commands :rabbitmqadmin => '/usr/local/bin/rabbitmqadmin'
else
has_command(:rabbitmqctl, 'rabbitmqctl') do
environment :HOME => "/tmp"
end
has_command(:rabbitmqadmin, '/usr/local/bin/rabbitmqadmin') do
environment :HOME => "/tmp"
end
end
defaultfor :feature => :posix

Expand Down

0 comments on commit 882b0c7

Please sign in to comment.