Skip to content

Commit b80c432

Browse files
committed
Merge pull request #366 from mhaskel/merge_4.4.x
Merge 4.4.x
2 parents 85d7edd + ded4d51 commit b80c432

7 files changed

Lines changed: 52 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
##2014-11-10 - Supported Release 4.4.0
2+
###Summary
3+
This release has an overhauled readme, new private manifest function, and fixes many future parser bugs.
4+
5+
####Features
6+
- All new shiny README
7+
- New `private()` function for making private manifests (yay!)
8+
9+
####Bugfixes
10+
- Code reuse in `bool2num()` and `zip()`
11+
- Fix many functions to handle `generate()` no longer returning a string on new puppets
12+
- `concat()` no longer modifies the first argument (whoops)
13+
- strict variable support for `getvar()`, `member()`, `values_at`, and `has_interface_with()`
14+
- `to_bytes()` handles PB and EB now
15+
- Fix `tempfile` ruby requirement for `validate_augeas()` and `validate_cmd()`
16+
- Fix `validate_cmd()` for windows
17+
- Correct `validate_string()` docs to reflect non-handling of `undef`
18+
- Fix `file_line` matching on older rubies
19+
20+
121
##2014-07-15 - Supported Release 4.3.2
222
###Summary
323

lib/puppet/parser/functions/has_interface_with.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ module Puppet::Parser::Functions
3535

3636
kind, value = args
3737

38-
if lookupvar(kind) == value
38+
# Bug with 3.7.1 - 3.7.3 when using future parser throws :undefined_variable
39+
# https://tickets.puppetlabs.com/browse/PUP-3597
40+
factval = nil
41+
catch :undefined_variable do
42+
factval = lookupvar(kind)
43+
end
44+
if factval == value
3945
return true
4046
end
4147

@@ -44,7 +50,11 @@ module Puppet::Parser::Functions
4450
iface.downcase!
4551
factval = nil
4652
begin
47-
factval = lookupvar("#{kind}_#{iface}")
53+
# Bug with 3.7.1 - 3.7.3 when using future parser throws :undefined_variable
54+
# https://tickets.puppetlabs.com/browse/PUP-3597
55+
catch :undefined_variable do
56+
factval = lookupvar("#{kind}_#{iface}")
57+
end
4858
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
4959
end
5060
if value == factval

metadata.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "puppetlabs-stdlib",
3-
"version": "4.3.2",
3+
"version": "4.4.0",
44
"author": "puppetlabs",
55
"summary": "Puppet Module Standard Library",
66
"license": "Apache 2.0",
77
"source": "git://github.com/puppetlabs/puppetlabs-stdlib",
88
"project_page": "https://github.com/puppetlabs/puppetlabs-stdlib",
9-
"issues_url": "https://github.com/puppetlabs/puppetlabs-stdlib/issues",
9+
"issues_url": "https://tickets.puppetlabs.com/browse/MODULES",
1010
"operatingsystem_support": [
1111
{
1212
"operatingsystem": "RedHat",
@@ -97,7 +97,7 @@
9797
"requirements": [
9898
{
9999
"name": "pe",
100-
"version_requirement": "3.3.x"
100+
"version_requirement": "3.x"
101101
},
102102
{
103103
"name": "puppet",

spec/acceptance/ensure_packages_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env ruby -S rspec
22
require 'spec_helper_acceptance'
33

4-
describe 'ensure_packages function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || fact('osfamily') == 'windows') do
4+
describe 'ensure_packages function', :unless => fact('osfamily') =~ /windows/i do
55
describe 'success' do
66
it 'ensure_packages a package' do
77
apply_manifest('package { "rake": ensure => absent, provider => "gem", }')

spec/acceptance/ensure_resource_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env ruby -S rspec
22
require 'spec_helper_acceptance'
33

4-
describe 'ensure_resource function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || fact('osfamily') == 'windows') do
4+
describe 'ensure_resource function', :unless => fact('osfamily') =~ /windows/i do
55
describe 'success' do
66
it 'ensure_resource a package' do
77
apply_manifest('package { "rake": ensure => absent, provider => "gem", }')

spec/acceptance/type_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env ruby -S rspec
22
require 'spec_helper_acceptance'
33

4-
describe 'type function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || !(is_future_parser_enabled?)) do
4+
describe 'type function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || is_future_parser_enabled?) do
55
describe 'success' do
66
it 'types arrays' do
77
pp = <<-EOS

spec/spec_helper_acceptance.rb

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@
44
UNSUPPORTED_PLATFORMS = []
55

66
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
7-
# This will install the latest available package on el and deb based
8-
# systems fail on windows and osx, and install via gem on other *nixes
9-
foss_opts = { :default_action => 'gem_install' }
7+
foss_opts = {
8+
:default_action => 'gem_install',
9+
:version => (ENV['PUPPET_VERSION'] ? ENV['PUPPET_VERSION'] : '3.7.2'),
10+
}
1011

1112
if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
1213

1314
hosts.each do |host|
14-
on host, "mkdir -p #{host['distmoduledir']}"
15-
on host, "/bin/touch #{host['puppetpath']}/hiera.yaml"
15+
if host['platform'] !~ /windows/i
16+
if host.is_pe?
17+
on host, 'mkdir -p /etc/puppetlabs/facter/facts.d'
18+
else
19+
on host, "/bin/touch #{host['puppetpath']}/hiera.yaml"
20+
on host, "mkdir -p #{host['distmoduledir']}"
21+
on host, 'mkdir -p /etc/facter/facts.d'
22+
end
23+
end
1624
end
1725
end
1826

@@ -29,17 +37,8 @@
2937
default[:default_apply_opts] ||= {}
3038
default[:default_apply_opts].merge!({:parser => 'future'})
3139
end
32-
hosts.each do |host|
33-
if host['platform'] !~ /windows/i
34-
copy_root_module_to(host, :source => proj_root, :module_name => 'stdlib')
35-
end
3640

37-
end
38-
hosts.each do |host|
39-
if host['platform'] =~ /windows/i
40-
on host, puppet('plugin download')
41-
end
42-
end
41+
copy_root_module_to(default, :source => proj_root, :module_name => 'stdlib')
4342
end
4443
end
4544

0 commit comments

Comments
 (0)