diff options
-rw-r--r-- | Gemfile | 8 | ||||
-rw-r--r-- | lib/facter/root_home.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/functions/validate_ipv4_address.rb | 2 | ||||
-rw-r--r-- | manifests/stages.pp | 2 | ||||
-rwxr-xr-x | spec/unit/facter/root_home_spec.rb | 2 |
5 files changed, 11 insertions, 5 deletions
@@ -11,8 +11,14 @@ def location_for(place, fake_version = nil) end group :development, :unit_tests do + # rspec must be v2 for ruby 1.8.7 + if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' + gem 'rspec', '~> 2.0' + else + gem 'rspec', '~> 3.1.0', :require => false + end + gem 'rake', '~> 10.1.0', :require => false - gem 'rspec', '~> 3.1.0', :require => false gem 'rspec-puppet', '~> 2.2', :require => false gem 'mocha', :require => false # keep for its rake task for now diff --git a/lib/facter/root_home.rb b/lib/facter/root_home.rb index ee3ffa8..87c7657 100644 --- a/lib/facter/root_home.rb +++ b/lib/facter/root_home.rb @@ -35,7 +35,7 @@ Facter.add(:root_home) do confine :kernel => :aix root_home = nil setcode do - str = Facter::Util::Resolution.exec("lsuser -C -a home root") + str = Facter::Util::Resolution.exec("lsuser -c -a home root") str && str.split("\n").each do |line| next if line =~ /^#/ root_home = line.split(/:/)[1] diff --git a/lib/puppet/parser/functions/validate_ipv4_address.rb b/lib/puppet/parser/functions/validate_ipv4_address.rb index fc02748..97faa57 100644 --- a/lib/puppet/parser/functions/validate_ipv4_address.rb +++ b/lib/puppet/parser/functions/validate_ipv4_address.rb @@ -8,7 +8,7 @@ module Puppet::Parser::Functions $my_ip = "1.2.3.4" validate_ipv4_address($my_ip) - validate_bool("8.8.8.8", "172.16.0.1", $my_ip) + validate_ipv4_address("8.8.8.8", "172.16.0.1", $my_ip) The following values will fail, causing compilation to abort: diff --git a/manifests/stages.pp b/manifests/stages.pp index eb15fd6..7de254c 100644 --- a/manifests/stages.pp +++ b/manifests/stages.pp @@ -26,7 +26,7 @@ # Sample Usage: # # node default { -# include stdlib +# include ::stdlib # class { java: stage => 'runtime' } # } # diff --git a/spec/unit/facter/root_home_spec.rb b/spec/unit/facter/root_home_spec.rb index ac5160a..a5c2846 100755 --- a/spec/unit/facter/root_home_spec.rb +++ b/spec/unit/facter/root_home_spec.rb @@ -58,7 +58,7 @@ describe 'root_home', :type => :fact do sample_lsuser = File.read(fixtures('lsuser','root')) it "should return /root" do - Facter::Util::Resolution.stubs(:exec).with("lsuser -C -a home root").returns(sample_lsuser) + Facter::Util::Resolution.stubs(:exec).with("lsuser -c -a home root").returns(sample_lsuser) expect(Facter.fact(:root_home).value).to eq(expected_root_home) end end |