(maint) Pin rake gem version for ruby 1.8.7

This commit is contained in:
Andrew Roetker 2016-03-11 11:32:51 -08:00
parent 4985c82f1c
commit 16e50d74eb
3 changed files with 19 additions and 17 deletions

View file

@ -1,7 +1,8 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
group :development, :test do
gem 'rake'
# Pinning `rake` because `v11` doesn't support Ruby 1.8.7
gem 'rake', '10.5.0'
gem 'puppetlabs_spec_helper', :require => false
# Pinning due to bug in newer rspec with Ruby 1.8.7
gem 'rspec-core', '3.1.7'

View file

@ -44,9 +44,10 @@ class puppetdb::master::config (
# puppetdb-terminus-3` which is impossible to do via Puppet.
#
# This will orphan some old terminus files (from pre-puppet-agent, i.e. puppet
# 3.x) that we're orphaned anyways and some of the new terminus files
# temporarily. If this exec fails all you need to do is reinstall whatever 2.3
# version of the terminus was already installed to revert the change.
# 3.x) that are orphaned as part of the Puppet 3 to Puppet 4 upgrade anyways
# and some of the new terminus files temporarily. If this exec fails all you
# need to do is reinstall whatever 2.3 version of the terminus was already
# installed to revert the change.
if !($puppetdb::params::puppetdb_version in ['present','absent'])
and versioncmp($puppetdb::params::puppetdb_version, '3.0.0') >= 0
and $::osfamily in ['RedHat','Suse'] {
@ -54,6 +55,7 @@ class puppetdb::master::config (
command => 'rpm -e --justdb puppetdb-terminus',
path => '/sbin/:/bin/',
onlyif => 'rpm -q puppetdb-terminus',
before => Package[$terminus_package],
}
}

View file

@ -1,21 +1,20 @@
require 'spec_helper'
describe 'puppetdb::master::config', :type => :class do
basefacts = {
:fqdn => 'puppetdb.example.com',
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemrelease => '6.0',
:kernel => 'Linux',
:lsbdistid => 'Debian',
:lsbdistcodename => 'foo',
:concat_basedir => '/var/lib/puppet/concat',
:id => 'root',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
let(:facts) do
basefacts
{
:fqdn => 'puppetdb.example.com',
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemrelease => '6.0',
:kernel => 'Linux',
:lsbdistid => 'Debian',
:lsbdistcodename => 'foo',
:concat_basedir => '/var/lib/puppet/concat',
:id => 'root',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
end
context 'when PuppetDB on remote server' do