Merge pull request #503 from puppetlabs/4.8.x

Mergeback 4.8.x
This commit is contained in:
Morgan Haskel 2015-08-12 14:33:07 -07:00
commit 605fffd852
4 changed files with 22 additions and 11 deletions

View file

@ -1,3 +1,16 @@
## 2015-08-10 - Supported Release 4.8.0
### Summary
This release adds a function for reading metadata.json from any module, and expands file\_line's abilities.
#### Features
- New parameter `replace` on `file_line`
- New function `load_module_metadata()` to load metadata.json and return the content as a hash.
- Added hash support to `size()`
#### Bugfixes
- Fix various docs typos
- Fix `file_line` resource on puppet < 3.3
##2015-06-22 - Supported Release 4.7.0
###Summary

View file

@ -1,6 +1,6 @@
{
"name": "puppetlabs-stdlib",
"version": "4.7.0",
"version": "4.8.0",
"author": "puppetlabs",
"summary": "Standard library of resources for Puppet modules.",
"license": "Apache-2.0",

View file

@ -1,7 +1,7 @@
#! /usr/bin/env ruby -S rspec
require 'spec_helper_acceptance'
describe 'ensure_resource function', :unless => fact('osfamily') =~ /windows/i do
describe 'ensure_resource function', :unless => fact('osfamily') =~ /(windows|Suse)/i do
describe 'success' do
it 'ensure_resource a package' do
apply_manifest('package { "rake": ensure => absent, provider => "gem", }')

View file

@ -36,16 +36,14 @@ end
RSpec.shared_context "with faked facts" do
let(:facts_d) do
puppet_version = (on default, puppet('--version')).output.chomp
if Puppet::Util::Package.versioncmp(puppet_version, '4.0.0') < 0 && fact('is_pe', '--puppet') == "true"
if fact('osfamily') =~ /windows/i
if fact('kernelmajversion').to_f < 6.0
'C:/Documents and Settings/All Users/Application Data/PuppetLabs/facter/facts.d'
else
'C:/ProgramData/PuppetLabs/facter/facts.d'
end
if fact('osfamily') =~ /windows/i
if fact('kernelmajversion').to_f < 6.0
'C:/Documents and Settings/All Users/Application Data/PuppetLabs/facter/facts.d'
else
'/etc/puppetlabs/facter/facts.d'
'C:/ProgramData/PuppetLabs/facter/facts.d'
end
elsif Puppet::Util::Package.versioncmp(puppet_version, '4.0.0') < 0 and fact('is_pe', '--puppet') == "true"
'/etc/puppetlabs/facter/facts.d'
else
'/etc/facter/facts.d'
end
@ -59,7 +57,7 @@ RSpec.shared_context "with faked facts" do
end
after :each do
shell("rm -f '#{facts_d}/fqdn.txt'")
shell("rm -f '#{facts_d}/fqdn.txt'", :acceptable_exit_codes => [0,1])
end
def fake_fact(name, value)