compatibility fixes for ruby 1.8.7 / puppet 2.7

This commit is contained in:
Joshua Hoblitt 2013-10-23 12:18:09 -07:00
parent 89dc9a9f71
commit b6ee7e40e5
4 changed files with 11 additions and 4 deletions

View file

@ -64,7 +64,7 @@ define concat(
$backup = 'puppet', $backup = 'puppet',
$replace = true, $replace = true,
$order = 'alpha', $order = 'alpha',
$ensure_newline = false, $ensure_newline = false
) { ) {
validate_re($ensure, '^present$|^absent$') validate_re($ensure, '^present$|^absent$')
validate_absolute_path($path) validate_absolute_path($path)

View file

@ -2,7 +2,10 @@ require 'spec_helper'
describe 'concat::setup', :type => :class do describe 'concat::setup', :type => :class do
shared_examples 'setup' do |id='root', concatdir='/foo'| shared_examples 'setup' do |id, concatdir|
id = 'root' if id.nil?
concatdir = '/foo' if concatdir.nil?
let(:facts) {{ :id => id, :concat_basedir => concatdir }} let(:facts) {{ :id => id, :concat_basedir => concatdir }}
it do it do

View file

@ -2,7 +2,9 @@ require 'spec_helper'
describe 'concat::fragment', :type => :define do describe 'concat::fragment', :type => :define do
shared_examples 'fragment' do |title, params={}| shared_examples 'fragment' do |title, params|
params = {} if params.nil?
id = 'root' id = 'root'
p = { p = {

View file

@ -2,7 +2,9 @@ require 'spec_helper'
describe 'concat', :type => :define do describe 'concat', :type => :define do
shared_examples 'concat' do |title, params={}| shared_examples 'concat' do |title, params|
params = {} if params.nil?
id = 'root' id = 'root'
# default param values # default param values