Changeset ad28f83 for src


Ignore:
Timestamp:
Aug 1, 2017, 3:45:14 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, debian/jessie
Children:
ce0f6a4
Parents:
bcf0be5 (diff), cd0f9cc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into debian/jessie

Location:
src/puppetcode/environments/gnuboat
Files:
145 added
33 deleted
342 edited
3 moved

Legend:

Unmodified
Added
Removed
  • src/puppetcode/environments/gnuboat/hieradata/common.yaml

    rbcf0be5 rad28f83  
    88  - gnuboat_canboat
    99  - apt
     10  - chrony
    1011
    1112apt::sources:
    … …  
    2223#      src: true
    2324#      deb: true
    24 apt::sources:
    2525  'gnuboat-raspbian':
    2626    comment: 'GNUBoat raspbian repository'
    … …  
    5050gnuboat_gpsd::service::devices: '/dev/ttyACM0'
    5151gnuboat_gpsd::service::network_access: true
     52gnuboat_gpsd::service::poll_on_startup: true
    5253gnuboat_gnuboat::service::status: 'running'
    5354gnuboat_gnuboat::service::enabled: true
    … …  
    6061gnuboat_canboat::service::actisense_serial: 'Actisense_NGT-1_2C88A'
    6162gnuboat_canboat::service::monitor: true
     63chrony::sync_local_clock: true
     64chrony::offline: true
     65chrony::refclock:
     66  - 'SHM 0  delay 0.5 refid NMEA'
     67chrony::serve_ntp: true
  • src/puppetcode/environments/gnuboat/modules/apt/CHANGELOG.md

    rbcf0be5 rad28f83  
     1## Supported Release 4.1.0
     2### Summary
     3
     4This release removes Data in Modules due to current compatibility issues and reinstates the params.pp file. Also includes a couple of bug fixes.
     5
     6#### Features
     7- (MODULES-4973) Data in Modules which was introduced in the last release has now been reverted due to compatibility issues.
     8
     9#### Bugfixes
     10- Now apt_key only sends the auth basic header when userinfo can be parsed from the URL.
     11- Reverted the removal of Evolving Web's attribution in NOTICE file.
     12- Test added to ensure empty string allowed for $release in apt::source.
     13
     14
     15## Supported Release 3.0.0 and 4.0.0
     16###Summary
     17
     18This release adds new Puppet 4 features: data in modules, EPP templates, the $facts hash, and data types. This release is fully backwards compatible to existing Puppet 4 configurations and provides you with deprecation warnings for every argument that will not work as expected with the final 4.0.0 release. See the stdlib docs here for an in-depth discussion of this: https://github.com/puppetlabs/puppetlabs-stdlib#validate_legacy
     19
     20If you want to learn more about the new features used or you wish to upgrade a module yourself, have a look at the NTP: A Puppet 4 language update blog post.
     21
     22If you're still running Puppet 3, remain on the latest puppetlabs-apt 2.x release for now, and see the documentation to upgrade to Puppet 4.
     23
     24Changes
     25
     26Data in modules: Moves all distribution and OS-dependent defaults into YAML files in data/, alleviating the need for a params class. Note that while this feature is currently still classed as experimental, the final implementation will support the changes here.
     27EPP templating: Uses the Puppet language as a base for templates to create simpler and safer templates. No need for Ruby anymore!
     28The $facts hash: Makes facts visibly distinct from other variables for more readable and maintainable code. This helps eliminate confusion if you use a local variable whose name happens to match that of a common fact.
     29Data types for validation: Helps you find and replace deprecated code in existing validate functions with stricter, more readable data type notation. First upgrade to the 3.0.0 release of this module, and address all deprecation warnings before upgrading to the final 4.0.0 release. Please see the stdlib docs for an in-depth discussion of this process.
     30
     31## Supported Release 2.4.0
     32### Summary
     33A release that includes only a couple of additional features, but includes several cleanups and bugfixes around existing issues.
     34
     35#### Features
     36- Tests updated to check for idempotency.
     37- (MODULES-4224) Implementation of beaker-module_install_helper.
     38- Deprecation warnings are now handled by the deprecation function in stdlib.
     39
     40#### Bugfixes
     41- Now http and https sources fixed for apt_key and can take a userinfo.
     42- GPG key update.
     43- Notify_update param now defaults to true to avoid validation errors.
     44- Implement retry on tests which pull key from a key server which sometimes times out (transient error).
     45- String comparison error now comphensated for in update.pp.
     46- (MODULES-4104) Removal of the port number from repository location in order to get the host name of the repository.
     47- Puppet lint warnings addressed.
     48- A few small readme issues addressed.
     49
     50## Supported Release 2.3.0
     51### Summary
     52A release containing many bugfixes with additional features.
     53
     54#### Features
     55- Apt_updates facts now use /usr/bin/apt-get.
     56- Addition of notify update to apt::source.
     57- Update to newest modulesync_configs.
     58- Installs software-properties-common for Xenial.
     59- Modulesync updates.
     60- Add ability to specify a hash of apt::conf defines.
     61
     62#### Bugfixes
     63- A clean up of spec/defines/key_compat_specs, also now runs under STRICT_VARIABLES.
     64- Apt::setting expects priority to be an integer, set defaults accordingly.
     65- Fixed version check for Ubuntu on 16.04.
     66- Now uses hkps.pool.sks-keyservers.net instead of pgp.mit.edu.
     67- Updates and fixes to tests. General cleanup.
     68- Fixed regexp for $ensure params.
     69- Apt/params: Remove unused LSB facts.
     70- Replaced `-s` with `-f` in ppa rspec tests - After the repository is added, the "${::apt::sources_list_d}/${sources_list_d_filename}" file is created as an empty file. The unless condition of Exec["add-apt-repository-${name}"] calls test -s, which returns 1 if the file is empty. Because the file is empty, the unless condition is never true and the repository is added on every execution. This change replaces the -s test condition with -f, which is true if the file exists or false otherwise.
     71- Limit non-strict parsing to pre-3.5.0 only - Puppet 3.5.0 introduced strict variables and the module handles strict variables by using the defined() function. This does not work on prior versions of puppet so we now gate based on that version. Puppet 4 series has a new setting `strict` that may be set to enforce strict variables while `strict_variables` remains unset (see PUP-6358) which causes the conditional in manifests/params.pp to erroniously use non-strict 3.5-era parsing and fail. This new conditional corrects the cases such that strict variable behavior happens on versions 3.5.0 and later.
     72
    173##Supported Release 2.2.2
    274###Summary
    375
    4 Several bug fixes and the addition of support updates to Debian 8 and Ubunto Wily.
     76Several bug fixes and the addition of support updates to Debian 8 and Ubuntu Wily.
    577
    678####Bugfixes
    779- Small fixes to descriptions within the readme and the addition of some examples.
    8 - Updates to run on Ubunto Wily.
     80- Updates to run on Ubuntu Wily.
    981- Fixed apt_key tempfile race condition.
    1082- Run stages limitation added to the documentation.
  • src/puppetcode/environments/gnuboat/modules/apt/CONTRIBUTING.md

    rbcf0be5 rad28f83  
    4444      - Make sure you have a [GitHub account](https://github.com/join)
    4545
    46       - [Create a ticket](https://tickets.puppetlabs.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppetlabs.com/browse/) you are patching for.
     46      - [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for.
    4747
    4848    * Preferred method:
    … …  
    209209====================
    210210
    211 * [Getting additional help](http://puppetlabs.com/community/get-help)
    212 
    213 * [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
    214 
    215 * [Patchwork](https://patchwork.puppetlabs.com)
     211* [Getting additional help](http://puppet.com/community/get-help)
     212
     213* [Writing tests](https://docs.puppet.com/guides/module_guides/bgtm.html#step-three-module-testing)
    216214
    217215* [General GitHub documentation](http://help.github.com/)
    218216
    219217* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
    220 
  • src/puppetcode/environments/gnuboat/modules/apt/Gemfile

    rbcf0be5 rad28f83  
    33source ENV['GEM_SOURCE'] || "https://rubygems.org"
    44
    5 def location_for(place, version = nil)
    6   if place =~ /^(git[:@][^#]*)#(.*)/
    7     [version, { :git => $1, :branch => $2, :require => false}].compact
    8   elsif place =~ /^file:\/\/(.*)/
    9     ['>= 0', { :path => File.expand_path($1), :require => false}]
     5# Determines what type of gem is requested based on place_or_version.
     6def gem_type(place_or_version)
     7  if place_or_version =~ /^git:/
     8    :git
     9  elsif place_or_version =~ /^file:/
     10    :file
    1011  else
    11     [place, version, { :require => false}].compact
     12    :gem
    1213  end
    1314end
    1415
    15 group :development, :unit_tests do
    16   gem 'json',                      :require => false
    17   gem 'metadata-json-lint',        :require => false
    18   gem 'puppet_facts',              :require => false
    19   gem 'puppet-blacksmith',         :require => false
    20   gem 'puppetlabs_spec_helper',    :require => false
    21   gem 'rspec-puppet', '>= 2.3.2',  :require => false
    22   gem 'simplecov',                 :require => false
    23 end
    24 group :system_tests do
    25   gem 'beaker-rspec',                  *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4')
    26   gem 'beaker',                        *location_for(ENV['BEAKER_VERSION'])
    27   gem 'serverspec',                    :require => false
    28   gem 'beaker-puppet_install_helper',  :require => false
    29   gem 'master_manipulator',            :require => false
    30   gem 'beaker-hostgenerator',          *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
     16# Find a location or specific version for a gem. place_or_version can be a
     17# version, which is most often used. It can also be git, which is specified as
     18# `git://somewhere.git#branch`. You can also use a file source location, which
     19# is specified as `file://some/location/on/disk`.
     20def location_for(place_or_version, fake_version = nil)
     21  if place_or_version =~ /^(git[:@][^#]*)#(.*)/
     22    [fake_version, { :git => $1, :branch => $2, :require => false }].compact
     23  elsif place_or_version =~ /^file:\/\/(.*)/
     24    ['>= 0', { :path => File.expand_path($1), :require => false }]
     25  else
     26    [place_or_version, { :require => false }]
     27  end
    3128end
    3229
    33 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION'])
     30# Used for gem conditionals
     31supports_windows = false
     32ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
     33minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
     34
     35group :development do
     36  gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
     37  gem "puppet-module-win-default-r#{minor_version}",   :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
     38  gem "puppet-module-posix-dev-r#{minor_version}",     :require => false, :platforms => "ruby"
     39  gem "puppet-module-win-dev-r#{minor_version}",       :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
     40  gem "json_pure", '<= 2.0.1',                         :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
     41  gem "fast_gettext", '1.1.0',                         :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
     42  gem "fast_gettext",                                  :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
     43end
     44
     45group :system_tests do
     46  gem "puppet-module-posix-system-r#{minor_version}",                            :require => false, :platforms => "ruby"
     47  gem "puppet-module-win-system-r#{minor_version}",                              :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
     48  gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 3')                 
     49  gem "beaker-pe",                                                               :require => false
     50  gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])               
     51  gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
     52  gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')       
     53end
     54
    3455gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
    3556
     57# Only explicitly specify Facter/Hiera if a version has been specified.
     58# Otherwise it can lead to strange bundler behavior. If you are seeing weird
     59# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
     60# to `1` and then run bundle install.
     61gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
     62gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
    3663
     64
     65# Evaluate Gemfile.local if it exists
    3766if File.exists? "#{__FILE__}.local"
    3867  eval(File.read("#{__FILE__}.local"), binding)
    3968end
     69
     70# Evaluate ~/.gemfile if it exists
     71if File.exists?(File.join(Dir.home, '.gemfile'))
     72  eval(File.read(File.join(Dir.home, '.gemfile')), binding)
     73end
     74
     75# vim:ft=ruby
  • src/puppetcode/environments/gnuboat/modules/apt/NOTICE

    rbcf0be5 rad28f83  
    1 apt puppet module
     1Puppet Module - puppetlabs-apt
    22
    3 Copyright (C) 2014-2016 Puppet Labs, Inc.
    4 
    5 Puppet Labs can be contacted at: info@puppetlabs.com
    6 
     3Copyright 2017 Puppet, Inc.
    74
    85Licensed under the Apache License, Version 2.0 (the "License");
    … …  
    107You may obtain a copy of the License at
    118
    12 http://www.apache.org/licenses/LICENSE-2.0
     9    http://www.apache.org/licenses/LICENSE-2.0
    1310
    1411Unless required by applicable law or agreed to in writing, software
  • src/puppetcode/environments/gnuboat/modules/apt/README.md

    rbcf0be5 rad28f83  
    5959**Warning:** Using short key IDs presents a serious security issue, potentially leaving you open to collision attacks. We recommend you always use full fingerprints to identify your GPG keys. This module allows short keys, but issues a security warning if you use them.
    6060
    61 Declare the `apt::key` class:
     61Declare the `apt::key` defined type:
    6262
    6363```puppet
    6464apt::key { 'puppetlabs':
    65   id      => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
     65  id      => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
    6666  server  => 'pgp.mit.edu',
    6767  options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',
    … …  
    148148  repos    => 'main',
    149149  key      => {
    150     'id'     => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
     150    'id'     => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
    151151    'server' => 'pgp.mit.edu',
    152152  },
    153 },
     153}
    154154```
    155155
    … …  
    179179    repos: 'main'
    180180    key:
    181       id: '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
     181      id: '6F6B15509CF8E59E6E469F327F438280EF8D349F'
    182182      server: 'pgp.mit.edu'
    183183```
    … …  
    193193  repos    => 'main universe multiverse restricted',
    194194}
    195  
     195
    196196apt::source { "archive.ubuntu.com-${lsbdistcodename}-security":
    197197  location => 'http://archive.ubuntu.com/ubuntu',
    … …  
    200200  release  => "${lsbdistcodename}-security"
    201201}
    202  
     202
    203203apt::source { "archive.ubuntu.com-${lsbdistcodename}-updates":
    204204  location => 'http://archive.ubuntu.com/ubuntu',
    … …  
    207207  release  => "${lsbdistcodename}-updates"
    208208}
    209  
     209
    210210apt::source { "archive.ubuntu.com-${lsbdistcodename}-backports":
    211211 location => 'http://archive.ubuntu.com/ubuntu',
    … …  
    261261##### Parameters (all optional)
    262262
     263* `confs`: Creates new `apt::conf` resources. Valid options: a hash to be passed to the [`create_resources` function](https://docs.puppetlabs.com/references/latest/function.html#createresources). Default: {}.
     264
    263265* `keys`: Creates new `apt::key` resources. Valid options: a hash to be passed to the [`create_resources` function](https://docs.puppetlabs.com/references/latest/function.html#createresources). Default: {}.
    264266
    … …  
    421423
    422424  * Lucid and Precise: 'python-software-properties'
    423   * Trusty, Utopic, and Vivid: 'software-properties-common'
    424   * All others: undef
     425  * Trusty and newer: 'software-properties-common'
     426  * All others: 'python-software-properties'
    425427
    426428* `release`: *Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint).* Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename. Default: "$lsbdistcodename".
    427429
    428 #### Defined Type: `apt:setting`
     430#### Defined Type: `apt::setting`
    429431
    430432Manages Apt configuration files.
    … …  
    485487
    486488* `trusted_source`: Specifies whether to authenticate packages from this release, even if the Release file is not signed or the signature can't be checked. Valid options: 'true' and 'false'. Default: undef. This parameter is **deprecated** and will be removed in a future version of the module.
     489
     490* `notify_update`: *Optional.* Specifies whether to trigger an `apt-get update` run. Valid options: 'true' and 'false'. Default: 'true'.
    487491
    488492#### Type: `apt_key`
  • src/puppetcode/environments/gnuboat/modules/apt/Rakefile

    rbcf0be5 rad28f83  
    1 require 'puppet_blacksmith/rake_tasks'
     1require 'puppetlabs_spec_helper/rake_tasks'
    22require 'puppet-lint/tasks/puppet-lint'
    3 require 'puppetlabs_spec_helper/rake_tasks'
     3require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
    44
    55PuppetLint.configuration.fail_on_warnings = true
    66PuppetLint.configuration.send('relative')
    7 PuppetLint.configuration.send('disable_80chars')
    8 PuppetLint.configuration.send('disable_class_inherits_from_params_class')
    9 PuppetLint.configuration.send('disable_documentation')
    10 PuppetLint.configuration.send('disable_single_quote_string_with_variables')
    11 PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
    127
    138desc 'Generate pooler nodesets'
  • src/puppetcode/environments/gnuboat/modules/apt/checksums.json

    rbcf0be5 rad28f83  
    11{
    2   "CHANGELOG.md": "6a1e5e7a7b25137bab30512b425c0634",
    3   "CONTRIBUTING.md": "ad65d271f183b5adb9fdd58207939f5f",
    4   "Gemfile": "a5493d10f1c1fec87972b13a9fe1afcf",
     2  "CHANGELOG.md": "a91cd94a75b1abd4b28b3ff089d81c60",
     3  "CONTRIBUTING.md": "77d0440d7cd4206497f99065c60bed46",
     4  "Gemfile": "bedf635025b279d7c7732adcc8ae9a29",
    55  "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57",
    6   "NOTICE": "f0fd8d07c4a816a2655400c7403db877",
    7   "README.md": "f27f862d74944cbd90d6e9e310602eaa",
    8   "Rakefile": "ab91824042ec3fd085a41cab7e0e90d4",
    9   "examples/backports.pp": "17882e4b05751cd28069dcc72705e470",
     6  "MAINTAINERS.md": "35674b233c6d12c0f56ee8afbdae29e4",
     7  "NOTICE": "9533d13591355591f69619be28e9cfce",
     8  "README.md": "06945ba980070be5f9e9b755fcfa4d8b",
     9  "Rakefile": "3851f083966b9bbd6d46e50dba5aa52a",
     10  "examples/backports.pp": "af57ea62ed1b73f540858e00327e6517",
    1011  "examples/builddep.pp": "eddb8b7d7c0ef7383d85a74c1cd0de3f",
    1112  "examples/debian_testing.pp": "2e50a41180e2afeac2de15ade05ddaa1",
    … …  
    1516  "examples/force.pp": "f71857eba704a0eb3d8d6b146e80da6d",
    1617  "examples/hold.pp": "5e58e0a30d6407a05691d96c7647ae14",
    17   "examples/key.pp": "d1d63e76f1ca8a004dbeac9261c9045a",
     18  "examples/key.pp": "d85507365bd2753e14e04c344c2f7703",
    1819  "examples/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab",
    1920  "examples/ppa.pp": "b902cce8159128b5e8b21bed540743ff",
    2021  "examples/release.pp": "2bc960babf8c4dd24b7ffa4220a601f8",
    21   "examples/source.pp": "2f402ae0218fdf070d5388a66e85f82f",
     22  "examples/source.pp": "c79817e129305f86a495f7558de3d3ec",
    2223  "examples/unattended_upgrades.pp": "e7a797388ef03077f110f4f268f5ecd1",
    2324  "lib/facter/apt_reboot_required.rb": "7c3fc46f254fc4b4579d011578caaadb",
    2425  "lib/facter/apt_update_last_success.rb": "2926ff059cd2f63a2a7824ba898837f9",
    25   "lib/facter/apt_updates.rb": "6c2f2204761b2d8842e0db6235d900cb",
    26   "lib/puppet/provider/apt_key/apt_key.rb": "f6ad8e3cacfa8a199921730d61e96105",
    27   "lib/puppet/type/apt_key.rb": "b167dc62db19a482a5b46abf3095904b",
     26  "lib/facter/apt_updates.rb": "2662a82fe574e565d225f7838278d9eb",
     27  "lib/puppet/provider/apt_key/apt_key.rb": "33d0ab1b0a21cea5c120d63173d514a4",
     28  "lib/puppet/type/apt_key.rb": "9c6ca9618cdcb863275c23cf32c77f2d",
    2829  "lib/puppet_x/apt_key/patch_openuri.rb": "951bad007a3b5db035be069c1d1c9c09",
    29   "manifests/backports.pp": "7d4a6e58ae3dc364e6279358e4f4b957",
    30   "manifests/conf.pp": "403cee9be6284d6f47759482759f4b6d",
    31   "manifests/init.pp": "3640560b938701bbc0c4ed8c93c5a64a",
    32   "manifests/key.pp": "ad58e1224124b5b4a2617123d74eed00",
    33   "manifests/params.pp": "d8799f415d36e4b50b1bf9a8a107a17c",
    34   "manifests/pin.pp": "5abe01b9106f1f3c00f02e3ad81eec75",
    35   "manifests/ppa.pp": "e745db50b160d7519e3dc97f137e0ca4",
    36   "manifests/setting.pp": "cde5492c31b2b94c49bf67c7c96a6058",
    37   "manifests/source.pp": "c1be91ad56665839711ada25c6f10850",
    38   "manifests/update.pp": "93f132802d6280debfc46b35c656486f",
    39   "metadata.json": "c6ad04eceebce0185b4882acb517a7da",
    40   "spec/acceptance/apt_key_provider_spec.rb": "1e19756f710dbc8799b630721197786e",
    41   "spec/acceptance/apt_spec.rb": "0bd13c6cb16e56d049ad0a5770f9c1f3",
    42   "spec/acceptance/class_spec.rb": "7fa3ee3cade5e27891fe01aa8af8941d",
    43   "spec/acceptance/nodesets/centos-59-x64.yml": "57eb3e471b9042a8ea40978c467f8151",
    44   "spec/acceptance/nodesets/centos-64-x64-pe.yml": "ec075d95760df3d4702abea1ce0a829b",
    45   "spec/acceptance/nodesets/centos-65-x64.yml": "3e5c36e6aa5a690229e720f4048bb8af",
    46   "spec/acceptance/nodesets/debian-70rc1-x64.yml": "715f798e696d3582c66d13f0e8e5f009",
    47   "spec/acceptance/nodesets/debian-73-x64.yml": "b44b7146a828c37482c06879862fb5d9",
    48   "spec/acceptance/nodesets/default.yml": "e27bb4d7526ad3c7a1c4aeb87decec15",
    49   "spec/acceptance/nodesets/ubuntu-server-10044-x64.yml": "75e86400b7889888dc0781c0ae1a1297",
    50   "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "d30d73e34cd50b043c7d14e305955269",
    51   "spec/acceptance/nodesets/ubuntu-server-1404-x64.yml": "5f0aed10098ac5b78e4217bb27c7aaf0",
    52   "spec/classes/apt_backports_spec.rb": "20492356c4ebddcfe8739b8f4a0beac6",
    53   "spec/classes/apt_spec.rb": "73023d41e3d02b760bad354deae321a1",
    54   "spec/classes/apt_update_spec.rb": "e1bae3848f53c709a14c1e6def93865e",
    55   "spec/classes/params_spec.rb": "87ac980e35fbc87e4d5a61809b99c1d8",
    56   "spec/defines/conf_spec.rb": "4c07a034a6e55098962535d5dca611b0",
    57   "spec/defines/key_compat_spec.rb": "3676c87d803d19d92f35ba74bad1db7c",
    58   "spec/defines/key_spec.rb": "a69d96e761e40767ee3526503b9ce63c",
    59   "spec/defines/pin_spec.rb": "5a3866f7a49f88e6e14e3335872e387b",
    60   "spec/defines/ppa_spec.rb": "b8aed505789e507775de01749cda49f4",
    61   "spec/defines/setting_spec.rb": "740578ed09763c7573c0bfafab6c94a1",
    62   "spec/defines/source_compat_spec.rb": "aee5bea3d7f13749f7e245efc572bb9e",
    63   "spec/defines/source_spec.rb": "783ed8308e71699b7f0b6f7cc925d178",
    64   "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
     30  "locales/config.yaml": "46660fe63119d48b8fb7dc3b38ee0856",
     31  "manifests/backports.pp": "87a05ecfa0243d152ab225feec963d92",
     32  "manifests/conf.pp": "8a33d3106e75422f82abc63ec41c4d84",
     33  "manifests/init.pp": "fe403437b485318b9c9c384abfb6bb06",
     34  "manifests/key.pp": "2ef8581029647d3d5a12234c86eff85f",
     35  "manifests/params.pp": "621974da9b92d75e943aba2c1b384188",
     36  "manifests/pin.pp": "d4fd040d22da4b418771a01fab8336fe",
     37  "manifests/ppa.pp": "5c05b41477ba7613af1855ec38be5971",
     38  "manifests/setting.pp": "50e39637905de1dfcfdaad95672a2890",
     39  "manifests/source.pp": "797edd25ee64b3128a04dbf70e1443a4",
     40  "manifests/update.pp": "46330dc5a8e69b62b2dfd9072cd4f26c",
     41  "metadata.json": "fd6d46586030158faa92d2af7aa46e7b",
     42  "spec/acceptance/apt_key_provider_spec.rb": "68e448171b89dcf535ac3f985937f1a7",
     43  "spec/acceptance/apt_spec.rb": "7b2ed0430e2288250586c5a17a51c21c",
     44  "spec/acceptance/class_spec.rb": "d3a2ff84333f0f9ee0143aeac414e46b",
     45  "spec/acceptance/nodesets/centos-7-x64.yml": "a713f3abd3657f0ae2878829badd23cd",
     46  "spec/acceptance/nodesets/debian-8-x64.yml": "d2d2977900989f30086ad251a14a1f39",
     47  "spec/acceptance/nodesets/default.yml": "b42da5a1ea0c964567ba7495574b8808",
     48  "spec/acceptance/nodesets/docker/centos-7.yml": "8a3892807bdd62306ae4774f41ba11ae",
     49  "spec/acceptance/nodesets/docker/debian-8.yml": "ac8e871d1068c96de5e85a89daaec6df",
     50  "spec/acceptance/nodesets/docker/ubuntu-14.04.yml": "dc42ee922a96908d85b8f0f08203ce58",
     51  "spec/classes/apt_backports_spec.rb": "9a2c5fd8b451ace56fcbca4e89d9a397",
     52  "spec/classes/apt_spec.rb": "1a132e04a5e9b4284105a6b2c8e202ce",
     53  "spec/classes/apt_update_spec.rb": "2061f6c2827b0ab9a3b461b2bb40fbaf",
     54  "spec/defines/conf_spec.rb": "57230dec18839ed45d695453f8e74978",
     55  "spec/defines/key_compat_spec.rb": "970b0cec22e99af9cf158e4338fef5a1",
     56  "spec/defines/key_spec.rb": "75f4d0880e7b3b4930f9fdf5cda760d1",
     57  "spec/defines/pin_spec.rb": "3bab03c1ac67f651334fc1e7d0c97000",
     58  "spec/defines/ppa_spec.rb": "7791f279e6c77f835fc4a21fbd6ec168",
     59  "spec/defines/setting_spec.rb": "fb41b3d28b7e1860a53846d99b811677",
     60  "spec/defines/source_compat_spec.rb": "8bed1d3acf3e6713d2795d4ab71ebb83",
     61  "spec/defines/source_spec.rb": "32d68cce3d579e9121602d87b0078bab",
    6562  "spec/spec_helper.rb": "b2db3bc02b4ac2fd5142a6621c641b07",
    66   "spec/spec_helper_acceptance.rb": "2d4884491c0eed85a780cbe694074945",
    67   "spec/unit/facter/apt_has_updates_spec.rb": "fdc0d48ed55ebc72ae16c3f09cf82d2c",
    68   "spec/unit/facter/apt_package_updates_spec.rb": "9102ea3ea94a286f5accd2fb2f040725",
     63  "spec/spec_helper_acceptance.rb": "ba9896539a0b9d550e4d27803ba5214c",
     64  "spec/unit/facter/apt_has_updates_spec.rb": "8294711c589fb1efa9aa23be0faf8500",
     65  "spec/unit/facter/apt_package_updates_spec.rb": "2a0549f8656f094d9d0006ce12f61b2c",
    6966  "spec/unit/facter/apt_reboot_required_spec.rb": "9d58cb2aeaed624f7c4ca118ec1b6410",
    70   "spec/unit/facter/apt_security_updates_spec.rb": "41c9c1d84a0feaa3938f6f3d8def9772",
    71   "spec/unit/facter/apt_update_last_success_spec.rb": "cbc907ca27e6f9bb803fa9654c4a1836",
    72   "spec/unit/facter/apt_updates_spec.rb": "22f290cfbe2dc1d6bb321ce782e90bb8",
    73   "spec/unit/puppet/type/apt_key_spec.rb": "986c3cf60937eb89cbf6335dc7923dc5",
    74   "templates/15update-stamp.erb": "b9de0ac9e2c9854b1bb213e362dc4e41",
    75   "templates/_conf_header.erb": "6f3077f2eabd3e929a44d55bc1c5446e",
    76   "templates/_header.erb": "9300ac105fe777787ac9e793b8df8d25",
    77   "templates/conf.erb": "b4bc626b0d998cd681ee6b8c507c0d1d",
    78   "templates/pin.pref.erb": "c3885c6816db46cf66e3a9bf57973c61",
    79   "templates/proxy.erb": "3d0f7b88020d8a29bafc690e05ca69d6",
    80   "templates/source.list.erb": "72648dd11918d5c03db82065d3bef73b"
     67  "spec/unit/facter/apt_security_updates_spec.rb": "ec8a6711feac739866743dfaf4baf3d0",
     68  "spec/unit/facter/apt_update_last_success_spec.rb": "0c6320a500d44948b4ec965194970840",
     69  "spec/unit/facter/apt_updates_spec.rb": "ffde1130fda5990d2786ff7878ade5e0",
     70  "spec/unit/puppet/type/apt_key_spec.rb": "311c79d817ad03fbae8923fa2a075221",
     71  "templates/15update-stamp.epp": "b9de0ac9e2c9854b1bb213e362dc4e41",
     72  "templates/_conf_header.epp": "6f3077f2eabd3e929a44d55bc1c5446e",
     73  "templates/_header.epp": "9300ac105fe777787ac9e793b8df8d25",
     74  "templates/pin.pref.epp": "ab7a64e3779f93028fe965a6393fad74",
     75  "templates/proxy.epp": "540643b8da51aa4cb209ab4713d3bbb3",
     76  "templates/source.list.epp": "c32995778d056f204d51a6d79505a5aa"
    8177}
  • src/puppetcode/environments/gnuboat/modules/apt/examples/backports.pp

    rbcf0be5 rad28f83  
    77  key      => {
    88    id     => '630239CC130E1A7FD81A27B140976EAF437D05B5',
    9     server => 'pgp.mit.edu',
     9    server => 'hkps.pool.sks-keyservers.net',
    1010  },
    1111}
  • src/puppetcode/environments/gnuboat/modules/apt/examples/key.pp

    rbcf0be5 rad28f83  
    11# Declare Apt key for apt.puppetlabs.com source
    22apt::key { 'puppetlabs':
    3   id      => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
    4   server  => 'pgp.mit.edu',
     3  id      => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
     4  server  => 'hkps.pool.sks-keyservers.net',
    55  options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',
    66}
  • src/puppetcode/environments/gnuboat/modules/apt/examples/source.pp

    rbcf0be5 rad28f83  
    88  repos    => 'main',
    99  key      => {
    10     id     => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
    11     server => 'pgp.mit.edu',
     10    id     => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
     11    server => 'hkps.pool.sks-keyservers.net',
    1212  },
    1313}
    … …  
    2020  key      => {
    2121    id     => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
    22     server => 'subkeys.pgp.net',
     22    server => 'hkps.pool.sks-keyservers.net',
    2323  },
    2424  pin      => '-10',
    … …  
    3030  key      => {
    3131    id     => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
    32     server => 'subkeys.pgp.net',
     32    server => 'hkps.pool.sks-keyservers.net',
    3333  },
    3434  pin      => '-10',
  • src/puppetcode/environments/gnuboat/modules/apt/lib/facter/apt_updates.rb

    rbcf0be5 rad28f83  
    22Facter.add("apt_has_updates") do
    33  confine :osfamily => 'Debian'
    4   if File.executable?("/usr/lib/update-notifier/apt-check")
    5     apt_check_result = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>&1')
    6     if not apt_check_result.nil? and apt_check_result =~ /^\d+;\d+$/
    7       apt_package_updates = apt_check_result.split(';')
     4  if File.executable?("/usr/bin/apt-get")
     5    apt_get_result = Facter::Util::Resolution.exec('/usr/bin/apt-get -s upgrade 2>&1')
     6    if not apt_get_result.nil?
     7      apt_package_updates = [[], []]
     8      apt_get_result.each_line do |line|
     9        if line =~ /^Inst\s/
     10          package = line.gsub(/^Inst\s([^\s]+)\s.*/, '\1').strip
     11          apt_package_updates[0].push(package)
     12          security_matches = [
     13            / Debian[^\s]+-updates /,
     14            / Debian-Security:/,
     15            / Ubuntu[^\s]+-security /,
     16            / gNewSense[^\s]+-security /
     17          ]
     18          re = Regexp.union(security_matches)
     19          if line.match(re)
     20            apt_package_updates[1].push(package)
     21          end
     22        end
     23      end
    824    end
    925  end
    … …  
    1127  setcode do
    1228    if not apt_package_updates.nil? and apt_package_updates.length == 2
    13       apt_package_updates != ['0', '0']
     29      apt_package_updates != [[], []]
    1430    end
    1531  end
    … …  
    1935  confine :apt_has_updates => true
    2036  setcode do
    21     packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>&1').split("\n")
    2237    if Facter.version < '2.0.0'
    23       packages.join(',')
     38      apt_package_updates[0].join(',')
    2439    else
    25       packages
     40      apt_package_updates[0]
    2641    end
    2742  end
    … …  
    3146  confine :apt_has_updates => true
    3247  setcode do
    33     Integer(apt_package_updates[0])
     48    Integer(apt_package_updates[0].length)
    3449  end
    3550end
    … …  
    3853  confine :apt_has_updates => true
    3954  setcode do
    40     Integer(apt_package_updates[1])
     55    Integer(apt_package_updates[1].length)
    4156  end
    4257end
  • src/puppetcode/environments/gnuboat/modules/apt/lib/puppet/provider/apt_key/apt_key.rb

    rbcf0be5 rad28f83  
    128128    else
    129129      begin
    130         key = parsedValue.read
     130        # Only send basic auth if URL contains userinfo
     131        # Some webservers (e.g. Amazon S3) return code 400 if empty basic auth is sent
     132        if parsedValue.userinfo.nil?
     133          key = parsedValue.read
     134        else
     135          user_pass = parsedValue.userinfo.split(':')
     136          parsedValue.userinfo = ''
     137          key = open(parsedValue, :http_basic_authentication => user_pass).read
     138        end
    131139      rescue OpenURI::HTTPError, Net::FTPPermError => e
    132140        fail("#{e.message} for #{resource[:source]}")
  • src/puppetcode/environments/gnuboat/modules/apt/lib/puppet/type/apt_key.rb

    rbcf0be5 rad28f83  
    88    be manipulated through the `apt-key` command.
    99
    10     apt_key { '4BD6EC30':
     10    apt_key { '6F6B15509CF8E59E6E469F327F438280EF8D349F':
    1111      source => 'http://apt.puppetlabs.com/pubkey.gpg'
    1212    }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/backports.pp

    rbcf0be5 rad28f83  
    11class apt::backports (
    2   $location = undef,
    3   $release  = undef,
    4   $repos    = undef,
    5   $key      = undef,
    6   $pin      = 200,
     2  Optional[String] $location                    = undef,
     3  Optional[String] $release                     = undef,
     4  Optional[String] $repos                       = undef,
     5  Optional[Variant[String, Hash]] $key          = undef,
     6  Optional[Variant[Integer, String, Hash]] $pin = 200,
    77){
    88  if $location {
    9     validate_string($location)
    109    $_location = $location
    1110  }
    1211  if $release {
    13     validate_string($release)
    1412    $_release = $release
    1513  }
    1614  if $repos {
    17     validate_string($repos)
    1815    $_repos = $repos
    1916  }
    2017  if $key {
    21     unless is_hash($key) {
    22       validate_string($key)
    23     }
    2418    $_key = $key
    2519  }
    26   if ($::apt::xfacts['lsbdistid'] == 'debian' or $::apt::xfacts['lsbdistid'] == 'ubuntu') {
     20  if ($facts['lsbdistid'] == 'Debian' or $facts['lsbdistid'] == 'Ubuntu') {
    2721    unless $location {
    2822      $_location = $::apt::backports['location']
    2923    }
    3024    unless $release {
    31       $_release = "${::apt::xfacts['lsbdistcodename']}-backports"
     25      $_release = "${facts['lsbdistcodename']}-backports"
    3226    }
    3327    unless $repos {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/conf.pp

    rbcf0be5 rad28f83  
    11define apt::conf (
    2   $content       = undef,
    3   $ensure        = present,
    4   $priority      = '50',
    5   $notify_update = undef,
     2  Optional[String] $content          = undef,
     3  Enum['present', 'absent'] $ensure  = present,
     4  Variant[String, Integer] $priority = 50,
     5  Optional[Boolean] $notify_update  = undef,
    66) {
    77
    … …  
    1212  }
    1313
     14  $confheadertmp = epp('apt/_conf_header.epp')
    1415  apt::setting { "conf-${name}":
    1516    ensure        => $ensure,
    1617    priority      => $priority,
    17     content       => template('apt/_conf_header.erb', 'apt/conf.erb'),
     18    content       => "${confheadertmp}${content}",
    1819    notify_update => $notify_update,
    1920  }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/init.pp

    rbcf0be5 rad28f83  
     1# == Class: apt
    12#
    2 class apt(
    3   $update   = {},
    4   $purge    = {},
    5   $proxy    = {},
    6   $sources  = {},
    7   $keys     = {},
    8   $ppas     = {},
    9   $pins     = {},
    10   $settings = {},
    11 ) inherits ::apt::params {
     3# Manage APT (Advanced Packaging Tool)
     4#
     5class apt (
     6  Hash $update_defaults         = $apt::params::update_defaults,
     7  Hash $purge_defaults          = $apt::params::purge_defaults,
     8  Hash $proxy_defaults          = $apt::params::proxy_defaults,
     9  Hash $include_defaults        = $apt::params::include_defaults,
     10  String $provider              = $apt::params::provider,
     11  String $keyserver             = $apt::params::keyserver,
     12  Optional[String] $ppa_options = $apt::params::ppa_options,
     13  Optional[String] $ppa_package = $apt::params::ppa_package,
     14  Optional[Hash] $backports     = $apt::params::backports,
     15  Hash $confs                   = $apt::params::confs,
     16  Hash $update                  = $apt::params::update,
     17  Hash $purge                   = $apt::params::purge,
     18  Hash $proxy                   = $apt::params::proxy,
     19  Hash $sources                 = $apt::params::sources,
     20  Hash $keys                    = $apt::params::keys,
     21  Hash $ppas                    = $apt::params::ppas,
     22  Hash $pins                    = $apt::params::pins,
     23  Hash $settings                = $apt::params::settings,
     24  String $root                  = $apt::params::root,
     25  String $sources_list          = $apt::params::sources_list,
     26  String $sources_list_d        = $apt::params::sources_list_d,
     27  String $conf_d                = $apt::params::conf_d,
     28  String $preferences           = $apt::params::preferences,
     29  String $preferences_d         = $apt::params::preferences_d,
     30  Hash $config_files            = $apt::params::config_files,
     31  Hash $source_key_defaults     = $apt::params::source_key_defaults
     32) inherits apt::params {
     33
     34  if $facts['osfamily'] != 'Debian' {
     35    fail('This module only works on Debian or derivatives like Ubuntu')
     36  }
    1237
    1338  $frequency_options = ['always','daily','weekly','reluctantly']
    14   validate_hash($update)
     39
    1540  if $update['frequency'] {
    1641    validate_re($update['frequency'], $frequency_options)
    1742  }
    1843  if $update['timeout'] {
    19     unless is_integer($update['timeout']) {
    20       fail('timeout value for update must be an integer')
    21     }
     44    assert_type(Integer, $update['timeout'])
    2245  }
    2346  if $update['tries'] {
    24     unless is_integer($update['tries']) {
    25       fail('tries value for update must be an integer')
    26     }
     47    assert_type(Integer, $update['tries'])
    2748  }
    2849
    … …  
    3051  include ::apt::update
    3152
    32   validate_hash($purge)
    3353  if $purge['sources.list'] {
    34     validate_bool($purge['sources.list'])
     54    assert_type(Boolean, $purge['sources.list'])
    3555  }
    3656  if $purge['sources.list.d'] {
    37     validate_bool($purge['sources.list.d'])
     57    assert_type(Boolean, $purge['sources.list.d'])
    3858  }
    3959  if $purge['preferences'] {
    40     validate_bool($purge['preferences'])
     60    assert_type(Boolean, $purge['preferences'])
    4161  }
    4262  if $purge['preferences.d'] {
    43     validate_bool($purge['preferences.d'])
     63    assert_type(Boolean, $purge['preferences.d'])
    4464  }
    4565
    4666  $_purge = merge($::apt::purge_defaults, $purge)
    4767
    48   validate_hash($proxy)
    4968  if $proxy['ensure'] {
    5069    validate_re($proxy['ensure'], ['file', 'present', 'absent'])
    5170  }
    5271  if $proxy['host'] {
    53     validate_string($proxy['host'])
     72    assert_type(String, $proxy['host'])
    5473  }
    5574  if $proxy['port'] {
    56     unless is_integer($proxy['port']) {
    57       fail('$proxy port must be an integer')
    58     }
     75    assert_type(Integer, $proxy['port'])
    5976  }
    60   if $proxy['https'] {
    61     validate_bool($proxy['https'])
     77  if $proxy['https']{
     78    assert_type(Boolean, $proxy['https'])
    6279  }
    6380
    6481  $_proxy = merge($apt::proxy_defaults, $proxy)
    6582
    66   validate_hash($sources)
    67   validate_hash($keys)
    68   validate_hash($settings)
    69   validate_hash($ppas)
    70   validate_hash($pins)
     83  $confheadertmp = epp('apt/_conf_header.epp')
     84  $proxytmp = epp('apt/proxy.epp', {'proxies' => $_proxy})
     85  $updatestamptmp = epp('apt/15update-stamp.epp')
    7186
    7287  if $_proxy['ensure'] == 'absent' or $_proxy['host'] {
    … …  
    7489      ensure   => $_proxy['ensure'],
    7590      priority => '01',
    76       content  => template('apt/_conf_header.erb', 'apt/proxy.erb'),
     91      content  => "${confheadertmp}${proxytmp}",
    7792    }
    7893  }
    … …  
    96111  apt::setting { 'conf-update-stamp':
    97112    priority => 15,
    98     content  => template('apt/_conf_header.erb', 'apt/15update-stamp.erb'),
     113    content  => "${confheadertmp}${updatestamptmp}",
    99114  }
    100115
    … …  
    140155  }
    141156
     157  if $confs {
     158    create_resources('apt::conf', $confs)
     159  }
    142160  # manage sources if present
    143161  if $sources {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/key.pp

    rbcf0be5 rad28f83  
    11# == Define: apt::key
    22define apt::key (
    3   $id          = $title,
    4   $ensure      = present,
    5   $content     = undef,
    6   $source      = undef,
    7   $server      = $::apt::keyserver,
    8   $options     = undef,
    9   $key         = undef,
    10   $key_content = undef,
    11   $key_source  = undef,
    12   $key_server  = undef,
    13   $key_options = undef,
    14 ) {
     3    String $id                           = $title,
     4    Enum['present', 'absent'] $ensure    = present,
     5    Optional[String] $content            = undef,
     6    Optional[String] $source             = undef,
     7    String $server                       = $::apt::keyserver,
     8    Optional[String] $options            = undef,
     9    ) {
    1510
    16   if $key != undef {
    17     warning('$key is deprecated and will be removed in the next major release. Please use $id instead.')
    18     $_id = $key
    19   } else {
    20     $_id = $id
     11  validate_re($id, ['\A(0x)?[0-9a-fA-F]{8}\Z', '\A(0x)?[0-9a-fA-F]{16}\Z', '\A(0x)?[0-9a-fA-F]{40}\Z'])
     12
     13  if $source {
     14    validate_re($source, ['\Ahttps?:\/\/', '\Aftp:\/\/', '\A\/\w+'])
    2115  }
    2216
    23   if $key_content != undef {
    24     warning('$key_content is deprecated and will be removed in the next major release. Please use $content instead.')
    25     $_content = $key_content
    26   } else {
    27     $_content = $content
    28   }
    29 
    30   if $key_source != undef {
    31     warning('$key_source is deprecated and will be removed in the next major release. Please use $source instead.')
    32     $_source = $key_source
    33   } else {
    34     $_source = $source
    35   }
    36 
    37   if $key_server != undef {
    38     warning('$key_server is deprecated and will be removed in the next major release. Please use $server instead.')
    39     $_server = $key_server
    40   } else {
    41     $_server = $server
    42   }
    43 
    44   if $key_options != undef {
    45     warning('$key_options is deprecated and will be removed in the next major release. Please use $options instead.')
    46     $_options = $key_options
    47   } else {
    48     $_options = $options
    49   }
    50 
    51   validate_re($_id, ['\A(0x)?[0-9a-fA-F]{8}\Z', '\A(0x)?[0-9a-fA-F]{16}\Z', '\A(0x)?[0-9a-fA-F]{40}\Z'])
    52   validate_re($ensure, ['\Aabsent|present\Z',])
    53 
    54   if $_content {
    55     validate_string($_content)
    56   }
    57 
    58   if $_source {
    59     validate_re($_source, ['\Ahttps?:\/\/', '\Aftp:\/\/', '\A\/\w+'])
    60   }
    61 
    62   if $_server {
    63     validate_re($_server,['\A((hkp|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$'])
    64   }
    65 
    66   if $_options {
    67     validate_string($_options)
     17  if $server {
     18    validate_re($server,['\A((hkp|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$'])
    6819  }
    6920
    7021  case $ensure {
    7122    present: {
    72       if defined(Anchor["apt_key ${_id} absent"]){
    73         fail("key with id ${_id} already ensured as absent")
     23      if defined(Anchor["apt_key ${id} absent"]){
     24        fail("key with id ${id} already ensured as absent")
    7425      }
    7526
    76       if !defined(Anchor["apt_key ${_id} present"]) {
     27      if !defined(Anchor["apt_key ${id} present"]) {
    7728        apt_key { $title:
    7829          ensure  => $ensure,
    79           id      => $_id,
    80           source  => $_source,
    81           content => $_content,
    82           server  => $_server,
    83           options => $_options,
    84         } ->
    85         anchor { "apt_key ${_id} present": }
     30          id      => $id,
     31          source  => $source,
     32          content => $content,
     33          server  => $server,
     34          options => $options,
     35        } -> anchor { "apt_key ${id} present": }
    8636      }
    8737    }
    8838
    8939    absent: {
    90       if defined(Anchor["apt_key ${_id} present"]){
    91         fail("key with id ${_id} already ensured as present")
     40      if defined(Anchor["apt_key ${id} present"]){
     41        fail("key with id ${id} already ensured as present")
    9242      }
    9343
    94       if !defined(Anchor["apt_key ${_id} absent"]){
     44      if !defined(Anchor["apt_key ${id} absent"]){
    9545        apt_key { $title:
    9646          ensure  => $ensure,
    97           id      => $_id,
    98           source  => $_source,
    99           content => $_content,
    100           server  => $_server,
    101           options => $_options,
    102         } ->
    103         anchor { "apt_key ${_id} absent": }
     47          id      => $id,
     48          source  => $source,
     49          content => $content,
     50          server  => $server,
     51          options => $options,
     52        } -> anchor { "apt_key ${id} absent": }
    10453      }
    10554    }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/params.pp

    rbcf0be5 rad28f83  
    33  if $::osfamily != 'Debian' {
    44    fail('This module only works on Debian or derivatives like Ubuntu')
    5   }
    6 
    7   # prior to puppet 3.5.0, defined couldn't test if a variable was defined
    8   # strict variables wasn't added until 3.5.0, so this should be fine.
    9   if ! $::settings::strict_variables {
    10     $xfacts = {
    11       'lsbdistcodename'     => $::lsbdistcodename,
    12       'lsbdistrelease'      => $::lsbdistrelease,
    13       'lsbmajdistrelease'   => $::lsbmajdistrelease,
    14       'lsbdistdescription'  => $::lsbdistdescription,
    15       'lsbminordistrelease' => $::lsbminordistrelease,
    16       'lsbdistid'           => $::lsbdistid,
    17     }
    18   } else {
    19     # Strict variables facts lookup compatibility
    20     $xfacts = {
    21       'lsbdistcodename' => defined('$lsbdistcodename') ? {
    22         true    => $::lsbdistcodename,
    23         default => undef,
    24       },
    25       'lsbdistrelease' => defined('$lsbdistrelease') ? {
    26         true    => $::lsbdistrelease,
    27         default => undef,
    28       },
    29       'lsbmajdistrelease' => defined('$lsbmajdistrelease') ? {
    30         true    => $::lsbmajdistrelease,
    31         default => undef,
    32       },
    33       'lsbdistdescription' => defined('$lsbdistdescription') ? {
    34         true    => $::lsbdistdescription,
    35         default => undef,
    36       },
    37       'lsbminordistrelease' => defined('$lsbminordistrelease') ? {
    38         true    => $::lsbminordistrelease,
    39         default => undef,
    40       },
    41       'lsbdistid' => defined('$lsbdistid') ? {
    42         true    => $::lsbdistid,
    43         default => undef,
    44       },
    45     }
    465  }
    476
    … …  
    5413  $preferences_d  = "${root}/preferences.d"
    5514  $keyserver      = 'keyserver.ubuntu.com'
     15  $confs          = {}
     16  $update         = {}
     17  $purge          = {}
     18  $proxy          = {}
     19  $sources        = {}
     20  $keys           = {}
     21  $ppas           = {}
     22  $pins           = {}
     23  $settings       = {}
    5624
    5725  $config_files = {
    … …  
    10270  }
    10371
    104   case $xfacts['lsbdistid'] {
    105     'debian': {
    106       case $xfacts['lsbdistcodename'] {
    107         'squeeze': {
     72  case $facts['os']['name']{
     73    'Debian': {
     74      case $facts['os']['release']['full'] {
     75        '6.0': {
    10876          $backports = {
    10977            'location' => 'http://httpredir.debian.org/debian-backports',
    … …  
    12593
    12694    }
    127     'ubuntu': {
     95    'Ubuntu': {
    12896      $backports = {
    12997        'location' => 'http://archive.ubuntu.com/ubuntu',
    … …  
    132100      }
    133101
    134       case $xfacts['lsbdistcodename'] {
    135         'lucid': {
     102      case $facts['os']['release']['full'] {
     103        '10.04': {
    136104          $ppa_options        = undef
    137105          $ppa_package        = 'python-software-properties'
    138106        }
    139         'precise': {
     107        '12.04': {
    140108          $ppa_options        = '-y'
    141109          $ppa_package        = 'python-software-properties'
    142110        }
    143         'trusty', 'utopic', 'vivid', 'wily': {
     111        '14.04', '14.10', '15.04', '15.10': {
    144112          $ppa_options        = '-y'
    145113          $ppa_package        = 'software-properties-common'
    … …  
    152120    }
    153121    undef: {
    154       fail('Unable to determine lsbdistid, please install lsb-release first')
     122      fail('Unable to determine full release number')
    155123    }
    156124    default: {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/pin.pp

    rbcf0be5 rad28f83  
    33
    44define apt::pin(
    5   $ensure          = present,
    6   $explanation     = undef,
    7   $order           = undef,
    8   $packages        = '*',
    9   $priority        = 0,
    10   $release         = '', # a=
    11   $origin          = '',
    12   $version         = '',
    13   $codename        = '', # n=
    14   $release_version = '', # v=
    15   $component       = '', # c=
    16   $originator      = '', # o=
    17   $label           = ''  # l=
     5  Optional[Enum['file', 'present', 'absent']] $ensure = present,
     6  Optional[String] $explanation                       = undef,
     7  Variant[Integer] $order                             = 50,
     8  Variant[String, Array] $packages                    = '*',
     9  Variant[Numeric, String] $priority                  = 0,
     10  Optional[String] $release                           = '', # a=
     11  Optional[String] $origin                            = '',
     12  Optional[String] $version                           = '',
     13  Optional[String] $codename                          = '', # n=
     14  Optional[String] $release_version                  = '', # v=
     15  Optional[String] $component                         = '', # c=
     16  Optional[String] $originator                        = '', # o=
     17  Optional[String] $label                             = '',  # l=
    1818) {
    19   if $order and !is_integer($order) {
    20     fail('Only integers are allowed in the apt::pin order param')
    21   }
    2219
    2320  if $explanation {
    … …  
    3734    $component,
    3835    $originator,
    39     $label]
     36    $label,
     37  ]
    4038  $pin_release = join($pin_release_array, '')
    4139
    … …  
    7270  $file_name = regsubst($title, '[^0-9a-z\-_\.]', '_', 'IG')
    7371
     72  $headertmp = epp('apt/_header.epp')
     73
     74  $pinpreftmp = epp('apt/pin.pref.epp', {
     75      'name'            => $name,
     76      'pin_release'     => $pin_release,
     77      'release'         => $release,
     78      'codename'        => $codename,
     79      'release_version' => $release_version,
     80      'component'       => $component,
     81      'originator'      => $originator,
     82      'label'           => $label,
     83      'version'         => $version,
     84      'origin'          => $origin,
     85      'explanation'     => $_explanation,
     86      'packages_string' => $packages_string,
     87      'priority'        => $priority,
     88  })
     89
    7490  apt::setting { "pref-${file_name}":
    7591    ensure        => $ensure,
    7692    priority      => $order,
    77     content       => template('apt/_header.erb', 'apt/pin.pref.erb'),
     93    content       => "${headertmp}${pinpreftmp}",
    7894    notify_update => false,
    7995  }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/ppa.pp

    rbcf0be5 rad28f83  
    11# ppa.pp
    22define apt::ppa(
    3   $ensure         = 'present',
    4   $options        = $::apt::ppa_options,
    5   $release        = $::apt::xfacts['lsbdistcodename'],
    6   $package_name  = $::apt::ppa_package,
    7   $package_manage = false,
     3  String $ensure                 = 'present',
     4  Optional[String] $options      = $::apt::ppa_options,
     5  Optional[String] $release      = $facts['lsbdistcodename'],
     6  Optional[String] $package_name = $::apt::ppa_package,
     7  Boolean $package_manage        = false,
    88) {
    99  unless $release {
    … …  
    1111  }
    1212
    13   if $::apt::xfacts['lsbdistid'] == 'Debian' {
     13  if $facts['lsbdistid'] == 'Debian' {
    1414    fail('apt::ppa is not currently supported on Debian.')
    1515  }
    1616
    17   $ubuntu_release_year  = regsubst($::apt::xfacts['lsbdistrelease'], '\.\d+$', '', 'G') + 0
    18   $ubuntu_release_month = regsubst($::apt::xfacts['lsbdistrelease'], '^\d+\.', '', 'G') + 0
    19 
    20   if $ubuntu_release_year >= 15 and $ubuntu_release_month >= 10 {
    21     $distid = downcase($::apt::xfacts['lsbdistid'])
     17  if versioncmp($facts['lsbdistrelease'], '15.10') >= 0 {
     18    $distid = downcase($facts['lsbdistid'])
    2219    $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2-${release}")
    2320  } else {
    … …  
    3229    if $package_manage {
    3330      ensure_packages($package_name)
    34 
    3531      $_require = [File['sources.list.d'], Package[$package_name]]
    3632    } else {
    … …  
    5248      environment => $_proxy_env,
    5349      command     => "/usr/bin/add-apt-repository ${options} ${name}",
    54       unless      => "/usr/bin/test -s ${::apt::sources_list_d}/${sources_list_d_filename}",
     50      unless      => "/usr/bin/test -f ${::apt::sources_list_d}/${sources_list_d_filename}",
    5551      user        => 'root',
    5652      logoutput   => 'on_failure',
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/setting.pp

    rbcf0be5 rad28f83  
    11define apt::setting (
    2   $priority      = 50,
    3   $ensure        = file,
    4   $source        = undef,
    5   $content       = undef,
    6   $notify_update = true,
     2  Variant[String, Integer, Array] $priority           = 50,
     3  Optional[Enum['file', 'present', 'absent']] $ensure = file,
     4  Optional[String] $source                            = undef,
     5  Optional[String] $content                           = undef,
     6  Boolean $notify_update                              = true,
    77) {
    88
    9   include 'apt::params'
    109  if $content and $source {
    1110    fail('apt::setting cannot have both content and source')
    … …  
    1514    fail('apt::setting needs either of content or source')
    1615  }
    17 
    18   validate_re($ensure,  ['file', 'present', 'absent'])
    19   validate_bool($notify_update)
    2016
    2117  $title_array = split($title, '-')
    … …  
    3026  }
    3127
    32   if $source {
    33     validate_string($source)
    34   }
    35 
    36   if $content {
    37     validate_string($content)
    38   }
    39 
    4028  if ($setting_type == 'list') or ($setting_type == 'pref') {
    4129    $_priority = ''
    … …  
    4432  }
    4533
    46   $_path = $::apt::params::config_files[$setting_type]['path']
    47   $_ext  = $::apt::params::config_files[$setting_type]['ext']
     34  $_path = $::apt::config_files[$setting_type]['path']
     35  $_ext  = $::apt::config_files[$setting_type]['ext']
    4836
    4937  if $notify_update {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/source.pp

    rbcf0be5 rad28f83  
    22# add an apt source
    33define apt::source(
    4   $location          = undef,
    5   $comment           = $name,
    6   $ensure            = present,
    7   $release           = undef,
    8   $repos             = 'main',
    9   $include           = {},
    10   $key               = undef,
    11   $pin               = undef,
    12   $architecture      = undef,
    13   $allow_unsigned    = false,
    14   $include_src       = undef,
    15   $include_deb       = undef,
    16   $required_packages = undef,
    17   $key_server        = undef,
    18   $key_content       = undef,
    19   $key_source        = undef,
    20   $trusted_source    = undef,
     4  Optional[String] $location           = undef,
     5  String $comment                      = $name,
     6  String $ensure                       = present,
     7  Optional[String] $release            = undef,
     8  String $repos                        = 'main',
     9  Optional[Variant[Hash]] $include     = {},
     10  Optional[Variant[String, Hash]] $key = undef,
     11  $pin                                 = undef,
     12  Optional[String] $architecture       = undef,
     13  Boolean $allow_unsigned              = false,
     14  Boolean $notify_update               = true,
    2115) {
    22   validate_string($architecture, $comment, $location, $repos)
    23   validate_bool($allow_unsigned)
    24   validate_hash($include)
    2516
    2617  # This is needed for compat with 1.8.x
    … …  
    2920  $_before = Apt::Setting["list-${title}"]
    3021
    31   if $include_src != undef {
    32     warning("\$include_src is deprecated and will be removed in the next major release, please use \$include => { 'src' => ${include_src} } instead")
    33   }
    34 
    35   if $include_deb != undef {
    36     warning("\$include_deb is deprecated and will be removed in the next major release, please use \$include => { 'deb' => ${include_deb} } instead")
    37   }
    38 
    39   if $required_packages != undef {
    40     warning('$required_packages is deprecated and will be removed in the next major release, please use package resources instead.')
    41     exec { "Required packages: '${required_packages}' for ${name}":
    42       command     => "${::apt::params::provider} -y install ${required_packages}",
    43       logoutput   => 'on_failure',
    44       refreshonly => true,
    45       tries       => 3,
    46       try_sleep   => 1,
    47       before      => $_before,
    48     }
    49   }
    50 
    51   if $key_server != undef {
    52     warning("\$key_server is deprecated and will be removed in the next major release, please use \$key => { 'server' => ${key_server} } instead.")
    53   }
    54 
    55   if $key_content != undef {
    56     warning("\$key_content is deprecated and will be removed in the next major release, please use \$key => { 'content' => ${key_content} } instead.")
    57   }
    58 
    59   if $key_source != undef {
    60     warning("\$key_source is deprecated and will be removed in the next major release, please use \$key => { 'source' => ${key_source} } instead.")
    61   }
    62 
    63   if $trusted_source != undef {
    64     warning('$trusted_source is deprecated and will be removed in the next major release, please use $allow_unsigned instead.')
    65     $_allow_unsigned = $trusted_source
    66   } else {
    67     $_allow_unsigned = $allow_unsigned
    68   }
    69 
    70   if ! $release {
    71     $_release = $::apt::params::xfacts['lsbdistcodename']
    72     unless $_release {
     22  if !$release {
     23    if $facts['lsbdistcodename'] {
     24      $_release = $facts['lsbdistcodename']
     25    } else {
    7326      fail('lsbdistcodename fact not available: release parameter required')
    7427    }
    … …  
    8134  }
    8235
    83   if $include_src != undef and $include_deb != undef {
    84     $_deprecated_include = {
    85       'src' => $include_src,
    86       'deb' => $include_deb,
    87     }
    88   } elsif $include_src != undef {
    89     $_deprecated_include = { 'src' => $include_src }
    90   } elsif $include_deb != undef {
    91     $_deprecated_include = { 'deb' => $include_deb }
    92   } else {
    93     $_deprecated_include = {}
    94   }
    95 
    96   $_include = merge($::apt::params::include_defaults, $_deprecated_include, $include)
    97 
    98   $_deprecated_key = {
    99     'key_server'  => $key_server,
    100     'key_content' => $key_content,
    101     'key_source'  => $key_source,
    102   }
     36  $includes = merge($::apt::include_defaults, $include)
    10337
    10438  if $key {
    … …  
    10741        fail('key hash must contain at least an id entry')
    10842      }
    109       $_key = merge($::apt::params::source_key_defaults, $_deprecated_key, $key)
     43      $_key = merge($::apt::source_key_defaults, $key)
    11044    } else {
    111       validate_string($key)
    112       $_key = merge( { 'id' => $key }, $_deprecated_key)
     45      validate_legacy(String, 'validate_string', $key)
     46      $_key = { 'id' => $key }
    11347    }
    11448  }
    11549
     50  $header = epp('apt/_header.epp')
     51
     52  $sourcelist = epp('apt/source.list.epp', {
     53    'comment'          => $comment,
     54    'includes'         => $includes,
     55    'opt_architecture' => $architecture,
     56    'allow_unsigned'   => $allow_unsigned,
     57    'location'         => $location,
     58    'release'          => $_release,
     59    'repos'            => $repos,
     60  })
     61
    11662  apt::setting { "list-${name}":
    117     ensure  => $ensure,
    118     content => template('apt/_header.erb', 'apt/source.list.erb'),
     63    ensure        => $ensure,
     64    content       => "${header}${sourcelist}",
     65    notify_update => $notify_update,
    11966  }
    12067
    … …  
    12370      $_pin = merge($pin, { 'ensure' => $ensure, 'before' => $_before })
    12471    } elsif (is_numeric($pin) or is_string($pin)) {
    125       $url_split = split($location, '/')
    126       $host      = $url_split[2]
     72      $url_split = split($location, '[:\/]+')
     73      $host      = $url_split[1]
    12774      $_pin = {
    12875        'ensure'   => $ensure,
    … …  
    14188    if is_hash($_key) {
    14289      apt::key { "Add key: ${$_key['id']} from Apt::Source ${title}":
    143         ensure      => present,
    144         id          => $_key['id'],
    145         server      => $_key['server'],
    146         content     => $_key['content'],
    147         source      => $_key['source'],
    148         options     => $_key['options'],
    149         key_server  => $_key['key_server'],
    150         key_content => $_key['key_content'],
    151         key_source  => $_key['key_source'],
    152         before      => $_before,
     90        ensure  => present,
     91        id      => $_key['id'],
     92        server  => $_key['server'],
     93        content => $_key['content'],
     94        source  => $_key['source'],
     95        options => $_key['options'],
     96        before  => $_before,
    15397      }
    15498    }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/update.pp

    rbcf0be5 rad28f83  
    1414      $daily_threshold = (strftime('%s') - 86400)
    1515      if $::apt_update_last_success {
    16         if $::apt_update_last_success < $daily_threshold {
     16        if $::apt_update_last_success + 0 < $daily_threshold {
    1717          $_kick_apt = true
    1818        } else {
    … …  
    2929      $weekly_threshold = (strftime('%s') - 604800)
    3030      if $::apt_update_last_success {
    31         if ( $::apt_update_last_success < $weekly_threshold ) {
     31        if ( $::apt_update_last_success + 0 < $weekly_threshold ) {
    3232          $_kick_apt = true
    3333        } else {
  • src/puppetcode/environments/gnuboat/modules/apt/metadata.json

    rbcf0be5 rad28f83  
    11{
    22  "name": "puppetlabs-apt",
    3   "version": "2.2.2",
     3  "version": "4.1.0",
    44  "author": "Puppet Labs",
    55  "summary": "Provides an interface for managing Apt source, key, and definitions with Puppet",
    … …  
    99  "issues_url": "https://tickets.puppetlabs.com/browse/MODULES",
    1010  "dependencies": [
    11     {"name":"puppetlabs/stdlib","version_requirement":">= 4.5.0 < 5.0.0"}
     11    {"name":"puppetlabs/stdlib","version_requirement":">= 4.16.0 < 5.0.0"}
    1212  ],
     13  "data_provider": null,
    1314  "operatingsystem_support": [
    1415    {
    … …  
    2526        "10.04",
    2627        "12.04",
    27         "14.04"
     28        "14.04",
     29        "16.04"
    2830      ]
    2931    }
    … …  
    3133  "requirements": [
    3234    {
    33       "name": "pe",
    34       "version_requirement": ">= 3.3.0 < 2015.4.0"
    35     },
    36     {
    3735      "name": "puppet",
    38       "version_requirement": ">= 3.0.0 < 5.0.0"
     36      "version_requirement": ">= 4.7.0 < 5.0.0"
    3937    }
    4038  ]
  • src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/apt_key_provider_spec.rb

    rbcf0be5 rad28f83  
    11require 'spec_helper_acceptance'
    22
    3 PUPPETLABS_GPG_KEY_SHORT_ID    = '4BD6EC30'
    4 PUPPETLABS_GPG_KEY_LONG_ID     = '1054B7A24BD6EC30'
    5 PUPPETLABS_GPG_KEY_FINGERPRINT = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
     3PUPPETLABS_GPG_KEY_SHORT_ID    = 'EF8D349F'
     4PUPPETLABS_GPG_KEY_LONG_ID     = '7F438280EF8D349F'
     5PUPPETLABS_GPG_KEY_FINGERPRINT = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
    66PUPPETLABS_APT_URL             = 'apt.puppetlabs.com'
    7 PUPPETLABS_GPG_KEY_FILE        = 'pubkey.gpg'
     7PUPPETLABS_GPG_KEY_FILE        = 'DEB-GPG-KEY-puppet'
    88CENTOS_GPG_KEY_SHORT_ID        = 'C105B9DE'
    99CENTOS_GPG_KEY_LONG_ID         = '0946FCA2C105B9DE'
    … …  
    1212CENTOS_GPG_KEY_FILE            = 'RPM-GPG-KEY-CentOS-6'
    1313
    14 SHOULD_NEVER_EXIST_ID          = '4BD6EC30'
     14SHOULD_NEVER_EXIST_ID          = 'EF8D349F'
    1515
    1616KEY_CHECK_COMMAND              = "apt-key adv --list-keys --with-colons --fingerprint | grep "
    1717PUPPETLABS_KEY_CHECK_COMMAND   = "#{KEY_CHECK_COMMAND} #{PUPPETLABS_GPG_KEY_FINGERPRINT}"
    1818CENTOS_KEY_CHECK_COMMAND       = "#{KEY_CHECK_COMMAND} #{CENTOS_GPG_KEY_FINGERPRINT}"
     19
     20MAX_TIMEOUT_RETRY              = 3
     21TIMEOUT_RETRY_WAIT             = 5
     22TIMEOUT_ERROR_MATCHER    = /no valid OpenPGP data found/
    1923
    2024describe 'apt_key' do
    … …  
    3034  describe 'default options' do
    3135    key_versions = {
    32       '32bit key id'                        => '4BD6EC30',
    33       '64bit key id'                        => '1054B7A24BD6EC30',
    34       '160bit key fingerprint'              => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
    35       '32bit lowercase key id'              => '4bd6ec30',
    36       '64bit lowercase key id'              => '1054b7a24bd6ec30',
    37       '160bit lowercase key fingerprint'    => '47b320eb4c7c375aa9dae1a01054b7a24bd6ec30',
    38       '0x formatted 32bit key id'           => '0x4BD6EC30',
    39       '0x formatted 64bit key id'           => '0x1054B7A24BD6EC30',
    40       '0x formatted 160bit key fingerprint' => '0x47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
    41       '0x formatted 32bit lowercase key id' => '0x4bd6ec30',
    42       '0x formatted 64bit lowercase key id' => '0x1054b7a24bd6ec30',
    43       '0x formatted 160bit lowercase key fingerprint' => '0x47b320eb4c7c375aa9dae1a01054b7a24bd6ec30',
     36      '32bit key id'                        => "#{PUPPETLABS_GPG_KEY_SHORT_ID}",
     37      '64bit key id'                        => "#{PUPPETLABS_GPG_KEY_LONG_ID}",
     38      '160bit key fingerprint'              => "#{PUPPETLABS_GPG_KEY_FINGERPRINT}",
     39      '32bit lowercase key id'              => "#{PUPPETLABS_GPG_KEY_SHORT_ID.downcase}",
     40      '64bit lowercase key id'              => "#{PUPPETLABS_GPG_KEY_LONG_ID.downcase}",
     41      '160bit lowercase key fingerprint'    => "#{PUPPETLABS_GPG_KEY_FINGERPRINT.downcase}",
     42      '0x formatted 32bit key id'           => "0x#{PUPPETLABS_GPG_KEY_SHORT_ID}",
     43      '0x formatted 64bit key id'           => "0x#{PUPPETLABS_GPG_KEY_LONG_ID}",
     44      '0x formatted 160bit key fingerprint' => "0x#{PUPPETLABS_GPG_KEY_FINGERPRINT}",
     45      '0x formatted 32bit lowercase key id' => "0x#{PUPPETLABS_GPG_KEY_SHORT_ID.downcase}",
     46      '0x formatted 64bit lowercase key id' => "0x#{PUPPETLABS_GPG_KEY_LONG_ID.downcase}",
     47      '0x formatted 160bit lowercase key fingerprint' => "0x#{PUPPETLABS_GPG_KEY_FINGERPRINT.downcase}",
    4448    }
    4549
    … …  
    6569        pp = <<-EOS
    6670        apt_key { 'puppetlabs':
    67           id => '4B7A24BD6EC30',
     71          id => '8280EF8D349F',
    6872        }
    6973        EOS
    … …  
    8690        EOS
    8791
    88         # Install the key first
    89         shell("apt-key adv --keyserver keyserver.ubuntu.com \
     92        # Install the key first (retry because key pool may timeout)
     93        retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do
     94          shell("apt-key adv --keyserver hkps.pool.sks-keyservers.net \
    9095              --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}")
     96        end
    9197        shell(CENTOS_KEY_CHECK_COMMAND)
    9298
    9399        # Time to remove it using Puppet
    94100        apply_manifest(pp, :catch_failures => true)
    95         apply_manifest(pp, :catch_failures => true)
     101        apply_manifest(pp, :catch_changes => true)
    96102
    97103        shell(CENTOS_KEY_CHECK_COMMAND,
    98104              :acceptable_exit_codes => [1])
    99105
    100         shell("apt-key adv --keyserver keyserver.ubuntu.com \
    101               --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}")
     106        # Re-Install the key (retry because key pool may timeout)
     107        retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do
     108          shell("apt-key adv --keyserver hkps.pool.sks-keyservers.net \
     109                --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}")
     110        end
    102111      end
    103112    end
    … …  
    112121        EOS
    113122
    114         # Install the key first
    115         shell("apt-key adv --keyserver keyserver.ubuntu.com \
    116               --recv-keys #{PUPPETLABS_GPG_KEY_LONG_ID}")
     123        # Install the key first (retry because key pool may timeout)
     124        retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do
     125          shell("apt-key adv --keyserver hkps.pool.sks-keyservers.net \
     126                --recv-keys #{PUPPETLABS_GPG_KEY_LONG_ID}")
     127        end
     128
    117129        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    118130
    119131        # Time to remove it using Puppet
    120132        apply_manifest(pp, :catch_failures => true)
    121         apply_manifest(pp, :catch_failures => true)
     133        apply_manifest(pp, :catch_changes => true)
    122134
    123135        shell(PUPPETLABS_KEY_CHECK_COMMAND,
    … …  
    135147            ensure  => 'present',
    136148            content => "-----BEGIN PGP PUBLIC KEY BLOCK-----
    137 Version: GnuPG v1.4.12 (GNU/Linux)
    138 Comment: GPGTools - http://gpgtools.org
     149
     150mQINBFe2Iz4BEADqbv/nWmR26bsivTDOLqrfBEvRu9kSfDMzYh9Bmik1A8Z036Eg
     151h5+TZD8Rrd5TErLQ6eZFmQXk9yKFoa9/C4aBjmsL/u0yeMmVb7/66i+x3eAYGLzV
     152FyunArjtefZyxq0B2mdRHE8kwl5XGl8015T5RGHCTEhpX14O9yigI7gtliRoZcl3
     153hfXtedcvweOf9VrV+t5LF4PrZejom8VcB5CE2pdQ+23KZD48+Cx/sHSLHDtahOTQ
     1545HgwOLK7rBll8djFgIqP/UvhOqnZGIsg4MzTvWd/vwanocfY8BPwwodpX6rPUrD2
     155aXPsaPeM3Q0juDnJT03c4i0jwCoYPg865sqBBrpOQyefxWD6UzGKYkZbaKeobrTB
     156xUKUlaz5agSK12j4N+cqVuZUBAWcokXLRrcftt55B8jz/Mwhx8kl6Qtrnzco9tBG
     157T5JN5vXMkETDjN/TqfB0D0OsLTYOp3jj4hpMpG377Q+6D71YuwfAsikfnpUtEBxe
     158NixXuKAIqrgG8trfODV+yYYWzfdM2vuuYiZW9pGAdm8ao+JalDZss3HL7oVYXSJp
     159MIjjhi78beuNflkdL76ACy81t2TvpxoPoUIG098kW3xd720oqQkyWJTgM+wV96bD
     160ycmRgNQpvqHYKWtZIyZCTzKzTTIdqg/sbE/D8cHGmoy0eHUDshcE0EtxsQARAQAB
     161tEhQdXBwZXQsIEluYy4gUmVsZWFzZSBLZXkgKFB1cHBldCwgSW5jLiBSZWxlYXNl
     162IEtleSkgPHJlbGVhc2VAcHVwcGV0LmNvbT6JAj4EEwECACgFAle2Iz4CGwMFCQlm
     163AYAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEH9DgoDvjTSfIN0P/jcCRzK8
     164WIdhcNz5dkj7xRZb8Oft2yDfenQmzb1SwGGa96IwJFcjF4Nq7ymcDUqunS2DEDb2
     165gCucsqmW1ubkaggsYbc9voz/SQwhsQpBjfWbuyOX9DWmW6av/aB1F85wP79gyfqT
     166uidTGxQE6EhDbLe7tuvxOHfM1bKsUtI+0n9TALLLHfXUEdtaXCwMlJuO1IIn1PWa
     167H7HzyEjw6OW/cy73oM9nuErBIio1O60slPLOW2XNhdWZJCRWkcXyuumRjoepz7WN
     1681JgsLOTcB7rcQaBP3pDN0O/Om5dlDQ6oYitoJs/F0gfEgwK68Uy8k8sUR+FLLJqM
     169o0CwOg6CeWU4ShAEd1xZxVYW6VOOKlz9x9dvjIVDn2SlTBDmLS99ySlQS57rjGPf
     170GwlRUnuZP4OeSuoFNNJNb9PO6XFSP66eNHFbEpIoBU7phBzwWpTXNsW+kAcY8Rno
     1718GzKR/2FRsxe5Nhfh8xy88U7BA0tqxWdqpk/ym+wDcgHBfSRt0dPFnbaHAiMRlgX
     172J/NPHBQtkoEdQTKA+ICxcNTUMvsPDQgZcU1/ViLMN+6kZaGNDVcPeMgDvqxu0e/T
     173b3uYiId38HYbHmD6rDrOQL/2VPPXbdGbxDGQUgX1DfdOuFXw1hSTilwI1KdXxUXD
     174sCsZbchgliqGcI1l2En62+6pI2x5XQqqiJ7+uQINBFe2Iz4BEADzbs8WhdBxBa0t
     175JBl4Vz0brDgU3YDqNkqnra/T17kVPI7s27VEhoHERmZJ17pKqb2pElpr9mN/FzuN
     1760N9wvUaumd9gxzsOCam7DPTmuSIvwysk391mjCJkboo01bhuVXe2FBkgOPFzAJEH
     177YFPxmu7tWOmCxNYiuuYtxLywU7lC/Zp6CZuq57xJqUWK47I5wDK9/iigkwSb3nDs
     1786A2LpkDmCr+rcOwLh5bxDSei7vYW+3TNOkPlC/h6fO9dPeC9AfyW6qPdVFQq1mpZ
     179Zcj1ALz7zFiciIB4NrD3PTjDlRnaJCWKPafVSsMbyIWmQaJ01ifuE0Owianrau8c
     180I264VXmI5pA9C8k9f2aVBuJiLsXaLEb03CzFWz9JpBLttA9ccaam3feU2EmnC3sb
     1819xD+Ibkxq5mKFN3lEzUAAIqbI1QYGZXPgLxMY7JSvoUxAqeHwpf/dO2LIUqYUpx0
     182bF/GWRV9Uql8omNQbhwP0p2X/0Gfxj9Abg2IJM8LeOu3Xk0HACwwyVXgxcgk5FO+
     183+KZpTN3iynjmbIzB9qcd9TeSzjVh/RDPSdn5K6Ao5ynubGYmaPwCk+DdVBRDlgWo
     1847yNIF4N9rFuSMAEJxA1nS5TYFgIN9oDF3/GHngVGfFCv4EG3yS08Hk1tDV0biKdK
     185ypcx402TAwVRWP5Pzmxc6/ZXU4ZhZQARAQABiQIlBBgBAgAPBQJXtiM+AhsMBQkJ
     186ZgGAAAoJEH9DgoDvjTSfbWYQALwafIQK9avVNIuhMsyYPa/yHf6rUOLqrYO1GCmj
     187vyG4cYmryzdxyfcXEmuE5QAIbEKSISrcO6Nvjt9PwLCjR/dUvco0f0YFTPv+kamn
     188+Bwp2Zt6d3MenXC6mLXPHR4OqFjzCpUT8kFwycvGPsuqZQ/CO0qzLDmAGTY+4ly3
     1899aQEsQyFhV3P+6SWnaC2TldWpfG/2pCSaSa8dbYbRe3SUNKXwT8kw3WoQYNofF6n
     190or8oFVA+UIVlvHc5h7L3tfFylRy5CwtR5rBQtoBicRVxEQc7ARNmB1XWuPntMQl/
     191N1Fcfc+KSILFblAR6eVv+6BhMvRqzxqe81AEAP+oKVVwJ7H+wTQun2UKAgZATDWP
     192/LQsYinmLADpraDPqxT2WJe8kjszMDQZCK+jhsVrhZdkiw9EHAM0z7BKz6JERmLu
     193TIEcickkTfzbJWXZgv40Bvl99yPMswnR1lQHD7TKxyHYrI7dzJQri4mbORg4lOnZ
     1943Tyodv21Ocf4as2No1p6esZW+M46zjZeO8zzExmmENI2+P7/VUt+LWyQFiqRM0iW
     195zGioYMWgVePywFGaTV51/0uF9ymHHC7BDIcLgUWHdg/1B67jR5YQfzPJUqLhnylt
     1961sjDRQIlf+3U+ddvre2YxX/rYUI2gBT32QzQrv016KsiZO+N+Iya3B4D68s6xxQS
     1973xJn
     198=mMjt
     199-----END PGP PUBLIC KEY BLOCK-----",
     200          }
     201        EOS
     202
     203        #Apply the manifest (Retry if timeout error is received from key pool)
     204        retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do
     205          apply_manifest(pp, :catch_failures => true)
     206        end
     207
     208        apply_manifest(pp, :catch_changes => true)
     209        shell(PUPPETLABS_KEY_CHECK_COMMAND)
     210      end
     211    end
     212
     213
     214    context 'multiple keys' do
     215      it 'runs without errors' do
     216        pp = <<-EOS
     217          apt_key { 'puppetlabs':
     218            id      => '#{PUPPETLABS_GPG_KEY_FINGERPRINT}',
     219            ensure  => 'present',
     220            content => "-----BEGIN PGP PUBLIC KEY BLOCK-----
     221Version: GnuPG v1
    139222
    140223mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b
    … …  
    150233f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB
    151234tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL
    152 ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn
    153 AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob
    154 pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF
    155 eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+
    156 aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M
    157 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ
    158 VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU
    159 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh
    160 qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1
    161 IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8
    162 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp
    163 HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN
    164 MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+
    165 UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh
    166 R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+
    167 N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc
    168 kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e
    169 lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT
    170 DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb
    171 kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf
    172 DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei
    173 BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z
    174 XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2
    175 +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU
    176 fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH
    177 dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4
    178 qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2
    179 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq
    180 UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x
    181 Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA
    182 KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3
    183 okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7
    184 bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4
    185 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX
    186 vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0
    187 jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y
    188 ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD
    189 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR
    190 M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf
    191 REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y
    192 DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk
    193 ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU=
    194 =a34C
    195 -----END PGP PUBLIC KEY BLOCK-----",
     235ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokBHAQQAQIABgUCTDfARgAKCRAhWv5Q
     2365BRwMq8TCACgG44+c+KgHBinygdU9Oj/r1wmfXbbmR+tpRgZ5sJytHC6gp3wjKFH
     237XrmddgmYPzKsAUGTxJxRUqxD+lKeo2sEKuXNAPo1C+4hZUV6Ah2N1qytZfpLOP43
     238U6WVvMgluQTl6jRaMIwQolUj8ZNjYCdNZQCbfo8tALkedIBPKSrDF5kOwn+zxFyR
     2393v5A3mwFXK0bepvjlDuMsmktwk7opgfivP1mA3svPLIZu70PKk+u6UAMb06svt6V
     240SewYMbgTUzw+SCT1e/0xEpqjUqNgsPnPE6hW116goRB2cz6VYwmKfVe+ioljsVMM
     241mTqj5xWqoeR0ov6yCyxwVVCWOAIR3QSAiQEcBBABAgAGBQJUCeGFAAoJEBM5V+oR
     242Ao3zE3AH/1GQTS4JX3kS3WXE2Pi8L+gGylfYsf1dDbaDBX8mPfxKO6usZZmX9fIu
     243qQwQDIEksGrdcb6nrGecHufJDbLmFZiE77LjjoREFlG9tEyaIAVSCw/vyng9wVo8
     244InDF7j1VHuUueh6eu+yvLjUrFuh3CVNHcx2rEIFzx+X5660TbbRfMgxLpTMkkb4w
     2457DQjCUmFQD4yLzZzXAzjELc/TgsFGZc3lxo7UuzwX0ZEm15WjrdYwvtMU1TGjjI2
     2466dgk24K3Kb2OeUnCybQ1mLx6qVx0aFd21beKRG9u3Stp8HHXpfLh/aznbCY5JavO
     247ShOXgNgq3f0/UImLjyuFv27x0HQFxfeJARwEEAEKAAYFAlQHuw4ACgkQpHBvotfb
     248FDW/pwf+J6JBPpUHi/EsuLLbqDTQjGbnMTsH35pZRApKheaISPRZH8oqgdmWE599
     2496e5GwnXMoBJoUvU0VbcO7aEarWlKmO6dpTKsfvjP+PtiSBeXUa8ewNcTq5N0Z7O5
     250IwF2CiHrSTEcySjjboMKJHS/vQCmsLg1j+MA7wq3quzX0vQsGBX3X1x+n2KOH4s8
     251BGoXFJs6sM1SInnqkPwryCesj61zc9I72kTM6IsG17X586INWMHoMDzpF/hTWKKw
     2522c0kFMDIJDpU+KBKr/e4mbKrp8ToP64GjB0MOx6MqjZI6I3k1PQu8zgWmOQ+yQhI
     253e/UfB8u+eGbhDwUMqKBEHUzV3b5lj4kCHAQQAQIABgUCUeTczgAKCRBKMwua1kj6
     2544/mED/9RNl8PfjS6SKnqM+UzPHBIP9BqnC07sPiCwZOxd7MOQ73sPbV3Wk1o1PRG
     255tcAxqDCTUSUPGaf9gdQN8yi9lrZspqCNaZXfzGRaz4+uHU/ji9QMbfQIBTopn6ZM
     256YtRuiV868N98JOb0yfWLaTEVonFtWFZHrNHbwplHbyzUgGyup5MKSxh90p2S7DX+
     257PznSFbwwzeE8En/jxUvHlAQV+eVfC3V+n4vKAC+sjInDu8m2xr1CMIiRCTa1y/vu
     258uGSJnoAO2GBUjHmPfINZKbicuoWnBtBMqs1GsJvldsv+ggx4cm4UgJvYdyQNLUq4
     259pceaq8O4uhGvT/AURkymzldB6+iZRrsmQx5LmP0C5sIbiDXMoS089oYOx8MoGWMI
     260cErBTKxCPmgZTnDxW+U4+dLrYMF+yBTbLmKmaYhNiSNI4votfA7rEbn+zEDxzKgl
     261KZs3bzqKZxjoAeWhOKK7r83tSz4I2uHD9XscC6fnp61YGfdtlYJEYYA8XeomvjLa
     262xQxjQTcdrs48Qcgp8FvgyImelee1ZPbydB8Xd2VMVO2EDPBydlyHHZ6zjKt8Neff
     263djh6KyrFYJtOW4StdSiBQQofUqiFJq1gy3F6dy/ttSXMivbbNJQJjJV/1zKDnSQH
     264L7Qnux4SmobkrlHzP2z/rcFPk6CGaLpsHazmIrl8G3dO7UhinIkCHAQQAQIABgUC
     265VAesWAAKCRBGnps2mw8PHet2EACTyXdYh4kXGgSwQpY8hUJwd9FPrXPyYMTfeJFq
     266kIBpG/q60Q72Kqvn0AqUSmnROoKzPnwYW/jE+89tx1JBAT+8EtRAJvJaNH9Hovw4
     267S3GV5wqImdsmIqJUxl8lh9moB9zfpsqWz2Laa1Xn/TGwmLl/zFL0PWQ4rv8r6pZ/
     268OhEE/pnqZDLh/+6PxYmQRsIvDfmeVd57XSYLnT6JNXkAYBnmMouw+L7b2B9LWMIs
     26910lfjdOCplNE1FCTFS7K/j13x8Cyul6yF6eeq+rd5ftcw84XW+1qh3Jsw4bSNc0Z
     270LvGh7zgRznEWhxZrcGzWwtxnEG1aW7wXiDJ/kqAvBNP1LOhIQQH2NVp3oRW+hB1o
     271Cb/pbIht3xin7g5EJ0cpplTKNvfVdcitIflpgV9CT51oNkV7dVCtkXbFxwGdxP1L
     272CnYmfJ8IBumX6a3ue741E1tHHp2dZOHXWiMUI6TjYISQjx4KiiFTXJRpMsm5AQDi
     273ps+TSnF5TsNJ4776aAhP0hTN6Wy864NRoWEPs9OHltmZFCHzzTixQZrNxaUvLALP
     274vCmQ++U8f4mxD1+/eLXSzcfWolUoqyneTH/DEWpYXaoE5NalLfmoH7WxCR32LXWR
     275tJ748SZXI5SFjOzIzLsFr/qq36hGqDb7fqsc4LSz8uvJYo7vAdvkSUL2mkHeX4lD
     276QzwR/4kCHAQQAQgABgUCTPlA6QAKCRBcE9bbkwUuAxdYD/40FxAeNCYByxkr/XRT
     2770gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAfDzVfqWjC0G0RnQBve+vcjpY4/rJu
     2784VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaeiBPSb3ip3P0of1iZZDQrNHMW5VcyL
     2791c+PWT/6exXSGsePtO/89tc6mupqZtC05f5ZXG4jswMF0U6Q5s3S0tG7Y+oQhKNF
     280JS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2+zeHzuRdRWGjb2rUiVxnIvPPBGxF
     2812JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpUfCw/WRT3gGXJHpGPOzFAvr3Xl7Vc
     282DUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucHdvE4SIKQ77vBLRlZIoXXVb6Wu7Vq
     283+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4qGTXQy/E9+dyUP1sXn3RRwb+ZkdI
     28477m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F27mfo0/522hObhdAe73VO3ttEPiri
     285Wy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzqUuWjBmZ35UlXjKQsGeUHlOiEh84a
     286ondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7xKk+F0qb9+/pGLiT3rqeQTr8fYsb4
     287xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIAKAIbAwYLCQgHAwIGFQgCCQoLBBYC
     288AwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3okvW7DAIKQ/9HvZyf+LHVSkCk92K
     289b6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7bdtWjAILzR/IBY0xj6OHKhYP2k8T
     290Lc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz44B0bPmhiE+LL46ET5IThLKu/Kfih
     291zkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gXvSZKP3hmvnK/FdylUY3nWtPedr+l
     292HpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0jIq2V77wfmbD9byIV7dXcxApzciK
     293+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863YZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre
     2942VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD7xBI7PPvOlyzCX4QJhy2Fn/fvzaN
     295jHp4/FSiCw0HvX01epcersyun3xxPkRIjwwRM9m5MJ0o4hhPfa97zibXSh8XXBno
     296sBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUfREsFmNOBUbi8xlKNS5CZypH3Zh88
     297EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5yDHmg7unCk4JyVopQ2KHMoqG886el
     298u+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAkugVIB2pi+8u84f+an4Hml4xlyijg
     299Yu05pqNvnLRyJDLd61hviLC8GYWJAj4EEwECACgFAkw3u0ACGwMFCQPCZwAGCwkI
     300BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBBUt6JL1uwwGWsP/2i5hP3qG6V6SFFc
     301glFkMRLz7TP4f0gCbBtyqBzfbttensLPlB7C/+xfdXHlV0EHQ9nvArWFhXizTNEU
     302jPYvyjOtIOAryEJZjanaoYtR7IBqiJ2e9v1ywF7p9IGm3wt+qy8MNpHpfmjKUX+f
     303Eq0rrJGN9tTZzBCZeDrB1doXzbQCIMNnv85vUYaDKRisaB2QrxYZz+7tjNsDKu4j
     304Qw1m+nVbC6c3ZVX9uNswm7mzwscUFzqQOeq85FD7ifOZnVcOItfaDyBSGVS+aMIr
     305dUsQjsQYOG/KGjEt+oRJd6rWRvN+K7S33KgJqo4cemibiSzgGDfOEIwxFNzSOSHz
     306UTL5biHk3A+A7eRQmGoTdOObVtUXOrORgEfEVuORmMEA8xvpJJHnhscBIaglu5zh
     3077sGSKFSbnzYXdvFBZ/NyhiRwkLeDQQa9yuU3GOmw0BCK6UqZVkgwW3d6dSGqGWNV
     308kg3T/Tk1Tkm7M9CYoJVplFhlgnXfwjElvw+/91VDiTmEQ8Kbb7UmHIyXPNVFftcw
     309fq7eS2vzlnuFDjkQ/o1NQE4o0BGhWMQW6gQZBW6ABF6vW7UUMnoKpPnlaR4c2nD+
     310TWBUzE4bx7k2qTcrXArKOWrv3DMsKgoGNQ33DCco6HLuGwrawHesOJBijTFHcDQ2
     311ELpR2QyPlIySJ4a2psp4Hc2S43XhiQI+BBMBAgAoAhsDBgsJCAcDAgYVCAIJCgsE
     312FgIDAQIeAQIXgAUCVwb4BQUJDDXSzQAKCRAQVLeiS9bsMLwBEACtdY+PvfNw8SFu
     313RpIM2rvdjGsEfJPKpUK5Dx90m1NSVyhMwQeYLdBb0GGgeGjjX8E5kCqhsD53VPWH
     314AD13nPc3zCeiDJiwpjYXeuGIH7AOG+gZZDLdy14myEN0JQIXQslOK8SiaTn/yI4s
     3152Lrje0Ubf6wbJ3uX9MwsqIkugkJrYn9e1BC1uPgESbE1SjiIbB4iL8lrxE6fdyxc
     316QnUEzneOFQ9kScfPc/M5U9COMuQOuoefiAEh+FRrjxf9ag3NzecTlwk/EdpgmfSj
     317a+ClS+BJv83zYForrHRfUU1SDiueuWXAH1OTaUpAsZIiXpigTB4X3hLJXB1iKoA1
     318TEM/9bZGPdJsS1mwUUy3ukDW1rhOodxojhN1XhT3f7X9Cl8lKxKw1tloRijfL3n4
     319njwk6hEyKaURTo4iOs12HDlBZV3zhWONNZTvqrFMkz4OB+q8RGpfO8G4Mbba+fNQ
     3202At+cAWmGCoZeX3KfyRtqYe6vtKJf5ptQZgjl3EFPl6OxKjopzomB7o9lXbxARgO
     3216Pf9NSyYwlv0sNfy88N5iSsa7Sw7yi9t9tO5KFGoGYLmXXgyjvNZrE8KMh6/hJOW
     322HsW19noVdogd73q+gjRAl+eZ4J1nKpbSPkbufNoD8uB/j3rr5/sRJrtvVnMTJXwC
     323iTItalyg7XRJSQ9kAqzvRlxdGobo95kCDQRXtiM+ARAA6m7/51pkdum7Ir0wzi6q
     3243wRL0bvZEnwzM2IfQZopNQPGdN+hIIefk2Q/Ea3eUxKy0OnmRZkF5PcihaGvfwuG
     325gY5rC/7tMnjJlW+/+uovsd3gGBi81RcrpwK47Xn2csatAdpnURxPJMJeVxpfNNeU
     326+URhwkxIaV9eDvcooCO4LZYkaGXJd4X17XnXL8Hjn/Va1freSxeD62Xo6JvFXAeQ
     327hNqXUPttymQ+PPgsf7B0ixw7WoTk0OR4MDiyu6wZZfHYxYCKj/1L4Tqp2RiLIODM
     328071nf78Gp6HH2PAT8MKHaV+qz1Kw9mlz7Gj3jN0NI7g5yU9N3OItI8AqGD4POubK
     329gQa6TkMnn8Vg+lMximJGW2inqG60wcVClJWs+WoEitdo+DfnKlbmVAQFnKJFy0a3
     330H7beeQfI8/zMIcfJJekLa583KPbQRk+STeb1zJBEw4zf06nwdA9DrC02Dqd44+Ia
     331TKRt++0Pug+9WLsHwLIpH56VLRAcXjYsV7igCKq4BvLa3zg1fsmGFs33TNr7rmIm
     332VvaRgHZvGqPiWpQ2bLNxy+6FWF0iaTCI44Yu/G3rjX5ZHS++gAsvNbdk76caD6FC
     333BtPfJFt8Xe9tKKkJMliU4DPsFfemw8nJkYDUKb6h2ClrWSMmQk8ys00yHaoP7GxP
     334w/HBxpqMtHh1A7IXBNBLcbEAEQEAAbRIUHVwcGV0LCBJbmMuIFJlbGVhc2UgS2V5
     335IChQdXBwZXQsIEluYy4gUmVsZWFzZSBLZXkpIDxyZWxlYXNlQHB1cHBldC5jb20+
     336iQI+BBMBAgAoBQJXtiM+AhsDBQkJZgGABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX
     337gAAKCRB/Q4KA7400nyDdD/43AkcyvFiHYXDc+XZI+8UWW/Dn7dsg33p0Js29UsBh
     338mveiMCRXIxeDau8pnA1Krp0tgxA29oArnLKpltbm5GoILGG3Pb6M/0kMIbEKQY31
     339m7sjl/Q1plumr/2gdRfOcD+/YMn6k7onUxsUBOhIQ2y3u7br8Th3zNWyrFLSPtJ/
     340UwCyyx311BHbWlwsDJSbjtSCJ9T1mh+x88hI8Ojlv3Mu96DPZ7hKwSIqNTutLJTy
     341zltlzYXVmSQkVpHF8rrpkY6Hqc+1jdSYLCzk3Ae63EGgT96QzdDvzpuXZQ0OqGIr
     342aCbPxdIHxIMCuvFMvJPLFEfhSyyajKNAsDoOgnllOEoQBHdcWcVWFulTjipc/cfX
     343b4yFQ59kpUwQ5i0vfckpUEue64xj3xsJUVJ7mT+DnkrqBTTSTW/TzulxUj+unjRx
     344WxKSKAVO6YQc8FqU1zbFvpAHGPEZ6PBsykf9hUbMXuTYX4fMcvPFOwQNLasVnaqZ
     345P8pvsA3IBwX0kbdHTxZ22hwIjEZYFyfzTxwULZKBHUEygPiAsXDU1DL7Dw0IGXFN
     346f1YizDfupGWhjQ1XD3jIA76sbtHv0297mIiHd/B2Gx5g+qw6zkC/9lTz123Rm8Qx
     347kFIF9Q33TrhV8NYUk4pcCNSnV8VFw7ArGW3IYJYqhnCNZdhJ+tvuqSNseV0Kqoie
     348/okBHAQQAQoABgUCV7d12AAKCRATOVfqEQKN8xl+B/0cdW8EhjyBXFWi4B0RzVXR
     349TIi5vUEe2mL+/cwt/qD70VJbe6Vy2X1VwGX5QrpMtjSnouGAa7aMU+oYXlzz+RPW
     350MtJTWMMVgOidRnAWw61wFAabZLFyJfVUg/QxI/sUQYkA3VC1XxSHLK+bjfglULRC
     351Q+JKpuK2D1jz0SrJhQtX6IGkVmT0t1tlwMUWhW3EIuHpc8TwvgxP0wjg8KLd01vK
     352KJTRLNb6Z3pFlT8rEF0Cw5LFReJM8i4+w1DqIy18xMkuDh09WBJhhCUH8LIHgGlz
     353D5p3fRmbtkW6T/wpjP2XR+eiGABJ0nr4WTDAwWn9SxnjXapp/QvKd+lOPRYUqRB5
     354iQEcBBABAgAGBQJXt3igAAoJEF5FJ36WgCWsN2wH/RBYyRHcIXW3F3oYS884JNj+
     355KA4Fl04kmuF9oQ3OnF8JYaYyZ1uuRErGH1UB8BVxTudKcowGCYi8AV4iQHSLx5dr
     356qY0w2MVlcxC2+8vUYEHYXU2i9EoGa6vwIJU+oSB/evnCJGe5DmzR6EbgQPADlkX3
     357IW8GzrnPionDJhP7POwOY4HNOOBRm6AfAE3JMjH++TUuEgAuB0urjCNPmZ2/t9ic
     358uSS5hDp5HepoaQ2rfEI1Df+/wd8vXAD5Zdi1wZhmDWX8pq/spdAgV4/kMlcKzdRS
     359FINyA4wajLVLfsYPavBCW18aHV6pEBc9mdhQ3xsqardcnyX+rd9kMgXKsG69WAGJ
     360ARwEEAEKAAYFAle3ca8ACgkQpHBvotfbFDWkRQf8CZtvvGM1sHJk7l07KDmG2zSM
     361rWb/GPsySK+DZRZDBJz3m7FWazWnfb2cuqRSMnoDDvnjg5EVSFqdZ3GaTsjKFBNe
     362NnLp/dC+sjSfKoi+a1iCP5wuhiXOwwWz4O45ekYUKrIwCXh3C32mtnqc6460YQwp
     363a1pdGqEeGq4aqcZPHUYAb294GuelA1TUkxibCIIDo5f223UNwGV3m9LPTyf0uOwO
     3641cht4ZdvccWBFXuDvzMQ9AGh6jHq8SX1uopQkEOY8AY53Lul6ubHzoHIvrld/GaQ
     3659osF1dm2/llGtHbQDqnVYVXg+lLNqW0u6JhNSE/EHDi9S2zWmK8J60m4akJRRokB
     366HAQQAQgABgUCV7eBzwAKCRDfnAdsUd5/xDeuB/0aVR8KKFpEjV+mYspTMJMUi0ku
     3670iqXYqVmvMCfrwP2fzKu2MbLqWjgutG9RiwtrMmqaRPx+AYGJMU6k/TVd9bxWP8+
     368vxvZzsEz9lPIoH6xCEAgA6AQ6TIYswwU0G6duR/iRUtn57oTixfoFazUFXriY3yk
     369gAeSphPmG2ZBVU/VEvht6qjkKrxIT46sjNEl5+5R3R9EekrW19D9S0TjtjPOGjfo
     370+6ZMxKWlGW5gCREliuSTQY1/56MTQdrA6bFdiim0TPftC+aK+6l2kzTyVbygBPPo
     3718/p30iOYHOX179HZNwGyGnP9fNxaURLsx7Zymaf2esA4mGVApDDE6QrZbeGHiQEc
     372BBABCAAGBQJXu01KAAoJEOe7Y9N+knoevtAH/2VjCnLU1xc25iuIDnDKtPdgdclY
     373tV5w4kLpDxo1WTieCPOjSK5Xbsfe9eSSSqjgsHm1EkejunzuDcmm57LXfcdf3MA3
     3741u6qIkS/fdctj9hkEMonEeWN2NnyYLAkcjWf6+I4u/qhM8BdoT/UmB80rgdq07yr
     37514zxMhetoZaqcLMCtZuaVpQMmoa/SbaADQSISiYRN3xWeZUmeWBjU10avK7YeRMN
     376tyYTCAsRCvrwcKTN9XKdzHgm5kMZfo9UDuqnD2TsUxDwRcwYfe1+ZiHWV6sWZtGv
     377zPqJ4t7fUO8tlo3LnCCdZRXp3U5i9G8f4xZCkH0fY2kEMHMxOn4T5NS1WxmJARwE
     378EAEKAAYFAle3euIACgkQutXwo5LphXJtOAf/QvpHm4MsGYMFe0GamNcfCqgPQBfr
     379+/7SIreIG9BJDpsB+JkNZX3+tcZR5m7tfXl7Zt8+t+ENJVs62FPPzOA8EuXQAMGW
     380NkyQlV9Y4lFerccUX3gK3rP4BMxTQ372quGXfOIeYwUmTEPaA0me6M0ODla3jT+g
     381dl9HSwCCLTfv4/2djK/Oi/+m1r3grfeFLbOjoznR4xZoPbWFBWCn7iweWE3B6r1X
     382n+99DEaLmuEG4Mk8ohlKzIgReZ1wTkHcIt27GG60to8TUhbgqtGcOtE3Qc9hxZXh
     383wRbYaNFM8gkIAmo4eJuuWd+VWjnMeFH9JKtcrSEgMhI/qyt97c8g5497sYkBHAQQ
     384AQoABgUCV7d67gAKCRCCRVGYVPwajc8QB/93fnBi8sKAaaWIjFA5ZrZkjZEsVE2a
     385y8G4hCKUPFk8qwacVSC78I/yFqZPhy1DE2zsXEQEdu9VBNxVvEHuRBrs79XU7L92
     3868xtdzEZF06my+xqYhhgBTqK1VguU4ayD9jKNgE1jGjPnHPFcjLaadyEtDDk9MMwC
     387fzvtFPGepRi1LYRMYxR4CNxAvAlgb0uVnZ+9dEfo9nfBfRL7ACLtnQbkazJZXyfP
     388zKeRmxlA9RTRlGm+ufHN5TgzsKFiTBbkQOF51ItAVJcKZVEARuyuMqWXIlZyURXq
     389kG9x1jAx0oZDW2iVRb6Ft21pAJd5P1ovGacX6EhTubAeAmlkqvmuPh3viQEcBBAB
     390CgAGBQJXt3sHAAoJEDy4a/JFI238WrgIAJS1gtpqw/tzyeAgopnKUyl+/ocCWoye
     3910wkS4/9QLzttQ718oDeb1EIcGnQEkazES1NAPoHAnc6TbvPfu71sfPqiTVMRE4VI
     3926AwXdjNT8ZWi0ip8fog1YVzFBxxMpYThDAPqkKPQG3kj3TAUMpmTlM/h63ndOOOU
     3935clUmuqT2agX7Xo/lP4qApcvcXe/EhwtWttYkFW9pPtjXUoHA7R4iEw/HZZRGvgi
     394RRuVkVnta63SBMasyypO8Km35dg/UAE4RRsPV1QLwl+uqgvD6zGt3A8+GNEXoAki
     395agKt8GJ43DlsD8aDkFzsp0E2iQ+idkqkqy7FXJMe4eG/LL4WG72fNL6JAhwEEAEC
     396AAYFAle3e60ACgkQyXOBc2z4R/lCtQ//SCePwH2R35N2h9EMYsCH9iypJmFWMcwN
     397HlEXOKmJrQ3viD0X3iXEa2SNRKKK7Evn3ggN9zbKwLLBIvZimut8LBLiF6TFnK/u
     398+8kZxGHLW0dhR/IokUY5zadx/E1F0C0IAkY7hNh791K6e7rwjw49pxSUnAQ00YMc
     399hNFeuq+IRtty+Jnw8uYz9m5CRAzBqPeAQ3mtXeYgkNPWEMQSTW5FDHnINlZItup9
     400BSwIQxYJymKFkG3YxcJsx18dQNuVdzhg81b4XS35C2mOjlOhUsD+5Pp+8L0SQ3GC
     401u3qj/xXazdB9U0yJIs0u3JYb1Rl73v/fQji6UYyU/4TbEAhjl4n8JRgje1bJ4W1g
     402ugjalCM9YVaLrgjf5CIf0t8rn3G4Hl26ddNm/VroTCMLKXvg4kdFKF1oc6xImqoo
     403WJblVa4B4la9LxuRsgN9PamGlBUg1cDUftjpSstW1PYQPiGhc0jJh8vXNmIg5fzq
     4045dcLLWXOlrQOkg4ce30YzDculzn6ntBl30sCzVi/hxQrX3c0cpAqgRT3azAkO7JT
     4054J8fXO8CyAwuXjpDv6g4N9xfIdgTrbtqgnZb3MzOzpd11s7Q6ypCcEZVxt+FKVS1
     406LgzJoWMQNVJ31sBwI1KenfB2/YfF6uILtpdFM+soKt86IvQub726rw56JWrIiP8w
     407+ojBTcDZGM6JAhwEEAEIAAYFAle3gC8ACgkQEFS3okvW7DCFfQ//SduNnxVJqud1
     408+c1B+N1G/M3jfkMvSb6Sujb5/4qu5yL2Yo/PoTHesvqkFh5zILGuepCLI4ravZd7
     409zyxy31o+egTC+adR4s6118k9swe9XDuZ+SNxBhK9A18pnaPcwa6b0j2q5KZI4klF
     410DKCg3u+D6qJQ3jqMPKbfPymVn1LE4qzkj/SXll0Nxkw7jIapn30UNONdY+q2nXpZ
     411Ej4xI01X66v9Zh/IRj8H0jwtJsTKfAoCkRmE9aJW4ywDUMJ0iHAqxYuGX2y617F6
     412b1IY1JoWvBlNDTlCwj0v8xF6CK02JQecKhHl9hvAoAuJDhGIqSGkKH3ENAOFN6I0
     4137orX6UrHDafphfqLYmEYCHJhz/QXC6Y4hxWS4cpcGbNqzfoerFkQimi0FT2lLPtn
     414DH1OOvBvibKAVKkifkAUjYCGN4EJYI39x9VX1I++sqoXWZoAgRTGd7Ppm7PQFdvM
     415pHQYDMLIzdFex5xvcQGrga1r7kOjUgpSP3rqBTgNfZtDNRucQE1iLOCu6Iias8HW
     416B66ya5eN7tpAN3vXvtMs1qpOU7748HbUKTOPvccj6abxJ5OKFluK286eLMXW1hHP
     417rB8I1WuIyYuqgtyuvdiRqhq0d+LyWuM2ZVos0usa03OtAuvnlaaTLE4qsW0cc73l
     418TAUI89WEAZ4yrD+IIVbR8WNv+F0O0GaJAhwEEAEIAAYFAle3ge4ACgkQhyhST+Id
     419P8Y9VBAAij8tXwW0Kl/cpJo0AEh1zPObs2ChFucwdj3DIbMOziV4d3cD/agGTL2H
     420rjNQnfGqr+oxvBOPGTXFJGllhmXYFISWdWQFGNM0G8XF0/zlnMP6c7XEpmUmr0O1
     421OQuTVi31lY3kBmFLuZiTmN4YENIo3vCG1z7P8hHb3jpDUR4112KZdqWnvTGznDsA
     422lFTiNdlX9bU7eoQtFC0bueYv+rvHQ3PdzT4O8NBPuRhrfqVaaCUOERlUGuqjJzlK
     423TfxRq949Ts7piTqlnwIgw+mWfuvyVtKcRnrIkTSMmDcojKnYmi8FjRQoEyZp5DOZ
     424NLoJ5OMLCb3gyjQDLtGaPeDuLBiAPfb+dB+FtTplwbeevpOks/Cnbr8eCY2DflMd
     4253cgOA7xT5NyoZrUY9nhlRGStqIjJ/QrB1orFt8hqisshGJLgGp+64wvbFORgXvcY
     4263M2qoSeCRz03IFjeIf58TxcmaTC+aYffWTFKuGmvUKNCbGod20MyRtl5/xzQ3K5S
     427bt9u6MXeLw50psnu/GzQEgN52dU36fsh3XNWQrlV3YdTihJHTSeFAs1LA/eg/qJL
     4284WPGXmg/sBHFXuv4NC7aqI+0sUjlZfDk3aJCZHmnBTQ8izuvlUhhYy3+8N5D9i5E
     429KjaIAsEoHGIljwcenI5lLZNSNqlREW3ZED7vJZrbblOWq7ezlhKJAhwEEAEKAAYF
     430Ale3e7cACgkQAl2/Z5bsLy5UhA/+JZ/I5Zscici5SnbVKTIefcJWwlylWCale/IV
     4310m+YXl1GTLOxNFMgeSHlISVDWeo1g22jtT/ln4mfYfKJFN+Hy2lHuknxqZOCwti/
     432T6DDSCqk8SZBIJliESPp1yOC6a1I1LhZWGzq1fUc3JtPng/CuiFKgxVQvrKooFTT
     433eFFzC3+S5Bjfcgz/vw/Hfuf8C2kMW6FFg3SQJIo1Iz8Z4C/f++J9kMKgkU7lfauK
     4349B3teN5F7gavOMv1C3SeM7xv0smaayM+coSA29/8LOKbfc5oSucNldXMI9CZTWQa
     435Kq7gfN5Lq7MPYDScS9UbEXAGQQIWsMIkeLadkdVpOqTjMfvnUX3d+rFdOCI4xFEA
     4365mm9o2qsmKTdZtGBeoY1M1Quq4qITtZifqthe6cZ83YulyKCEZniqiQzfCjWYZoS
     437tcW8rc+DIC/pakwRN7K7nZRNpoYb50+C+vlHfk7tuQuR3B95QFiOdfob9lSrnNtM
     438pli+diK5g1xmBbhSCUvbSK22ELCEtek6CZxKvkQclscteEhvVDIiq6rl5fMZsQCz
     43985L4fMX1HhVQ4fSPIIAfMi1sup36DEtTM9ensT8jKSB0gp9ZHsUAX+NA8PeUsjB1
     440p6i7ywHuA0kS4NC8a7uACXgWyQq6rVZPn9w9ogu1k2KdtcHLcQSAgq8jB0Xw3056
     441K7S6EVK5Ag0EV7YjPgEQAPNuzxaF0HEFrS0kGXhXPRusOBTdgOo2Sqetr9PXuRU8
     442juzbtUSGgcRGZknXukqpvakSWmv2Y38XO43Q33C9Rq6Z32DHOw4JqbsM9Oa5Ii/D
     443KyTf3WaMImRuijTVuG5Vd7YUGSA48XMAkQdgU/Ga7u1Y6YLE1iK65i3EvLBTuUL9
     444mnoJm6rnvEmpRYrjsjnAMr3+KKCTBJvecOzoDYumQOYKv6tw7AuHlvENJ6Lu9hb7
     445dM06Q+UL+Hp871094L0B/Jbqo91UVCrWalllyPUAvPvMWJyIgHg2sPc9OMOVGdok
     446JYo9p9VKwxvIhaZBonTWJ+4TQ7CJqetq7xwjbrhVeYjmkD0LyT1/ZpUG4mIuxdos
     447RvTcLMVbP0mkEu20D1xxpqbd95TYSacLexv3EP4huTGrmYoU3eUTNQAAipsjVBgZ
     448lc+AvExjslK+hTECp4fCl/907YshSphSnHRsX8ZZFX1SqXyiY1BuHA/SnZf/QZ/G
     449P0BuDYgkzwt467deTQcALDDJVeDFyCTkU774pmlM3eLKeOZsjMH2px31N5LONWH9
     450EM9J2fkroCjnKe5sZiZo/AKT4N1UFEOWBajvI0gXg32sW5IwAQnEDWdLlNgWAg32
     451gMXf8YeeBUZ8UK/gQbfJLTweTW0NXRuIp0rKlzHjTZMDBVFY/k/ObFzr9ldThmFl
     452ABEBAAGJAiUEGAECAA8FAle2Iz4CGwwFCQlmAYAACgkQf0OCgO+NNJ9tZhAAvBp8
     453hAr1q9U0i6EyzJg9r/Id/qtQ4uqtg7UYKaO/IbhxiavLN3HJ9xcSa4TlAAhsQpIh
     454Ktw7o2+O30/AsKNH91S9yjR/RgVM+/6Rqaf4HCnZm3p3cx6dcLqYtc8dHg6oWPMK
     455lRPyQXDJy8Y+y6plD8I7SrMsOYAZNj7iXLf1pASxDIWFXc/7pJadoLZOV1al8b/a
     456kJJpJrx1thtF7dJQ0pfBPyTDdahBg2h8XqeivygVUD5QhWW8dzmHsve18XKVHLkL
     457C1HmsFC2gGJxFXERBzsBE2YHVda4+e0xCX83UVx9z4pIgsVuUBHp5W/7oGEy9GrP
     458Gp7zUAQA/6gpVXAnsf7BNC6fZQoCBkBMNY/8tCxiKeYsAOmtoM+rFPZYl7ySOzMw
     459NBkIr6OGxWuFl2SLD0QcAzTPsErPokRGYu5MgRyJySRN/NslZdmC/jQG+X33I8yz
     460CdHWVAcPtMrHIdisjt3MlCuLiZs5GDiU6dndPKh2/bU5x/hqzY2jWnp6xlb4zjrO
     461Nl47zPMTGaYQ0jb4/v9VS34tbJAWKpEzSJbMaKhgxaBV4/LAUZpNXnX/S4X3KYcc
     462LsEMhwuBRYd2D/UHruNHlhB/M8lSouGfKW3WyMNFAiV/7dT512+t7ZjFf+thQjaA
     463FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc=
     464=TREp
     465-----END PGP PUBLIC KEY BLOCK----- ",
    196466          }
    197467        EOS
    198468
    199469        apply_manifest(pp, :catch_failures => true)
    200         apply_manifest(pp, :catch_failures => true)
    201         shell(PUPPETLABS_KEY_CHECK_COMMAND)
    202       end
    203     end
    204 
    205     context 'multiple keys' do
    206       it 'runs without errors' do
    207         pp = <<-EOS
    208           apt_key { 'puppetlabs':
    209             id      => '#{PUPPETLABS_GPG_KEY_FINGERPRINT}',
    210             ensure  => 'present',
    211             content => "-----BEGIN PGP PUBLIC KEY BLOCK-----
    212 Version: GnuPG v1.4.12 (GNU/Linux)
    213 Comment: GPGTools - http://gpgtools.org
    214 
    215 mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b
    216 fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg
    217 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+
    218 S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY
    219 GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH
    220 Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v
    221 VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0
    222 Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI
    223 wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN
    224 NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl
    225 f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB
    226 tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL
    227 ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn
    228 AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob
    229 pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF
    230 eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+
    231 aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M
    232 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ
    233 VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU
    234 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh
    235 qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1
    236 IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8
    237 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp
    238 HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN
    239 MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+
    240 UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh
    241 R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+
    242 N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc
    243 kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e
    244 lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT
    245 DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb
    246 kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf
    247 DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei
    248 BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z
    249 XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2
    250 +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU
    251 fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH
    252 dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4
    253 qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2
    254 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq
    255 UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x
    256 Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA
    257 KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3
    258 okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7
    259 bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4
    260 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX
    261 vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0
    262 jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y
    263 ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD
    264 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR
    265 M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf
    266 REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y
    267 DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk
    268 ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYWJAhwEEAEC
    269 AAYFAlHk3M4ACgkQSjMLmtZI+uP5hA//UTZfD340ukip6jPlMzxwSD/QapwtO7D4
    270 gsGTsXezDkO97D21d1pNaNT0RrXAMagwk1ElDxmn/YHUDfMovZa2bKagjWmV38xk
    271 Ws+Prh1P44vUDG30CAU6KZ+mTGLUbolfOvDffCTm9Mn1i2kxFaJxbVhWR6zR28KZ
    272 R28s1IBsrqeTCksYfdKdkuw1/j850hW8MM3hPBJ/48VLx5QEFfnlXwt1fp+LygAv
    273 rIyJw7vJtsa9QjCIkQk2tcv77rhkiZ6ADthgVIx5j3yDWSm4nLqFpwbQTKrNRrCb
    274 5XbL/oIMeHJuFICb2HckDS1KuKXHmqvDuLoRr0/wFEZMps5XQevomUa7JkMeS5j9
    275 AubCG4g1zKEtPPaGDsfDKBljCHBKwUysQj5oGU5w8VvlOPnS62DBfsgU2y5ipmmI
    276 TYkjSOL6LXwO6xG5/sxA8cyoJSmbN286imcY6AHloTiiu6/N7Us+CNrhw/V7HAun
    277 56etWBn3bZWCRGGAPF3qJr4y2sUMY0E3Ha7OPEHIKfBb4MiJnpXntWT28nQfF3dl
    278 TFTthAzwcnZchx2es4yrfDXn33Y4eisqxWCbTluErXUogUEKH1KohSatYMtxencv
    279 7bUlzIr22zSUCYyVf9cyg50kBy+0J7seEpqG5K5R8z9s/63BT5Oghmi6bB2s5iK5
    280 fBt3Tu1IYpyZAg0EURGeeQEQALoU2rlo+usvGKqmBKaEl8Cbx0UZY4tQa1OQSDCj
    281 6QeCBc36rq2NCAFpjYg0nrxMN86e0aHYVVetT75rSX701jRJD/TRCPzr03QVwEtk
    282 GpGIpBXtdx0962I0We5rSZL2TWKuPtGRKrbs6CSVlNynLprIEnN+2sJYd/1yEsrR
    283 9wBtUfVOkq6o4hBWOj4oEqhqQv1MPv1RPqGEgJl19s4LS9277cMIwrj553nGzsy1
    284 XwO6BQIP8IhJQZ+8Okw3UaJjLHkJExgo3UHMFdZhAOOYbrlxwq3lENmkdgjxCUBZ
    285 iVNiEX9NLm8x1HWaW/nnBIHu6g7r+1Ff5qMSI2hBVan6om4gKHdI9wThG89V16Nq
    286 3YztuK5L6Nh9a7BVQJos0r419NHGXPqXqN99jWRL+jAqwKozviUYijDx8k4xLnpQ
    287 1dIbHfwE0MPuIkgHeQIoBMkxD1tiQC7ouqVRqU1gg9VKhOZf0opDnvqQ+cDMyfUC
    288 hgrjjikSoCBIVCDvr1r7T/gUMDEXfnaMfAdEy1z9qnUzTRRzMbl4BN3Zn+4Htf+B
    289 zpAln6H8h7sBb6CO1TX2Qh3JPTrV9zSSbbOW/kuySU+rkHBQPza5l+pnWD7eXaVj
    290 7+WEx+TsYIP9Gpe/FOVp2ht93NgjNFAodPW+i5jm7MRk+vlzjidHJ69pEUoQQtuk
    291 Td8LABEBAAG0V1B1cHBldCBMYWJzIE5pZ2h0bHkgQnVpbGQgS2V5IChQdXBwZXQg
    292 TGFicyBOaWdodGx5IEJ1aWxkIEtleSkgPGRlbGl2ZXJ5QHB1cHBldGxhYnMuY29t
    293 PokCPwQTAQIAKQUCURGzrQIbAwUJBaOagAcLCQgHAwIBBhUIAgkKCwQWAgMBAh4B
    294 AheAAAoJELj5mcAHu2xX7UUQAKGDOQS20BRNEa3top+dQONWmC/j1ABDVTOkF7Zc
    295 9JT5oEESzVof/yIWKAfCbYyH5l3yySZI3NOQt7CswIWDYe0JR/uBhyGoHkA1t52L
    296 zP45UxI29K5XaeBm3qoQbV3W6GWScGkijfaJ2yz/dIHh0m3SkC8mUGBrIqqVwV38
    297 JcsW1/CzTetZiWGlk8/nPeUg+snGwd22zUlZkTaVh3FbHrqh2xsMFdrphDOtSU5s
    298 Jzebu5h6mp7cMZELaRNNmg3O7VeQMA1hwaq05jQuPisS/ktOqSgJXh8pOaUpDoV0
    299 ta4JSwaqEkWsZHv3tmaXGy0Qzs9X9bOjRbIKgN2w9JY+z2OKJ5L4Yg5VMJPYMdKp
    300 wGSQf70YaaT0d1N/84P8j7CRsDBnVME/TDuE2u1XM/9B7xmdcI28FxZrqQc06OGS
    301 UvK9vSgTkTxXSsjobah8ssi4C4/zRgTZu94KOhSlH4YGrzLX7g25M708NxgXJiPZ
    302 7K8Ceea28mHYf3f+JobEbpzPeewURAFCXHCm4cFU31FsiXQrNhGmUpRKVayiMMzN
    303 JF8yjuHpwB2DjGdV3QR5C8Ms+RO86JnD/Yq9zeoF7T7jCAkQKuh76cQe60XllKhV
    304 Dlh2rpKXAtLAbea9hcSraZkm3Lj+oKzXUSf3Ml9xp65yjUjm9O+a4AMQ1wFroGEP
    305 QUEEiQEcBBABCgAGBQJT0XkMAAoJELrV8KOS6YVy7O8IAKJYT0Afd6Ufkx4cR0rj
    306 soCoPpDDiyITmSdeLSzvl9rr1X39+PqR0dcncEhO1heCZo8sm/iMNsiV4UORv2Wh
    307 lCriE2fDpu9ByX1rwuKl9nEu9xx2WTRWtdx4M4fB+ZXYiJbgb1vuM46mGp51NYRK
    308 ByPIm1EAjOhsfXm14BZICOQO5WLy5Sv/oRVSEBiGXNXf1kweXSzrhRCNEWYfPhQJ
    309 4pCsvNeiQuhqQIB+J9FbA48x47JikMM92w0aEa4aVVokNF2PBCp9/SdRAzlY7Ikx
    310 aAdIzuyc0ANIZBPgYxIgdH/Fltwz6VW6iFNk3gS7jR6TFBjRQba73I53IBbiVIRq
    311 dnWJAhwEEAECAAYFAlPRd2QACgkQRp6bNpsPDx1HiQ//TEOYPkp+iHT/wNcTUO4A
    312 r00La6xl9bw3v5XlnW83YjrB0ieChbXcHpChNRk08vdRSgxyWCtbIwmMeOO8mDiv
    313 aJbYrgngJY+FSMsAzhSyPauze0l4PV3dnLRMZmK5Nro4GNI4oiOGp0qXPcBjstlc
    314 BnEa6XuLHDnRYFhkcVboZDu2o/tdz+OJD+CZjyeiIAtChMJ+ghlpfO3cOuK0wmTh
    315 Jtn/eDAfjB34CZdkt1paKZap5bLZCF0QwP+DbJd189HZy/ot6w2jpNXFt1JFnoyn
    316 7Nluo6MPNTZSG3pzh7fvzb924M1sm+CyLFzEV1rYi6ujyHOsW+KYc6fOUB5jk/BZ
    317 QPaU6vG1JRDLHWPjbPf9Ax8uGQSrVXC3txiu2OLZcn4Ti54PoHed5m7Fxk9fnaiT
    318 gNGL0ox/wmIPbIsdGrXuTHcdmPyuRM5btXFWCMbknTIbefEEOQdbPl+e5QgWR5cf
    319 EVOvo6qTBstH7aHqiWMQpuvnU7l9xpfcJ40SawHxiY/UCKXhpf7SJXAvE8zkMIvi
    320 PJaHKDy2FyCwtCHwG1wiQSqjnCJt5gmTGCXzO/yAGhcgUWbTpykIMij9IPboL7VL
    321 er+I/3CikWeszcjBp5lJhg4k2OCBi5LOiI+8EUTlFcAqxbTFEyM+IQDOwnW8Gznf
    322 nMb070gS9iBk0GTVC9iXHla0U1B1cHBldCBMYWJzIE5pZ2h0bHkgQnVpbGQgS2V5
    323 IChQdXBwZXQgTGFicyBOaWdodGx5IEJ1aWxkIEtleSkgPGluZm9AcHVwcGV0bGFi
    324 cy5jb20+iQI+BBMBAgAoBQJREZ55AhsDBQkFo5qABgsJCAcDAgYVCAIJCgsEFgID
    325 AQIeAQIXgAAKCRC4+ZnAB7tsVyjmEACSw9ZLq1ehcq8/QemiB+i8W/yVYZAxphmq
    326 w547JXOxk19V5joR5Wp0fwqIEvE1Thw0mAiMUDAgM4TpdZc8zOaILj2OH1gWsuyi
    327 fbFTHExTZAuZ1Lx1Nc1AlUv5Q+bmrzjAhx13Nk3LE7yfe4DLZnSyF3cZxAcSXYSq
    328 wSo1sBrWxf2bOYnuyJwLlz94eeEkNdSi0mfANqt+ihiiAeTe9OXf65iPFn8SYRqV
    329 W0hUayVlOedoCl0kviVXHvIgHxgkfazeIPqncFgPiRyYGNCVhKjaFjpUm+RzBFOk
    330 HQzzcyNovlnjHmhxKkN+L2f1JqmHmUQguTTpJfpRdwmnEkA1BYY6m0WQ5Owga1eE
    331 WEeHh9AjtVrukJOOibvpoS/M5FdAgaUgGXPIOziURDKBjQ0zuYMtlXgEDzKt0ugp
    332 7YO74EAv1JiyeZ0Mu+m6WnxRX0Sb/op0ef74xZYD4eKYixOxahQ7kxtO9qTy+pOs
    333 c3/KSNGv+oQh/CgChBbN3oq1UBfL6gVioRIp2GmP6Jmfipfod+VGIVI8xyfD3h/Z
    334 nKF7dEHHMsyB03Ap2ypCcy8OEVwCeAZ4eY+lKXNyBSnddXcMGuFTqgJ1IMvTm0T8
    335 BfYn74A4fDqwNKKQGYjb67MZ+3N7YaWwCgWUvFpfd557fTQmZfV1arok2urvWIGa
    336 x82lgKTA64kBHAQQAQoABgUCU9F5DwAKCRC61fCjkumFchUwB/wLfX/PA0LUbSen
    337 es6ilcbHOZVZKyppMA5bIU6fG6SIS9FVauL0lgkEnJAhr5w3rXGd14LM33QkkPbs
    338 /uNe2YQHzzrsffLhFyJkKJXH5rc6sSM7RYbAxtMNXKpkdMhPGmHgIgMzJo3ZuD8+
    339 ixsyR/8tGAMXbHwX5aAJDKYfg8X4kkPBxzysWJzN5/wFbYEK8FHiULkHNfJv480H
    340 UBLNwczVeg9Etaje0tCQuGkD/CJHR50Kxuc/BiGYdYVjAnQVILXa2NcBizXtUU3f
    341 N+6L+K2m9Fm3Dvhw0ZVEq7TxTMmHA23HGt8fMJ7zNCRO3krK7vtjUQxSXKOM7HF+
    342 D60QA/oGiQIcBBABAgAGBQJT0XdkAAoJEEaemzabDw8dtt0QAITarh4rsJWupVXD
    343 BFHbxsUyT7AXspJ7kW3vxG3Y/gHSjleDX0VdblzUUBmD5y5JvR/DHrAgDd8XQN4E
    344 4+hTOpZhzILZcoSWhiAW+VuL5b+R5NxSzIiHEt/qKgslvcx/sbQz8+Ro/zWHxhn9
    345 1uFf5JOFw+5W2wBmC4OdQby7B8AiV58OBAGcVUs0+57oJRYIU0zTRAJKRstMlD7s
    346 F3R1d6EyNUbGjnJhPcltk6RRsYuJJx8vJzyY4pEy5eZPNSPEpFBjWlWyRnKDbQ6/
    347 TbtSB7bojbtjQFhh905kvdKxzcBkFgYTyzqJffUwHqJti8QQMraGAtC79/D/0vmf
    348 lIJtzTB+gA/NOhyriaSXoGzi0oA/ZKReU3uJd5Yl202s/hvG+xpBkh7ouaVa5zFX
    349 cqfi6gmmpQzVo6snI7d+Wonyvg1lhqZ7TXvtUIilsmbc5zEedidaCei77buX/ZuV
    350 8jo+32HtsSKTYYHVsJzY6YzEy1SVfrUY+EdXXWG7Y97JaXKJc8oCNT1YA8BG4c+M
    351 1cMXO1LTiP56gyYnrH6/oTIFrBXMl3dO/gKpcwUmf8lScFXIfVn5Wm3D0n6cUBKT
    352 aRmmpfu7UhzBMEA7ZrIGxNBuD8WwfVi8ZSwBbV92fHkukkfixkhmeUmCB9vyq31+
    353 UfTwFXkHDTMZ4jfctKuBU+3p5sEwuQINBFERnnkBEAC0XpaBe0L9yvF1oc7rDLEt
    354 XMrjDWHL6qPEW8ei94D619n1eo1QbZA4zZSZFjmN1SWtxg+2VRJazIlaFNMTpp+q
    355 7lpmHPwzGdFdZZPVvjwd7cIe5KrGjEiTD1zf7i5Ws5Xh9jTh6VzY8nseakhIGTOC
    356 lWzxl/+X2cJlMAR4/nLJjiTi3VwI2JBT8w2H8j8EgfRpjf6P1FyLv0WWMODc/hgc
    357 /o5koLb4WRsK2w5usP/a3RNeh6L6iqHiiAL1Y9+0GZXOrjtNpkzPRarIL3MiX29o
    358 VKSFcjUREpsEZHBHLwuA3WIR6WBX49LhrA6uLgofYhALeky6/H3ZFEH9ZS3plmnX
    359 /vow8YWmz0Lyzzf848qsg5E5cHg36m2CXSEUeZfH748H78R62uIf/shusffl9Op2
    360 aZnQoPyeYIkA6N8m29CqIa/pzd68rLEQ+MNHHkp0KjQ0oKyrz9/YCXeQg3lIBXAv
    361 +FIVK/04fMA3rr5tnynkeG9Ow6fGEtqzNjZhMZtx5BnkhdLTt6qu+wyaDw3q9X1/
    362 /j3lhplXteYzUkNUIinCHODGXaI55R/I4HNsbvtvy904g5sTHZX9QBn0x7QpVZaW
    363 90jCgl6+NPH96g1cuHFuk+HED4H6XYFcdt1VRVb9YA7GgRXkSyfw6KdtGFT15e7o
    364 7PcaD6NpqyBfbYfrNQmiOwARAQABiQIlBBgBAgAPBQJREZ55AhsMBQkFo5qAAAoJ
    365 ELj5mcAHu2xXR8cP/Ai4PqUKBZdN6Jz628VQdiVX2EO7jhQ7KYdt9RWz87kfm0rC
    366 LhdROCyeddgGsYbpdikC3Gzrk0JFIs/qAzpZOMIip0cXTxDEWWObuwShIac8hmZz
    367 BE5SM7TcA9+/jmBwLajcreGgKs/MfDkkWkiBT/B+FyHkqS6O/rdBvYqFzLtvUigG
    368 SRf1clP4QEGWcR6LLsJ1uiH+brK3G1GsILVpX5iQ0Y4wNv0xNRGZzAPVZ1/vgHCM
    369 sAG7TZy26oOraigvnZeo1Q9r7pg+i6uSIu4ywfdNTOuoBK+VY+RKyAybBHIqH07w
    370 p9TmYOY1x+wmIe0oSYcR47OcvZU57fdLsEB9djYvkGkkmbz0gwXQL0iEW3kX+05J
    371 zrLzPsx6muR35SPNCvfR2T/0VCDwtNwwxACWuZI/tqsobU/+lA/MqRZ4kOD/Bx07
    372 CpZfYIAi2STc0MIDvpyDnZLiYVMMkqV4+gn2ANtkF+GKbra3Aeof9b4KEVabSaQ5
    373 5W70DJF0G5bmHBSdyqdYnKB/yRj1rH+dgRbiRMv7rBAx5Q8rbYiym8im+5XNUDy2
    374 ZTQcCD53HcBLvKX6RJ4ByYawKaQqMa27WK/YWVmFXqVDVk12iKrQW6zktDdGInnD
    375 +f0rRH7c/7F/QuBR6Y4Zkso0CuVMNsmxv0E+7Zk0z4dWalzQuXpN7OXcZ8Gp
    376 =Gl+v
    377 -----END PGP PUBLIC KEY BLOCK-----",
    378           }
    379         EOS
    380         apply_manifest(pp, :catch_failures => true)
    381         apply_manifest(pp, :catch_failures => true)
     470        apply_manifest(pp, :catch_changes => true)
    382471        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    383472      end
    … …  
    402491
    403492  describe 'server =>' do
    404     context 'pgp.mit.edu' do
    405       it 'works' do
    406         pp = <<-EOS
    407         apt_key { 'puppetlabs':
    408           id     => '#{PUPPETLABS_GPG_KEY_LONG_ID}',
    409           ensure => 'present',
    410           server => 'pgp.mit.edu',
    411         }
    412         EOS
    413 
    414         apply_manifest(pp, :catch_failures => true)
    415         apply_manifest(pp, :catch_failures => true)
    416         shell(PUPPETLABS_KEY_CHECK_COMMAND)
    417       end
    418     end
    419 
    420     context 'hkp://pgp.mit.edu:80' do
     493    context 'hkps.pool.sks-keyservers.net' do
     494      it 'works' do
     495        pp = <<-EOS
     496        apt_key { 'puppetlabs':
     497          id     => '#{PUPPETLABS_GPG_KEY_LONG_ID}',
     498          ensure => 'present',
     499          server => 'hkps.pool.sks-keyservers.net',
     500        }
     501        EOS
     502
     503        #Apply the manifest (Retry if timeout error is received from key pool)
     504        retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do
     505          apply_manifest(pp, :catch_failures => true)
     506        end
     507
     508        apply_manifest(pp, :catch_changes => true)
     509        shell(PUPPETLABS_KEY_CHECK_COMMAND)
     510      end
     511    end
     512
     513    context 'hkp://hkps.pool.sks-keyservers.net:80' do
    421514      it 'works' do
    422515        pp = <<-EOS
    … …  
    424517          id     => '#{PUPPETLABS_GPG_KEY_FINGERPRINT}',
    425518          ensure => 'present',
    426           server => 'hkp://pgp.mit.edu:80',
    427         }
    428         EOS
    429 
    430         apply_manifest(pp, :catch_failures => true)
    431         apply_manifest(pp, :catch_failures => true)
     519          server => 'hkp://hkps.pool.sks-keyservers.net:80',
     520        }
     521        EOS
     522
     523        retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do
     524          apply_manifest(pp, :catch_failures => true)
     525        end
     526
     527        apply_manifest(pp, :catch_changes => true)
    432528        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    433529      end
    … …  
    479575
    480576        apply_manifest(pp, :catch_failures => true)
    481         apply_manifest(pp, :catch_failures => true)
     577        apply_manifest(pp, :catch_changes => true)
     578        shell(PUPPETLABS_KEY_CHECK_COMMAND)
     579      end
     580
     581      it 'works with userinfo' do
     582        pp = <<-EOS
     583        apt_key { 'puppetlabs':
     584          id     => '#{PUPPETLABS_GPG_KEY_LONG_ID}',
     585          ensure => 'present',
     586          source => 'http://dummyuser:dummypassword@#{PUPPETLABS_APT_URL}/#{PUPPETLABS_GPG_KEY_FILE}',
     587        }
     588        EOS
     589
     590        apply_manifest(pp, :catch_failures => true)
     591        apply_manifest(pp, :catch_changes => true)
    482592        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    483593      end
    … …  
    528638
    529639        apply_manifest(pp, :catch_failures => true)
    530         apply_manifest(pp, :catch_failures => true)
     640        apply_manifest(pp, :catch_changes => true)
    531641        shell(CENTOS_KEY_CHECK_COMMAND)
    532642      end
    … …  
    572682
    573683        apply_manifest(pp, :catch_failures => true)
    574         apply_manifest(pp, :catch_failures => true)
     684        apply_manifest(pp, :catch_changes => true)
     685        shell(PUPPETLABS_KEY_CHECK_COMMAND)
     686      end
     687
     688      it 'works with userinfo' do
     689        pp = <<-EOS
     690        apt_key { 'puppetlabs':
     691          id     => '#{PUPPETLABS_GPG_KEY_LONG_ID}',
     692          ensure => 'present',
     693          source => 'https://dummyuser:dummypassword@#{PUPPETLABS_APT_URL}/#{PUPPETLABS_GPG_KEY_FILE}',
     694        }
     695        EOS
     696
     697        apply_manifest(pp, :catch_failures => true)
     698        apply_manifest(pp, :catch_changes => true)
    575699        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    576700      end
    … …  
    618742        pp = <<-EOS
    619743        apt_key { 'puppetlabs':
    620           id     => '4BD6EC30',
     744          id     => 'EF8D349F',
    621745          ensure => 'present',
    622746          source => '/tmp/puppetlabs-pubkey.gpg',
    … …  
    625749
    626750        apply_manifest(pp, :catch_failures => true)
    627         apply_manifest(pp, :catch_failures => true)
     751        apply_manifest(pp, :catch_changes => true)
    628752        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    629753      end
    … …  
    682806
    683807        apply_manifest(pp, :catch_failures => true)
    684         apply_manifest(pp, :catch_failures => true)
    685         shell(PUPPETLABS_KEY_CHECK_COMMAND)
    686       end
    687 
    688       it 'fails on invalid options' do
    689         pp = <<-EOS
    690         apt_key { 'puppetlabs':
    691           id      => '#{PUPPETLABS_GPG_KEY_LONG_ID}',
    692           ensure  => 'present',
    693           options => 'this is totally bonkers',
    694         }
    695         EOS
    696 
    697         shell("apt-key del #{PUPPETLABS_GPG_KEY_FINGERPRINT}", :acceptable_exit_codes => [0,1,2])
    698         apply_manifest(pp, :expect_failures => true) do |r|
    699           expect(r.stderr).to match(/--keyserver-options this is totally/)
    700         end
     808        apply_manifest(pp, :catch_changes => true)
     809        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    701810      end
    702811    end
    … …  
    715824
    716825        apply_manifest(pp, :catch_failures => true)
    717         apply_manifest(pp, :catch_failures => true)
     826        apply_manifest(pp, :catch_changes => true)
    718827      end
    719828    end
    … …  
    723832        pp = <<-EOS
    724833        apt_key { 'puppetlabs':
    725           id      => '47B320EB4C7C375AA9DAE1A01054B7A24BD6E666',
     834          id      => '6F6B15509CF8E59E6E469F327F438280EF8D9999',
    726835          ensure  => 'present',
    727836          source  => 'https://#{PUPPETLABS_APT_URL}/#{PUPPETLABS_GPG_KEY_FILE}',
  • src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/apt_spec.rb

    rbcf0be5 rad28f83  
    11require 'spec_helper_acceptance'
     2
     3MAX_TIMEOUT_RETRY              = 3
     4TIMEOUT_RETRY_WAIT             = 5
     5TIMEOUT_ERROR_MATCHER    = /no valid OpenPGP data found/
    26
    37describe 'apt class' do
    … …  
    2125            'repos'    => 'main',
    2226            'key'      => {
    23               'id'     => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
    24               'server' => 'pgp.mit.edu',
     27              'id'     => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
     28              'server' => 'hkps.pool.sks-keyservers.net',
    2529            },
    2630          },
    … …  
    3034        update => {
    3135          'frequency' => 'always',
    32           'timeout'   => '400',
    33           'tries'     => '3',
     36          'timeout'   => 400,
     37          'tries'     => 3,
    3438        },
    3539        purge => {
    … …  
    4347      EOS
    4448
    45       apply_manifest(pp, :catch_failures => true)
     49      #Apply the manifest (Retry if timeout error is received from key pool)
     50      retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do
     51        apply_manifest(pp, :catch_failures => true)
     52      end
     53
    4654      apply_manifest(pp, :catch_failures => true)
    4755    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/class_spec.rb

    rbcf0be5 rad28f83  
    1212      # Run it twice and test for idempotency
    1313      apply_manifest(pp, :catch_failures => true)
    14       apply_manifest(pp, :catch_failures => true)
     14      apply_manifest(pp, :catch_changes => true)
    1515    end
    1616  end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/nodesets/default.yml

    rbcf0be5 rad28f83  
    11HOSTS:
    2   ubuntu-server-12042-x64:
     2  ubuntu-1404-x64:
    33    roles:
    4       - master
    5     platform: ubuntu-server-12.04-amd64
    6     box : ubuntu-server-12042-x64-vbox4210-nocm
    7     box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
    8     hypervisor : vagrant
     4      - agent
     5      - default
     6    platform: ubuntu-14.04-amd64
     7    hypervisor: vagrant
     8    box: puppetlabs/ubuntu-14.04-64-nocm
    99CONFIG:
    1010  type: foss
    11   vagrant_ssh_port_random: true
  • src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_backports_spec.rb

    rbcf0be5 rad28f83  
    88      let(:facts) do
    99        {
     10          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    1011          :lsbdistid       => 'Debian',
    1112          :osfamily        => 'Debian',
    … …  
    2627      let(:facts) do
    2728        {
     29          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0' }},
    2830          :lsbdistid       => 'Debian',
    2931          :osfamily        => 'Debian',
    … …  
    4446      let(:facts) do
    4547        {
     48          :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    4649          :lsbdistid       => 'Ubuntu',
    4750          :osfamily        => 'Debian',
    4851          :lsbdistcodename => 'trusty',
     52          :lsbdistrelease  => '14.04',
    4953          :puppetversion   => Puppet.version,
    5054        }
    … …  
    6266      let(:facts) do
    6367        {
     68          :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    6469          :lsbdistid       => 'Ubuntu',
    6570          :osfamily        => 'Debian',
    6671          :lsbdistcodename => 'trusty',
     72          :lsbdistrelease  => '14.04',
    6773          :puppetversion   => Puppet.version,
    6874        }
    … …  
    8995      let(:facts) do
    9096        {
     97          :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    9198          :lsbdistid       => 'Ubuntu',
    9299          :osfamily        => 'Debian',
    93100          :lsbdistcodename => 'trusty',
     101          :lsbdistrelease  => '14.04',
    94102          :puppetversion   => Puppet.version,
    95103        }
    … …  
    115123    let(:facts) do
    116124      {
     125        :os => { :family => 'Debian', :name => 'Linuxmint', :release => { :major => '17', :full => '17' }},
    117126        :lsbdistid       => 'linuxmint',
    118127        :osfamily        => 'Debian',
    … …  
    199208    let(:facts) do
    200209      {
     210        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    201211        :lsbdistid       => 'Ubuntu',
    202212        :osfamily        => 'Debian',
    203213        :lsbdistcodename => 'trusty',
     214        :lsbdistrelease  => '14.04',
    204215        :puppetversion   => Puppet.version,
    205216      }
    … …  
    214225        expect {
    215226          subject.call
    216         }.to raise_error(Puppet::Error, /is not a string/)
     227        }.to raise_error(Puppet::Error, /expects a/)
    217228      end
    218229    end
    … …  
    226237        expect {
    227238          subject.call
    228         }.to raise_error(Puppet::Error, /is not a string/)
     239        }.to raise_error(Puppet::Error, /expects a/)
    229240      end
    230241    end
    … …  
    238249        expect {
    239250          subject.call
    240         }.to raise_error(Puppet::Error, /is not a string/)
     251        }.to raise_error(Puppet::Error, /expects a/)
    241252      end
    242253    end
    … …  
    250261        expect {
    251262          subject.call
    252         }.to raise_error(Puppet::Error, /is not a string/)
     263        }.to raise_error(Puppet::Error, /expects a/)
    253264      end
    254265    end
    … …  
    262273        expect {
    263274          subject.call
    264         }.to raise_error(Puppet::Error, /pin must be either a string, number or hash/)
     275        }.to raise_error(Puppet::Error, /expects a/)
    265276      end
    266277    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_spec.rb

    rbcf0be5 rad28f83  
    11require 'spec_helper'
    22describe 'apt' do
    3   let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version} }
    4 
     3  let(:facts) do
     4  {
     5    :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     6    :lsbdistid       => 'Debian',
     7    :osfamily        => 'Debian',
     8    :lsbdistcodename => 'wheezy',
     9    :puppetversion   => Puppet.version,
     10  }
     11  end
    512  context 'defaults' do
    613    it { is_expected.to contain_file('sources.list').that_notifies('Class[Apt::Update]').only_with({
    … …  
    138145  context 'with sources defined on valid osfamily' do
    139146    let :facts do
    140       { :osfamily        => 'Debian',
    141         :lsbdistcodename => 'precise',
    142         :lsbdistid       => 'Debian',
     147      { :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04' }},
     148        :osfamily        => 'Debian',
     149        :lsbdistcodename => 'precise',
     150        :lsbdistid       => 'Ubuntu',
     151        :lsbdistrelease  => '12.04',
    143152        :puppetversion   => Puppet.version,
    144153      }
    … …  
    156165        'location'   => 'http://apt.puppetlabs.com',
    157166        'repos'      => 'main',
    158         'key'        => { 'id' => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30', 'server' => 'pgp.mit.edu' },
     167        'key'        => { 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 'server' => 'pgp.mit.edu' },
    159168      }
    160169    } } }
    … …  
    178187  end
    179188
     189  context 'with confs defined on valid osfamily' do
     190    let :facts do
     191      {
     192        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
     193        :osfamily        => 'Debian',
     194        :lsbdistcodename => 'precise',
     195        :lsbdistid       => 'Debian',
     196        :puppetversion   => Puppet.version,
     197      }
     198    end
     199    let(:params) { { :confs => {
     200      'foo' => {
     201        'content' => 'foo',
     202      },
     203      'bar' => {
     204        'content' => 'bar',
     205      }
     206    } } }
     207
     208    it { is_expected.to contain_apt__conf('foo').with({
     209        :content => 'foo',
     210    })}
     211
     212    it { is_expected.to contain_apt__conf('bar').with({
     213        :content => 'bar',
     214    })}
     215  end
     216
    180217  context 'with keys defined on valid osfamily' do
    181218    let :facts do
    182       { :osfamily        => 'Debian',
     219      {
     220        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
     221        :osfamily        => 'Debian',
    183222        :lsbdistcodename => 'precise',
    184223        :lsbdistid       => 'Debian',
    … …  
    190229        'server' => 'subkeys.pgp.net',
    191230      },
    192       '4BD6EC30' => {
     231      'EF8D349F' => {
    193232        'server' => 'pgp.mit.edu',
    194233      }
    … …  
    199238    })}
    200239
    201     it { is_expected.to contain_apt__key('4BD6EC30').with({
     240    it { is_expected.to contain_apt__key('EF8D349F').with({
    202241        :server => 'pgp.mit.edu',
    203242    })}
    … …  
    206245  context 'with ppas defined on valid osfamily' do
    207246    let :facts do
    208       { :osfamily        => 'Debian',
     247      {
     248        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
     249        :osfamily        => 'Debian',
    209250        :lsbdistcodename => 'precise',
    210251        :lsbdistid       => 'ubuntu',
    … …  
    224265  context 'with settings defined on valid osfamily' do
    225266    let :facts do
    226       { :osfamily        => 'Debian',
     267      {
     268        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
     269        :osfamily        => 'Debian',
    227270        :lsbdistcodename => 'precise',
    228271        :lsbdistid       => 'Debian',
    … …  
    241284  context 'with pins defined on valid osfamily' do
    242285    let :facts do
    243       { :osfamily        => 'Debian',
     286      {
     287        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
     288        :osfamily        => 'Debian',
    244289        :lsbdistcodename => 'precise',
    245290        :lsbdistid       => 'Debian',
    … …  
    292337      end
    293338    end
    294 
    295     context 'with unsupported osfamily' do
    296       let :facts do
    297         { :osfamily => 'Darwin', :puppetversion   => Puppet.version,}
    298       end
    299 
    300       it do
    301         expect {
    302           subject.call
    303         }.to raise_error(Puppet::Error, /This module only works on Debian or derivatives like Ubuntu/)
    304       end
    305     end
    306339  end
    307340end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_update_spec.rb

    rbcf0be5 rad28f83  
    44describe 'apt::update', :type => :class do
    55  context "and apt::update['frequency']='always'" do
    6     { 'a recent run' => Time.now.to_i, 'we are due for a run' => 1406660561,'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval|
     6    {
     7      'a recent run'                                 => Time.now.to_i,
     8      'we are due for a run'                         => 1406660561,
     9      'the update-success-stamp file does not exist' => -1,
     10    }.each_pair do |desc, factval|
    711      context "and $::apt_update_last_success indicates #{desc}" do
    8         let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    9         let (:pre_condition) { "class{'::apt': update => {'frequency' => 'always' },}" }
     12        let(:facts) { {
     13          :os                      => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     14          :lsbdistid               => 'Debian',
     15          :osfamily                => 'Debian',
     16          :apt_update_last_success => factval,
     17          :lsbdistcodename         => 'wheezy',
     18          :puppetversion           => Puppet.version,
     19        } }
     20        let (:pre_condition) {
     21          "class{'::apt': update => {'frequency' => 'always' },}"
     22        }
    1023        it 'should trigger an apt-get update run' do
    1124          #set the apt_update exec's refreshonly attribute to false
    … …  
    1528    end
    1629    context 'when $::apt_update_last_success is nil' do
    17       let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     30      let(:facts) { {
     31        :os              => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     32        :lsbdistid       => 'Debian',
     33        :osfamily        => 'Debian',
     34        :lsbdistcodename => 'wheezy',
     35        :puppetversion   => Puppet.version,
     36      } }
    1837      let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'always' },}" }
    1938      it 'should trigger an apt-get update run' do
    … …  
    2443  end
    2544  context "and apt::update['frequency']='reluctantly'" do
    26     {'a recent run' => Time.now.to_i, 'we are due for a run' => 1406660561,'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval|
     45    {
     46      'a recent run'                                 => Time.now.to_i,
     47      'we are due for a run'                         => 1406660561,
     48      'the update-success-stamp file does not exist' => -1,
     49    }.each_pair do |desc, factval|
    2750      context "and $::apt_update_last_success indicates #{desc}" do
    28         let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version,} }
     51        let(:facts) { {
     52          :os                      => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     53          :lsbdistid               => 'Debian',
     54          :osfamily                => 'Debian',
     55          :apt_update_last_success => factval,
     56          :lsbdistcodename         => 'wheezy',
     57          :puppetversion           => Puppet.version,
     58        } }
    2959        let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" }
    3060        it 'should not trigger an apt-get update run' do
    … …  
    3565    end
    3666    context 'when $::apt_update_last_success is nil' do
    37       let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     67      let(:facts) { {
     68        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     69        :lsbdistid       => 'Debian',
     70        :osfamily        => 'Debian',
     71        :lsbdistcodename => 'wheezy',
     72        :puppetversion   => Puppet.version,
     73      } }
    3874      let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" }
    3975      it 'should not trigger an apt-get update run' do
    … …  
    4783      { 'we are due for a run' => 1406660561,'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval|
    4884        context "and $::apt_update_last_success indicates #{desc}" do
    49           let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     85          let(:facts) { {
     86            :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     87            :lsbdistid               => 'Debian',
     88            :osfamily                => 'Debian',
     89            :apt_update_last_success => factval,
     90            :lsbdistcodename         => 'wheezy',
     91            :puppetversion           => Puppet.version,
     92          } }
    5093          let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
    5194          it 'should trigger an apt-get update run' do
    … …  
    5699      end
    57100      context 'when the $::apt_update_last_success fact has a recent value' do
    58         let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :apt_update_last_success => Time.now.to_i, :puppetversion   => Puppet.version, } }
     101        let(:facts) { {
     102          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     103          :lsbdistid               => 'Debian',
     104          :osfamily                => 'Debian',
     105          :lsbdistcodename         => 'wheezy',
     106          :apt_update_last_success => Time.now.to_i,
     107          :puppetversion           => Puppet.version,
     108        } }
    59109        let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
    60110        it 'should not trigger an apt-get update run' do
    … …  
    64114      end
    65115      context 'when $::apt_update_last_success is nil' do
    66         let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :apt_update_last_success => nil, :puppetversion   => Puppet.version, } }
     116        let(:facts) { {
     117          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     118          :lsbdistid               => 'Debian',
     119          :osfamily                => 'Debian',
     120          :lsbdistcodename         => 'wheezy',
     121          :apt_update_last_success => nil,
     122          :puppetversion           => Puppet.version,
     123        } }
    67124        let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
    68125        it 'should trigger an apt-get update run' do
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/conf_spec.rb

    rbcf0be5 rad28f83  
    44    'class { "apt": }'
    55  end
    6   let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     6  let(:facts) { {
     7    :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     8    :lsbdistid       => 'Debian',
     9    :osfamily        => 'Debian',
     10    :lsbdistcodename => 'wheezy',
     11    :puppetversion   => Puppet.version,
     12  } }
    713  let :title do
    814    'norecommends'
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/key_compat_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'apt::key', :type => :define do
    4   let(:facts) { { :lsbdistid => 'Debian' } }
    5   GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
     4  let(:facts) { {
     5    :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     6    :lsbdistid     => 'Debian',
     7    :osfamily      => 'Debian',
     8    :puppetversion => Puppet.version,
     9  } }
     10  GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
    611
    712  let :title do
    … …  
    914  end
    1015
     16  let :pre_condition do
     17    'include apt'
     18  end
     19
    1120  describe 'normal operation' do
    1221    describe 'default options' do
    13       it 'contains the apt_key' do
    14         should contain_apt_key(title).with({
     22      it {
     23        is_expected.to contain_apt_key(title).with({
    1524          :id                => title,
    1625          :ensure            => 'present',
    1726          :source            => nil,
    18           :server            => nil,
     27          :server            => 'keyserver.ubuntu.com',
    1928          :content           => nil,
    20           :keyserver_options => nil,
    21         })
    22       end
     29        })
     30      }
    2331      it 'contains the apt_key present anchor' do
    24         should contain_anchor("apt_key #{title} present")
     32        is_expected.to contain_anchor("apt_key #{title} present")
    2533      end
    2634    end
    … …  
    3240
    3341      let :params do {
    34         :key => GPG_KEY_ID,
    35       } end
    36 
    37       it 'contains the apt_key' do
    38         should contain_apt_key(title).with({
     42        :id => GPG_KEY_ID,
     43      } end
     44
     45      it 'contains the apt_key' do
     46        is_expected.to contain_apt_key(title).with({
    3947          :id                => GPG_KEY_ID,
    4048          :ensure            => 'present',
    4149          :source            => nil,
    42           :server            => nil,
     50          :server            => 'keyserver.ubuntu.com',
    4351          :content           => nil,
    44           :keyserver_options => nil,
    4552        })
    4653      end
    4754      it 'contains the apt_key present anchor' do
    48         should contain_anchor("apt_key #{GPG_KEY_ID} present")
     55        is_expected.to contain_anchor("apt_key #{GPG_KEY_ID} present")
    4956      end
    5057    end
    … …  
    5663
    5764      it 'contains the apt_key' do
    58         should contain_apt_key(title).with({
     65        is_expected.to contain_apt_key(title).with({
    5966          :id                => title,
    6067          :ensure            => 'absent',
    6168          :source            => nil,
    62           :server            => nil,
     69          :server            => 'keyserver.ubuntu.com',
    6370          :content           => nil,
    64           :keyserver_options => nil,
    6571        })
    6672      end
    6773      it 'contains the apt_key absent anchor' do
    68         should contain_anchor("apt_key #{title} absent")
     74        is_expected.to contain_anchor("apt_key #{title} absent")
    6975      end
    7076    end
    … …  
    7278    describe 'set a bunch of things!' do
    7379      let :params do {
    74         :key_content => 'GPG key content',
    75         :key_source => 'http://apt.puppetlabs.com/pubkey.gpg',
    76         :key_server => 'pgp.mit.edu',
    77         :key_options => 'debug',
    78       } end
    79 
    80       it 'contains the apt_key' do
    81         should contain_apt_key(title).with({
     80        :content => 'GPG key content',
     81        :source => 'http://apt.puppetlabs.com/pubkey.gpg',
     82        :server => 'pgp.mit.edu',
     83        :options => 'debug',
     84      } end
     85
     86      it 'contains the apt_key' do
     87        is_expected.to contain_apt_key(title).with({
    8288          :id      => title,
    8389          :ensure  => 'present',
    8490          :source  => 'http://apt.puppetlabs.com/pubkey.gpg',
    8591          :server  => 'pgp.mit.edu',
    86           :content => params[:key_content],
     92          :content => params[:content],
    8793          :options => 'debug',
    8894        })
    8995      end
    9096      it 'contains the apt_key present anchor' do
    91         should contain_anchor("apt_key #{title} present")
     97        is_expected.to contain_anchor("apt_key #{title} present")
    9298      end
    9399    end
    … …  
    95101    context "domain with dash" do
    96102      let(:params) do{
    97         :key_server => 'p-gp.m-it.edu',
    98       } end
    99       it 'contains the apt_key' do
    100         should contain_apt_key(title).with({
     103        :server => 'p-gp.m-it.edu',
     104      } end
     105      it 'contains the apt_key' do
     106        is_expected.to contain_apt_key(title).with({
    101107          :id        => title,
    102108          :server => 'p-gp.m-it.edu',
    … …  
    108114      let :params do
    109115        {
    110           :key_server => 'hkp://pgp.mit.edu',
    111         }
    112       end
    113       it 'contains the apt_key' do
    114         should contain_apt_key(title).with({
     116          :server => 'hkp://pgp.mit.edu',
     117        }
     118      end
     119      it 'contains the apt_key' do
     120        is_expected.to contain_apt_key(title).with({
    115121          :id        => title,
    116122          :server => 'hkp://pgp.mit.edu',
    … …  
    121127      let :params do
    122128        {
    123           :key_server => 'hkp://pgp.mit.edu:80',
    124         }
    125       end
    126       it 'contains the apt_key' do
    127         should contain_apt_key(title).with({
     129          :server => 'hkp://pgp.mit.edu:80',
     130        }
     131      end
     132      it 'contains the apt_key' do
     133        is_expected.to contain_apt_key(title).with({
    128134          :id        => title,
    129135          :server => 'hkp://pgp.mit.edu:80',
    … …  
    136142    context "domain begin with dash" do
    137143      let(:params) do{
    138         :key_server => '-pgp.mit.edu',
     144        :server => '-pgp.mit.edu',
    139145      } end
    140146      it 'fails' do
    … …  
    145151    context "domain begin with dot" do
    146152      let(:params) do{
    147         :key_server => '.pgp.mit.edu',
     153        :server => '.pgp.mit.edu',
    148154      } end
    149155      it 'fails' do
    … …  
    154160    context "domain end with dot" do
    155161      let(:params) do{
    156         :key_server => "pgp.mit.edu.",
     162        :server => "pgp.mit.edu.",
    157163      } end
    158164      it 'fails' do
    … …  
    163169      let :params do
    164170        {
    165           :key_server => 'hkp://pgpiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.mit.edu'
     171          :server => 'hkp://pgpiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.mit.edu'
    166172        }
    167173      end
    … …  
    173179      let :params do
    174180        {
    175           :key_server => 'hkp://pgp.mit.edu:8008080'
     181          :server => 'hkp://pgp.mit.edu:8008080'
    176182        }
    177183      end
    … …  
    183189      let :params do
    184190        {
    185           :key_server => 'abc://pgp.mit.edu:80'
     191          :server => 'abc://pgp.mit.edu:80'
    186192        }
    187193      end
    … …  
    193199      let :params do
    194200        {
    195           :key_server => 'hkp://pgp.mit.edu:'
     201          :server => 'hkp://pgp.mit.edu:'
    196202        }
    197203      end
    … …  
    203209      let :params do
    204210        {
    205           :key_server => 'hkp://pgp.mit.edu.'
     211          :server => 'hkp://pgp.mit.edu.'
    206212        }
    207213      end
    … …  
    212218    context "url begin with a dash" do
    213219      let(:params) do{
    214         :key_server => "hkp://-pgp.mit.edu",
     220        :server => "hkp://-pgp.mit.edu",
    215221      } end
    216222      it 'fails' do
    … …  
    229235    context 'invalid source' do
    230236      let :params do {
    231         :key_source => 'afp://puppetlabs.com/key.gpg',
     237        :source => 'afp://puppetlabs.com/key.gpg',
    232238      } end
    233239      it 'fails' do
    … …  
    238244    context 'invalid content' do
    239245      let :params do {
    240         :key_content => [],
    241       } end
    242       it 'fails' do
    243         expect { subject.call }.to raise_error(/is not a string/)
     246        :content => [],
     247      } end
     248      it 'fails' do
     249        expect { subject.call }.to raise_error(/expects a/)
    244250      end
    245251    end
    … …  
    247253    context 'invalid server' do
    248254      let :params do {
    249         :key_server => 'two bottles of rum',
     255        :server => 'two bottles of rum',
    250256      } end
    251257      it 'fails' do
    … …  
    256262    context 'invalid keyserver_options' do
    257263      let :params do {
    258         :key_options => {},
    259       } end
    260       it 'fails' do
    261         expect { subject.call }.to raise_error(/is not a string/)
     264        :options => {},
     265      } end
     266      it 'fails' do
     267        expect { subject.call }.to raise_error(/expects a/)
    262268      end
    263269    end
    … …  
    270276      end
    271277      it 'fails' do
    272         expect { subject.call }.to raise_error(/does not match/)
     278        expect { subject.call }.to raise_error(/Enum\['absent', 'present'\]/)
    273279      end
    274280    end
    … …  
    277283      context 'two apt::key resources for same key, different titles' do
    278284        let :pre_condition do
    279           "apt::key { 'duplicate': key => '#{title}', }"
    280         end
    281 
    282         it 'contains two apt::key resources' do
    283           should contain_apt__key('duplicate').with({
    284             :key    => title,
     285          "#{super()}\napt::key { 'duplicate': id => '#{title}', }"
     286        end
     287
     288        it 'contains the duplicate apt::key resource' do
     289          is_expected.to contain_apt__key('duplicate').with({
     290            :id    => title,
    285291            :ensure => 'present',
    286292          })
    287           should contain_apt__key(title).with({
     293        end
     294
     295        it 'contains the original apt::key resource' do
     296          is_expected.to contain_apt__key(title).with({
    288297            :id     => title,
    289298            :ensure => 'present',
    … …  
    291300        end
    292301
    293         it 'contains only a single apt_key' do
    294           should contain_apt_key('duplicate').with({
     302        it 'contains the native apt_key' do
     303          is_expected.to contain_apt_key('duplicate').with({
    295304            :id                => title,
    296305            :ensure            => 'present',
    297306            :source            => nil,
    298             :server            => nil,
     307            :server            => 'keyserver.ubuntu.com',
    299308            :content           => nil,
    300309            :keyserver_options => nil,
    301310          })
    302           should_not contain_apt_key(title)
     311        end
     312
     313        it 'does not contain the original apt_key' do
     314          is_expected.not_to contain_apt_key(title)
    303315        end
    304316      end
    … …  
    306318      context 'two apt::key resources, different ensure' do
    307319        let :pre_condition do
    308           "apt::key { 'duplicate': key => '#{title}', ensure => 'absent', }"
     320          "#{super()}\napt::key { 'duplicate': id => '#{title}', ensure => 'absent', }"
    309321        end
    310322        it 'informs the user of the impossibility' do
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/key_spec.rb

    rbcf0be5 rad28f83  
    66  end
    77
    8   let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    9 
    10   GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
     8  let(:facts) { {
     9    :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     10    :lsbdistid       => 'Debian',
     11    :osfamily        => 'Debian',
     12    :lsbdistcodename => 'wheezy',
     13    :puppetversion   => Puppet.version,
     14  } }
     15
     16  GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
    1117
    1218  let :title do
    … …  
    246252      } end
    247253      it 'fails' do
    248         expect { subject.call }.to raise_error(/is not a string/)
     254        expect { subject.call }.to raise_error(/expects a/)
    249255      end
    250256    end
    … …  
    264270      } end
    265271      it 'fails' do
    266         expect { subject.call }.to raise_error(/is not a string/)
     272        expect { subject.call }.to raise_error(/expects a/)
    267273      end
    268274    end
    269275
    270276    context 'invalid ensure' do
    271       let :params do
    272         {
    273           :ensure => 'foo',
    274         }
    275       end
    276       it 'fails' do
    277         expect { subject.call }.to raise_error(/does not match/)
     277      %w(foo aabsent absenta apresent presenta).each do |param|
     278        let :params do
     279          {
     280            :ensure => param,
     281          }
     282          end
     283        it 'fails' do
     284          expect { subject.call }.to raise_error(/for Enum\['absent', 'present'\], got/)
     285        end
    278286      end
    279287    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/pin_spec.rb

    rbcf0be5 rad28f83  
    44    'class { "apt": }'
    55  end
    6   let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     6  let(:facts) { {
     7    :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     8    :lsbdistid       => 'Debian',
     9    :osfamily        => 'Debian',
     10    :lsbdistcodename => 'wheezy',
     11    :puppetversion   => Puppet.version,
     12  } }
    713  let(:title) { 'my_pin' }
    814
    915  context 'defaults' do
    1016    it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: \*\nPin: release a=my_pin\nPin-Priority: 0\n/)}
    11     it { is_expected.to contain_apt__setting("pref-my_pin") }
    1217  end
    1318
    … …  
    1621      {
    1722        'packages' => 'vim',
    18         'version'  => '1',
     23        'version'  => "1",
    1924      }
    2025    end
    2126    it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: vim\nPin: version 1\nPin-Priority: 0\n/)}
    22     it { is_expected.to contain_apt__setting("pref-my_pin") }
    2327  end
    2428
    … …  
    3135    end
    3236    it { is_expected.to contain_apt__setting("pref-my_pin").with_content(/Explanation: : my_pin\nPackage: vim\nPin: origin test\nPin-Priority: 0\n/)}
    33     it { is_expected.to contain_apt__setting("pref-my_pin") }
    3437  end
    3538
    … …  
    8285        expect {
    8386          subject.call
    84         }.to raise_error(Puppet::Error, /Only integers are allowed/)
     87        }.to raise_error(Puppet::Error, /expects an Integer value, got String/)
    8588      end
    8689    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/ppa_spec.rb

    rbcf0be5 rad28f83  
    88    let :facts do
    99      {
     10        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    1011        :lsbdistrelease  => '11.04',
    1112        :lsbdistcodename => 'natty',
    … …  
    2223      :environment => [],
    2324      :command     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type',
    24       :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list',
     25      :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list',
    2526      :user        => 'root',
    2627      :logoutput   => 'on_failure',
    … …  
    3233    let :facts do
    3334      {
     35        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '15', :full => '15.10' }},
    3436        :lsbdistrelease  => '15.10',
    3537        :lsbdistcodename => 'wily',
    … …  
    4547      :environment => [],
    4648      :command     => '/usr/bin/add-apt-repository -y ppa:user/foo',
    47       :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-ubuntu-foo-wily.list',
     49      :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-wily.list',
    4850      :user        => 'root',
    4951      :logoutput   => 'on_failure',
    … …  
    7072    let :facts do
    7173      {
     74        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    7275        :lsbdistrelease  => '11.04',
    7376        :lsbdistcodename => 'natty',
    … …  
    8487      'environment' => [],
    8588      'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow',
    86       'unless'      => '/usr/bin/test -s /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
     89      'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
    8790      'user'        => 'root',
    8891      'logoutput'   => 'on_failure',
    … …  
    105108    let :facts do
    106109      {
     110        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    107111        :lsbdistrelease  => '11.04',
    108112        :lsbdistcodename => 'natty',
    … …  
    124128      'environment' => [],
    125129      'command'     => '/usr/bin/add-apt-repository -y ppa:user/bar',
    126       'unless'      => '/usr/bin/test -s /etc/apt/sources.list.d/user-bar-natty.list',
     130      'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/user-bar-natty.list',
    127131      'user'        => 'root',
    128132      'logoutput'   => 'on_failure',
    … …  
    142146    let :facts do
    143147      {
     148        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    144149        :lsbdistrelease  => '11.04',
    145150        :lsbdistcodename => 'natty',
    … …  
    161166      'environment' => [],
    162167      'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow',
    163       'unless'      => '/usr/bin/test -s /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
     168      'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
    164169      'user'        => 'root',
    165170      'logoutput'   => 'on_failure',
    … …  
    181186    let :facts do
    182187      {
     188        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    183189        :lsbdistrelease  => '14.04',
    184190        :lsbdistcodename => 'trusty',
    … …  
    202208      :environment => [],
    203209      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    204       :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
     210      :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
    205211      :user        => 'root',
    206212      :logoutput   => 'on_failure',
    … …  
    217223    let :facts do
    218224      {
     225        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    219226        :lsbdistrelease  => '14.04',
    220227        :lsbdistcodename => 'trusty',
    … …  
    236243      :environment => ['http_proxy=http://localhost:8080'],
    237244      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    238       :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
     245      :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
    239246      :user        => 'root',
    240247      :logoutput   => 'on_failure',
    … …  
    251258    let :facts do
    252259      {
     260        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    253261        :lsbdistrelease  => '14.04',
    254262        :lsbdistcodename => 'trusty',
    … …  
    270278      :environment => ['http_proxy=http://localhost:8180'],
    271279      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    272       :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
     280      :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
    273281      :user        => 'root',
    274282      :logoutput   => 'on_failure',
    … …  
    285293    let :facts do
    286294      {
     295        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    287296        :lsbdistrelease  => '14.04',
    288297        :lsbdistcodename => 'trusty',
    … …  
    304313      :environment => ['http_proxy=http://localhost:8180', 'https_proxy=https://localhost:8180'],
    305314      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    306       :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
     315      :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
    307316      :user        => 'root',
    308317      :logoutput   => 'on_failure',
    … …  
    317326    let :facts do
    318327      {
     328        :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    319329        :lsbdistrelease  => '14.04',
    320330        :lsbdistcodename => 'trusty',
    … …  
    341351      let :facts do
    342352        {
     353          :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    343354          :lsbdistrelease  => '14.04',
    344355          :operatingsystem => 'Ubuntu',
    … …  
    360371      let :facts do
    361372        {
     373          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0.7' }},
    362374          :lsbdistrelease  => '6.0.7',
    363375          :lsbdistcodename => 'wheezy',
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/setting_spec.rb

    rbcf0be5 rad28f83  
    33describe 'apt::setting' do
    44  let(:pre_condition) { 'class { "apt": }' }
    5   let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     5  let :facts do
     6    {
     7      :os => { :distro => { :codename => 'wheezy' }, :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     8      :lsbdistrelease  => '7.0',
     9      :lsbdistcodename => 'wheezy',
     10      :operatingsystem => 'Debian',
     11      :osfamily        => 'Debian',
     12      :lsbdistid       => 'Debian',
     13      :puppetversion   => Puppet.version,
     14    }
     15  end
    616  let(:title) { 'conf-teddybear' }
    717
    … …  
    6272      '
    6373    end
    64     let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     74    let(:facts) { {
     75      :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     76      :lsbdistid       => 'Debian',
     77      :osfamily        => 'Debian',
     78      :lsbdistcodename => 'wheezy',
     79      :puppetversion   => Puppet.version,
     80    } }
    6581    let(:title) { 'conf-teddybear' }
    6682    let(:default_params) { { :content => 'di' } }
    … …  
    8399      let(:params) { default_params }
    84100      it do
    85         expect { subject.call }.to raise_error(Puppet::Error, /must start with /)
     101        expect { subject.call }.to raise_error(Puppet::Error, /must start with either/)
    86102      end
    87103    end
    … …  
    90106      let(:params) { default_params.merge({ :ensure => 'banana' }) }
    91107      it do
    92         expect { subject.call }.to raise_error(Puppet::Error, /"banana" does not /)
     108        expect { subject.call }.to raise_error(Puppet::Error, /Enum\['absent', 'file', 'present'\]/)
    93109      end
    94110    end
    … …  
    96112    context 'with priority=1.2' do
    97113      let(:params) { default_params.merge({ :priority => 1.2 }) }
    98       it do
    99         expect { subject.call }.to raise_error(Puppet::Error, /be an integer /)
     114      if Puppet::Util::Package.versioncmp(Puppet.version, '4.0') >= 0 || ENV["FUTURE_PARSER"] == 'yes'
     115        it { is_expected.to compile.and_raise_error(/expects a value of type/) }
     116      else
     117        it { is_expected.to compile.and_raise_error(/priority must be an integer or a zero-padded integer/) }
    100118      end
    101119    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/source_compat_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'apt::source', :type => :define do
    4   GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
     4  GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
    55
    66  let :title do
    … …  
    1111    let :facts do
    1212      {
     13        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    1314        :lsbdistid       => 'Debian',
    1415        :lsbdistcodename => 'wheezy',
    1516        :osfamily        => 'Debian',
     17        :puppetversion   => Puppet.version,
    1618      }
    1719    end
    … …  
    1921    let :params do
    2022      {
    21         'include_deb' => false,
    22         'include_src' => true,
     23        'include' => { 'deb' => false, 'src' => true },
    2324        'location'    => 'http://debian.mirror.iweb.ca/debian/',
    2425      }
    … …  
    3233    let :facts do
    3334      {
     35        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    3436        :lsbdistid       => 'Debian',
    3537        :lsbdistcodename => 'wheezy',
    36         :osfamily        => 'Debian'
     38        :osfamily        => 'Debian',
     39        :puppetversion   => Puppet.version,
    3740      }
    3841    end
    3942    let :params do
    4043      {
    41         'comment'           => 'foo',
    42         'location'          => 'http://debian.mirror.iweb.ca/debian/',
    43         'release'           => 'sid',
    44         'repos'             => 'testing',
    45         'include_src'       => false,
    46         'required_packages' => 'vim',
    47         'key'               => GPG_KEY_ID,
    48         'key_server'        => 'pgp.mit.edu',
    49         'key_content'       => 'GPG key content',
    50         'key_source'        => 'http://apt.puppetlabs.com/pubkey.gpg',
    51         'pin'               => '10',
    52         'architecture'      => 'x86_64',
    53         'trusted_source'    => true,
     44        'comment'        => 'foo',
     45        'location'       => 'http://debian.mirror.iweb.ca/debian/',
     46        'release'        => 'sid',
     47        'repos'          => 'testing',
     48        'include'        => { 'src' => false },
     49        'key'            => GPG_KEY_ID,
     50        'pin'            => '10',
     51        'architecture'   => 'x86_64',
     52        'allow_unsigned' => true,
    5453      }
    5554    end
    … …  
    6564    }
    6665
    67     it { is_expected.to contain_exec("Required packages: 'vim' for my_source").that_comes_before('Apt::Setting[list-my_source]').with({
    68       'command'     => '/usr/bin/apt-get -y install vim',
    69       'logoutput'   => 'on_failure',
    70       'refreshonly' => true,
    71       'tries'       => '3',
    72       'try_sleep'   => '1',
    73     })
    74     }
    75 
    7666    it { is_expected.to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('Apt::Setting[list-my_source]').with({
    7767      'ensure' => 'present',
    7868      'id'  => GPG_KEY_ID,
    79       'key_server' => 'pgp.mit.edu',
    80       'key_content' => 'GPG key content',
    81       'key_source' => 'http://apt.puppetlabs.com/pubkey.gpg',
    8269    })
    8370    }
    8471  end
    8572
    86   context 'trusted_source true' do
     73  context 'allow_unsigned true' do
    8774    let :facts do
    8875      {
     76        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    8977        :lsbdistid       => 'Debian',
    9078        :lsbdistcodename => 'wheezy',
    91         :osfamily        => 'Debian'
     79        :osfamily        => 'Debian',
     80        :puppetversion   => Puppet.version,
    9281      }
    9382    end
    9483    let :params do
    9584      {
    96         'include_src'    => false,
     85        'include'        => {'src' => false},
    9786        'location'       => 'http://debian.mirror.iweb.ca/debian/',
    98         'trusted_source' => true,
     87        'allow_unsigned' => true,
    9988      }
    10089    end
    … …  
    10695    let :facts do
    10796      {
     97        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    10898        :lsbdistid       => 'Debian',
    10999        :lsbdistcodename => 'wheezy',
    110         :osfamily        => 'Debian'
     100        :osfamily        => 'Debian',
     101        :puppetversion   => Puppet.version,
    111102      }
    112103    end
    … …  
    125116    let :facts do
    126117      {
     118        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    127119        :lsbdistid       => 'Debian',
    128120        :lsbdistcodename => 'wheezy',
    129         :osfamily        => 'Debian'
     121        :osfamily        => 'Debian',
     122        :puppetversion   => Puppet.version,
    130123      }
    131124    end
    … …  
    146139      let :facts do
    147140        {
     141          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    148142          :lsbdistid       => 'Debian',
    149           :osfamily        => 'Debian'
     143          :osfamily        => 'Debian',
     144          :puppetversion   => Puppet.version,
    150145        }
    151146      end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/source_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'apt::source' do
    4   GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
     4  GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
    55
    66  let :pre_condition do
    … …  
    1616      let :facts do
    1717        {
    18           :lsbdistid       => 'Debian',
    19           :lsbdistcodename => 'wheezy',
    20           :osfamily        => 'Debian',
     18          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     19          :osfamily        => 'Debian',
     20          :lsbdistcodename => 'wheezy',
    2121          :puppetversion   => Puppet.version,
    2222        }
    … …  
    3131      let :facts do
    3232        {
     33          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    3334          :lsbdistid       => 'Debian',
    3435          :lsbdistcodename => 'wheezy',
    … …  
    4950    let :facts do
    5051      {
    51         :lsbdistid       => 'Debian',
    52         :lsbdistcodename => 'wheezy',
    53         :osfamily        => 'Debian',
     52        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     53        :lsbdistid       => 'Debian',
     54        :lsbdistcodename => 'wheezy',
     55        :osfamily        => 'Debian',
     56        :operatingsystem => 'Debian',
     57        :lsbdistrelease  => '7.0',
    5458        :puppetversion   => Puppet.version,
    5559      }
    … …  
    190194    let :facts do
    191195      {
     196        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    192197        :lsbdistid       => 'Debian',
    193198        :lsbdistcodename => 'wheezy',
    … …  
    212217    let :facts do
    213218      {
     219        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    214220        :lsbdistid       => 'Debian',
    215221        :lsbdistcodename => 'wheezy',
    … …  
    221227      {
    222228        :location     => 'hello.there',
    223         :include      => {'deb' => false, 'src' => true,},
     229        :include      => {'deb' => false, 'src' => true},
    224230        :architecture => 'x86_64',
    225231      }
    … …  
    232238  end
    233239
     240  context 'with architecture fact and unset architecture parameter' do
     241    let :facts do
     242      {
     243        :architecture    => 'amd64',
     244        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     245        :lsbdistid       => 'Debian',
     246        :lsbdistcodename => 'wheezy',
     247        :osfamily        => 'Debian',
     248        :puppetversion   => Puppet.version,
     249      }
     250    end
     251    let :params do
     252      {
     253        :location => 'hello.there',
     254        :include  => {'deb' => false, 'src' => true,},
     255      }
     256    end
     257
     258    it { is_expected.to contain_apt__setting('list-my_source').with({
     259      :ensure => 'present',
     260    }).with_content(/# my_source\ndeb-src hello.there wheezy main\n/)
     261    }
     262  end
     263
    234264  context 'include_src => true' do
    235265    let :facts do
    236266      {
     267        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    237268        :lsbdistid       => 'Debian',
    238269        :lsbdistcodename => 'wheezy',
    … …  
    244275      {
    245276        :location    => 'hello.there',
    246         :include_src => true,
     277        :include     => {'src' => true},
    247278      }
    248279    end
    … …  
    254285  end
    255286
    256   context 'include_deb => false' do
    257     let :facts do
    258       {
     287  context 'include deb => false' do
     288    let :facts do
     289      {
     290        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    259291        :lsbdistid       => 'debian',
    260292        :lsbdistcodename => 'wheezy',
    … …  
    265297    let :params do
    266298      {
     299        :include => { 'deb' => false },
    267300        :location    => 'hello.there',
    268         :include_deb => false,
    269301      }
    270302    end
    … …  
    277309  end
    278310
    279   context 'include_src => true and include_deb => false' do
    280     let :facts do
    281       {
     311  context 'include src => true and include deb => false' do
     312    let :facts do
     313      {
     314        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    282315        :lsbdistid       => 'debian',
    283316        :lsbdistcodename => 'wheezy',
    … …  
    288321    let :params do
    289322      {
     323        :include => { 'deb' => false, 'src' => true },
    290324        :location    => 'hello.there',
    291         :include_deb => false,
    292         :include_src => true,
    293325      }
    294326    end
    … …  
    301333  end
    302334
    303   context 'include precedence' do
    304     let :facts do
    305       {
    306         :lsbdistid       => 'debian',
    307         :lsbdistcodename => 'wheezy',
    308         :osfamily        => 'debian',
    309         :puppetversion   => Puppet.version,
    310       }
    311     end
    312     let :params do
    313       {
    314         :location    => 'hello.there',
    315         :include_deb => true,
    316         :include_src => false,
    317         :include     => { 'deb' => false, 'src' => true },
    318       }
    319     end
    320 
    321     it { is_expected.to contain_apt__setting('list-my_source').with({
    322       :ensure => 'present',
    323     }).with_content(/deb-src hello.there wheezy main\n/)
    324     }
    325     it { is_expected.to contain_apt__setting('list-my_source').without_content(/deb hello.there wheezy main\n/) }
    326   end
    327 
    328335  context 'ensure => absent' do
    329336    let :facts do
    330337      {
     338        :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    331339        :lsbdistid       => 'Debian',
    332340        :lsbdistcodename => 'wheezy',
    … …  
    351359      let :facts do
    352360        {
     361          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    353362          :lsbdistid       => 'Debian',
    354363          :osfamily        => 'Debian',
    … …  
    365374    end
    366375
     376    context 'release is empty string' do
     377      let :facts do
     378        {
     379          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     380          :lsbdistid       => 'Debian',
     381          :osfamily        => 'Debian',
     382          :puppetversion   => Puppet.version,
     383        }
     384      end
     385      let(:params) { { :location => 'hello.there', :release => '' } }
     386
     387      it { is_expected.to contain_apt__setting('list-my_source').with_content(/hello\.there  main/) }
     388    end
     389
    367390    context 'invalid pin' do
    368391      let :facts do
    369392        {
     393          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    370394          :lsbdistid       => 'Debian',
    371395          :lsbdistcodename => 'wheezy',
    … …  
    388412    end
    389413
     414    context "with notify_update = undef (default)" do
     415      let :facts do
     416        {
     417          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     418          :lsbdistid       => 'Debian',
     419          :lsbdistcodename => 'wheezy',
     420          :osfamily        => 'Debian',
     421          :puppetversion   => Puppet.version,
     422        }
     423      end
     424      let :params do
     425        {
     426          :location      => 'hello.there',
     427        }
     428      end
     429      it { is_expected.to contain_apt__setting("list-#{title}").with_notify_update(true) }
     430    end
     431
     432    context "with notify_update = true" do
     433      let :facts do
     434        {
     435          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     436          :lsbdistid       => 'Debian',
     437          :lsbdistcodename => 'wheezy',
     438          :osfamily        => 'Debian',
     439          :puppetversion   => Puppet.version,
     440        }
     441      end
     442      let :params do
     443        {
     444          :location      => 'hello.there',
     445          :notify_update => true,
     446        }
     447      end
     448      it { is_expected.to contain_apt__setting("list-#{title}").with_notify_update(true) }
     449    end
     450
     451    context "with notify_update = false" do
     452      let :facts do
     453        {
     454          :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     455          :lsbdistid       => 'Debian',
     456          :lsbdistcodename => 'wheezy',
     457          :osfamily        => 'Debian',
     458          :puppetversion   => Puppet.version,
     459        }
     460      end
     461      let :params do
     462        {
     463          :location      => 'hello.there',
     464          :notify_update => false,
     465        }
     466      end
     467      it { is_expected.to contain_apt__setting("list-#{title}").with_notify_update(false) }
     468    end
     469
    390470  end
    391471end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/spec_helper_acceptance.rb

    rbcf0be5 rad28f83  
    11require 'beaker-rspec'
    22require 'beaker/puppet_install_helper'
     3require 'beaker/module_install_helper'
    34
    45run_puppet_install_helper
     6install_module_on(hosts)
     7install_module_dependencies_on(hosts)
    58
    69UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris']
     10
     11# This method allows a block to be passed in and if an exception is raised
     12# that matches the 'error_matcher' matcher, the block will wait a set number
     13# of seconds before retrying.
     14# Params:
     15# - max_retry_count - Max number of retries
     16# - retry_wait_interval_secs - Number of seconds to wait before retry
     17# - error_matcher - Matcher which the exception raised must match to allow retry
     18# Example Usage:
     19# retry_on_error_matching(3, 5, /OpenGPG Error/) do
     20#   apply_manifest(pp, :catch_failures => true)
     21# end
     22def retry_on_error_matching(max_retry_count = 3, retry_wait_interval_secs = 5, error_matcher = nil)
     23  try = 0
     24  begin
     25    try += 1
     26    yield
     27  rescue Exception => e
     28    if try < max_retry_count && (error_matcher == nil || e.message =~ error_matcher)
     29      sleep retry_wait_interval_secs
     30      retry
     31    else
     32      raise
     33    end
     34  end
     35end
    736
    837RSpec.configure do |c|
    … …  
    1241  # Readable test descriptions
    1342  c.formatter = :documentation
    14 
    15   # Configure all nodes in nodeset
    16   c.before :suite do
    17     # Install module and dependencies
    18     hosts.each do |host|
    19       copy_module_to(host, :source => proj_root, :module_name => 'apt')
    20       shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
    21       on host, puppet('module install puppetlabs-stdlib --version 4.5.0'), { :acceptable_exit_codes => [0,1] }
    22     end
    23   end
    2443end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_has_updates_spec.rb

    rbcf0be5 rad28f83  
    1212  end
    1313
    14   describe 'on Debian based distro missing update-notifier-common' do
     14  describe 'on Debian based distro missing apt-get' do
    1515    before {
    1616      Facter.fact(:osfamily).expects(:value).at_least(1).returns 'Debian'
    1717      File.stubs(:executable?) # Stub all other calls
    18       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns false
    19     }
    20     it { is_expected.to be_nil }
    21   end
    22 
    23   describe 'on Debian based distro with broken packages' do
    24     before {
    25       Facter.fact(:osfamily).expects(:value).at_least(1).returns 'Debian'
    26       File.stubs(:executable?) # Stub all other calls
    27       Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    28       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
    29       Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "E: Error: BrokenCount > 0"
    30     }
    31     it { is_expected.to be_nil }
    32   end
    33 
    34   describe 'on Debian based distro with unknown error with semicolons' do
    35     before {
    36       Facter.fact(:osfamily).expects(:value).at_least(1).returns 'Debian'
    37       File.stubs(:executable?) # Stub all other calls
    38       Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    39       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
    40       Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "E: Unknown Error: 'This error contains something that could be parsed like 4;3' (10)"
     18      File.expects(:executable?).with('/usr/bin/apt-get').returns false
    4119    }
    4220    it { is_expected.to be_nil }
    … …  
    4826      File.stubs(:executable?) # Stub all other calls
    4927      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    50       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
    51       Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "4;3"
     28      File.expects(:executable?).with('/usr/bin/apt-get').returns true
     29      Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
     30        "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     31        "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     32        "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
     33        "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
    5234    }
    5335    it { is_expected.to be true }
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_package_updates_spec.rb

    rbcf0be5 rad28f83  
    1717      File.stubs(:executable?) # Stub all other calls
    1818      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    19       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
    20       Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "1;2"
    21       Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check -p 2>&1').returns "puppet-common\nlinux-generic\nlinux-image-generic"
     19      File.expects(:executable?).with('/usr/bin/apt-get').returns true
     20      Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
     21        "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     22        "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     23        "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
     24        "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
    2225    }
    2326    it {
    2427      if Facter.version < '2.0.0'
    25         is_expected.to eq('puppet-common,linux-generic,linux-image-generic')
     28        is_expected.to eq('tzdata,unhide.rb')
    2629      else
    27         is_expected.to eq(['puppet-common', 'linux-generic', 'linux-image-generic'])
     30        is_expected.to eq(['tzdata','unhide.rb'])
    2831      end
    2932    }
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_security_updates_spec.rb

    rbcf0be5 rad28f83  
    1717      File.stubs(:executable?) # Stub all other calls
    1818      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    19       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
    20       Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "14;7"
     19      File.expects(:executable?).with('/usr/bin/apt-get').returns true
     20      Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
     21        "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     22        "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     23        "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
     24        "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
    2125    }
    22     it { is_expected.to eq(7) }
     26    it { is_expected.to eq(1) }
    2327  end
    2428
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_update_last_success_spec.rb

    rbcf0be5 rad28f83  
    33describe 'apt_update_last_success fact' do
    44  subject { Facter.fact(:apt_update_last_success).value }
     5  before(:each) { Facter.clear }
    56  after(:each) { Facter.clear }
    67
    78  describe 'on Debian based distro which has not yet created the update-success-stamp file' do
    8     before {
     9    it 'should have a value of -1' do
    910      Facter.fact(:osfamily).stubs(:value).returns 'Debian'
    10       File.stubs(:exists?).returns false
    11     }
    12     it 'should have a value of -1' do
     11      File.expects(:exists?).with('/var/lib/apt/periodic/update-success-stamp').returns false
    1312      is_expected.to eq(-1)
    1413    end
    … …  
    1615
    1716  describe 'on Debian based distro which has created the update-success-stamp' do
    18     before {
     17    it 'should have the value of the mtime of the file' do
    1918      Facter.fact(:osfamily).stubs(:value).returns 'Debian'
    2019      File.stubs(:exists?).returns true
    2120      File.stubs(:mtime).returns 1407660561
    22     }
    23     it 'should have the value of the mtime of the file' do
    2421      is_expected.to eq(1407660561)
    2522    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_updates_spec.rb

    rbcf0be5 rad28f83  
    1717      File.stubs(:executable?) # Stub all other calls
    1818      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    19       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
    20       Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "14;7"
     19      File.expects(:executable?).with('/usr/bin/apt-get').returns true
     20      Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+
     21        "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     22        "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+
     23        "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+
     24        "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
    2125    }
    22     it { is_expected.to eq(14) }
     26    it { is_expected.to eq(2) }
    2327  end
    2428
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/puppet/type/apt_key_spec.rb

    rbcf0be5 rad28f83  
    55  context 'only namevar 32bit key id' do
    66    let(:resource) { Puppet::Type.type(:apt_key).new(
    7       :id => '4BD6EC30'
     7      :id => 'EF8D349F'
    88    )}
    99    it 'id is set' do
    10       expect(resource[:id]).to eq '4BD6EC30'
     10      expect(resource[:id]).to eq 'EF8D349F'
    1111    end
    1212
    1313    it 'name is set to id' do
    14       expect(resource[:name]).to eq '4BD6EC30'
     14      expect(resource[:name]).to eq 'EF8D349F'
    1515    end
    1616
    … …  
    3030  context 'with a lowercase 32bit key id' do
    3131    let(:resource) { Puppet::Type.type(:apt_key).new(
    32       :id => '4bd6ec30'
     32      :id => 'ef8d349f'
    3333    )}
    3434    it 'id is set' do
    35       expect(resource[:id]).to eq '4BD6EC30'
     35      expect(resource[:id]).to eq 'EF8D349F'
    3636    end
    3737  end
    … …  
    3939  context 'with a 64bit key id' do
    4040    let(:resource) { Puppet::Type.type(:apt_key).new(
    41       :id => 'FFFFFFFF4BD6EC30'
     41      :id => 'FFFFFFFFEF8D349F'
    4242    )}
    4343    it 'id is set' do
    44       expect(resource[:id]).to eq 'FFFFFFFF4BD6EC30'
     44      expect(resource[:id]).to eq 'FFFFFFFFEF8D349F'
    4545    end
    4646  end
    … …  
    4848  context 'with a 0x formatted key id' do
    4949    let(:resource) { Puppet::Type.type(:apt_key).new(
    50       :id => '0x4BD6EC30'
     50      :id => '0xEF8D349F'
    5151    )}
    5252    it 'id is set' do
    53       expect(resource[:id]).to eq '4BD6EC30'
     53      expect(resource[:id]).to eq 'EF8D349F'
    5454    end
    5555  end
    … …  
    5757  context 'with a 0x formatted lowercase key id' do
    5858    let(:resource) { Puppet::Type.type(:apt_key).new(
    59       :id => '0x4bd6ec30'
     59      :id => '0xef8d349f'
    6060    )}
    6161    it 'id is set' do
    62       expect(resource[:id]).to eq '4BD6EC30'
     62      expect(resource[:id]).to eq 'EF8D349F'
    6363    end
    6464  end
    … …  
    6666  context 'with a 0x formatted 64bit key id' do
    6767    let(:resource) { Puppet::Type.type(:apt_key).new(
    68       :id => '0xFFFFFFFF4BD6EC30'
     68      :id => '0xFFFFFFFFEF8D349F'
    6969    )}
    7070    it 'id is set' do
    71       expect(resource[:id]).to eq 'FFFFFFFF4BD6EC30'
     71      expect(resource[:id]).to eq 'FFFFFFFFEF8D349F'
    7272    end
    7373  end
    … …  
    7575  context 'with source' do
    7676    let(:resource) { Puppet::Type.type(:apt_key).new(
    77       :id => '4BD6EC30',
     77      :id => 'EF8D349F',
    7878      :source => 'http://apt.puppetlabs.com/pubkey.gpg'
    7979    )}
    … …  
    8686  context 'with content' do
    8787    let(:resource) { Puppet::Type.type(:apt_key).new(
    88       :id => '4BD6EC30',
     88      :id => 'EF8D349F',
    8989      :content => 'http://apt.puppetlabs.com/pubkey.gpg'
    9090    )}
    … …  
    9797  context 'with keyserver' do
    9898    let(:resource) { Puppet::Type.type(:apt_key).new(
    99       :id => '4BD6EC30',
     99      :id => 'EF8D349F',
    100100      :server => 'http://keyring.debian.org'
    101101    )}
    … …  
    109109    it 'raises an error if content and source are set' do
    110110      expect { Puppet::Type.type(:apt_key).new(
    111         :id      => '4BD6EC30',
     111        :id      => 'EF8D349F',
    112112        :source  => 'http://apt.puppetlabs.com/pubkey.gpg',
    113113        :content => 'Completely invalid as a GPG key'
    … …  
    117117    it 'raises an error if a weird length key is used' do
    118118      expect { Puppet::Type.type(:apt_key).new(
    119         :id      => 'F4BD6EC30',
     119        :id      => 'FEF8D349F',
    120120        :source  => 'http://apt.puppetlabs.com/pubkey.gpg',
    121121        :content => 'Completely invalid as a GPG key'
    … …  
    125125    it 'raises an error when an invalid URI scheme is used in source' do
    126126      expect { Puppet::Type.type(:apt_key).new(
    127         :id      => '4BD6EC30',
     127        :id      => 'EF8D349F',
    128128        :source  => 'hkp://pgp.mit.edu'
    129129      )}.to raise_error(/Valid values match/)
    … …  
    132132    it 'allows the http URI scheme in source' do
    133133      expect { Puppet::Type.type(:apt_key).new(
    134         :id      => '4BD6EC30',
     134        :id      => 'EF8D349F',
    135135        :source  => 'http://pgp.mit.edu'
     136      )}.to_not raise_error
     137    end
     138
     139    it 'allows the http URI with username and password' do
     140      expect { Puppet::Type.type(:apt_key).new(
     141          :id      => '4BD6EC30',
     142          :source  => 'http://testme:Password2@pgp.mit.edu'
    136143      )}.to_not raise_error
    137144    end
    … …  
    139146    it 'allows the https URI scheme in source' do
    140147      expect { Puppet::Type.type(:apt_key).new(
    141         :id      => '4BD6EC30',
     148        :id      => 'EF8D349F',
    142149        :source  => 'https://pgp.mit.edu'
    143150      )}.to_not raise_error
    … …  
    146153    it 'allows the https URI with username and password' do
    147154      expect { Puppet::Type.type(:apt_key).new(
    148           :id      => '4BD6EC30',
     155          :id      => 'EF8D349F',
    149156          :source  => 'https://testme:Password2@pgp.mit.edu'
    150157      )}.to_not raise_error
    … …  
    153160    it 'allows the ftp URI scheme in source' do
    154161      expect { Puppet::Type.type(:apt_key).new(
    155         :id      => '4BD6EC30',
     162        :id      => 'EF8D349F',
    156163        :source  => 'ftp://pgp.mit.edu'
    157164      )}.to_not raise_error
    … …  
    160167    it 'allows an absolute path in source' do
    161168      expect { Puppet::Type.type(:apt_key).new(
    162         :id      => '4BD6EC30',
     169        :id      => 'EF8D349F',
    163170        :source  => '/path/to/a/file'
    164171      )}.to_not raise_error
    … …  
    167174    it 'allows 5-digit ports' do
    168175      expect { Puppet::Type.type(:apt_key).new(
    169         :id      => '4BD6EC30',
     176        :id      => 'EF8D349F',
    170177        :source  => 'http://pgp.mit.edu:12345/key'
    171178      )}.to_not raise_error
    … …  
    174181    it 'allows 5-digit ports when using key servers' do
    175182      expect { Puppet::Type.type(:apt_key).new(
    176         :id      => '4BD6EC30',
     183        :id      => 'EF8D349F',
    177184        :server  => 'http://pgp.mit.edu:12345'
    178185      )}.to_not raise_error
  • src/puppetcode/environments/gnuboat/modules/gnuboat_gpsd/manifests/service.pp

    rbcf0be5 rad28f83  
    66        String $devices = '/dev/ttyAMA0',
    77        Boolean $network_access = false,
     8        Boolean $poll_on_startup = false,
    89)
    910inherits gnuboat_gpsd
    … …  
    1516        }
    1617
     18       
    1719        if(!$network_access)
    1820        {
    19                 $options = ''
     21                $options_network = ''
    2022        }
    2123        else
    2224        {
    23                 $options = '-G'
     25                $options_network = '-G'
    2426                $listen_stream = '0.0.0.0:2947'
    2527                file{'/etc/systemd/system/gpsd.socket':
    … …  
    4244        }
    4345
     46        if($poll_on_startup)
     47        {
     48                $options_startup = '-n'
     49        }
     50        else
     51        {
     52                $options_startup = ''
     53        }
    4454
     55        $options = [$options_network, $options_startup]
    4556        file{'/etc/default/gpsd':
    4657                ensure => present,
  • src/puppetcode/environments/gnuboat/modules/gnuboat_gpsd/templates/gpsd.epp

    rbcf0be5 rad28f83  
    22        Boolean $usb_auto,
    33        String $devices,
    4         String $options
     4        Array $options
    55| -%>
    66# Default settings for the gpsd init script and the hotplug wrapper.
    … …  
    2727
    2828# Other options you want to pass to gpsd
    29 GPSD_OPTIONS="<%= $options %>"
     29GPSD_OPTIONS="<%= $options.join(' ') %>"
  • src/puppetcode/environments/gnuboat/modules/stdlib/CHANGELOG.md

    rbcf0be5 rad28f83  
     1## Supported Release 4.17.1
     2### Summary
     3
     4Small release to address a bug (PUP-7650). Also pushes the Puppet version compatibility to 4.7.0.
     5
     6#### Bugfixes
     7- (MODULES-5095) Workaround for PUP-7650
     8- (FM-6197) Formatting fixes for file_line resource
     9
     10
     11## Supported Release 4.17.0
     12### Summary
     13This release adds support for internationalization. It also contains Japanese translations for the README, summary and description of the metadata.json and major cleanups in the README. Additional folders have been introduced called locales and readmes where translation files can be found. A number of features and bug fixes are also included in this release. It also adds a new function `glob()` for expanding file lists. Also works around an issue that appeared in puppet 4.6.0 involving types being declared multiple times.
     14
     15#### Features
     16- Addition of POT file / folder structure for i18n.
     17- Addition of Internationalized READMEs.
     18- `glob()` function
     19
     20### Fixed
     21- Occasional duplicate type definitions when using `defined_with_params()`
     22- `file_line` encoding issue on ruby 1.8 (unsupported)
     23- Huge readme refresh
     24
     25## Supported Release 4.16.0
     26### Summary
     27
     28This release sees a massive update to all unit tests to test UTF8 characters. There are also multiple cleanups in preparation for internationalization. Alongside this, improvements to ipv6 support, a new length function compatible with Puppet 4, and an update to path types. Also contains multiple bug fixes around functionality and tests.
     29
     30#### Features
     31- Addition of coverage in all unit tests for functions, data and resource types for UTF8 for i18n.
     32- All strings within the readme and functions that are split over two lines have been combined in preparation for i18n parser/decorator.
     33- Improvement on the ipv6 support for type - Improves regex to catch some valid (but lesser known) ipv6 strings, mostly those which are a mix of ipv6 strings and embedded ipv6 numbers.
     34- Adds a new parameter `encoding` to allow non UTF-8 files to specify a file encoding. This prevents receiving the error message "invalid byte sequence in UTF-8" when special characters that are not UTF-8 encoded appear in the input stream, such as the copyright symbol.
     35- Addition of the new length function. Returns the length of a given string, array or hash. To eventually replace the deprecated size() function as can handle the new type functionality introduced in Puppet 4.
     36- Permit double slash in absolute/Unix path types.
     37
     38#### Bugfixes
     39- Fix unsupported data type error with rspec-puppet master.
     40- Now allows test module metadata.json to be read by Puppet.
     41- Fix acceptance test failure "Hiera is not a class".
     42- Removal of unsupported platforms and future parser setting in acceptance tests.
     43- Regex for tuple checking has been loosened.
     44- Ensure_packages function - Now only tries to apply the resource if not defined.
     45- (MODULES-4528) Use versioncmp to check Puppet version for 4.10.x compat.
     46- Adds comments to warn for UTF8 incompatibility of the functions that may not be compatible with UTF8 with Ruby < 2.4.0.
     47
     48## Supported Release 4.15.0
     49### Summary
     50
     51This release introduces multiple new functions, a new fact and the addition of Ubuntu Xenial support. Also includes a bugfix and documentation update.
     52
     53#### Features
     54- Addition of puppet_server fact to return agents server.
     55- Addition of a pry function.
     56- Addition of tests for ensure_resources.
     57- Addition of FQDN UUID generation function.
     58- Addition of Ubuntu Xenial to OS Support.
     59
     60####Bugfixes
     61- Ensure_packages now works with Ruby < 2.0.
     62- Updated the documentation of str2bool function.
     63
     64## Supported Release 4.14.0
     65### Summary
     66
     67Adds several new features and updates, especially around refining the deprecation and validate_legacy functions. Also includes a Gemfile update around an issue with parallel_tests dependancy for different versions of Ruby.
     68
     69#### Features
     70- Deprecation function now uses puppet stacktrace if available.
     71- join_key_to_values function now handles array values. If values are arrays, multiple keys are added for each element.
     72- Updated Gemfile to deal with parallel_tests Ruby dependancy (MODULES-3983).
     73- Updated/Fixed ipv4 regex validator (MODULES-3980).
     74- Deprecation clarification added to README.
     75
     76#### Bugfixes
     77- README typo fixes.
     78- Use .dup to duplicate classes for modification (MODULES-3829).
     79- Fixes spec failures that were caused by a change in the tested error message in validate_legacy_spec.
     80- Broken link to validate_legacy docs fixed.
     81- Updates deprecation tests to include future parser.
     82
     83## Supported Release 4.13.1
     84### Summary
     85
     86This bugfix release addresses the `undefined method 'optional_repeated_param'` error messages seen by users of puppet 3.7.
     87
     88It also improves the user experience around function deprecations by emitting one warning per function(-name) instead of only one deprecation overall. This allows users to identify all deprecated functions used in one agent run, with less back-and-forth.
     89
     90#### Bugfixes
     91
     92* Emit deprecations warnings for each function, instead of once per process. (MODULES-3961)
     93* Use a universally available API for the v4 deprecation stubs of `is_*` and `validate_*`. (MODULES-3962)
     94* Make `getvar()` compatible to ruby 1.8.7. (MODULES-3969)
     95* Add v4 deprecation stubs for the `is_` counterparts of the deprecated functions to emit the deprecations warnings in all cases.
     96
     97
     98## Supported Release 4.13.0
     99### Summary
     100
     101This version of stdlib deprecates a whole host of functions, and provides stepping stones to move to Puppet 4 type validations. Be sure to check out the new `deprecation()` and `validate_legacy()` functions to migrate off the deprecated v3-style data validations.
     102
     103Many thanks to all community contributors: bob, Dmitry Ilyin, Dominic Cleal, Joris, Joseph Yaworski, Loic Antoine-Gombeaud, Maksym Melnychok, Michiel Brandenburg, Nate Potter, Romain Tartière, Stephen Benjamin, and Steve Moore, as well as anyone contributing in the code review process and by submitting issues.
     104
     105Special thanks to [Voxpupuli's](https://voxpupuli.org/) Igor Galić for donating the puppet-tea types to kickstart this part of stdlib.
     106
     107
     108#### Deprecations
     109* `validate_absolute_path`, `validate_array`, `validate_bool`, `validate_hash`, `validate_integer`, `validate_ip_address`, `validate_ipv4_address`, `validate_ipv6_address`, `validate_numeric`, `validate_re`, `validate_slength`, `validate_string`, and their `is_` counter parts are now deprecated on Puppet 4. See the `validate_legacy()` description in the README for help on migrating away from those functions.
     110* The `dig` function is provided by core puppet since 4.5.0 with slightly different calling convention. The stdlib version can still be accessed as `dig44` for now.
     111
     112
     113#### Features
     114* Add Puppet 4 data types for Unix, and Windows paths, and URLs.
     115* Add `deprecation` function to warn users of functionality that will be removed soon.
     116* Add `validate_legacy` function to help with migrating to Puppet 4 data types.
     117
     118* Add `any2bool` function, a combination of of `string2bool` and `num2bool`.
     119* Add `delete_regex` function to delete array elements matching a regular expression.
     120* Add `puppet_environmentpath` fact to expose the `environmentpath` setting.
     121* Add `regexpescape` function to safely insert arbitrary strings into regular expressions.
     122* Add `shell_escape`, `shell_join`, and `shell_split` functions for safer working with shell scripts..
     123
     124* The `delete` function now also accepts regular expressions as search term.
     125* The `loadyaml` function now accepts a default value, which is returned when there is an error loading the file.
     126
     127#### Bugfixes
     128* Fix `file_line.match_for_absence` implementation and description to actually work. (MODULES-3590)
     129* Fix `getparam` so that it can now also return `false`. (MODULES-3933)
     130* Fix the fixture setup for testing and adjust `load_module_metadata` and `loadjson` tests.
     131* Fix `defined_with_params` to handle `undef` correctly on all puppet versions. (PUP-6422, MODULES-3543)
     132* Fix `file_line.path` validation to use puppet's built in `absolute_path?` matcher.
     133
     134#### Minor Improvements
     135* README changes: improved descriptions of `deep_merge`, `delete`, `ensure_packages`, `file_line.after`, `range`, and `validate_numeric`.
     136* The `getvar` function now returns nil in all situations where the variable is not found.
     137* Update the `dig44` function with better `undef`, `nil`, and `false` handling.
     138* Better wording on `str2bool` argument validation error message.
     139
     140
     141### Known issues
     142* The `validate_legacy` function relies on internal APIs from Puppet 4.4.0 (PE 2016.1) onwards, and doesn't work on earlier versions.
     143* Puppet 4.5.0 (PE 2016.2) has a number of improvements around data types - especially error handling - that make working with them much nicer.
     144
    1145## Supported Release 4.12.0
    2146###Summary
  • src/puppetcode/environments/gnuboat/modules/stdlib/CONTRIBUTING.md

    rbcf0be5 rad28f83  
    4444      - Make sure you have a [GitHub account](https://github.com/join)
    4545
    46       - [Create a ticket](https://tickets.puppetlabs.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppetlabs.com/browse/) you are patching for.
     46      - [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for.
    4747
    4848    * Preferred method:
    … …  
    209209====================
    210210
    211 * [Getting additional help](http://puppetlabs.com/community/get-help)
    212 
    213 * [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
    214 
    215 * [Patchwork](https://patchwork.puppetlabs.com)
     211* [Getting additional help](http://puppet.com/community/get-help)
     212
     213* [Writing tests](https://docs.puppet.com/guides/module_guides/bgtm.html#step-three-module-testing)
    216214
    217215* [General GitHub documentation](http://help.github.com/)
    218216
    219217* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
    220 
  • src/puppetcode/environments/gnuboat/modules/stdlib/Gemfile

    rbcf0be5 rad28f83  
    33source ENV['GEM_SOURCE'] || "https://rubygems.org"
    44
    5 def location_for(place, version = nil)
    6   if place =~ /^(git[:@][^#]*)#(.*)/
    7     [version, { :git => $1, :branch => $2, :require => false}].compact
    8   elsif place =~ /^file:\/\/(.*)/
    9     ['>= 0', { :path => File.expand_path($1), :require => false}]
     5# Determines what type of gem is requested based on place_or_version.
     6def gem_type(place_or_version)
     7  if place_or_version =~ /^git:/
     8    :git
     9  elsif place_or_version =~ /^file:/
     10    :file
    1011  else
    11     [place, version, { :require => false}].compact
     12    :gem
    1213  end
    1314end
    1415
    15 group :development, :unit_tests do
    16   gem 'json',                      :require => false
    17   gem 'metadata-json-lint',        :require => false
    18   gem 'puppet_facts',              :require => false
    19   gem 'puppet-blacksmith',         :require => false
    20   gem 'puppetlabs_spec_helper',    :require => false
    21   gem 'rspec-puppet', '>= 2.3.2',  :require => false
    22   gem 'simplecov',                 :require => false
    23 end
    24 group :system_tests do
    25   gem 'beaker-rspec',                  *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4')
    26   gem 'beaker',                        *location_for(ENV['BEAKER_VERSION'])
    27   gem 'serverspec',                    :require => false
    28   gem 'beaker-puppet_install_helper',  :require => false
    29   gem 'master_manipulator',            :require => false
    30   gem 'beaker-hostgenerator',          *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
     16# Find a location or specific version for a gem. place_or_version can be a
     17# version, which is most often used. It can also be git, which is specified as
     18# `git://somewhere.git#branch`. You can also use a file source location, which
     19# is specified as `file://some/location/on/disk`.
     20def location_for(place_or_version, fake_version = nil)
     21  if place_or_version =~ /^(git[:@][^#]*)#(.*)/
     22    [fake_version, { :git => $1, :branch => $2, :require => false }].compact
     23  elsif place_or_version =~ /^file:\/\/(.*)/
     24    ['>= 0', { :path => File.expand_path($1), :require => false }]
     25  else
     26    [place_or_version, { :require => false }]
     27  end
    3128end
    3229
    33 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION'])
     30# Used for gem conditionals
     31supports_windows = false
     32ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
     33minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
     34
     35group :development do
     36  gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
     37  gem "puppet-module-win-default-r#{minor_version}",   :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
     38  gem "puppet-module-posix-dev-r#{minor_version}",     :require => false, :platforms => "ruby"
     39  gem "puppet-module-win-dev-r#{minor_version}",       :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
     40  gem "json_pure", '<= 2.0.1',                         :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
     41  gem "fast_gettext", '1.1.0',                         :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
     42  gem "fast_gettext",                                  :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
     43end
     44
     45group :system_tests do
     46  gem "puppet-module-posix-system-r#{minor_version}",                            :require => false, :platforms => "ruby"
     47  gem "puppet-module-win-system-r#{minor_version}",                              :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
     48  gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 3')                 
     49  gem "beaker-pe",                                                               :require => false
     50  gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])               
     51  gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
     52  gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')       
     53end
     54
    3455gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
    3556
     57# Only explicitly specify Facter/Hiera if a version has been specified.
     58# Otherwise it can lead to strange bundler behavior. If you are seeing weird
     59# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
     60# to `1` and then run bundle install.
     61gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
     62gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
    3663
     64
     65# Evaluate Gemfile.local if it exists
    3766if File.exists? "#{__FILE__}.local"
    3867  eval(File.read("#{__FILE__}.local"), binding)
    3968end
     69
     70# Evaluate ~/.gemfile if it exists
     71if File.exists?(File.join(Dir.home, '.gemfile'))
     72  eval(File.read(File.join(Dir.home, '.gemfile')), binding)
     73end
     74
     75# vim:ft=ruby
  • src/puppetcode/environments/gnuboat/modules/stdlib/Rakefile

    rbcf0be5 rad28f83  
    1 require 'puppet_blacksmith/rake_tasks'
     1require 'puppetlabs_spec_helper/rake_tasks'
    22require 'puppet-lint/tasks/puppet-lint'
    3 require 'puppetlabs_spec_helper/rake_tasks'
     3require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
    44
    55PuppetLint.configuration.fail_on_warnings = true
    66PuppetLint.configuration.send('relative')
    7 PuppetLint.configuration.send('disable_80chars')
    8 PuppetLint.configuration.send('disable_class_inherits_from_params_class')
    9 PuppetLint.configuration.send('disable_documentation')
    10 PuppetLint.configuration.send('disable_single_quote_string_with_variables')
    11 PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
    127
    138desc 'Generate pooler nodesets'
  • src/puppetcode/environments/gnuboat/modules/stdlib/checksums.json

    rbcf0be5 rad28f83  
    11{
    2   "CHANGELOG.md": "62822f2fe9d7362a4b99156d01c846c4",
    3   "CONTRIBUTING.md": "ad65d271f183b5adb9fdd58207939f5f",
    4   "Gemfile": "a5493d10f1c1fec87972b13a9fe1afcf",
     2  "CHANGELOG.md": "b6fa51fd30594614b963fb98a6a0fffb",
     3  "CONTRIBUTING.md": "77d0440d7cd4206497f99065c60bed46",
     4  "Gemfile": "bedf635025b279d7c7732adcc8ae9a29",
    55  "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57",
     6  "MAINTAINERS.md": "b40ec4f2c16145af6f723c2c34bb2ff9",
    67  "NOTICE": "b2e552587e5969886fdd60481e8b0351",
    7   "README.markdown": "9ff8d7869c0139409311df63f3bb0361",
     8  "README.md": "ac4c03f7f00304de7ed5a9eb9c6b84b7",
    89  "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165",
    910  "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1",
    1011  "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9",
    11   "Rakefile": "ab91824042ec3fd085a41cab7e0e90d4",
    12   "examples/file_line.pp": "48f7f162127beffea8f8e3e58db2355a",
     12  "Rakefile": "3851f083966b9bbd6d46e50dba5aa52a",
     13  "appveyor.yml": "7e0ff52cc2abe3fa4f2d8d978bf18ad7",
     14  "examples/file_line.pp": "d8126b139dd1dce21ff26910d1c5a245",
    1315  "examples/has_interface_with.pp": "d69d520cf3ff4d0b495480afaca359ef",
    1416  "examples/has_ip_address.pp": "32f42575e49aa66f0f2398a70ae2a9f4",
    … …  
    1820  "lib/facter/package_provider.rb": "539766a71dfb2f65e94a7c91bf413fcf",
    1921  "lib/facter/pe_version.rb": "60d47406026c8201e51394227ddf780d",
    20   "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d",
     22  "lib/facter/puppet_settings.rb": "9438c0839ae28dc52fffb8348ae5124f",
    2123  "lib/facter/root_home.rb": "35702ae0c7410ec4d2101113e2f697fa",
    2224  "lib/facter/service_provider.rb": "66cc42526eae631e306b397391f1f01c",
    2325  "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1",
     26  "lib/puppet/functions/deprecation.rb": "59b803eaa15b5a559040497bffc172ae",
    2427  "lib/puppet/functions/is_a.rb": "9dad7f8c9b75348cd97aca986ac0b29a",
    25   "lib/puppet/functions/type_of.rb": "71e19f89e167c45ec691ea6c7d319625",
    26   "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b",
     28  "lib/puppet/functions/is_absolute_path.rb": "96b217f26d06dbac87a2c6a8cfd2d8c8",
     29  "lib/puppet/functions/is_array.rb": "9292a646010d167417a1936b0b0c17b9",
     30  "lib/puppet/functions/is_bool.rb": "73957f9efd75ed8a7ab867f9de6da117",
     31  "lib/puppet/functions/is_float.rb": "af3bd6bb56878bac8cc4fe4f7564e4f9",
     32  "lib/puppet/functions/is_ip_address.rb": "ee231c66c3e039778bf46702d89815a6",
     33  "lib/puppet/functions/is_ipv4_address.rb": "900d33249906c4daa02aa79cac896548",
     34  "lib/puppet/functions/is_ipv6_address.rb": "568fba9af6a83c8b536fafcda82eb448",
     35  "lib/puppet/functions/is_numeric.rb": "33051800b886cc3b2119826b77c9821a",
     36  "lib/puppet/functions/is_string.rb": "230e9eabc5c9e1d8d5fb7b3c6c12b300",
     37  "lib/puppet/functions/length.rb": "03cf801867a919f801d290424fd2bb8d",
     38  "lib/puppet/functions/type_of.rb": "bec00841aae556993c926ab298bc81cd",
     39  "lib/puppet/functions/validate_absolute_path.rb": "54a610baa115c7505f1b35976b632a8e",
     40  "lib/puppet/functions/validate_array.rb": "9052b0026da174636c276a2512cf5acc",
     41  "lib/puppet/functions/validate_bool.rb": "fe979e402a5a3a19d013ce84b39ef06a",
     42  "lib/puppet/functions/validate_hash.rb": "92ea8fc21bbbf6cc41f6bb9cfcaefce7",
     43  "lib/puppet/functions/validate_integer.rb": "b0982b68a599262da2c6f2e032bc7713",
     44  "lib/puppet/functions/validate_ip_address.rb": "65a12af9a2c2a9c70d820d04d19ec891",
     45  "lib/puppet/functions/validate_ipv4_address.rb": "4a5039b99ac97cc0447faa343b9f7416",
     46  "lib/puppet/functions/validate_ipv6_address.rb": "fbdf685432416505fed27d5647c26f9c",
     47  "lib/puppet/functions/validate_legacy.rb": "d9f115f30c511cef536a821b94826094",
     48  "lib/puppet/functions/validate_numeric.rb": "41b2cc7335395f617c2bfbeac8f579da",
     49  "lib/puppet/functions/validate_re.rb": "42092f592ebf89b8a504b10c900230d8",
     50  "lib/puppet/functions/validate_slength.rb": "3ae6fcc3f60032c923d06ab3e457b84e",
     51  "lib/puppet/functions/validate_string.rb": "cc967a9d0ea156b2208d1760d7f6e1b2",
     52  "lib/puppet/parser/functions/abs.rb": "a8e46ecf4fb378d314916599651cebe5",
    2753  "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75",
    28   "lib/puppet/parser/functions/assert_private.rb": "1365284f9e474ecec24cfe43ee8e7cf4",
    29   "lib/puppet/parser/functions/base64.rb": "ac8d0565df2931470447effa502c9ad3",
     54  "lib/puppet/parser/functions/any2bool.rb": "8bbb74cb81ebdb164e1965415364080b",
     55  "lib/puppet/parser/functions/assert_private.rb": "cb9cd79ed4e3d647a48467dfb6237d5c",
     56  "lib/puppet/parser/functions/base64.rb": "0d121a32fbfe25b06a4e91b0259af91d",
    3057  "lib/puppet/parser/functions/basename.rb": "c61952b3f68fd86408c84fca2c3febb1",
    31   "lib/puppet/parser/functions/bool2num.rb": "f953f5fc094c2ae3908a72d8840ba291",
    32   "lib/puppet/parser/functions/bool2str.rb": "6334ac6d24a8aa49a2243fb425f47311",
    33   "lib/puppet/parser/functions/camelcase.rb": "71c67b71eac4b7f46a0dd22cb915d2e6",
    34   "lib/puppet/parser/functions/capitalize.rb": "da131748a9d32da9eb0b6438e39377eb",
    35   "lib/puppet/parser/functions/ceiling.rb": "dfa9b1c75ce89344026b3b5aed2d190f",
    36   "lib/puppet/parser/functions/chomp.rb": "2b7dc42f9967edd34cfa0ba9a97229ca",
    37   "lib/puppet/parser/functions/chop.rb": "0ec76f54afd94201f35785dfeb2092b5",
    38   "lib/puppet/parser/functions/clamp.rb": "d19b8dfc573ed2eff7e3536ae1e5d596",
    39   "lib/puppet/parser/functions/concat.rb": "a1b0233e58f1f8095a74fe9300c74a9b",
     58  "lib/puppet/parser/functions/bool2num.rb": "01b070b02611fda7e1491de0a8cd89fc",
     59  "lib/puppet/parser/functions/bool2str.rb": "c00885242abf381ba482644ded70b688",
     60  "lib/puppet/parser/functions/camelcase.rb": "bd5da699dfe1ec27ffe91b06187c5900",
     61  "lib/puppet/parser/functions/capitalize.rb": "c94c50b0f147a22861c3b93c724e4343",
     62  "lib/puppet/parser/functions/ceiling.rb": "7de4a96c8bb645fd5ce5c38438667228",
     63  "lib/puppet/parser/functions/chomp.rb": "35a16c85bc59dc285baae631da1ae771",
     64  "lib/puppet/parser/functions/chop.rb": "3beb80906fa3c759945a2664fe510b20",
     65  "lib/puppet/parser/functions/clamp.rb": "6920e6c11b575fc65dadb21220c01a7a",
     66  "lib/puppet/parser/functions/concat.rb": "d10e5428917895d4bb90c638b148b7fa",
    4067  "lib/puppet/parser/functions/convert_base.rb": "c3b3e59a49318af98dcb88aed7156629",
    41   "lib/puppet/parser/functions/count.rb": "9eb74eccd93e2b3c87fd5ea14e329eba",
     68  "lib/puppet/parser/functions/count.rb": "325bbd89a29e6ed0f31e0462d0a0d301",
    4269  "lib/puppet/parser/functions/deep_merge.rb": "d83696855578fb81b64b9e92b9c7cc7c",
    43   "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc",
    44   "lib/puppet/parser/functions/delete.rb": "cec92c5de6d748c8dc93ca7d25ac1c68",
    45   "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a",
    46   "lib/puppet/parser/functions/delete_undef_values.rb": "b32d4a3925753b2eb2c318cbd7f14404",
    47   "lib/puppet/parser/functions/delete_values.rb": "39b147f7d369bb5f809044b6341954a2",
    48   "lib/puppet/parser/functions/difference.rb": "e31b95fbaf974cf853a510177368bfb9",
    49   "lib/puppet/parser/functions/dig.rb": "54a993e69c2673d999876cb3349984b7",
     70  "lib/puppet/parser/functions/defined_with_params.rb": "2d964410afbee415446c94d9692a2112",
     71  "lib/puppet/parser/functions/delete.rb": "7af1540fee4285d93b6b28fb490db70a",
     72  "lib/puppet/parser/functions/delete_at.rb": "a2cba60ac86a676d4ed1ff846a917014",
     73  "lib/puppet/parser/functions/delete_regex.rb": "91cd012ef5a636ffe541814ed232b909",
     74  "lib/puppet/parser/functions/delete_undef_values.rb": "52beef9ee37f84ed2278a69ec4383125",
     75  "lib/puppet/parser/functions/delete_values.rb": "b410f5618b4a6158a921acb7b2dc628d",
     76  "lib/puppet/parser/functions/deprecation.rb": "4323210434d36e37977251f906a232b8",
     77  "lib/puppet/parser/functions/difference.rb": "467e44aeaebd0ee0a51c8b89e3769f1f",
     78  "lib/puppet/parser/functions/dig.rb": "1a2a8918f646c13dcb9876a22f9295ab",
     79  "lib/puppet/parser/functions/dig44.rb": "3078b97ee941c261944857373d400ed6",
    5080  "lib/puppet/parser/functions/dirname.rb": "8a5579f9a9a13fd737ba65eccf8e6d5a",
    5181  "lib/puppet/parser/functions/dos2unix.rb": "be8359a5106a7832be4180e8207dd586",
    52   "lib/puppet/parser/functions/downcase.rb": "73121616d73339cf8dd10e0de61a6c50",
    53   "lib/puppet/parser/functions/empty.rb": "b4ad0c3c00cbc56f745fbc05af1efa00",
    54   "lib/puppet/parser/functions/enclose_ipv6.rb": "581bc163291824909d1700909db96512",
    55   "lib/puppet/parser/functions/ensure_packages.rb": "81a8edbd7b6f85fc90e458568184c356",
     82  "lib/puppet/parser/functions/downcase.rb": "02376505a00accd0ce6b148f869c9c86",
     83  "lib/puppet/parser/functions/empty.rb": "6d7d2dde2971f6a40fa913f0af1c610c",
     84  "lib/puppet/parser/functions/enclose_ipv6.rb": "ec39936a9a51dc5cb8ada6eeb829b239",
     85  "lib/puppet/parser/functions/ensure_packages.rb": "362fac217452d0eee783be7c7ab3a569",
    5686  "lib/puppet/parser/functions/ensure_resource.rb": "de703fe63392b939fc2b4392975263de",
    57   "lib/puppet/parser/functions/ensure_resources.rb": "e9543e167972dd6a9a88aa5e02a9b4a5",
    58   "lib/puppet/parser/functions/flatten.rb": "25777b76f9719162a8bab640e5595b7a",
    59   "lib/puppet/parser/functions/floor.rb": "42cad4c689231a51526c55a6f0985d1f",
     87  "lib/puppet/parser/functions/ensure_resources.rb": "c92d8b69d6354eda24aa3a13d88177b2",
     88  "lib/puppet/parser/functions/flatten.rb": "6a27f5b922a24fec6e823f6f51c98090",
     89  "lib/puppet/parser/functions/floor.rb": "07ba3b1662a14c60fe908b51231355ee",
    6090  "lib/puppet/parser/functions/fqdn_rand_string.rb": "9ac5f18e563094aee62ef7586267025d",
    61   "lib/puppet/parser/functions/fqdn_rotate.rb": "770d510a2e50d19b2dd42b6edef3fb1f",
     91  "lib/puppet/parser/functions/fqdn_rotate.rb": "2483d17df4e6cb25d92b4e8520f30957",
     92  "lib/puppet/parser/functions/fqdn_uuid.rb": "d357e8837ba2ed8196e926f3697be521",
    6293  "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45",
    63   "lib/puppet/parser/functions/getparam.rb": "4dd7a0e35f4a3780dcfc9b19b4e0006e",
    64   "lib/puppet/parser/functions/getvar.rb": "344f1ce85dcb7512d37e8702ccbabb66",
    65   "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896",
    66   "lib/puppet/parser/functions/has_interface_with.rb": "e135f09dbecc038c3aa9ae03127617ef",
    67   "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325",
    68   "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731",
     94  "lib/puppet/parser/functions/getparam.rb": "440a9c381b9ad589504e2e9919e83c06",
     95  "lib/puppet/parser/functions/getvar.rb": "0c8c5cef7e158e232a8cf6e42c10d0ff",
     96  "lib/puppet/parser/functions/glob.rb": "c4106d2aff24f4b5a32b54bf4cd452a2",
     97  "lib/puppet/parser/functions/grep.rb": "c2f2dbdf79d16584579c3a7bc7b5902f",
     98  "lib/puppet/parser/functions/has_interface_with.rb": "db65f5aac94e8fe105c7ca0cd1f66403",
     99  "lib/puppet/parser/functions/has_ip_address.rb": "6ce9e6cdfb499b6ce86bf531848a18be",
     100  "lib/puppet/parser/functions/has_ip_network.rb": "3cc7b923fd3cde5062ed9d0eaaa8155f",
    69101  "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e",
    70   "lib/puppet/parser/functions/hash.rb": "784f8d2d114eb4c9414ebd8a6868f82f",
    71   "lib/puppet/parser/functions/intersection.rb": "c8f4f8b861c9c297c87b08bdbfb94caa",
    72   "lib/puppet/parser/functions/is_absolute_path.rb": "94ea1869c438d23f7f659c87ced8080a",
    73   "lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11",
    74   "lib/puppet/parser/functions/is_bool.rb": "e693b7c4b5366cff1380b6e0c7dd7b11",
    75   "lib/puppet/parser/functions/is_domain_name.rb": "6ca1f2708add756a6803b29d593d5830",
    76   "lib/puppet/parser/functions/is_email_address.rb": "82573a431edf5a0bf9847393af27566a",
    77   "lib/puppet/parser/functions/is_float.rb": "10e0d3ecf75fac15e415aee79acf70dc",
    78   "lib/puppet/parser/functions/is_function_available.rb": "628428bbcd9313ce09783d9484330e09",
    79   "lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a",
    80   "lib/puppet/parser/functions/is_integer.rb": "c665be82686aa4729959bb42c66a7510",
    81   "lib/puppet/parser/functions/is_ip_address.rb": "a714a736c1560e8739aaacd9030cca00",
    82   "lib/puppet/parser/functions/is_ipv4_address.rb": "3df98fc55d9d59e0706ff83f607bb2a8",
    83   "lib/puppet/parser/functions/is_ipv6_address.rb": "16e88af742f8ac93f1e8bb562eebc593",
    84   "lib/puppet/parser/functions/is_mac_address.rb": "6dd3c96437d49e68630869b0b464e7f2",
    85   "lib/puppet/parser/functions/is_numeric.rb": "93ddc9d4c0834a5e5e0562d7b3cdce91",
    86   "lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64",
    87   "lib/puppet/parser/functions/join.rb": "a285a05c015ae278608f6454aef211ea",
    88   "lib/puppet/parser/functions/join_keys_to_values.rb": "f29da49531228f6ca5b3aa0df00a14c2",
    89   "lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad",
     102  "lib/puppet/parser/functions/hash.rb": "c1ebb21cc5b984153a87c252a9854db2",
     103  "lib/puppet/parser/functions/intersection.rb": "87469eb81ab00bbacfd744165beeaeec",
     104  "lib/puppet/parser/functions/is_absolute_path.rb": "1ce9a6d1cd0a79087d73cb879ed04542",
     105  "lib/puppet/parser/functions/is_array.rb": "bbce6768b688bc0f36978ecb0f60f7f4",
     106  "lib/puppet/parser/functions/is_bool.rb": "b8800ff7a11b4e8c03616041e218225f",
     107  "lib/puppet/parser/functions/is_domain_name.rb": "5c6106c070945a605c5adbd1852f0691",
     108  "lib/puppet/parser/functions/is_email_address.rb": "1eb786779743e93a7bb9fe8087b38b8d",
     109  "lib/puppet/parser/functions/is_float.rb": "6257620b98c5099293be7aa4088b88ce",
     110  "lib/puppet/parser/functions/is_function_available.rb": "f13934d6b41561ef54d88cf0da86231b",
     111  "lib/puppet/parser/functions/is_hash.rb": "6f1ccf659c41cb5dab4db9fa89f0b364",
     112  "lib/puppet/parser/functions/is_integer.rb": "a4ae475a5a799c0cc46519e86aed2973",
     113  "lib/puppet/parser/functions/is_ip_address.rb": "2eabe60c213df2e642a03ebfd4852497",
     114  "lib/puppet/parser/functions/is_ipv4_address.rb": "ab854b47367921f657410fbe79054f0b",
     115  "lib/puppet/parser/functions/is_ipv6_address.rb": "2a2be7adbdd5ca23c3e21f00d7d8bac7",
     116  "lib/puppet/parser/functions/is_mac_address.rb": "1af27510d3b9b936384192a4e1dfbf8c",
     117  "lib/puppet/parser/functions/is_numeric.rb": "bfd99f39e2506953ad00178db6fa07ea",
     118  "lib/puppet/parser/functions/is_string.rb": "c1405dd293e9e3c738b83c4ef5aab1ef",
     119  "lib/puppet/parser/functions/join.rb": "2ed4f56d296a4535da142e01b11a126d",
     120  "lib/puppet/parser/functions/join_keys_to_values.rb": "71ad24ac1809739713c461141aedd082",
     121  "lib/puppet/parser/functions/keys.rb": "c10485a3d6c53b6d57a891b9852898de",
    90122  "lib/puppet/parser/functions/load_module_metadata.rb": "805c5476a6e7083d133e167129885924",
    91   "lib/puppet/parser/functions/loadyaml.rb": "6da5dc9256c9e7a6549bb15c72cb9f9d",
    92   "lib/puppet/parser/functions/lstrip.rb": "20a9b1fa077c16f34e0ef5448b895698",
    93   "lib/puppet/parser/functions/max.rb": "f652fd0b46ef7d2fbdb42b141f8fdd1d",
    94   "lib/puppet/parser/functions/member.rb": "2b5d7fb8f87f1c7d195933c57ca32e91",
     123  "lib/puppet/parser/functions/loadjson.rb": "ffecf61ba2ec8011915d37009b1a273e",
     124  "lib/puppet/parser/functions/loadyaml.rb": "668265f14327cba1d1400f2078b7b26b",
     125  "lib/puppet/parser/functions/lstrip.rb": "e9cbd5c2233233940e7344478362fb9f",
     126  "lib/puppet/parser/functions/max.rb": "529eb6ac3d88c03caa788167594bd487",
     127  "lib/puppet/parser/functions/member.rb": "03d618926bbb9efd117950e6078c3878",
    95128  "lib/puppet/parser/functions/merge.rb": "f3dcc5c83440cdda2036cce69b61a14b",
    96   "lib/puppet/parser/functions/min.rb": "0d2a1b7e735ab251c5469e735fa3f4c6",
    97   "lib/puppet/parser/functions/num2bool.rb": "605c12fa518c87ed2c66ae153e0686ce",
     129  "lib/puppet/parser/functions/min.rb": "8d829c8a55c9330ab02f962926221d4f",
     130  "lib/puppet/parser/functions/num2bool.rb": "ddb603cf74f92e16a00f1447a4403429",
    98131  "lib/puppet/parser/functions/parsejson.rb": "15165fd3807d9f3d657697fa854d643d",
    99132  "lib/puppet/parser/functions/parseyaml.rb": "db54578d9d798ced75952217cf11b737",
    100133  "lib/puppet/parser/functions/pick.rb": "bf01f13bbfe2318e7f6a302ac7c4433f",
    101134  "lib/puppet/parser/functions/pick_default.rb": "ad3ea60262de408767786d37a54d45dc",
    102   "lib/puppet/parser/functions/prefix.rb": "e377fd64bd63dde6c9660aa75aca4942",
     135  "lib/puppet/parser/functions/prefix.rb": "ece9341c5b232a25c58545718a54e92f",
    103136  "lib/puppet/parser/functions/private.rb": "1500a21d5cf19961c5b1d476df892d92",
    104   "lib/puppet/parser/functions/pw_hash.rb": "d82221f667050026cd6d155432a31802",
    105   "lib/puppet/parser/functions/range.rb": "76f693d1dd50ffee409e58ff6d9a58bb",
     137  "lib/puppet/parser/functions/pry.rb": "79a48e45196e4bbf0a3e658781513cf4",
     138  "lib/puppet/parser/functions/pw_hash.rb": "3d540eb4c483cc9c111794ac2d24a4a7",
     139  "lib/puppet/parser/functions/range.rb": "ab19430b6b9737cf56263eb65d80cba1",
     140  "lib/puppet/parser/functions/regexpescape.rb": "6378fdd413237a37c322859877147a50",
    106141  "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9",
    107   "lib/puppet/parser/functions/reverse.rb": "b234b54b8cd62b2d67ccd70489ffdccf",
    108   "lib/puppet/parser/functions/rstrip.rb": "b4e4ada41f7c1d2fcad073ce6344980f",
     142  "lib/puppet/parser/functions/reverse.rb": "209e7ef512963251571c515e2d0aee10",
     143  "lib/puppet/parser/functions/rstrip.rb": "f3226709247741825f07d9ec20bd3887",
    109144  "lib/puppet/parser/functions/seeded_rand.rb": "2ad22e7613d894ae779c0c5b0e65dade",
    110   "lib/puppet/parser/functions/shuffle.rb": "d50f72b0aeb921e64d2482f62488e2f3",
    111   "lib/puppet/parser/functions/size.rb": "ab3b5b8cf2369d76969a7cb2564e018f",
    112   "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833",
    113   "lib/puppet/parser/functions/squeeze.rb": "541f85b4203b55c9931d3d6ecd5c75f8",
    114   "lib/puppet/parser/functions/str2bool.rb": "e380cfbc3395404ac8232ff960b22bca",
    115   "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85",
    116   "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a",
    117   "lib/puppet/parser/functions/strip.rb": "85d70ab95492e3e4ca5f0b5ec3f284a9",
    118   "lib/puppet/parser/functions/suffix.rb": "082519722ed6f237dd3a9a7e316ab2e4",
    119   "lib/puppet/parser/functions/swapcase.rb": "b17a9f3cb0271451d309e4b4f52dd651",
    120   "lib/puppet/parser/functions/time.rb": "8cb0b8320c60b4a21725634154a9f1db",
    121   "lib/puppet/parser/functions/to_bytes.rb": "65437027687b6172173b3a211a799e37",
     145  "lib/puppet/parser/functions/shell_escape.rb": "13662933244e1af42ddca71ced4ac9e5",
     146  "lib/puppet/parser/functions/shell_join.rb": "b99a23d5e62e2e1b98accde5c22e45c9",
     147  "lib/puppet/parser/functions/shell_split.rb": "5317d71f3a7e293624b57aaca23f57d5",
     148  "lib/puppet/parser/functions/shuffle.rb": "6c0555524ebc9ed5dd8295b836fb7163",
     149  "lib/puppet/parser/functions/size.rb": "c171d46b87e377ebcc710ad5a5925a2b",
     150  "lib/puppet/parser/functions/sort.rb": "0b7d1411decc4a92450828809fad0779",
     151  "lib/puppet/parser/functions/squeeze.rb": "403ea46228a8e45e89c91168ed301fb6",
     152  "lib/puppet/parser/functions/str2bool.rb": "ff82f179970a9429614bd37fa7a1ae2a",
     153  "lib/puppet/parser/functions/str2saltedsha512.rb": "457ab12e4329494ae6276cfa4f20eb23",
     154  "lib/puppet/parser/functions/strftime.rb": "8f15e2e3732b6d1d357a1fa1826800d4",
     155  "lib/puppet/parser/functions/strip.rb": "da0ce253cb63a4863f15f9d145217db5",
     156  "lib/puppet/parser/functions/suffix.rb": "1ce493098f17ea47e9435f994adbc6cd",
     157  "lib/puppet/parser/functions/swapcase.rb": "48cad9bf415b5d79584c8e17ab7a06cc",
     158  "lib/puppet/parser/functions/time.rb": "cd96d1f039f8875af083091e3637190b",
     159  "lib/puppet/parser/functions/to_bytes.rb": "45248fd0bba8cfb24eac830fc0add17a",
    122160  "lib/puppet/parser/functions/try_get_value.rb": "09cd079ec5f0e5e2ac862c9ebe0f54fe",
    123161  "lib/puppet/parser/functions/type.rb": "4709f7ab8a8aad62d77a3c5d91a3aa08",
    124   "lib/puppet/parser/functions/type3x.rb": "f9bf4de8341afb0c677c26b40ec8a2b2",
    125   "lib/puppet/parser/functions/union.rb": "3cf57ea53f2522f586264feb67293cd6",
    126   "lib/puppet/parser/functions/unique.rb": "c1bb4a8aeebd09ba3e4c8bc3702cfd60",
     162  "lib/puppet/parser/functions/type3x.rb": "5d0391205bd1cfe8de985a44e8c3e8a9",
     163  "lib/puppet/parser/functions/union.rb": "c02fca3fe102875ba020072b7edee532",
     164  "lib/puppet/parser/functions/unique.rb": "0f79a96896149f7034cd85e31eed1e54",
    127165  "lib/puppet/parser/functions/unix2dos.rb": "b1f5087fcaca69d9395094204cce887a",
    128   "lib/puppet/parser/functions/upcase.rb": "8decededec9eb33e58f961eb86f0888f",
    129   "lib/puppet/parser/functions/uriescape.rb": "d912ba09ba3f58c70988e662e05ffbe8",
    130   "lib/puppet/parser/functions/validate_absolute_path.rb": "51c81d562fcc6c2df49ce5cfefd721ff",
    131   "lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8",
     166  "lib/puppet/parser/functions/upcase.rb": "e875fc4f03adec1ff3b42d22f177441e",
     167  "lib/puppet/parser/functions/uriescape.rb": "ba78def2cd0e60bdc4412df6c7b891ec",
     168  "lib/puppet/parser/functions/validate_absolute_path.rb": "c4b12e101055380386a235cd2c92ad10",
     169  "lib/puppet/parser/functions/validate_array.rb": "bee8327014714d4cd8dbb5c46611f594",
    132170  "lib/puppet/parser/functions/validate_augeas.rb": "61e828e7759ba3e1e563e1fdd68aa80f",
    133   "lib/puppet/parser/functions/validate_bool.rb": "a712634a000024398b3c6cd4ecc46463",
     171  "lib/puppet/parser/functions/validate_bool.rb": "971700229c4b581f67f6fadc9019eb2c",
    134172  "lib/puppet/parser/functions/validate_cmd.rb": "7df12370db442eddddcf4dd7a5364b5e",
    135   "lib/puppet/parser/functions/validate_email_address.rb": "e74fe9695ae0219d95f1595978267e48",
    136   "lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0",
    137   "lib/puppet/parser/functions/validate_integer.rb": "438c7fdd25f7f6a208ac48c9b75a390f",
    138   "lib/puppet/parser/functions/validate_ip_address.rb": "8d1f23b4fb623e9ce2a6bfa59c6c1266",
    139   "lib/puppet/parser/functions/validate_ipv4_address.rb": "ea5a7e87f51fc5a961cdc7369b3c9d00",
    140   "lib/puppet/parser/functions/validate_ipv6_address.rb": "4699238e4cad60e7e1428905523eaeb7",
    141   "lib/puppet/parser/functions/validate_numeric.rb": "60b0c6d5b8b170ea77498a8580bd3158",
    142   "lib/puppet/parser/functions/validate_re.rb": "53613813ba02914f2692f0edd7e12fab",
    143   "lib/puppet/parser/functions/validate_slength.rb": "5f0db124caae4866f474a60c589ba632",
    144   "lib/puppet/parser/functions/validate_string.rb": "cf6a20877a27b1073d63fdd522af50bb",
     173  "lib/puppet/parser/functions/validate_email_address.rb": "a72656cbfeda622cdd5cfdafdf464095",
     174  "lib/puppet/parser/functions/validate_hash.rb": "c2ae6299148ea200f8dfcf9204875182",
     175  "lib/puppet/parser/functions/validate_integer.rb": "65aa35f7450794aaadb6ad2c2e114df7",
     176  "lib/puppet/parser/functions/validate_ip_address.rb": "b23c3d5ce6839e32d0186411147a6a44",
     177  "lib/puppet/parser/functions/validate_ipv4_address.rb": "593e8f832469cb6a48c5f16ee66c3b2d",
     178  "lib/puppet/parser/functions/validate_ipv6_address.rb": "48d3733012818993eae662839183d139",
     179  "lib/puppet/parser/functions/validate_numeric.rb": "0e36d370262b8bdef2f88f0a3cb5b30e",
     180  "lib/puppet/parser/functions/validate_re.rb": "d5963c404e3ac1670553f306221c2655",
     181  "lib/puppet/parser/functions/validate_slength.rb": "6cbcfe15378ca4a780bac786223aacac",
     182  "lib/puppet/parser/functions/validate_string.rb": "8afa7b0dcfe17bfbbb5704ad54664cc2",
    145183  "lib/puppet/parser/functions/validate_x509_rsa_key_pair.rb": "f17427dfc42128dc1df0ab04f37942e5",
    146   "lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5",
    147   "lib/puppet/parser/functions/values_at.rb": "325a899e0201e8df5bd483fec6f12d76",
    148   "lib/puppet/parser/functions/zip.rb": "a89d5e802bc1e63e52020c2ddbaaca2c",
    149   "lib/puppet/provider/file_line/ruby.rb": "0b7ed2917e70902b5c40362370edcbb0",
     184  "lib/puppet/parser/functions/values.rb": "c35978761496406cc3dafdccaa014236",
     185  "lib/puppet/parser/functions/values_at.rb": "f7e6ad2a1126acd4fb5f7fcf9bfc2e2b",
     186  "lib/puppet/parser/functions/zip.rb": "133f3d4c54640844e656e2e6e790318e",
     187  "lib/puppet/provider/file_line/ruby.rb": "97dee0cadfaf112550e8424e143acc55",
    150188  "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c",
    151   "lib/puppet/type/file_line.rb": "21214f23b82b909dba6d7a57dd6464b6",
     189  "lib/puppet/type/file_line.rb": "d65885f7f0afe49ee199d6bf873a5daf",
     190  "locales/config.yaml": "574ee65e2a2a9d2f67edbc58735f50d4",
     191  "locales/ja/puppetlabs-stdlib.po": "805e5d893d2025ad57da8ec0614a6753",
     192  "locales/puppetlabs-stdlib.pot": "23c892ac0683aef4b09aabe0037750ae",
    152193  "manifests/init.pp": "9560a09f657d7eebbfdb920cefcc1d4f",
    153194  "manifests/stages.pp": "72eb4fa624474faf23b39e57cf1590bd",
    154   "metadata.json": "cab692227f5bbcc300d1512b4c8600dd",
    155   "spec/acceptance/abs_spec.rb": "538db8d037db814b455a6d741e91bb8d",
    156   "spec/acceptance/anchor_spec.rb": "3a366ecab2fda6c20acd70eeb57c5080",
    157   "spec/acceptance/any2array_spec.rb": "de86ead0205acbb3eca3a8a4792bdac8",
    158   "spec/acceptance/base64_spec.rb": "1684d5dd176dd5bbd4c3c6b1e64fbcea",
    159   "spec/acceptance/bool2num_spec.rb": "bf53ceac40d0a67551c618b11809f3f8",
     195  "metadata.json": "72d1000d449f8b37a4da8167a51edc05",
     196  "readmes/README_ja_JP.md": "173d377936c83b2cd622bb471d154a02",
     197  "spec/acceptance/abs_spec.rb": "5b60756b2b4da28314025f51989592d7",
     198  "spec/acceptance/anchor_spec.rb": "0fdbe266d8b7c3dc172e338b978109ba",
     199  "spec/acceptance/any2array_spec.rb": "444cfd34154539d896e5ef1488386372",
     200  "spec/acceptance/base64_spec.rb": "6a1dd4144ba354f9bed14eb70f7d2cba",
     201  "spec/acceptance/bool2num_spec.rb": "edc9cb8b89b95410326475d27ce74bd5",
    160202  "spec/acceptance/build_csv.rb": "f28ef587de764ade1513091c4906412c",
    161   "spec/acceptance/capitalize_spec.rb": "e77ea2c37144a75a67969c0d0839adfd",
    162   "spec/acceptance/ceiling_spec.rb": "b2718dc74a39399e342ef96fe0d00fdc",
    163   "spec/acceptance/chomp_spec.rb": "fb0862a6b7eeb3c290e280788e705061",
    164   "spec/acceptance/chop_spec.rb": "4e7ab2d3a441b88b667a0d8ea5b174c1",
    165   "spec/acceptance/clamp_spec.rb": "7513fd2a6701206b4673f40728eae835",
    166   "spec/acceptance/concat_spec.rb": "73ce39ffec7184d8ed5f0b5656ed9557",
    167   "spec/acceptance/count_spec.rb": "d82cfcad2461b16872455d6347a8b114",
    168   "spec/acceptance/deep_merge_spec.rb": "c335a947f1666e185e0210e661f1c78a",
    169   "spec/acceptance/defined_with_params_spec.rb": "f27c54ade9872c63c69316f62b03c119",
    170   "spec/acceptance/delete_at_spec.rb": "9c028b703ee0286565c9877757678f3f",
    171   "spec/acceptance/delete_spec.rb": "31e6dfcb9cc7c16b20d47c00e6a85a1d",
    172   "spec/acceptance/delete_undef_values_spec.rb": "6e6a66aee0c383c843b5f92ef8c8410c",
    173   "spec/acceptance/delete_values_spec.rb": "22c9b4914d4cbc0153aa3862cb4fb50e",
    174   "spec/acceptance/difference_spec.rb": "289f4f1788feaacb304ffd54971c7e7e",
    175   "spec/acceptance/dirname_spec.rb": "84db53878c4400a6c684c924cff05cfc",
    176   "spec/acceptance/downcase_spec.rb": "0f094849b94a94df491ee01186473104",
    177   "spec/acceptance/empty_spec.rb": "e5094267eb1eae007addc5e76b6d43d1",
     203  "spec/acceptance/capitalize_spec.rb": "4bb6471ec3a8a07260da8e249fae6ccd",
     204  "spec/acceptance/ceiling_spec.rb": "46489eef94aa21bb1560383bb17d7d02",
     205  "spec/acceptance/chomp_spec.rb": "8372fe8a875b1a599a89df1191f43bc0",
     206  "spec/acceptance/chop_spec.rb": "d73d1c7c6a44df65677362bd2899bbc1",
     207  "spec/acceptance/clamp_spec.rb": "8afaae07bf89e0af35474da489fd590f",
     208  "spec/acceptance/concat_spec.rb": "bad5f40e0a501b436ec4264cd278290b",
     209  "spec/acceptance/count_spec.rb": "f8abd435b077edd06ad76a96a2e610c0",
     210  "spec/acceptance/deep_merge_spec.rb": "5f16342cb8c1b52d6a08717a2ef87117",
     211  "spec/acceptance/defined_with_params_spec.rb": "8b47a7255b9d662009217f3cfd17ca03",
     212  "spec/acceptance/delete_at_spec.rb": "b0c853ffe5fc121e051233d62f6e72b3",
     213  "spec/acceptance/delete_spec.rb": "6ccb838a13037a56d1413aecb4fdac00",
     214  "spec/acceptance/delete_undef_values_spec.rb": "7d849a978d3ecdaaf5e922acc6038ad8",
     215  "spec/acceptance/delete_values_spec.rb": "b9f3dbffbb89fec32c6a5b2bd3b20901",
     216  "spec/acceptance/deprecation_spec.rb": "cadc56a94cbc2f13965d698f581f582d",
     217  "spec/acceptance/difference_spec.rb": "2f4e8ddd760f2d4dc9a4fb7b653e982f",
     218  "spec/acceptance/dirname_spec.rb": "76e6b66474f070d8a89f3fe5bd187e85",
     219  "spec/acceptance/downcase_spec.rb": "53f0f5b1867e0fd87ba59833c18b5ca2",
     220  "spec/acceptance/empty_spec.rb": "be8a610f87790a321dbd4cc0542e2885",
    178221  "spec/acceptance/ensure_resource_spec.rb": "c0193d79f1db1985d313bedb93a4c7ae",
    179   "spec/acceptance/flatten_spec.rb": "83fb08cc168a105c1d5d0df66b1d9e84",
    180   "spec/acceptance/floor_spec.rb": "d7267b2914b1da6406224abb7489ca86",
    181   "spec/acceptance/fqdn_rand_string_spec.rb": "45982bd0062e3ffe2dbdd5ef0359d869",
    182   "spec/acceptance/fqdn_rotate_spec.rb": "b00226e2ae28acf4ffea8a96b6e64f01",
    183   "spec/acceptance/get_module_path_spec.rb": "2658cdcd1abd4b7d20f53c4aced3c72a",
    184   "spec/acceptance/getparam_spec.rb": "4d32dc5a0ee34d045242c36d77a3b482",
    185   "spec/acceptance/getvar_spec.rb": "ba2f081a88be97c0e7004a6296294f23",
    186   "spec/acceptance/grep_spec.rb": "98818b8b0557b80d6ff519f70ea7617c",
    187   "spec/acceptance/has_interface_with_spec.rb": "30e27096050c43b7efdb5e6c0d54f53b",
    188   "spec/acceptance/has_ip_address_spec.rb": "2812117ec4b88556039e8488d53c0cb0",
    189   "spec/acceptance/has_ip_network_spec.rb": "ca75b43ff1256ead9052f2db7620db99",
    190   "spec/acceptance/has_key_spec.rb": "6509a26a0886f7d591eaa926b2f92407",
    191   "spec/acceptance/hash_spec.rb": "1c626457ba056bdd3936e28aa5bf503e",
    192   "spec/acceptance/intersection_spec.rb": "40f586af7f95408a5d4a2882a4aa98f1",
    193   "spec/acceptance/is_a_spec.rb": "03e612e76d9004ec625d9e30bb17af04",
    194   "spec/acceptance/is_array_spec.rb": "c2ff70ce59b90b50a5aed67abaa5399d",
    195   "spec/acceptance/is_bool_spec.rb": "c001fdecff6b0a3c9dc78774987a0b15",
    196   "spec/acceptance/is_domain_name_spec.rb": "63e84285c26d8717fd5d4dda01e3f432",
    197   "spec/acceptance/is_float_spec.rb": "2f0164b4d732166aa46055a2cf7b4ea9",
    198   "spec/acceptance/is_function_available_spec.rb": "7745eba89f8719c9ca7ebf04d5b005f7",
    199   "spec/acceptance/is_hash_spec.rb": "cff723cd8fddac45033af5dc8406d4e4",
    200   "spec/acceptance/is_integer_spec.rb": "c09201d17d3914bba197872897fa3413",
    201   "spec/acceptance/is_ip_address_spec.rb": "aa14cf9abf404c3fe1e761ea957871fe",
    202   "spec/acceptance/is_ipv4_address_spec.rb": "b787114912487987801bc68d7cb15142",
    203   "spec/acceptance/is_ipv6_address_spec.rb": "c99785448a72f9a2cfa7cd52a392b5e7",
    204   "spec/acceptance/is_mac_address_spec.rb": "30ff4c6a63be58daa3568305617ca2a7",
    205   "spec/acceptance/is_numeric_spec.rb": "fb9829c7a1a8d4a58836df6ff4c3386d",
    206   "spec/acceptance/is_string_spec.rb": "df3022de123b72f0022728eb2d8ce857",
    207   "spec/acceptance/join_keys_to_values_spec.rb": "8aa128bbaeea65aab8d92badee3ca2b5",
    208   "spec/acceptance/join_spec.rb": "c6378ed481265152bba9871fc5501ee6",
    209   "spec/acceptance/keys_spec.rb": "20486e3ebee53e50dc9de3b78b9d6ae6",
    210   "spec/acceptance/loadyaml_spec.rb": "bd440cb6779026bd07d83f1aceb2781b",
    211   "spec/acceptance/lstrip_spec.rb": "e29ab4039b65660ec2bd76a298adcae0",
    212   "spec/acceptance/max_spec.rb": "209cda4b83d677743afb1a8870330618",
    213   "spec/acceptance/member_spec.rb": "d6088a4fa6321791a3067d9b9cf8914a",
    214   "spec/acceptance/merge_spec.rb": "5f168188fa0d6b31ba5b3dac49fb609c",
    215   "spec/acceptance/min_spec.rb": "152a7db28434a0d0378561d4f64cddcc",
    216   "spec/acceptance/nodesets/centos-59-x64.yml": "57eb3e471b9042a8ea40978c467f8151",
    217   "spec/acceptance/nodesets/centos-6-vcloud.yml": "bdf9ce9d3b0f0b4995666ae9d64d878d",
    218   "spec/acceptance/nodesets/centos-64-x64-pe.yml": "ec075d95760df3d4702abea1ce0a829b",
    219   "spec/acceptance/nodesets/centos-64-x64.yml": "092dd2c588a9f87fa1fb12997c0723ef",
    220   "spec/acceptance/nodesets/centos-65-x64.yml": "3e5c36e6aa5a690229e720f4048bb8af",
    221   "spec/acceptance/nodesets/default.yml": "3e5c36e6aa5a690229e720f4048bb8af",
    222   "spec/acceptance/nodesets/fedora-18-x64.yml": "80e41b1ee16ea489f53164bfdae58855",
    223   "spec/acceptance/nodesets/sles-11-x64.yml": "44e4c6c15c018333bfa9840a5e702f66",
    224   "spec/acceptance/nodesets/ubuntu-server-10044-x64.yml": "75e86400b7889888dc0781c0ae1a1297",
    225   "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "d30d73e34cd50b043c7d14e305955269",
    226   "spec/acceptance/nodesets/ubuntu-server-1404-x64.yml": "5f0aed10098ac5b78e4217bb27c7aaf0",
    227   "spec/acceptance/nodesets/windows-2003-i386.yml": "b518fc01fab99ee6a9afccec5bc0c1c4",
    228   "spec/acceptance/nodesets/windows-2003-x86_64.yml": "5c783eaa8ea4734edc836e89e923dfa1",
    229   "spec/acceptance/nodesets/windows-2008-x86_64.yml": "3082234eafcfaf7a9579d9ebdb8bc409",
    230   "spec/acceptance/nodesets/windows-2008r2-x86_64.yml": "dfeff32a4cc3fffa872c8281d990a840",
    231   "spec/acceptance/nodesets/windows-2012-x86_64.yml": "8bed73362ee1f43d21ea1903a729f955",
    232   "spec/acceptance/nodesets/windows-2012r2-x86_64.yml": "3f4f6112d24db02989b8ab79d3a1256f",
    233   "spec/acceptance/num2bool_spec.rb": "e4a00b913b08c68a689837e9f9336cb2",
    234   "spec/acceptance/parsejson_spec.rb": "5753b9dd66e4fd464c132b39487b922c",
    235   "spec/acceptance/parseyaml_spec.rb": "991f6f7b729812535155643c11846bcb",
    236   "spec/acceptance/pick_default_spec.rb": "1bc2562380ef6f6cded5ec90a03922be",
    237   "spec/acceptance/pick_spec.rb": "272c54c8f9398f499768331bdb4276ee",
    238   "spec/acceptance/prefix_spec.rb": "da620568c6771e7d492ec1ff697c531c",
    239   "spec/acceptance/pw_hash_spec.rb": "721fe0da04d798a353799fd651bcd0fc",
    240   "spec/acceptance/range_spec.rb": "65e5b98ceca257658604d988fbec7d03",
    241   "spec/acceptance/reject_spec.rb": "b5185f1a6071c9bdc7aca92e6f899c3e",
    242   "spec/acceptance/reverse_spec.rb": "7bdee543e82532e97bbf7a067140031c",
    243   "spec/acceptance/rstrip_spec.rb": "28a64ceb7cb5ae8a93d31f49816190ab",
    244   "spec/acceptance/shuffle_spec.rb": "8a8652e57d56f2b4946cdf4d20052b7a",
    245   "spec/acceptance/size_spec.rb": "ae17d8a55921a0570972200c7c9327e1",
    246   "spec/acceptance/sort_spec.rb": "d44b1b8c090f0f00a2f38515fda431ea",
    247   "spec/acceptance/squeeze_spec.rb": "adcd65fa4e72203b97f1f14c8835c2cd",
    248   "spec/acceptance/str2bool_spec.rb": "55ad165ceef6b9ba32bf20ca3b53b44c",
    249   "spec/acceptance/str2saltedsha512_spec.rb": "b684c4214d06ae3d5bae055262a5ccaa",
    250   "spec/acceptance/strftime_spec.rb": "0f4eadbd74445b35de4a42c9790fbcc1",
    251   "spec/acceptance/strip_spec.rb": "6767da5bc735beb5362aeee6ff692c9e",
    252   "spec/acceptance/suffix_spec.rb": "07dfc7eed48b75fcc1b93d0308243eda",
    253   "spec/acceptance/swapcase_spec.rb": "5c3c1bc19a09fed6e01881f79b0b4ea5",
    254   "spec/acceptance/time_spec.rb": "044b2f634a1fa6ecc735998d68a93b73",
    255   "spec/acceptance/to_bytes_spec.rb": "f9df1f234b9409f5eaf56ef24e651c36",
    256   "spec/acceptance/try_get_value_spec.rb": "db7c47f372f9d9725987ebe13e6039eb",
    257   "spec/acceptance/type_spec.rb": "4297e038a8ff7e6ecb859b8b68c7b3a6",
    258   "spec/acceptance/union_spec.rb": "f24e166bc838c9c8cbd75ad3f8f9d15b",
    259   "spec/acceptance/unique_spec.rb": "9b00b21cefde3b5391f50eeb9cd2493b",
    260   "spec/acceptance/unsupported_spec.rb": "09b9265ecb05252cd5e5a18327c7ae97",
    261   "spec/acceptance/upcase_spec.rb": "ffd1d6f9e6ec24131fb78983c53a75f9",
    262   "spec/acceptance/uriescape_spec.rb": "13daa387714cbfc63b587aaa8dbf7fcd",
    263   "spec/acceptance/validate_absolute_path_spec.rb": "8b9ebfae80329231d84fcab606a3eeaf",
    264   "spec/acceptance/validate_array_spec.rb": "382641719e754622ffae562d10e38bf7",
    265   "spec/acceptance/validate_augeas_spec.rb": "c26b8ca2184a9dd87033a0c6f0553093",
    266   "spec/acceptance/validate_bool_spec.rb": "08bc139459204cf0a35098a5bc30ab95",
    267   "spec/acceptance/validate_cmd_spec.rb": "e9260c49d880e4de54f77bf4fd70cff4",
    268   "spec/acceptance/validate_hash_spec.rb": "70ceacc18a0dee97b26ab2e50f925706",
    269   "spec/acceptance/validate_ipv4_address_spec.rb": "dc901bbd05c3764a93cb49154cea6e4b",
    270   "spec/acceptance/validate_ipv6_address_spec.rb": "c0872c56230ac2800cd5723eaa5bc53a",
    271   "spec/acceptance/validate_re_spec.rb": "b289909078d6ae0d015419f518566698",
    272   "spec/acceptance/validate_slength_spec.rb": "f0a05c1c2b895b096cb7326df4821594",
    273   "spec/acceptance/validate_string_spec.rb": "6c9ced99fb1e263e66e25427d24f8f7b",
    274   "spec/acceptance/values_at_spec.rb": "669b26c4d47742051472003518c3aa61",
    275   "spec/acceptance/values_spec.rb": "9681223bb1bd755c28946ef0bcd6ece9",
    276   "spec/acceptance/zip_spec.rb": "86d1b555745ee873da68c71f1e46ed21",
     222  "spec/acceptance/flatten_spec.rb": "3ab1f9c9e761e5d758eeee7a2e32f295",
     223  "spec/acceptance/floor_spec.rb": "4a20f6fc7142ef9357c8d18a408b5e52",
     224  "spec/acceptance/fqdn_rand_string_spec.rb": "7744b45e282013c5fe637dbaf42f85b9",
     225  "spec/acceptance/fqdn_rotate_spec.rb": "366816bb1d3102f64025d61e22eec79c",
     226  "spec/acceptance/get_module_path_spec.rb": "d5d2258b2345359d1e51a638b97523cb",
     227  "spec/acceptance/getparam_spec.rb": "d4037f1f546cf7a3e7dcabe787e637b5",
     228  "spec/acceptance/getvar_spec.rb": "8451bced69bfd5599a552ddf49976d98",
     229  "spec/acceptance/grep_spec.rb": "5e6650532658915d1004a6e6c0f1229d",
     230  "spec/acceptance/has_interface_with_spec.rb": "e028fc7fc1023293ba32c48c9f46752a",
     231  "spec/acceptance/has_ip_address_spec.rb": "f3443be46277f6084ca8e531562d8ac7",
     232  "spec/acceptance/has_ip_network_spec.rb": "fa7a38450bef7e4408deb6b978d5a42f",
     233  "spec/acceptance/has_key_spec.rb": "68e42fb69d15f27916e7943ab727afc6",
     234  "spec/acceptance/hash_spec.rb": "1e8ff803d76d8f9e506c8a366a93ad90",
     235  "spec/acceptance/intersection_spec.rb": "755c135f67811666b3c5152c5c5349c2",
     236  "spec/acceptance/is_a_spec.rb": "4cdd8df78a6285de21d634c032e5a7c9",
     237  "spec/acceptance/is_array_spec.rb": "1de1fb0b55759d4012033ae3ce0723c2",
     238  "spec/acceptance/is_bool_spec.rb": "9984cd966d81c217f8ff4e252a4a66d1",
     239  "spec/acceptance/is_domain_name_spec.rb": "948dc0c7372027e8f2bb9db85b8d66b2",
     240  "spec/acceptance/is_float_spec.rb": "731d9b71e7b4ee5055339d08b2b5f707",
     241  "spec/acceptance/is_function_available_spec.rb": "413964bfe8e18c34d8809590afcc4118",
     242  "spec/acceptance/is_hash_spec.rb": "9095a364cba82a95a1edd0f92d2218c7",
     243  "spec/acceptance/is_integer_spec.rb": "bc4e7192073531638be9f8a4d391a827",
     244  "spec/acceptance/is_ip_address_spec.rb": "c2ee8738d62b4c9d42b3ef1a1b8573fc",
     245  "spec/acceptance/is_ipv4_address_spec.rb": "09f6f3ad6a1c0a9e5dcfaab34a081ffc",
     246  "spec/acceptance/is_ipv6_address_spec.rb": "d19a98176b2b7367e740d338df08c2ae",
     247  "spec/acceptance/is_mac_address_spec.rb": "b53f033cc4943a19f597895df0b5210a",
     248  "spec/acceptance/is_numeric_spec.rb": "95ecae5adde23e6b61cd090704c4572d",
     249  "spec/acceptance/is_string_spec.rb": "d9ad89b30aff62aea4fb805c991c6abf",
     250  "spec/acceptance/join_keys_to_values_spec.rb": "908f62013e1d797ddc0ba68c0fb7913b",
     251  "spec/acceptance/join_spec.rb": "5609c646859140109af4ae1c63cc69d2",
     252  "spec/acceptance/keys_spec.rb": "15edb2f0a5630dfadd9bd6c038e5cf95",
     253  "spec/acceptance/loadjson_spec.rb": "7bf8eb220ed02b77e9956dade1acfcb3",
     254  "spec/acceptance/loadyaml_spec.rb": "3810faad7411bc1d9c9274671bb68a9a",
     255  "spec/acceptance/lstrip_spec.rb": "27a6e2c9e2afc5b3e0e98301798a80ad",
     256  "spec/acceptance/max_spec.rb": "c39a2006dacdbd24a8acc5dc25f1a9f3",
     257  "spec/acceptance/member_spec.rb": "10b9635c1daf636d66aabea6ff796e6a",
     258  "spec/acceptance/merge_spec.rb": "a1502ebd4d069c5f818f7fd8da79e02d",
     259  "spec/acceptance/min_spec.rb": "a6e73a33255bc202de93fd8fe679c510",
     260  "spec/acceptance/nodesets/centos-7-x64.yml": "a713f3abd3657f0ae2878829badd23cd",
     261  "spec/acceptance/nodesets/debian-8-x64.yml": "d2d2977900989f30086ad251a14a1f39",
     262  "spec/acceptance/nodesets/default.yml": "b42da5a1ea0c964567ba7495574b8808",
     263  "spec/acceptance/nodesets/docker/centos-7.yml": "8a3892807bdd62306ae4774f41ba11ae",
     264  "spec/acceptance/nodesets/docker/debian-8.yml": "ac8e871d1068c96de5e85a89daaec6df",
     265  "spec/acceptance/nodesets/docker/ubuntu-14.04.yml": "dc42ee922a96908d85b8f0f08203ce58",
     266  "spec/acceptance/num2bool_spec.rb": "33ab633c5a6aa1e5e9c0cac9ec23c0d5",
     267  "spec/acceptance/parsejson_spec.rb": "56353143de570034f59a87244bb9ff7b",
     268  "spec/acceptance/parseyaml_spec.rb": "a564b2217350398d8a3f1b212d0c2ada",
     269  "spec/acceptance/pick_default_spec.rb": "bc3512e0cc3bc34da5f44ae18573af5d",
     270  "spec/acceptance/pick_spec.rb": "661747652e50bb522ad0c627fb8c3c58",
     271  "spec/acceptance/prefix_spec.rb": "2b9df68e18e16144caa4440fd6acaa01",
     272  "spec/acceptance/pw_hash_spec.rb": "979f0d209f1ef227a31d27a452fc2ed3",
     273  "spec/acceptance/range_spec.rb": "f913a26f4bbe8b9432b6cb80a3b6d1ed",
     274  "spec/acceptance/reject_spec.rb": "c63eb909288cf2210f72d3afa1e07b32",
     275  "spec/acceptance/reverse_spec.rb": "eca705328f8e246a648e3f62434e662a",
     276  "spec/acceptance/rstrip_spec.rb": "bad1e42f66d07b5d09ca1133b392bf6a",
     277  "spec/acceptance/shuffle_spec.rb": "adc420bc01d83dde117b04baa4a5e2d8",
     278  "spec/acceptance/size_spec.rb": "d923ec158f5c2275b9823dd118edd953",
     279  "spec/acceptance/sort_spec.rb": "3ac4acd4233fbe624d926604d58acea6",
     280  "spec/acceptance/squeeze_spec.rb": "2270c35766a5162cd732f0f761f0dc34",
     281  "spec/acceptance/str2bool_spec.rb": "73ca9cbf9079ef52de10f90cb871e80c",
     282  "spec/acceptance/str2saltedsha512_spec.rb": "1e89299c3802ba386589a5133a07dccc",
     283  "spec/acceptance/strftime_spec.rb": "6cdfc95c02af2419eb14d173a23df678",
     284  "spec/acceptance/strip_spec.rb": "711b6b73fce659ab83956c4454500e55",
     285  "spec/acceptance/suffix_spec.rb": "c2ca0539e9e7b71f36ff470d3c18b303",
     286  "spec/acceptance/swapcase_spec.rb": "30290d4378f19fa8bac4bc3347a36298",
     287  "spec/acceptance/time_spec.rb": "74b6d4f21d46ca612a98efed9c48944c",
     288  "spec/acceptance/to_bytes_spec.rb": "ff7d57f85cf1e211b0998235636edfd9",
     289  "spec/acceptance/try_get_value_spec.rb": "8b62b969ece6f02c65f0cf3d365324b1",
     290  "spec/acceptance/type_spec.rb": "909aa4d0c2463b04a3d3ff72cb0d4b42",
     291  "spec/acceptance/union_spec.rb": "41b8705ac890ddd915a5f6c8b33620cd",
     292  "spec/acceptance/unique_spec.rb": "0108f76cc12ecb0551a37a002a9bda85",
     293  "spec/acceptance/upcase_spec.rb": "30721f352edd513a0cc36c94aa0fe760",
     294  "spec/acceptance/uriescape_spec.rb": "69857543c97c35b23094cc6da0828055",
     295  "spec/acceptance/validate_absolute_path_spec.rb": "b7f57e45a4d4d2a187bf9db99c481f98",
     296  "spec/acceptance/validate_array_spec.rb": "ec0db1f08eb8d64fec1025b65b544365",
     297  "spec/acceptance/validate_augeas_spec.rb": "744354dd9726be3624db10935ae2b13f",
     298  "spec/acceptance/validate_bool_spec.rb": "950632bafc509e1965cd6a57646d87f6",
     299  "spec/acceptance/validate_cmd_spec.rb": "1605939801210b1a53dc8873492551e0",
     300  "spec/acceptance/validate_hash_spec.rb": "b79b1ef06301e1b97863281e3c419b0e",
     301  "spec/acceptance/validate_ipv4_address_spec.rb": "547520f1ad1d55c52a257f4fb85ecc33",
     302  "spec/acceptance/validate_ipv6_address_spec.rb": "feedad9317be19409e351011c7b852b9",
     303  "spec/acceptance/validate_re_spec.rb": "bcc18798eccca866883b965baefc3cc9",
     304  "spec/acceptance/validate_slength_spec.rb": "29311e9e910bba57a86be9a4893b43e5",
     305  "spec/acceptance/validate_string_spec.rb": "cd36b419ebb8630618ec795781081101",
     306  "spec/acceptance/values_at_spec.rb": "17e39ac5e094fb05522cb363e12186ab",
     307  "spec/acceptance/values_spec.rb": "25d5abaffd9a108a52cdb156b5120e85",
     308  "spec/acceptance/zip_spec.rb": "30ac38a83f8e92d642a20b53c5b66292",
     309  "spec/aliases/absolute_path_spec.rb": "4326af270230f6d1aef6b1c68a31c53b",
     310  "spec/aliases/absolutepath_spec.rb": "ab9a78b2aa5f6eb102ee648c5f88da61",
     311  "spec/aliases/array_spec.rb": "09c3559333ec646387e4141ed37d671e",
     312  "spec/aliases/bool_spec.rb": "c3f734df3cd334860bba95386b8e8ba6",
     313  "spec/aliases/float_spec.rb": "dda76444d67dcf4e9ab4bf8d1a668b23",
     314  "spec/aliases/hash_spec.rb": "8b0753fbb41a41655235f999a8cd8a17",
     315  "spec/aliases/httpsurl_spec.rb": "49fa0c1da3f055228aaa7ab12471f126",
     316  "spec/aliases/httpurl_spec.rb": "fe92b61091197895e9e0070adcaec1e9",
     317  "spec/aliases/integer_spec.rb": "3d5c27c864e2385251f1c16a46ef717d",
     318  "spec/aliases/ip_address.rb": "297c6577c0763f5121f9ca9c19718dfe",
     319  "spec/aliases/ipv4_spec.rb": "8f3be58256671754f32287609c7a64ba",
     320  "spec/aliases/ipv6_spec.rb": "68bc3bdf8f2dbb049f8f8daf93d78e82",
     321  "spec/aliases/numeric_spec.rb": "a0031bb0085673ec7cc28d9c9b5a72e4",
     322  "spec/aliases/string_spec.rb": "8953daa594d54b8efc91fecf73629608",
     323  "spec/aliases/unixpath_spec.rb": "1fac6f23e14c3589d26284a081c25c77",
     324  "spec/aliases/windowspath_spec.rb": "4a3aec398b2c6ae86cb6d68ac5e8ab06",
     325  "spec/fixtures/dscacheutil/root": "e1a7622f55f3d1be258c9a5b16b474be",
     326  "spec/fixtures/lsuser/root": "2ed657fa157372a81634539bb1a56be8",
     327  "spec/fixtures/test/manifests/absolute_path.pp": "79e9da69f05adc0e1ed41c20bf14e95f",
     328  "spec/fixtures/test/manifests/absolutepath.pp": "8561fa141028cd38d0b8409cd69a1372",
     329  "spec/fixtures/test/manifests/array.pp": "0e1d4146a9b2dd56063b2cab6f3d7571",
     330  "spec/fixtures/test/manifests/bool.pp": "cf75826f36025bd73ff7f479acf7196d",
     331  "spec/fixtures/test/manifests/deftype.pp": "b9dbd15e3f4a2dd53aac7f26322abf0c",
     332  "spec/fixtures/test/manifests/ensure_resources.pp": "3265ae7af9382cfe7d9a13527265dcc9",
     333  "spec/fixtures/test/manifests/float.pp": "132f9a63e60bba2fba68be83208c2e28",
     334  "spec/fixtures/test/manifests/hash.pp": "84d647482ef0c7dc35348c13fb0ca23e",
     335  "spec/fixtures/test/manifests/httpsurl.pp": "9047fc382d215ae55c065b0798a82a2d",
     336  "spec/fixtures/test/manifests/httpurl.pp": "7165bf5607a4808f3da3f9baca911240",
     337  "spec/fixtures/test/manifests/integer.pp": "3cb3807714ddcde25cd8eeca61581e3b",
     338  "spec/fixtures/test/manifests/ip_address.pp": "78deea27fe1ff9e85c360eced4d2c256",
     339  "spec/fixtures/test/manifests/ipv4.pp": "b4f0dfe6ae06d4f8b284d24e55f6a6a2",
     340  "spec/fixtures/test/manifests/ipv6.pp": "4764f683b6013556e20d8669b21b5bdc",
     341  "spec/fixtures/test/manifests/numeric.pp": "bffd26d7c0bb53628369f42c14b342cb",
     342  "spec/fixtures/test/manifests/string.pp": "27b69c1eb36250bfbd474a0ef9ba847b",
     343  "spec/fixtures/test/manifests/unixpath.pp": "fd062024efdf731e19026901d3fcc075",
     344  "spec/fixtures/test/manifests/windowspath.pp": "7f942ec8f883a3ac0fcaf960ea24b7d8",
    277345  "spec/functions/abs_spec.rb": "7c0ebbd787b788d32b9bb21fe9061a2f",
    278   "spec/functions/any2array_spec.rb": "c5990164adbaaf4f6536df4022309176",
    279   "spec/functions/assert_private_spec.rb": "3bf58bd53467248cc221b9f846b13d98",
     346  "spec/functions/any2array_spec.rb": "22b7ce032a34d02b6858360025eb7644",
     347  "spec/functions/any2bool_spec.rb": "d090dde9be26601a38980e8f77fa5970",
     348  "spec/functions/assert_private_spec.rb": "a7e79ac7a1b28610a0e57e38e913c9fa",
    280349  "spec/functions/base64_spec.rb": "fa279d9a4f3060ee3f467e35b050d528",
    281   "spec/functions/basename_spec.rb": "84a6567266725376d7ab518ab7dc5fe8",
     350  "spec/functions/basename_spec.rb": "4aec9efc4fc6ed35de82d93b34dc0fab",
    282351  "spec/functions/bool2num_spec.rb": "6609136ff067b90d41cf27bf8838c3ea",
    283352  "spec/functions/bool2str_spec.rb": "52560617234393f960aedb496b49a628",
    … …  
    285354  "spec/functions/capitalize_spec.rb": "31a8d497b274653d5ede70a0187d4053",
    286355  "spec/functions/ceiling_spec.rb": "47bd74569f8979d9195df06a863de93b",
    287   "spec/functions/chomp_spec.rb": "6749a0b358b34e73843e1a284cead44a",
    288   "spec/functions/chop_spec.rb": "6e33e61f50459191387c87e474d3d127",
     356  "spec/functions/chomp_spec.rb": "8be3a83a34945dcaa6e8e193cf2751e4",
     357  "spec/functions/chop_spec.rb": "8e1f661e93dd87b8bbeebe293fe16612",
    289358  "spec/functions/clamp_spec.rb": "65dab1e9aceb2cb4e41ef9c0c65a7ba3",
    290   "spec/functions/concat_spec.rb": "d217a63169e819e1ae2445083c248aa6",
     359  "spec/functions/concat_spec.rb": "4161a254ff4c21497e61a62ce84dafe8",
    291360  "spec/functions/convert_base_spec.rb": "f031e84b18cb010bc6233be3e4bcff83",
    292   "spec/functions/count_spec.rb": "d91a084665ecd902586d26c99d45beed",
    293   "spec/functions/deep_merge_spec.rb": "d70a71c7e9363c75224fffd40fc5efdd",
    294   "spec/functions/defined_with_params_spec.rb": "9185955113fd14a7b2fbaa0228669d00",
    295   "spec/functions/delete_at_spec.rb": "a5443ac5879992af9c4470e59f0355cf",
    296   "spec/functions/delete_spec.rb": "2352787d3a93bf863bd6db186d4bcf4f",
    297   "spec/functions/delete_undef_values_spec.rb": "6bee6b89a507130a009a9e8b5ef3e130",
    298   "spec/functions/delete_values_spec.rb": "0d2d17c0cacd7f3871ea7ab2f5b96d93",
    299   "spec/functions/difference_spec.rb": "2caaab5edb42ddc426e65348b12ebcc3",
    300   "spec/functions/dig_spec.rb": "60ef76a16c557e7580cd8747c3476f1e",
    301   "spec/functions/dirname_spec.rb": "5c905655d551b1956b6c9eda4ee96569",
    302   "spec/functions/dos2unix_spec.rb": "95c13597be9e67e79e69ed0e6c3d325a",
     361  "spec/functions/count_spec.rb": "14ab4e4b10fe33d69d0662357cd4bf8b",
     362  "spec/functions/deep_merge_spec.rb": "5a4e826aaa0a0c0e4247b72e03bdfbd1",
     363  "spec/functions/defined_with_params_spec.rb": "c592e82de04ab45222b36478ee7040e6",
     364  "spec/functions/delete_at_spec.rb": "188a3143799bd5cf121982883c7dc1c8",
     365  "spec/functions/delete_regex_spec.rb": "c049a3926aded4b6a804f1c824c57d2f",
     366  "spec/functions/delete_spec.rb": "d7c589404fdc3a6b65da7ecf1f7e0b02",
     367  "spec/functions/delete_undef_values_spec.rb": "a2c138145333e1873ee4bf23d091f86a",
     368  "spec/functions/delete_values_spec.rb": "e20b68a589002f1e2b52873d3dbcfb49",
     369  "spec/functions/deprecation_spec.rb": "f5d7355b687eaaa15c20fdb214671c2a",
     370  "spec/functions/difference_spec.rb": "66ba399c0bace1a131ecdb365e0afd4e",
     371  "spec/functions/dig44_spec.rb": "89631bb7282f7d3c9b75d79f48446c65",
     372  "spec/functions/dig_spec.rb": "61708160da38852c3c78bc8563e0fcb2",
     373  "spec/functions/dirname_spec.rb": "e80baeab6a166284f5069263fb5e37b7",
     374  "spec/functions/dos2unix_spec.rb": "d0cfe5fe19d2bf33320e6f47789826c6",
    303375  "spec/functions/downcase_spec.rb": "e2c24d41c6fb840f7b66c5205c942780",
    304376  "spec/functions/empty_spec.rb": "e6d06c193869ce8c97d3e67d5c5c5b4f",
    305   "spec/functions/ensure_packages_spec.rb": "76e89bf81ae98e52d2a07263c0e8d4f4",
    306   "spec/functions/ensure_resource_spec.rb": "57634d7b6f86ac77dc47fb5da36410c2",
    307   "spec/functions/flatten_spec.rb": "6fb563c36daf40599a414c1f3af8dc0b",
     377  "spec/functions/ensure_packages_spec.rb": "cb741ab1e99e7ad9057eea258730cd19",
     378  "spec/functions/ensure_resource_spec.rb": "e1ebbf9475781d86b58541a5846eda0b",
     379  "spec/functions/flatten_spec.rb": "5d59251fa8da0e4c8a376a513a25bc7a",
    308380  "spec/functions/floor_spec.rb": "7d110b1f994432e1c6c7c004a3dedbe4",
    309   "spec/functions/fqdn_rand_string_spec.rb": "2edaae1764df4d751684d8ceda7b9cda",
    310   "spec/functions/fqdn_rotate_spec.rb": "e9b1ce122788f18611cf64696d666328",
     381  "spec/functions/fqdn_rand_string_spec.rb": "950a33e5ad8056fbfe564ec7e3b9a583",
     382  "spec/functions/fqdn_rotate_spec.rb": "83f00ce0c48dec632e1aaa8192bb51cf",
     383  "spec/functions/fqdn_uuid_spec.rb": "1b2980fcbecc4b51bdc6de01e9b001b7",
    311384  "spec/functions/get_module_path_spec.rb": "ef22bd80ce5dedb069830d5aa10572c1",
    312   "spec/functions/getparam_spec.rb": "dbbdde0a72653feb479e9fb971b94ec7",
    313   "spec/functions/getvar_spec.rb": "18a9340442dd59cea8a6c98e95d38f4d",
    314   "spec/functions/grep_spec.rb": "b9d0722e7708351b0114c46d4272f760",
     385  "spec/functions/getparam_spec.rb": "359d7c9349ec0e5666bb38e2d9224621",
     386  "spec/functions/getvar_spec.rb": "3c7884e012bdb596df3d0640533dab96",
     387  "spec/functions/glob_spec.rb": "98e054f995a0d38002d9373b5e6acbc0",
     388  "spec/functions/grep_spec.rb": "0e917284860c5f96fdf56301012ba199",
    315389  "spec/functions/has_interface_with_spec.rb": "473c000e461c3497f8461eb17cf73430",
    316390  "spec/functions/has_ip_address_spec.rb": "7b36b993ea32757e74be9909906bd165",
    317   "spec/functions/has_ip_network_spec.rb": "23021acd604dc4ca3a1fef62e8863d8e",
    318   "spec/functions/has_key_spec.rb": "6bc81bc7d179d4b680e7065a60b76562",
    319   "spec/functions/hash_spec.rb": "4519b75eeb8eb0bba80b4594c297cf5e",
    320   "spec/functions/intersection_spec.rb": "fcd475963335b3efee99c3ddd0ddd969",
    321   "spec/functions/is_a_spec.rb": "51b1f473786fbd1d723febf20281de23",
    322   "spec/functions/is_array_spec.rb": "7ea00635b395f231fce6467c95410b05",
    323   "spec/functions/is_bool_spec.rb": "9173b8fd7cb5aea4504f0fa860d883c9",
     391  "spec/functions/has_ip_network_spec.rb": "7086a27623ba91c5ff069397a32172c4",
     392  "spec/functions/has_key_spec.rb": "eaa046db8632d6f76893e4b9df7b3e31",
     393  "spec/functions/hash_spec.rb": "53a059e13781fac6b4f8eb660655d58f",
     394  "spec/functions/intersection_spec.rb": "e906cb8ceb39b644b4b338adcd4dda26",
     395  "spec/functions/is_a_spec.rb": "7d6322426d629e5302c52455d9c4cd55",
     396  "spec/functions/is_array_spec.rb": "26d7eab025f333d2c4a8baf89ef4e36e",
     397  "spec/functions/is_bool_spec.rb": "40569a4cdb50af0cc21ad749ac18e6ef",
    324398  "spec/functions/is_domain_name_spec.rb": "4ea3825d5b77a5d75eab8228dcc738f9",
    325399  "spec/functions/is_email_address_spec.rb": "699c4573dfd00db8993a18afc0eaf875",
    326   "spec/functions/is_float_spec.rb": "42b7f071e02af58e3154643b84445af1",
     400  "spec/functions/is_float_spec.rb": "8aedd9e622cd1b861d99523532dc4fc1",
    327401  "spec/functions/is_function_available.rb": "f8ab234d536532c3629ff6a5068e7877",
    328402  "spec/functions/is_hash_spec.rb": "11563529f0f1f821769edb3131277100",
    329   "spec/functions/is_integer_spec.rb": "799bef092df12fa590e71473db957d11",
    330   "spec/functions/is_ip_address_spec.rb": "195e89d0c32eae24e4a51d12b8c59009",
    331   "spec/functions/is_mac_address_spec.rb": "748b7e3dffae6d4097da9cc29a37e94d",
    332   "spec/functions/is_numeric_spec.rb": "d131e94cf670075e8c46576b5109c2b6",
    333   "spec/functions/is_string_spec.rb": "f41f332f93fc05b57ee9611cdbe73c11",
    334   "spec/functions/join_keys_to_values_spec.rb": "b95f8f32888a96c4239c87cf9785d288",
    335   "spec/functions/join_spec.rb": "2181956bf08efe90f932a17e5138a25c",
    336   "spec/functions/keys_spec.rb": "8a6772daf2ae821e98d392f5266fdf67",
    337   "spec/functions/load_module_metadata_spec.rb": "bcc48736e28992853c4f6b16d397daed",
    338   "spec/functions/loadyaml_spec.rb": "f4f50af8016ffd187a0358b78634a259",
    339   "spec/functions/lstrip_spec.rb": "58644ca945b38ec8b3d8729423aacf69",
     403  "spec/functions/is_integer_spec.rb": "21a139f9a87b1561bfec60de26c435a2",
     404  "spec/functions/is_ip_address_spec.rb": "04a15328803bb47ae431eff63aa555df",
     405  "spec/functions/is_ipv4_address_spec.rb": "339b8c79925bb70c0de19468d58ab64a",
     406  "spec/functions/is_ipv6_address_spec.rb": "9743a0f2bfda70ace128d2f476a208b9",
     407  "spec/functions/is_mac_address_spec.rb": "532b8c4c63b37849e7fb9122d163ae3a",
     408  "spec/functions/is_numeric_spec.rb": "cb846f44e8f6d79161686d7b3729967c",
     409  "spec/functions/is_string_spec.rb": "56f34694781dfcf774e43bca06057fec",
     410  "spec/functions/join_keys_to_values_spec.rb": "f99dff6550fdb7c245ed4dcaca0a16a3",
     411  "spec/functions/join_spec.rb": "e190fbce526b3f4f7bb8aac029338ece",
     412  "spec/functions/keys_spec.rb": "fba0bfa928b5684d5c918d6c06edd06d",
     413  "spec/functions/length.rb": "c07a267ccccc4b4edbbfad155dc21475",
     414  "spec/functions/load_module_metadata_spec.rb": "431fbe84d627a5c4398f432caaec96f8",
     415  "spec/functions/loadjson_spec.rb": "76cbe175c90a596892b799d8e4d599e5",
     416  "spec/functions/loadyaml_spec.rb": "60e283bc07adc67bc2c934424bf01b8d",
     417  "spec/functions/lstrip_spec.rb": "892229ce8657490c72fc860fb0dda1b6",
    340418  "spec/functions/max_spec.rb": "47de8d59070d8d51b2184731f5d1aa43",
    341   "spec/functions/member_spec.rb": "02891f40caaca15a5aba43443c7d2ccb",
     419  "spec/functions/member_spec.rb": "6a988e6368c1ce090b47fe41efbc041c",
    342420  "spec/functions/merge_spec.rb": "56297527d192640bbe82c7ccf1e39815",
    343421  "spec/functions/min_spec.rb": "8b38e2a989912406cd2c57dcd3a460c4",
    344422  "spec/functions/num2bool_spec.rb": "7c4fd30e41a11b1bd0d9e5233340f16b",
    345   "spec/functions/parsejson_spec.rb": "656300186e986725982595c262f7eccd",
    346   "spec/functions/parseyaml_spec.rb": "67b3be346368a2070535585a51bcd7c2",
    347   "spec/functions/pick_default_spec.rb": "bef7bb2f755e665775aa0085c6897fb2",
    348   "spec/functions/pick_spec.rb": "8fe02695ea909e993119254accc61f1a",
    349   "spec/functions/prefix_spec.rb": "95956321291a0f6d1e2f45572569fe3b",
     423  "spec/functions/parsejson_spec.rb": "958db1dde2f2244f458c399e0c3231e0",
     424  "spec/functions/parseyaml_spec.rb": "19a2add90ca08d5a17c4e3aff89fe3c0",
     425  "spec/functions/pick_default_spec.rb": "ab9ef2e9111cfd2709313e0e3c3befa2",
     426  "spec/functions/pick_spec.rb": "786044a71e3bd673212949c12f37b10f",
     427  "spec/functions/prefix_spec.rb": "2402d2ad5108050bb5c20b3ea58b64be",
    350428  "spec/functions/private_spec.rb": "f404771c4590a0cd7ce61ddff8f3eb7b",
    351429  "spec/functions/pw_hash_spec.rb": "640609cc73b4c8bbcdfc88c3e9797664",
    352   "spec/functions/range_spec.rb": "e73c3bb7f2c25540780c3bad19b30994",
    353   "spec/functions/reject_spec.rb": "e0eb0546885dd0aef023dfa4694155db",
    354   "spec/functions/reverse_spec.rb": "cb48f198c2a9efe224a00d67e68d978f",
    355   "spec/functions/rstrip_spec.rb": "f0391a775d335e2a5c9335d50c657f4b",
    356   "spec/functions/seeded_rand_spec.rb": "d7d80c3458706e83a8087e17c8a7b6ab",
    357   "spec/functions/shuffle_spec.rb": "6ab6083720cfd4dfa99556e5ef81f576",
    358   "spec/functions/size_spec.rb": "51495c464a203d9e1919008209f05cd5",
     430  "spec/functions/range_spec.rb": "d3af56cc8a137059423f8738e343ccff",
     431  "spec/functions/regexpescape_spec.rb": "ce027e1b99674f39de8ddffcfed8396e",
     432  "spec/functions/reject_spec.rb": "8ecbca64a9817ebef76be96dcf6cdeeb",
     433  "spec/functions/reverse_spec.rb": "e40754fd34e96ac206308958504ae315",
     434  "spec/functions/rstrip_spec.rb": "748f4587c12b5a590b985f111e282a8d",
     435  "spec/functions/seeded_rand_spec.rb": "eb56445d10962d81ed935b53826da349",
     436  "spec/functions/shell_escape_spec.rb": "bf108573c041f0c228f6d47d367d0aa3",
     437  "spec/functions/shell_join_spec.rb": "92f31bd98d6e8e30e5f758f50bcb8a75",
     438  "spec/functions/shell_split_spec.rb": "430f58733cc7855e56bfc918971b3fc1",
     439  "spec/functions/shuffle_spec.rb": "be5d43184f2ca42db4f452085a4730fd",
     440  "spec/functions/size_spec.rb": "f5e35878331bb12d9639522e38cc81c8",
    359441  "spec/functions/sort_spec.rb": "d9533dd37c6263b92895f7eba8485248",
    360   "spec/functions/squeeze_spec.rb": "549af334b7f9dd5f06d6b45c3e3e8303",
     442  "spec/functions/squeeze_spec.rb": "ffcf3b44cbdd45e14eb1173d2b7d1d99",
    361443  "spec/functions/str2bool_spec.rb": "607b25fb0badd0da5acb86c63437c8be",
    362444  "spec/functions/str2saltedsha512_spec.rb": "07586b0026757cd39229c12c7221808b",
    363445  "spec/functions/strftime_spec.rb": "f1a34fc930940213abfba3095d5d8065",
    364   "spec/functions/strip_spec.rb": "0cb8537f2e7df14f42247349ab3161a6",
    365   "spec/functions/suffix_spec.rb": "65172f6879c902802230f718ea9df7da",
     446  "spec/functions/strip_spec.rb": "023132b8bd0820da254f74c6fe31bb80",
     447  "spec/functions/suffix_spec.rb": "dfe26a61bf0185291b6ae868e9d0de20",
    366448  "spec/functions/swapcase_spec.rb": "90bace1b004aa63d46eb6481c6dce2b1",
    367449  "spec/functions/time_spec.rb": "6dc8f5b42cf89345d2de424bfe19be90",
    … …  
    371453  "spec/functions/type_of_spec.rb": "83755d9390b9c00e086a007edff7fd9b",
    372454  "spec/functions/type_spec.rb": "7a61b4af7d3d83be590d783a7e5e80f8",
    373   "spec/functions/union_spec.rb": "089b03e9a6ef25cdcf68157bb986d8a8",
    374   "spec/functions/unique_spec.rb": "b793c531b4d227ae55d05a187b706fb8",
     455  "spec/functions/union_spec.rb": "a290a38e443b856a476d14d4b1dc72fb",
     456  "spec/functions/unique_spec.rb": "97fbcc73a0e0d82e23c723837627c712",
    375457  "spec/functions/unix2dos_spec.rb": "628c8a0c608d1fa0dd09bd1b5af97c1f",
    376458  "spec/functions/upcase_spec.rb": "4f0461a20c03d618f0c18da39bebcf65",
    377459  "spec/functions/uriescape_spec.rb": "1458afbe7e7e11dcaad8d295a7f2be59",
    378   "spec/functions/validate_absolute_path_spec.rb": "26e00ce6122016b9b53797806e681682",
    379   "spec/functions/validate_array_spec.rb": "df0bcf372b3efdd1f4de16b508987616",
     460  "spec/functions/validate_absolute_path_spec.rb": "5adbf0a0ac8b23e86195deaf3e4bd371",
     461  "spec/functions/validate_array_spec.rb": "3aa76f3731754c637acc94b59c79efb0",
    380462  "spec/functions/validate_augeas_spec.rb": "d598e89a23912be9f24d39b809f30b47",
    381   "spec/functions/validate_bool_spec.rb": "93cfbecbe8cc4707ada13f48f5c8c8a6",
    382   "spec/functions/validate_cmd_spec.rb": "05eb581532fc689ff91212413b2e678d",
     463  "spec/functions/validate_bool_spec.rb": "d1b43cd294d0588ac6d67d5d3c77a42a",
     464  "spec/functions/validate_cmd_spec.rb": "34a4e623ab0ce7d4c218a837f896c1ea",
    383465  "spec/functions/validate_email_address_spec.rb": "1296f9934d102258091379ee07f9a2a8",
    384   "spec/functions/validate_hash_spec.rb": "56f4b7e42a4d3f62172982fa639f5cc3",
    385   "spec/functions/validate_integer_spec.rb": "0a2677479c8bf0257bdd54c3d0db1f81",
    386   "spec/functions/validate_ip_address_spec.rb": "e4ba65ff0c87b28b29f05e1637b7e700",
    387   "spec/functions/validate_ipv4_address_spec.rb": "dc1af709faa724ccc51d9c5aba1d6356",
    388   "spec/functions/validate_ipv6_address_spec.rb": "5f27c395b286385c489df5ee119580bc",
    389   "spec/functions/validate_numeric_spec.rb": "dd5fcc7421002c85252d0a9421a5a99b",
    390   "spec/functions/validate_re_spec.rb": "430e57fd80d3f29f4ba8be62c5463e62",
    391   "spec/functions/validate_slength_spec.rb": "92252419e0d311a7bd6b426edb3c1040",
    392   "spec/functions/validate_string_spec.rb": "779473e87660081e610c397f0157331a",
     466  "spec/functions/validate_hash_spec.rb": "0b3ac3f7262f13ef14e3df937c8d104c",
     467  "spec/functions/validate_integer_spec.rb": "ec55ab34e3ec4f09722349cd6aac77a6",
     468  "spec/functions/validate_ip_address_spec.rb": "ba8c92e30f1af9e6839a2901e002c3f3",
     469  "spec/functions/validate_ipv4_address_spec.rb": "d5d956651629f95ea531ac03b71e247b",
     470  "spec/functions/validate_ipv6_address_spec.rb": "7ee0d6097666558d8627de424c26ef75",
     471  "spec/functions/validate_legacy_spec.rb": "a1a3af70e71d0a6b848d75c518949b3b",
     472  "spec/functions/validate_numeric_spec.rb": "c2f01b9c9aeae75683563ef7d3951bbb",
     473  "spec/functions/validate_re_spec.rb": "27bcf99cd815b755548cd3979753b2f3",
     474  "spec/functions/validate_slength_spec.rb": "c292023b2e61298499ff1f791fc03005",
     475  "spec/functions/validate_string_spec.rb": "bc6735359ada0b3ccf69f515231e3808",
    393476  "spec/functions/validate_x509_rsa_key_pair_spec.rb": "24810bdb8ac473ae1168f1b2c5708170",
    394   "spec/functions/values_at_spec.rb": "c318f66de43f8e6095d28f733f55ec5d",
    395   "spec/functions/values_spec.rb": "5550da71a69514f8be87a12b575d5228",
    396   "spec/functions/zip_spec.rb": "4c991f26985096b3e8b336cef528aa00",
     477  "spec/functions/values_at_spec.rb": "866ba43a4b606f6e9e72ac91c07408bd",
     478  "spec/functions/values_spec.rb": "6b8f39665cb8fdb03658d838e50b55b0",
     479  "spec/functions/zip_spec.rb": "986defd43a001ff28fe7c90b0366812e",
    397480  "spec/monkey_patches/alias_should_to_must.rb": "b19ee31563afb91a72f9869f9d7362ff",
    398481  "spec/monkey_patches/publicize_methods.rb": "c690e444b77c871375d321e413e28ca1",
    399482  "spec/spec_helper.rb": "b2db3bc02b4ac2fd5142a6621c641b07",
    400   "spec/spec_helper_acceptance.rb": "4da340042246df9b9e3dc221a5807528",
    401   "spec/spec_helper_local.rb": "845be3a017611728b73e73af427f7431",
     483  "spec/spec_helper_acceptance.rb": "cd589056b52031da19d9c31ed86ea922",
     484  "spec/spec_helper_local.rb": "1e3ad3c06a11cbcb813dc1d31973cbda",
     485  "spec/support/shared_data.rb": "9758f8ba2958965d287387a2513dac73",
     486  "spec/unit/ensure_resources_spec.rb": "30cad259a3cc6c73f90209804183c818",
    402487  "spec/unit/facter/facter_dot_d_spec.rb": "420339a544851f2c7ee6fa4c651bdce8",
    403488  "spec/unit/facter/package_provider_spec.rb": "3a6ba799822fbcabc9adab5880260b7a",
    … …  
    408493  "spec/unit/puppet/parser/functions/enclose_ipv6_spec.rb": "0145a78254ea716e5e7600d9464318a8",
    409494  "spec/unit/puppet/parser/functions/is_absolute_path_spec.rb": "52f8d3b9011fb1fd8a2a429fe8b2ae08",
    410   "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e70f3093b17aeccef198b52901ab2f94",
     495  "spec/unit/puppet/provider/file_line/ruby_spec.rb": "d269e18953fc297786a8393b20842abc",
    411496  "spec/unit/puppet/type/anchor_spec.rb": "06a669dffa44d716bf19b4e7f5f1d75d",
    412   "spec/unit/puppet/type/file_line_spec.rb": "af824724caf0071d84464042490a6f88"
     497  "spec/unit/puppet/type/file_line_spec.rb": "83e11166de4abe69cdf0dc7450e79778",
     498  "types/absolutepath.pp": "3ae6f48dd95835df87c5dacea13c88d2",
     499  "types/compat/absolute_path.pp": "6d0e102d1098d85d97c8f13051cb2c10",
     500  "types/compat/array.pp": "43c41022dd743d55c8e9e82ce3ed741c",
     501  "types/compat/bool.pp": "6e0cd7b2a7e1b9efaa0e273937211e58",
     502  "types/compat/float.pp": "fd134a0e0e1abd420cec2107780a7afa",
     503  "types/compat/hash.pp": "3535d98f0f3eaec44d443190f258e9ba",
     504  "types/compat/integer.pp": "e85a20e42b3afaf5ec0718a8d9f9c5e3",
     505  "types/compat/ip_address.pp": "d42c7435de30a469a71b69c45d642da7",
     506  "types/compat/ipv4.pp": "c84eb3764f45b256a09be68afe61b749",
     507  "types/compat/ipv6.pp": "d3c0fada5425d576aeca14ddbee78653",
     508  "types/compat/numeric.pp": "f864539d78e95dabf0bab361b4ccc042",
     509  "types/compat/re.pp": "70b05d4697e61f9af0c212ba063f395d",
     510  "types/compat/string.pp": "b9a179664c85e121aa0277021627d126",
     511  "types/httpsurl.pp": "108225d0273e17d541b239882287ed15",
     512  "types/httpurl.pp": "4ba64825b11af75997c59b5acf07c62d",
     513  "types/unixpath.pp": "5fc80523e7f474dd84056c44fafd9544",
     514  "types/windowspath.pp": "4c1eda331ecb43de98c29ed22d0ad448"
    413515}
  • src/puppetcode/environments/gnuboat/modules/stdlib/examples/file_line.pp

    rbcf0be5 rad28f83  
    33file { '/tmp/dansfile':
    44  ensure => file,
    5 } ->
    6 file_line { 'dans_line':
     5}
     6-> file_line { 'dans_line':
    77  line => 'dan is awesome',
    88  path => '/tmp/dansfile',
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/functions/type_of.rb

    rbcf0be5 rad28f83  
    1111# See the `assert_type()` function for flexible ways to assert the type of a value.
    1212#
     13# The built-in type() function in puppet is generally preferred over this function
     14# this function is provided for backwards compatibility.
    1315Puppet::Functions.create_function(:type_of) do
    1416  def type_of(value)
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/abs.rb

    rbcf0be5 rad28f83  
    1010  ) do |arguments|
    1111
    12     raise(Puppet::ParseError, "abs(): Wrong number of arguments " +
    13       "given (#{arguments.size} for 1)") if arguments.size < 1
     12    raise(Puppet::ParseError, "abs(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1413
    1514    value = arguments[0]
    … …  
    2221        value = value.to_i
    2322      else
    24         raise(Puppet::ParseError, 'abs(): Requires float or ' +
    25           'integer to work with')
     23        raise(Puppet::ParseError, 'abs(): Requires float or integer to work with')
    2624      end
    2725    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/assert_private.rb

    rbcf0be5 rad28f83  
    1010  ) do |args|
    1111
    12     raise(Puppet::ParseError, "assert_private(): Wrong number of arguments "+
    13       "given (#{args.size}}) for 0 or 1)") if args.size > 1
     12    raise(Puppet::ParseError, "assert_private(): Wrong number of arguments given (#{args.size}}) for 0 or 1)") if args.size > 1
    1413
    1514    scope = self
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/base64.rb

    rbcf0be5 rad28f83  
     1
     2#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
     3
    14module Puppet::Parser::Functions
    25
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/bool2num.rb

    rbcf0be5 rad28f83  
    1212  ) do |arguments|
    1313
    14     raise(Puppet::ParseError, "bool2num(): Wrong number of arguments " +
    15       "given (#{arguments.size} for 1)") if arguments.size < 1
     14    raise(Puppet::ParseError, "bool2num(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1615
    1716    value = function_str2bool([arguments[0]])
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/bool2str.rb

    rbcf0be5 rad28f83  
    2121
    2222    unless arguments.size == 1 or arguments.size == 3
    23       raise(Puppet::ParseError, "bool2str(): Wrong number of arguments " +
    24                                 "given (#{arguments.size} for 3)")
     23      raise(Puppet::ParseError, "bool2str(): Wrong number of arguments given (#{arguments.size} for 3)")
    2524    end
    2625
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/camelcase.rb

    rbcf0be5 rad28f83  
    11#
    22#  camelcase.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    910  ) do |arguments|
    1011
    11     raise(Puppet::ParseError, "camelcase(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     12    raise(Puppet::ParseError, "camelcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1313
    1414    value = arguments[0]
    … …  
    1616
    1717    unless [Array, String].include?(klass)
    18       raise(Puppet::ParseError, 'camelcase(): Requires either ' +
    19         'array or string to work with')
     18      raise(Puppet::ParseError, 'camelcase(): Requires either array or string to work with')
    2019    end
    2120
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/capitalize.rb

    rbcf0be5 rad28f83  
    11#
    22#  capitalize.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    1011  ) do |arguments|
    1112
    12     raise(Puppet::ParseError, "capitalize(): Wrong number of arguments " +
    13       "given (#{arguments.size} for 1)") if arguments.size < 1
     13    raise(Puppet::ParseError, "capitalize(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1414
    1515    value = arguments[0]
    1616
    1717    unless value.is_a?(Array) || value.is_a?(String)
    18       raise(Puppet::ParseError, 'capitalize(): Requires either ' +
    19         'array or string to work with')
     18      raise(Puppet::ParseError, 'capitalize(): Requires either array or string to work with')
    2019    end
    2120
    … …  
    3029  end
    3130end
    32 
    33 # vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ceiling.rb

    rbcf0be5 rad28f83  
    66  ) do |arguments|
    77
    8     raise(Puppet::ParseError, "ceiling(): Wrong number of arguments " +
    9           "given (#{arguments.size} for 1)") if arguments.size != 1
     8    raise(Puppet::ParseError, "ceiling(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    109
    1110    begin
    1211      arg = Float(arguments[0])
    1312    rescue TypeError, ArgumentError => e
    14       raise(Puppet::ParseError, "ceiling(): Wrong argument type " +
    15             "given (#{arguments[0]} for Numeric)")
     13      raise(Puppet::ParseError, "ceiling(): Wrong argument type given (#{arguments[0]} for Numeric)")
    1614    end
    1715
    18     raise(Puppet::ParseError, "ceiling(): Wrong argument type " +
    19           "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false
     16    raise(Puppet::ParseError, "ceiling(): Wrong argument type given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false
    2017
    2118    arg.ceil
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/chomp.rb

    rbcf0be5 rad28f83  
    1111  ) do |arguments|
    1212
    13     raise(Puppet::ParseError, "chomp(): Wrong number of arguments " +
    14       "given (#{arguments.size} for 1)") if arguments.size < 1
     13    raise(Puppet::ParseError, "chomp(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1514
    1615    value = arguments[0]
    1716
    1817    unless value.is_a?(Array) || value.is_a?(String)
    19       raise(Puppet::ParseError, 'chomp(): Requires either ' +
    20         'array or string to work with')
     18      raise(Puppet::ParseError, 'chomp(): Requires either array or string to work with')
    2119    end
    2220
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/chop.rb

    rbcf0be5 rad28f83  
    1313  ) do |arguments|
    1414
    15     raise(Puppet::ParseError, "chop(): Wrong number of arguments " +
    16       "given (#{arguments.size} for 1)") if arguments.size < 1
     15    raise(Puppet::ParseError, "chop(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1716
    1817    value = arguments[0]
    1918
    2019    unless value.is_a?(Array) || value.is_a?(String)
    21       raise(Puppet::ParseError, 'chop(): Requires either an ' +
    22         'array or string to work with')
     20      raise(Puppet::ParseError, 'chop(): Requires either an array or string to work with')
    2321    end
    2422
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/clamp.rb

    rbcf0be5 rad28f83  
    1111    args.flatten!
    1212
    13     raise(Puppet::ParseError, 'clamp(): Wrong number of arguments, ' +
    14           'need three to clamp') if args.size != 3
     13    raise(Puppet::ParseError, 'clamp(): Wrong number of arguments, need three to clamp') if args.size != 3
    1514
    1615    # check values out
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/concat.rb

    rbcf0be5 rad28f83  
    1818
    1919    # Check that more than 2 arguments have been given ...
    20     raise(Puppet::ParseError, "concat(): Wrong number of arguments " +
    21       "given (#{arguments.size} for < 2)") if arguments.size < 2
     20    raise(Puppet::ParseError, "concat(): Wrong number of arguments given (#{arguments.size} for < 2)") if arguments.size < 2
    2221
    2322    a = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/count.rb

    rbcf0be5 rad28f83  
    88
    99    if (args.size > 2) then
    10       raise(ArgumentError, "count(): Wrong number of arguments "+
    11         "given #{args.size} for 1 or 2.")
     10      raise(ArgumentError, "count(): Wrong number of arguments given #{args.size} for 1 or 2.")
    1211    end
    1312
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb

    rbcf0be5 rad28f83  
    2525  end
    2626  ret = false
    27   if resource = findresource(reference.to_s)
     27
     28  if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0
     29    # Workaround for PE-20308
     30    if reference.is_a?(String)
     31      type_name, title = Puppet::Resource.type_and_title(reference, nil)
     32      type = Puppet::Pops::Evaluator::Runtime3ResourceSupport.find_resource_type_or_class(find_global_scope, type_name.downcase)
     33    elsif reference.is_a?(Puppet::Resource)
     34      type = reference.resource_type
     35      title = reference.title
     36    else
     37      raise(ArgumentError, "Reference is not understood: '#{reference.class}'")
     38    end
     39    #end workaround
     40  else
     41    type = reference.to_s
     42    title = nil
     43  end
     44
     45  if resource = findresource(type, title)
    2846    matches = params.collect do |key, value|
    29       resource[key] == value
     47      # eql? avoids bugs caused by monkeypatching in puppet
     48      resource_is_undef = resource[key].eql?(:undef) || resource[key].nil?
     49      value_is_undef = value.eql?(:undef) || value.nil?
     50      (resource_is_undef && value_is_undef) || (resource[key] == value)
    3051    end
    3152    ret = params.empty? || !matches.include?(false)
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete.rb

    rbcf0be5 rad28f83  
    22# delete.rb
    33#
    4 
    5 # TODO(Krzysztof Wilczynski): We need to add support for regular expression ...
    64
    75module Puppet::Parser::Functions
    … …  
    2624  ) do |arguments|
    2725
    28     if (arguments.size != 2) then
    29       raise(Puppet::ParseError, "delete(): Wrong number of arguments "+
    30                                   "given #{arguments.size} for 2.")
    31     end
     26    raise(Puppet::ParseError, "delete(): Wrong number of arguments given #{arguments.size} for 2") unless arguments.size == 2
    3227
    3328    collection = arguments[0].dup
    … …  
    3934          collection.gsub! item, ''
    4035        else
    41           raise(TypeError, "delete(): First argument must be an Array, " +
    42                              "String, or Hash. Given an argument of class #{collection.class}.")
     36          raise(TypeError, "delete(): First argument must be an Array, String, or Hash. Given an argument of class #{collection.class}.")
    4337      end
    4438    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete_at.rb

    rbcf0be5 rad28f83  
    1515  ) do |arguments|
    1616
    17     raise(Puppet::ParseError, "delete_at(): Wrong number of arguments " +
    18       "given (#{arguments.size} for 2)") if arguments.size < 2
     17    raise(Puppet::ParseError, "delete_at(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2
    1918
    2019    array = arguments[0]
    … …  
    2726
    2827    if index.is_a?(String) and not index.match(/^\d+$/)
    29       raise(Puppet::ParseError, 'delete_at(): You must provide ' +
    30         'non-negative numeric index')
     28      raise(Puppet::ParseError, 'delete_at(): You must provide non-negative numeric index')
    3129    end
    3230
    … …  
    3735
    3836    if index > result.size - 1 # First element is at index 0 is it not?
    39       raise(Puppet::ParseError, 'delete_at(): Given index ' +
    40         'exceeds size of array given')
     37      raise(Puppet::ParseError, 'delete_at(): Given index exceeds size of array given')
    4138    end
    4239
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb

    rbcf0be5 rad28f83  
    1616    ) do |args|
    1717
    18     raise(Puppet::ParseError,
    19           "delete_undef_values(): Wrong number of arguments given " +
    20           "(#{args.size})") if args.size < 1
     18    raise(Puppet::ParseError, "delete_undef_values(): Wrong number of arguments given (#{args.size})") if args.size < 1
    2119
    2220    unless args[0].is_a? Array or args[0].is_a? Hash
    23       raise(Puppet::ParseError,
    24             "delete_undef_values(): expected an array or hash, got #{args[0]} type  #{args[0].class} ")
     21      raise(Puppet::ParseError, "delete_undef_values(): expected an array or hash, got #{args[0]} type  #{args[0].class} ")
    2522    end
    2623    result = args[0].dup
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete_values.rb

    rbcf0be5 rad28f83  
    1212    ) do |arguments|
    1313
    14     raise(Puppet::ParseError,
    15           "delete_values(): Wrong number of arguments given " +
    16           "(#{arguments.size} of 2)") if arguments.size != 2
     14    raise(Puppet::ParseError, "delete_values(): Wrong number of arguments given (#{arguments.size} of 2)") if arguments.size != 2
    1715
    1816    hash, item = arguments
    1917
    2018    if not hash.is_a?(Hash)
    21       raise(TypeError, "delete_values(): First argument must be a Hash. " + \
    22                        "Given an argument of class #{hash.class}.")
     19      raise(TypeError, "delete_values(): First argument must be a Hash. Given an argument of class #{hash.class}.")
    2320    end
    2421    hash.dup.delete_if { |key, val| item == val }
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/difference.rb

    rbcf0be5 rad28f83  
    1818
    1919    # Two arguments are required
    20     raise(Puppet::ParseError, "difference(): Wrong number of arguments " +
    21       "given (#{arguments.size} for 2)") if arguments.size != 2
     20    raise(Puppet::ParseError, "difference(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size != 2
    2221
    2322    first = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/dig.rb

    rbcf0be5 rad28f83  
    55module Puppet::Parser::Functions
    66  newfunction(:dig, :type => :rvalue, :doc => <<-EOS
    7 Looks up into a complex structure of arrays and hashes and returns nil
    8 or the default value if nothing was found.
    9 
    10 Path is an array of keys to be looked up in data argument. The function
    11 will go down the structure and try to extract the required value.
    12 
    13 $data = {
    14   'a' => {
    15     'b' => [
    16       'b1',
    17       'b2',
    18       'b3' ]}}
    19 
    20 $value = dig($data, ['a', 'b', '2'], 'not_found')
    21 => $value = 'b3'
    22 
    23 a -> first hash key
    24 b -> second hash key
    25 2 -> array index starting with 0
    26 
    27 not_found -> (optional) will be returned if there is no value or the path
    28 did not match. Defaults to nil.
    29 
    30 In addition to the required "path" argument, "dig" accepts default
    31 argument. It will be returned if no value was found or a path component is
    32 missing. And the fourth argument can set a variable path separator.
     7    DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version.
    338    EOS
    34              ) do |arguments|
    35     # Two arguments are required
    36     raise(Puppet::ParseError, "dig(): Wrong number of arguments " +
    37                               "given (#{arguments.size} for at least 2)") if arguments.size < 2
    38 
    39     data, path, default = *arguments
    40 
    41     if !(data.is_a?(Hash) || data.is_a?(Array))
    42       raise(Puppet::ParseError, "dig(): first argument must be a hash or an array, " <<
    43                                 "given #{data.class.name}")
     9  ) do |arguments|
     10    warning("dig() DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version.")
     11    if ! Puppet::Parser::Functions.autoloader.loaded?(:dig44)
     12      Puppet::Parser::Functions.autoloader.load(:dig44)
    4413    end
    45 
    46     unless path.is_a? Array
    47       raise(Puppet::ParseError, "dig(): second argument must be an array, " <<
    48                                 "given #{path.class.name}")
    49     end
    50 
    51     value = path.reduce(data) { |h, k| (h.is_a?(Hash) || h.is_a?(Array)) ? h[k] : break }
    52     value.nil? ? default : value
     14    function_dig44(arguments)
    5315  end
    5416end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/downcase.rb

    rbcf0be5 rad28f83  
    11#
    22#  downcase.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    910  ) do |arguments|
    1011
    11     raise(Puppet::ParseError, "downcase(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     12    raise(Puppet::ParseError, "downcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1313
    1414    value = arguments[0]
    1515
    1616    unless value.is_a?(Array) || value.is_a?(String)
    17       raise(Puppet::ParseError, 'downcase(): Requires either ' +
    18         'array or string to work with')
     17      raise(Puppet::ParseError, 'downcase(): Requires either array or string to work with')
    1918    end
    2019
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/empty.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "empty(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "empty(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1312
    1413    value = arguments[0]
    1514
    1615    unless value.is_a?(Array) || value.is_a?(Hash) || value.is_a?(String) || value.is_a?(Numeric)
    17       raise(Puppet::ParseError, 'empty(): Requires either ' +
    18         'array, hash, string or integer to work with')
     16      raise(Puppet::ParseError, 'empty(): Requires either array, hash, string or integer to work with')
    1917    end
    2018
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/enclose_ipv6.rb

    rbcf0be5 rad28f83  
    1717
    1818    if (arguments.size != 1) then
    19       raise(Puppet::ParseError, "enclose_ipv6(): Wrong number of arguments "+
    20         "given #{arguments.size} for 1")
     19      raise(Puppet::ParseError, "enclose_ipv6(): Wrong number of arguments given #{arguments.size} for 1")
    2120    end
    2221    unless arguments[0].is_a?(String) or arguments[0].is_a?(Array) then
    23       raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument type "+
    24         "given #{arguments[0].class} expected String or Array")
     22      raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument type given #{arguments[0].class} expected String or Array")
    2523    end
    2624
    … …  
    3331          ip = IPAddr.new(val)
    3432        rescue *rescuable_exceptions
    35           raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument "+
    36                 "given #{val} is not an ip address.")
     33          raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument given #{val} is not an ip address.")
    3734        end
    3835        val = "[#{ip.to_s}]" if ip.ipv6?
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb

    rbcf0be5 rad28f83  
    1212
    1313    if arguments.size > 2 or arguments.size == 0
    14       raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments " +
    15         "given (#{arguments.size} for 1 or 2)")
    16     elsif arguments.size == 2 and !arguments[1].is_a?(Hash)
     14      raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments given (#{arguments.size} for 1 or 2)")
     15    elsif arguments.size == 2 and !arguments[1].is_a?(Hash)
    1716      raise(Puppet::ParseError, 'ensure_packages(): Requires second argument to be a Hash')
    1817    end
    … …  
    2625
    2726      Puppet::Parser::Functions.function(:ensure_resources)
    28       function_ensure_resources(['package', Hash(arguments[0]), defaults ])
     27      function_ensure_resources(['package', arguments[0].dup, defaults ])
    2928    else
    3029      packages = Array(arguments[0])
    … …  
    3837      Puppet::Parser::Functions.function(:ensure_resource)
    3938      packages.each { |package_name|
     39      raise(Puppet::ParseError, 'ensure_packages(): Empty String provided for package name') if package_name.length == 0
     40      if !findresource("Package[#{package_name}]")
    4041        function_ensure_resource(['package', package_name, defaults ])
     42      end
    4143    }
    4244    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ensure_resources.rb

    rbcf0be5 rad28f83  
    3737
    3838  if title.is_a?(Hash)
    39     resource_hash = Hash(title)
     39    resource_hash = title.dup
    4040    resources = resource_hash.keys
    4141
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/flatten.rb

    rbcf0be5 rad28f83  
    1616  ) do |arguments|
    1717
    18     raise(Puppet::ParseError, "flatten(): Wrong number of arguments " +
    19       "given (#{arguments.size} for 1)") if arguments.size != 1
     18    raise(Puppet::ParseError, "flatten(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    2019
    2120    array = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/floor.rb

    rbcf0be5 rad28f83  
    66  ) do |arguments|
    77
    8     raise(Puppet::ParseError, "floor(): Wrong number of arguments " +
    9           "given (#{arguments.size} for 1)") if arguments.size != 1
     8    raise(Puppet::ParseError, "floor(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    109
    1110    begin
    1211      arg = Float(arguments[0])
    1312    rescue TypeError, ArgumentError => e
    14       raise(Puppet::ParseError, "floor(): Wrong argument type " +
    15             "given (#{arguments[0]} for Numeric)")
     13      raise(Puppet::ParseError, "floor(): Wrong argument type given (#{arguments[0]} for Numeric)")
    1614    end
    1715
    18     raise(Puppet::ParseError, "floor(): Wrong argument type " +
    19           "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false
     16    raise(Puppet::ParseError, "floor(): Wrong argument type given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false
    2017
    2118    arg.floor
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb

    rbcf0be5 rad28f83  
    1616  a SEED can be useful if you need more than one unrelated rotation.") do |args|
    1717
    18     raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments " +
    19       "given (#{args.size} for 1)") if args.size < 1
     18    raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments given (#{args.size} for 1)") if args.size < 1
    2019
    2120    value = args.shift
    … …  
    2322
    2423    unless value.is_a?(Array) || value.is_a?(String)
    25       raise(Puppet::ParseError, 'fqdn_rotate(): Requires either ' +
    26         'array or string to work with')
     24      raise(Puppet::ParseError, 'fqdn_rotate(): Requires either array or string to work with')
    2725    end
    2826
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/getparam.rb

    rbcf0be5 rad28f83  
    2929
    3030  if resource = findresource(reference.to_s)
    31     return resource[param] if resource[param]
     31    return resource[param] unless resource[param].nil?
    3232  end
    3333
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/getvar.rb

    rbcf0be5 rad28f83  
    2121
    2222    begin
     23      result = nil
    2324      catch(:undefined_variable) do
    24         self.lookupvar("#{args[0]}")
     25        result = self.lookupvar("#{args[0]}")
    2526      end
     27
     28      # avoid relying on incosistent behaviour around ruby return values from catch
     29      result
    2630    rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
    2731    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/grep.rb

    rbcf0be5 rad28f83  
    1919
    2020    if (arguments.size != 2) then
    21       raise(Puppet::ParseError, "grep(): Wrong number of arguments "+
    22         "given #{arguments.size} for 2")
     21      raise(Puppet::ParseError, "grep(): Wrong number of arguments given #{arguments.size} for 2")
    2322    end
    2423
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb

    rbcf0be5 rad28f83  
    2020  ) do |args|
    2121
    22     raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments " +
    23           "given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2
     22    raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2
    2423
    2524    interfaces = lookupvar('interfaces')
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb

    rbcf0be5 rad28f83  
    1212  ) do |args|
    1313
    14     raise(Puppet::ParseError, "has_ip_address(): Wrong number of arguments " +
    15           "given (#{args.size} for 1)") if args.size != 1
     14    raise(Puppet::ParseError, "has_ip_address(): Wrong number of arguments given (#{args.size} for 1)") if args.size != 1
    1615
    1716    Puppet::Parser::Functions.autoloader.load(:has_interface_with) \
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb

    rbcf0be5 rad28f83  
    1212  ) do |args|
    1313
    14     raise(Puppet::ParseError, "has_ip_network(): Wrong number of arguments " +
    15           "given (#{args.size} for 1)") if args.size != 1
     14    raise(Puppet::ParseError, "has_ip_network(): Wrong number of arguments given (#{args.size} for 1)") if args.size != 1
    1615
    1716    Puppet::Parser::Functions.autoloader.load(:has_interface_with) \
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/hash.rb

    rbcf0be5 rad28f83  
    1515  ) do |arguments|
    1616
    17     raise(Puppet::ParseError, "hash(): Wrong number of arguments " +
    18       "given (#{arguments.size} for 1)") if arguments.size < 1
     17    raise(Puppet::ParseError, "hash(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1918
    2019    array = arguments[0]
    … …  
    3130      result = Hash[*array]
    3231    rescue StandardError
    33       raise(Puppet::ParseError, 'hash(): Unable to compute ' +
    34         'hash from array given')
     32      raise(Puppet::ParseError, 'hash(): Unable to compute hash from array given')
    3533    end
    3634
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/intersection.rb

    rbcf0be5 rad28f83  
    1616
    1717    # Two arguments are required
    18     raise(Puppet::ParseError, "intersection(): Wrong number of arguments " +
    19       "given (#{arguments.size} for 2)") if arguments.size != 2
     18    raise(Puppet::ParseError, "intersection(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size != 2
    2019
    2120    first = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_absolute_path.rb

    rbcf0be5 rad28f83  
    2424
    2525  ENDHEREDOC
    26 
     26    function_deprecation([:is_absolute_path, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_path. There is further documentation for validate_legacy function in the README.'])
    2727    require 'puppet/util'
    2828
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_array.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "is_array(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    function_deprecation([:is_array, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.'])
     12
     13    raise(Puppet::ParseError, "is_array(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1314
    1415    type = arguments[0]
    … …  
    1920  end
    2021end
    21 
    22 # vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_bool.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "is_bool(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size != 1
     11    function_deprecation([:is_bool, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.'])
     12
     13    raise(Puppet::ParseError, "is_bool(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    1314
    1415    type = arguments[0]
    … …  
    1920  end
    2021end
    21 
    22 # vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb

    rbcf0be5 rad28f83  
    1010
    1111    if (arguments.size != 1) then
    12       raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments "+
    13         "given #{arguments.size} for 1")
     12      raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments given #{arguments.size} for 1")
    1413    end
    1514
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_email_address.rb

    rbcf0be5 rad28f83  
    99             ) do |arguments|
    1010    if arguments.size != 1
    11       raise(Puppet::ParseError, 'is_email_address(): Wrong number of arguments '\
    12         "given #{arguments.size} for 1")
     11      raise(Puppet::ParseError, "is_email_address(): Wrong number of arguments given #{arguments.size} for 1")
    1312    end
    1413
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_float.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
     11    function_deprecation([:is_float, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Float. There is further documentation for validate_legacy function in the README.'])
     12
    1113    if (arguments.size != 1) then
    12       raise(Puppet::ParseError, "is_float(): Wrong number of arguments "+
    13         "given #{arguments.size} for 1")
     14      raise(Puppet::ParseError, "is_float(): Wrong number of arguments given #{arguments.size} for 1")
    1415    end
    1516
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb

    rbcf0be5 rad28f83  
    1212
    1313    if (arguments.size != 1) then
    14       raise(Puppet::ParseError, "is_function_available?(): Wrong number of arguments "+
    15         "given #{arguments.size} for 1")
     14      raise(Puppet::ParseError, "is_function_available?(): Wrong number of arguments given #{arguments.size} for 1")
    1615    end
    1716
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_hash.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "is_hash(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size != 1
     11    raise(Puppet::ParseError, "is_hash(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    1312
    1413    type = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_integer.rb

    rbcf0be5 rad28f83  
    1414  ) do |arguments|
    1515
     16    function_deprecation([:is_integer, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Integer. There is further documentation for validate_legacy function in the README.'])
     17
    1618    if (arguments.size != 1) then
    17       raise(Puppet::ParseError, "is_integer(): Wrong number of arguments "+
    18         "given #{arguments.size} for 1")
     19      raise(Puppet::ParseError, "is_integer(): Wrong number of arguments given #{arguments.size} for 1")
    1920    end
    2021
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb

    rbcf0be5 rad28f83  
    1111    require 'ipaddr'
    1212
     13    function_deprecation([:is_ip_address, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ip_address. There is further documentation for validate_legacy function in the README.'])
     14
    1315    if (arguments.size != 1) then
    14       raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments "+
    15         "given #{arguments.size} for 1")
     16      raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments given #{arguments.size} for 1")
    1617    end
    1718
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ipv4_address.rb

    rbcf0be5 rad28f83  
    1111    require 'ipaddr'
    1212
     13    function_deprecation([:is_ipv4_address, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ipv4. There is further documentation for validate_legacy function in the README.'])
     14
    1315    if (arguments.size != 1) then
    14       raise(Puppet::ParseError, "is_ipv4_address(): Wrong number of arguments "+
    15         "given #{arguments.size} for 1")
     16      raise(Puppet::ParseError, "is_ipv4_address(): Wrong number of arguments given #{arguments.size} for 1")
    1617    end
    1718
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ipv6_address.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
     11    function_deprecation([:is_ipv6_address, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ipv6. There is further documentation for validate_legacy function in the README.'])
     12
    1113    require 'ipaddr'
    1214
    1315    if (arguments.size != 1) then
    14       raise(Puppet::ParseError, "is_ipv6_address(): Wrong number of arguments "+
    15         "given #{arguments.size} for 1")
     16      raise(Puppet::ParseError, "is_ipv6_address(): Wrong number of arguments given #{arguments.size} for 1")
    1617    end
    1718
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb

    rbcf0be5 rad28f83  
    1010
    1111    if (arguments.size != 1) then
    12       raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments "+
    13         "given #{arguments.size} for 1")
     12      raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments given #{arguments.size} for 1")
    1413    end
    1514
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb

    rbcf0be5 rad28f83  
    2525  ) do |arguments|
    2626
     27    function_deprecation([:is_numeric, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Numeric. There is further documentation for validate_legacy function in the README.'])
     28
    2729    if (arguments.size != 1) then
    28       raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments "+
    29         "given #{arguments.size} for 1")
     30      raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments given #{arguments.size} for 1")
    3031    end
    3132
    … …  
    7273  end
    7374end
    74 
    75 # vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_string.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "is_string(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    function_deprecation([:is_string, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README.'])
     12
     13    raise(Puppet::ParseError, "is_string(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1314
    1415    type = arguments[0]
    1516
    16     result = type.is_a?(String)
     17    # when called through the v4 API shim, undef gets translated to nil
     18    result = type.is_a?(String) || type.nil?
    1719
    1820    if result and (type == type.to_f.to_s or type == type.to_i.to_s) then
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/join.rb

    rbcf0be5 rad28f83  
    1616
    1717    # Technically we support two arguments but only first is mandatory ...
    18     raise(Puppet::ParseError, "join(): Wrong number of arguments " +
    19       "given (#{arguments.size} for 1)") if arguments.size < 1
     18    raise(Puppet::ParseError, "join(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    2019
    2120    array = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb

    rbcf0be5 rad28f83  
    66  newfunction(:join_keys_to_values, :type => :rvalue, :doc => <<-EOS
    77This function joins each key of a hash to that key's corresponding value with a
    8 separator. Keys and values are cast to strings. The return value is an array in
     8separator. Keys are cast to strings. If values are arrays, multiple keys
     9are added for each element. The return value is an array in
    910which each element is one joined key/value pair.
    1011
    … …  
    1415
    1516Would result in: ["a is 1","b is 2"]
     17
     18    join_keys_to_values({'a'=>1,'b'=>[2,3]}, " is ")
     19
     20Would result in: ["a is 1","b is 2","b is 3"]
    1621    EOS
    1722  ) do |arguments|
    … …  
    1924    # Validate the number of arguments.
    2025    if arguments.size != 2
    21       raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two " +
    22             "arguments, but #{arguments.size} given.")
     26      raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two arguments, but #{arguments.size} given.")
    2327    end
    2428
    … …  
    2630    hash = arguments[0]
    2731    if not hash.is_a?(Hash)
    28       raise(TypeError, "join_keys_to_values(): The first argument must be a " +
    29             "hash, but a #{hash.class} was given.")
     32      raise(TypeError, "join_keys_to_values(): The first argument must be a hash, but a #{hash.class} was given.")
    3033    end
    3134
    … …  
    3336    separator = arguments[1]
    3437    if not separator.is_a?(String)
    35       raise(TypeError, "join_keys_to_values(): The second argument must be a " +
    36             "string, but a #{separator.class} was given.")
     38      raise(TypeError, "join_keys_to_values(): The second argument must be a string, but a #{separator.class} was given.")
    3739    end
    3840
    3941    # Join the keys to their values.
    4042    hash.map do |k,v|
    41       String(k) + separator + String(v)
    42     end
     43      if v.is_a?(Array)
     44        v.map { |va| String(k) + separator + String(va) }
     45      else
     46        String(k) + separator + String(v)
     47      end
     48    end.flatten
    4349
    4450  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/keys.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "keys(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "keys(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1312
    1413    hash = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb

    rbcf0be5 rad28f83  
    11module Puppet::Parser::Functions
     2  newfunction(:loadyaml, :type => :rvalue, :arity => -2, :doc => <<-'ENDHEREDOC') do |args|
     3Load a YAML file containing an array, string, or hash, and return the data
     4in the corresponding native data type.
     5The second parameter is the default value. It will be returned if the file
     6was not found or could not be parsed.
    27
    3   newfunction(:loadyaml, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|
    4     Load a YAML file containing an array, string, or hash, and return the data
    5     in the corresponding native data type.
     8For example:
    69
    7     For example:
     10    $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
     11    $myhash = loadyaml('no-file.yaml', {'default' => 'value'})
     12  ENDHEREDOC
    813
    9         $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
    10     ENDHEREDOC
     14    raise ArgumentError, 'Wrong number of arguments. 1 or 2 arguments should be provided.' unless args.length >= 1
     15    require 'yaml'
    1116
    12     unless args.length == 1
    13       raise Puppet::ParseError, ("loadyaml(): wrong number of arguments (#{args.length}; must be 1)")
    14     end
    15 
    16     if File.exists?(args[0]) then
    17       YAML.load_file(args[0])
     17    if File.exists?(args[0])
     18      begin
     19        YAML::load_file(args[0]) || args[1]
     20      rescue Exception => e
     21        if args[1]
     22          args[1]
     23        else
     24          raise e
     25        end
     26      end
    1827    else
    19       warning("Can't load " + args[0] + ". File does not exist!")
    20       nil
     28      warning("Can't load '#{args[0]}' File does not exist!")
     29      args[1]
    2130    end
    2231
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/lstrip.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "lstrip(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "lstrip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1312
    1413    value = arguments[0]
    1514
    1615    unless value.is_a?(Array) || value.is_a?(String)
    17       raise(Puppet::ParseError, 'lstrip(): Requires either ' +
    18         'array or string to work with')
     16      raise(Puppet::ParseError, 'lstrip(): Requires either array or string to work with')
    1917    end
    2018
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/max.rb

    rbcf0be5 rad28f83  
    66  ) do |args|
    77
    8     raise(Puppet::ParseError, "max(): Wrong number of arguments " +
    9           "need at least one") if args.size == 0
     8    raise(Puppet::ParseError, "max(): Wrong number of arguments need at least one") if args.size == 0
    109
    1110    # Sometimes we get numbers as numerics and sometimes as strings.
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/member.rb

    rbcf0be5 rad28f83  
    3131  ) do |arguments|
    3232
    33     raise(Puppet::ParseError, "member(): Wrong number of arguments " +
    34       "given (#{arguments.size} for 2)") if arguments.size < 2
     33    raise(Puppet::ParseError, "member(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2
    3534
    3635    array = arguments[0]
    … …  
    5150
    5251
    53     raise(Puppet::ParseError, 'member(): You must provide item ' +
    54       'to search for within array given') if item.respond_to?('empty?') && item.empty?
     52    raise(Puppet::ParseError, 'member(): You must provide item to search for within array given') if item.respond_to?('empty?') && item.empty?
    5553
    5654    result = (item - array).empty?
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/min.rb

    rbcf0be5 rad28f83  
    66  ) do |args|
    77
    8     raise(Puppet::ParseError, "min(): Wrong number of arguments " +
    9           "need at least one") if args.size == 0
     8    raise(Puppet::ParseError, "min(): Wrong number of arguments need at least one") if args.size == 0
    109
    1110    # Sometimes we get numbers as numerics and sometimes as strings.
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/num2bool.rb

    rbcf0be5 rad28f83  
    1111  ) do |arguments|
    1212
    13     raise(Puppet::ParseError, "num2bool(): Wrong number of arguments " +
    14       "given (#{arguments.size} for 1)") if arguments.size != 1
     13    raise(Puppet::ParseError, "num2bool(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    1514
    1615    number = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/prefix.rb

    rbcf0be5 rad28f83  
    1616
    1717    # Technically we support two arguments but only first is mandatory ...
    18     raise(Puppet::ParseError, "prefix(): Wrong number of arguments " +
    19       "given (#{arguments.size} for 1)") if arguments.size < 1
     18    raise(Puppet::ParseError, "prefix(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    2019
    2120    enumerable = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/pw_hash.rb

    rbcf0be5 rad28f83  
     1
     2#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
     3
    14Puppet::Parser::Functions::newfunction(
    25  :pw_hash,
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/range.rb

    rbcf0be5 rad28f83  
    2626
    2727    range("host01", "host10")
    28 
    2928Will return: ["host01", "host02", ..., "host09", "host10"]
     29NB Be explicit in including trailing zeros. Otherwise the underlying ruby function will fail.
    3030
    3131Passing a third argument will cause the generated range to step by that
    … …  
    3838  ) do |arguments|
    3939
    40     raise(Puppet::ParseError, 'range(): Wrong number of ' +
    41       'arguments given (0 for 1)') if arguments.size == 0
     40    raise(Puppet::ParseError, 'range(): Wrong number of arguments given (0 for 1)') if arguments.size == 0
    4241
    4342    if arguments.size > 1
    … …  
    5857        step = 1
    5958      elsif value.match(/^.+$/)
    60         raise(Puppet::ParseError, "range(): Unable to compute range " +
    61           "from the value: #{value}")
     59        raise(Puppet::ParseError, "range(): Unable to compute range from the value: #{value}")
    6260      else
    6361        raise(Puppet::ParseError, "range(): Unknown range format: #{value}")
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/reverse.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "reverse(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "reverse(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1312
    1413    value = arguments[0]
    1514
    1615    unless value.is_a?(Array) || value.is_a?(String)
    17       raise(Puppet::ParseError, 'reverse(): Requires either ' +
    18         'array or string to work with')
     16      raise(Puppet::ParseError, 'reverse(): Requires either array or string to work with')
    1917    end
    2018
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/rstrip.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "rstrip(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "rstrip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1312
    1413    value = arguments[0]
    1514
    1615    unless value.is_a?(Array) || value.is_a?(String)
    17       raise(Puppet::ParseError, 'rstrip(): Requires either ' +
    18         'array or string to work with')
     16      raise(Puppet::ParseError, 'rstrip(): Requires either array or string to work with')
    1917    end
    2018
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/shuffle.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "shuffle(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "shuffle(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1312
    1413    value = arguments[0]
    1514
    1615    unless value.is_a?(Array) || value.is_a?(String)
    17       raise(Puppet::ParseError, 'shuffle(): Requires either ' +
    18         'array or string to work with')
     16      raise(Puppet::ParseError, 'shuffle(): Requires either array or string to work with')
    1917    end
    2018
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/size.rb

    rbcf0be5 rad28f83  
    99  ) do |arguments|
    1010
    11     raise(Puppet::ParseError, "size(): Wrong number of arguments " +
    12       "given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "size(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1312
    1413    item = arguments[0]
     14
     15    function_deprecation([:size, 'This method is going to be deprecated, please use the stdlib length function.'])
    1516
    1617    if item.is_a?(String)
    … …  
    2728        Float(item)
    2829
    29         raise(Puppet::ParseError, 'size(): Requires either ' +
    30           'string, array or hash to work with')
     30        raise(Puppet::ParseError, 'size(): Requires either string, array or hash to work with')
    3131
    3232      rescue ArgumentError
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/sort.rb

    rbcf0be5 rad28f83  
    11#
    2 # sort.rb
     2#  sort.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    1011
    1112    if (arguments.size != 1) then
    12       raise(Puppet::ParseError, "sort(): Wrong number of arguments "+
    13         "given #{arguments.size} for 1")
     13      raise(Puppet::ParseError, "sort(): Wrong number of arguments given #{arguments.size} for 1")
    1414    end
    1515
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/squeeze.rb

    rbcf0be5 rad28f83  
    1010
    1111    if ((arguments.size != 2) and (arguments.size != 1)) then
    12       raise(Puppet::ParseError, "squeeze(): Wrong number of arguments "+
    13         "given #{arguments.size} for 2 or 1")
     12      raise(Puppet::ParseError, "squeeze(): Wrong number of arguments given #{arguments.size} for 2 or 1")
    1413    end
    1514
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/str2bool.rb

    rbcf0be5 rad28f83  
    1111  ) do |arguments|
    1212
    13     raise(Puppet::ParseError, "str2bool(): Wrong number of arguments " +
    14       "given (#{arguments.size} for 1)") if arguments.size < 1
     13    raise(Puppet::ParseError, "str2bool(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1514
    1615    string = arguments[0]
    … …  
    2221
    2322    unless string.is_a?(String)
    24       raise(Puppet::ParseError, 'str2bool(): Requires either ' +
    25         'string to work with')
     23      raise(Puppet::ParseError, 'str2bool(): Requires string to work with')
    2624    end
    2725
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb

    rbcf0be5 rad28f83  
    11#
    2 # str2saltedsha512.rb
     2#  str2saltedsha512.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    1314    require 'digest/sha2'
    1415
    15     raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments " +
    16       "passed (#{arguments.size} but we require 1)") if arguments.size != 1
     16    raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments passed (#{arguments.size} but we require 1)") if arguments.size != 1
    1717
    1818    password = arguments[0]
    1919
    2020    unless password.is_a?(String)
    21       raise(Puppet::ParseError, 'str2saltedsha512(): Requires a ' +
    22         "String argument, you passed: #{password.class}")
     21      raise(Puppet::ParseError, "str2saltedsha512(): Requires a String argument, you passed: #{password.class}")
    2322    end
    2423
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/strftime.rb

    rbcf0be5 rad28f83  
    11#
    2 # strftime.rb
     2#  strftime.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    7273
    7374    # Technically we support two arguments but only first is mandatory ...
    74     raise(Puppet::ParseError, "strftime(): Wrong number of arguments " +
    75       "given (#{arguments.size} for 1)") if arguments.size < 1
     75    raise(Puppet::ParseError, "strftime(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    7676
    7777    format = arguments[0]
    7878
    79     raise(Puppet::ParseError, 'strftime(): You must provide ' +
    80       'format for evaluation') if format.empty?
     79    raise(Puppet::ParseError, 'strftime(): You must provide format for evaluation') if format.empty?
    8180
    8281    # The Time Zone argument is optional ...
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/strip.rb

    rbcf0be5 rad28f83  
    1616  ) do |arguments|
    1717
    18     raise(Puppet::ParseError, "strip(): Wrong number of arguments " +
    19       "given (#{arguments.size} for 1)") if arguments.size < 1
     18    raise(Puppet::ParseError, "strip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    2019
    2120    value = arguments[0]
    2221
    2322    unless value.is_a?(Array) || value.is_a?(String)
    24       raise(Puppet::ParseError, 'strip(): Requires either ' +
    25         'array or string to work with')
     23      raise(Puppet::ParseError, 'strip(): Requires either array or string to work with')
    2624    end
    2725
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/suffix.rb

    rbcf0be5 rad28f83  
    1717
    1818    # Technically we support two arguments but only first is mandatory ...
    19     raise(Puppet::ParseError, "suffix(): Wrong number of arguments " +
    20       "given (#{arguments.size} for 1)") if arguments.size < 1
     19    raise(Puppet::ParseError, "suffix(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    2120
    2221    enumerable = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/swapcase.rb

    rbcf0be5 rad28f83  
    11#
    22#  swapcase.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    1516  ) do |arguments|
    1617
    17     raise(Puppet::ParseError, "swapcase(): Wrong number of arguments " +
    18       "given (#{arguments.size} for 1)") if arguments.size < 1
     18    raise(Puppet::ParseError, "swapcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1919
    2020    value = arguments[0]
    2121
    2222    unless value.is_a?(Array) || value.is_a?(String)
    23       raise(Puppet::ParseError, 'swapcase(): Requires either ' +
    24         'array or string to work with')
     23      raise(Puppet::ParseError, 'swapcase(): Requires either array or string to work with')
    2524    end
    2625
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/time.rb

    rbcf0be5 rad28f83  
    1919
    2020    if (arguments.size != 0) and (arguments.size != 1) then
    21       raise(Puppet::ParseError, "time(): Wrong number of arguments "+
    22         "given #{arguments.size} for 0 or 1")
     21      raise(Puppet::ParseError, "time(): Wrong number of arguments given #{arguments.size} for 0 or 1")
    2322    end
    2423
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb

    rbcf0be5 rad28f83  
    88  ) do |arguments|
    99
    10     raise(Puppet::ParseError, "to_bytes(): Wrong number of arguments " +
    11           "given (#{arguments.size} for 1)") if arguments.size != 1
     10    raise(Puppet::ParseError, "to_bytes(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    1211
    1312    arg = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/type3x.rb

    rbcf0be5 rad28f83  
    1717    EOS
    1818  ) do |args|
    19     raise(Puppet::ParseError, "type3x(): Wrong number of arguments " +
    20       "given (#{args.size} for 1)") if args.size < 1
     19    raise(Puppet::ParseError, "type3x(): Wrong number of arguments given (#{args.size} for 1)") if args.size < 1
    2120
    2221    value = args[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/union.rb

    rbcf0be5 rad28f83  
    1616
    1717    # Check that 2 or more arguments have been given ...
    18     raise(Puppet::ParseError, "union(): Wrong number of arguments " +
    19       "given (#{arguments.size} for < 2)") if arguments.size < 2
     18    raise(Puppet::ParseError, "union(): Wrong number of arguments given (#{arguments.size} for < 2)") if arguments.size < 2
    2019
    2120    arguments.each do |argument|
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/unique.rb

    rbcf0be5 rad28f83  
    2525  ) do |arguments|
    2626
    27     raise(Puppet::ParseError, "unique(): Wrong number of arguments " +
    28       "given (#{arguments.size} for 1)") if arguments.size < 1
     27    raise(Puppet::ParseError, "unique(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    2928
    3029    value = arguments[0]
    3130
    3231    unless value.is_a?(Array) || value.is_a?(String)
    33       raise(Puppet::ParseError, 'unique(): Requires either ' +
    34         'array or string to work with')
     32      raise(Puppet::ParseError, 'unique(): Requires either array or string to work with')
    3533    end
    3634
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/upcase.rb

    rbcf0be5 rad28f83  
    11#
    2 # upcase.rb
     2#  upcase.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45
    … …  
    1718  ) do |arguments|
    1819
    19     raise(Puppet::ParseError, "upcase(): Wrong number of arguments " +
    20                                 "given (#{arguments.size} for 1)") if arguments.size != 1
     20    raise(Puppet::ParseError, "upcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
    2121
    2222    value = arguments[0]
    2323
    2424    unless value.is_a?(Array) || value.is_a?(Hash) || value.respond_to?(:upcase)
    25       raise(Puppet::ParseError, 'upcase(): Requires an ' +
    26                                   'array, hash or object that responds to upcase in order to work')
     25      raise(Puppet::ParseError, 'upcase(): Requires an array, hash or object that responds to upcase in order to work')
    2726    end
    2827
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/uriescape.rb

    rbcf0be5 rad28f83  
    11#
    22#  uriescape.rb
     3#  Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085.
    34#
    45require 'uri'
    … …  
    1112  ) do |arguments|
    1213
    13     raise(Puppet::ParseError, "uriescape(): Wrong number of arguments " +
    14       "given (#{arguments.size} for 1)") if arguments.size < 1
     14    raise(Puppet::ParseError, "uriescape(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    1515
    1616    value = arguments[0]
    1717
    1818    unless value.is_a?(Array) || value.is_a?(String)
    19       raise(Puppet::ParseError, 'uriescape(): Requires either ' +
    20         'array or string to work with')
     19      raise(Puppet::ParseError, 'uriescape(): Requires either array or string to work with')
    2120    end
    2221
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb

    rbcf0be5 rad28f83  
    2727    ENDHEREDOC
    2828
     29    # The deprecation function was being called twice, as validate_absolute_path calls is_absolute_path. I have removed it from here so it only calls deprecation once within is_absolute_path.
     30    # function_deprecation([:validate_absolute_path, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_path. There is further documentation for validate_legacy function in the README.'])
     31
    2932    require 'puppet/util'
    3033
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_array.rb

    rbcf0be5 rad28f83  
    1919    ENDHEREDOC
    2020
     21    function_deprecation([:validate_array, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.'])
     22
    2123    unless args.length > 0 then
    2224      raise Puppet::ParseError, ("validate_array(): wrong number of arguments (#{args.length}; must be > 0)")
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb

    rbcf0be5 rad28f83  
    2020    ENDHEREDOC
    2121
     22    # The deprecation function was being called twice, as validate_bool calls is_bool. I have removed it from here so it only calls deprecation once within is_bool.
     23    # function_deprecation([:validate_bool, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.'])
     24
    2225    unless args.length > 0 then
    2326      raise Puppet::ParseError, ("validate_bool(): wrong number of arguments (#{args.length}; must be > 0)")
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_email_address.rb

    rbcf0be5 rad28f83  
    11module Puppet::Parser::Functions
    2   newfunction(:validate_email_address, doc: <<-ENDHEREDOC
     2  newfunction(:validate_email_address, :doc => <<-ENDHEREDOC
    33    Validate that all values passed are valid email addresses.
    44    Fail compilation if any value fails this check.
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb

    rbcf0be5 rad28f83  
    1919    ENDHEREDOC
    2020
     21    function_deprecation([:validate_hash, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Hash. There is further documentation for validate_legacy function in the README.'])
     22
    2123    unless args.length > 0 then
    2224      raise Puppet::ParseError, ("validate_hash(): wrong number of arguments (#{args.length}; must be > 0)")
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_integer.rb

    rbcf0be5 rad28f83  
    33  newfunction(:validate_integer, :doc => <<-'ENDHEREDOC') do |args|
    44    Validate that the first argument is an integer (or an array of integers). Abort catalog compilation if any of the checks fail.
    5    
     5
    66    The second argument is optional and passes a maximum. (All elements of) the first argument has to be less or equal to this max.
    77
    … …  
    5353
    5454    ENDHEREDOC
     55
     56    function_deprecation([:validate_integer, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Integer. There is further documentation for validate_legacy function in the README.'])
    5557
    5658    # tell the user we need at least one, and optionally up to two other parameters
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_ip_address.rb

    rbcf0be5 rad28f83  
    99    validate_ip_address($my_ip)
    1010    validate_ip_address("8.8.8.8", "172.16.0.1", $my_ip)
    11    
     11
    1212    $my_ip = "3ffe:505:2"
    1313    validate_ip_address(1)
    1414    validate_ip_address($my_ip)
    1515    validate_ip_address("fe80::baf6:b1ff:fe19:7507", $my_ip)
    16    
     16
    1717    The following values will fail, causing compilation to abort:
    1818    $some_array = [ 1, true, false, "garbage string", "3ffe:505:2" ]
    … …  
    2323    require "ipaddr"
    2424    rescuable_exceptions = [ ArgumentError ]
     25
     26    function_deprecation([:validate_ip_address, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ip_address. There is further documentation for validate_legacy function in the README.'])
    2527
    2628    if defined?(IPAddr::InvalidAddressError)
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb

    rbcf0be5 rad28f83  
    1818    ENDHEREDOC
    1919  ) do |args|
     20
     21    function_deprecation([:validate_ipv4_address, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ipv4. There is further documentation for validate_legacy function in the README.'])
    2022
    2123    require "ipaddr"
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb

    rbcf0be5 rad28f83  
    1919    ENDHEREDOC
    2020  ) do |args|
     21
     22    function_deprecation([:validate_ipv6_address, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ipv6. There is further documentation for validate_legacy function in the README.'])
    2123
    2224    require "ipaddr"
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_numeric.rb

    rbcf0be5 rad28f83  
    33  newfunction(:validate_numeric, :doc => <<-'ENDHEREDOC') do |args|
    44    Validate that the first argument is a numeric value (or an array of numeric values). Abort catalog compilation if any of the checks fail.
    5    
     5
    66    The second argument is optional and passes a maximum. (All elements of) the first argument has to be less or equal to this max.
    77
    … …  
    1515
    1616    ENDHEREDOC
     17
     18    function_deprecation([:validate_numeric, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Numeric. There is further documentation for validate_legacy function in the README.'])
    1719
    1820    # tell the user we need at least one, and optionally up to two other parameters
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_re.rb

    rbcf0be5 rad28f83  
    3030
    3131    ENDHEREDOC
     32
     33    function_deprecation([:validate_re, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Re. There is further documentation for validate_legacy function in the README.'])
     34
    3235    if (args.length < 2) or (args.length > 3) then
    3336      raise Puppet::ParseError, "validate_re(): wrong number of arguments (#{args.length}; must be 2 or 3)"
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb

    rbcf0be5 rad28f83  
    2121
    2222    ENDHEREDOC
     23
     24    function_deprecation([:validate_slength, 'This method is deprecated, please use the stdlib validate_legacy function, with String[]. There is further documentation for validate_legacy function in the README.'])
    2325
    2426    raise Puppet::ParseError, "validate_slength(): Wrong number of arguments (#{args.length}; must be 2 or 3)" unless args.length == 2 or args.length == 3
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_string.rb

    rbcf0be5 rad28f83  
    1414        validate_string(true)
    1515        validate_string([ 'some', 'array' ])
    16        
     16
    1717    Note: validate_string(undef) will not fail in this version of the
    1818    functions API (incl. current and future parser). Instead, use:
    19    
     19
    2020        if $var == undef {
    2121          fail('...')
    2222        }
    23    
     23
    2424    ENDHEREDOC
     25
     26    function_deprecation([:validate_string, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README.'])
    2527
    2628    unless args.length > 0 then
    … …  
    2931
    3032    args.each do |arg|
    31       unless arg.is_a?(String)
     33      # when called through the v4 API shim, undef gets translated to nil
     34      unless arg.is_a?(String) || arg.nil?
    3235        raise Puppet::ParseError, ("#{arg.inspect} is not a string.  It looks to be a #{arg.class}")
    3336      end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/values.rb

    rbcf0be5 rad28f83  
    2222  ) do |arguments|
    2323
    24     raise(Puppet::ParseError, "values(): Wrong number of arguments " +
    25       "given (#{arguments.size} for 1)") if arguments.size < 1
     24    raise(Puppet::ParseError, "values(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
    2625
    2726    hash = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/values_at.rb

    rbcf0be5 rad28f83  
    3030  ) do |arguments|
    3131
    32     raise(Puppet::ParseError, "values_at(): Wrong number of " +
    33       "arguments given (#{arguments.size} for 2)") if arguments.size < 2
     32    raise(Puppet::ParseError, "values_at(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2
    3433
    3534    array = arguments.shift
    … …  
    4241
    4342    if not indices or indices.empty?
    44       raise(Puppet::ParseError, 'values_at(): You must provide ' +
    45         'at least one positive index to collect')
     43      raise(Puppet::ParseError, 'values_at(): You must provide at least one positive index to collect')
    4644    end
    4745
    … …  
    5856
    5957        if start > stop
    60           raise(Puppet::ParseError, 'values_at(): Stop index in ' +
    61             'given indices range is smaller than the start index')
     58          raise(Puppet::ParseError, 'values_at(): Stop index in given indices range is smaller than the start index')
    6259        elsif stop > array.size - 1 # First element is at index 0 is it not?
    63           raise(Puppet::ParseError, 'values_at(): Stop index in ' +
    64             'given indices range exceeds array size')
     60          raise(Puppet::ParseError, 'values_at(): Stop index in given indices range exceeds array size')
    6561        end
    6662
    … …  
    7470        # Only positive numbers allowed in this case ...
    7571        if not i.match(/^\d+$/)
    76           raise(Puppet::ParseError, 'values_at(): Unknown format ' +
    77             'of given index')
     72          raise(Puppet::ParseError, 'values_at(): Unknown format of given index')
    7873        end
    7974
    … …  
    8277
    8378        if i > array.size - 1 # Same story.  First element is at index 0 ...
    84           raise(Puppet::ParseError, 'values_at(): Given index ' +
    85             'exceeds array size')
     79          raise(Puppet::ParseError, 'values_at(): Given index exceeds array size')
    8680        end
    8781
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/zip.rb

    rbcf0be5 rad28f83  
    1818
    1919    # Technically we support three arguments but only first is mandatory ...
    20     raise(Puppet::ParseError, "zip(): Wrong number of arguments " +
    21       "given (#{arguments.size} for 2)") if arguments.size < 2
     20    raise(Puppet::ParseError, "zip(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2
    2221
    2322    a = arguments[0]
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/provider/file_line/ruby.rb

    rbcf0be5 rad28f83  
    55    else
    66      lines.find do |line|
    7         line.chomp == resource[:line].chomp
     7        if resource[:ensure].to_s == 'absent' and resource[:match_for_absence].to_s == 'true'
     8          line.chomp =~ Regexp.new(resource[:match])
     9        else
     10          line.chomp == resource[:line].chomp
     11        end
    812      end
    913    end
    … …  
    3741    #  small-ish config files that can fit into memory without
    3842    #  too much trouble.
    39     @lines ||= File.readlines(resource[:path])
     43    begin
     44      @lines ||= File.readlines(resource[:path], :encoding => resource[:encoding])
     45    rescue TypeError => e
     46      # Ruby 1.8 doesn't support open_args
     47      @lines ||= File.readlines(resource[:path])
     48    end
    4049  end
    4150
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/type/file_line.rb

    rbcf0be5 rad28f83  
    4949    error will be raised unless the `multiple => true` parameter is set.
    5050
     51    Encoding example:
     52
     53        file_line { "XScreenSaver":
     54          ensure   => present,
     55          path     => '/root/XScreenSaver'
     56          line     => "*lock: 10:00:00",
     57          match    => '^*lock:',
     58          encoding => "iso-8859-1",
     59        }
     60
     61    Files with special characters that are not valid UTF-8 will give the
     62    error message "invalid byte sequence in UTF-8".  In this case, determine
     63    the correct file encoding and specify the correct encoding using the
     64    encoding attribute, the value of which needs to be a valid Ruby character
     65    encoding.
     66
    5167    **Autorequires:** If Puppet is managing the file that will contain the line
    5268    being managed, the file_line resource will autorequire that file.
    … …  
    7288    desc 'An optional value to determine if match should be applied when ensure => absent.' +
    7389         ' If set to true and match is set, the line that matches match will be deleted.' +
    74          ' If set to false (the default), match is ignored when ensure => absent.'
     90         ' If set to false (the default), match is ignored when ensure => absent.' +
     91         ' When `ensure => present`, match_for_absence is ignored.'
    7592    newvalues(true, false)
    7693    defaultto false
    … …  
    84101
    85102  newparam(:after) do
    86     desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)'
     103    desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)' +
     104         ' This is also takes a regex.'
    87105  end
    88106
    … …  
    94112    desc 'The file Puppet will ensure contains the line specified by the line parameter.'
    95113    validate do |value|
    96       unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/))
    97         raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'")
     114      unless Puppet::Util.absolute_path?(value)
     115        raise Puppet::Error, "File paths must be fully qualified, not '#{value}'"
    98116      end
    99117    end
    … …  
    104122    newvalues(true, false)
    105123    defaultto true
     124  end
     125
     126  newparam(:encoding) do
     127    desc 'For files that are not UTF-8 encoded, specify encoding such as iso-8859-1'
     128    defaultto 'UTF-8'
    106129  end
    107130
  • src/puppetcode/environments/gnuboat/modules/stdlib/metadata.json

    rbcf0be5 rad28f83  
    11{
    22  "name": "puppetlabs-stdlib",
    3   "version": "4.12.0",
     3  "version": "4.17.1",
    44  "author": "puppetlabs",
    55  "summary": "Standard library of resources for Puppet modules.",
    … …  
    7070        "10.04",
    7171        "12.04",
    72         "14.04"
     72        "14.04",
     73        "16.04"
    7374      ]
    7475    },
    … …  
    7778      "operatingsystemrelease": [
    7879        "10",
    79         "11",
    80         "12"
     80        "11"
    8181      ]
    8282    },
    … …  
    105105  "requirements": [
    106106    {
    107       "name": "pe",
    108       "version_requirement": ">= 3.0.0 < 2015.4.0"
    109     },
    110     {
    111107      "name": "puppet",
    112       "version_requirement": ">=2.7.20 <5.0.0"
     108      "version_requirement": ">= 4.7.0 < 5.0.0"
    113109    }
    114110  ],
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/abs_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'abs function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'abs function' do
    55  describe 'success' do
    66    it 'should accept a string' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/anchor_spec.rb

    rbcf0be5 rad28f83  
    11require 'spec_helper_acceptance'
    22
    3 describe 'anchor type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     3describe 'anchor type' do
    44  describe 'success' do
    55    it 'should effect proper chaining of resources' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/any2array_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'any2array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'any2array function' do
    55  describe 'success' do
    66    it 'should create an empty array' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/base64_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'base64 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'base64 function' do
    55  describe 'success' do
    66    it 'should encode then decode a string' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/bool2num_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'bool2num function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'bool2num function' do
    55  describe 'success' do
    66    ['false', 'f', '0', 'n', 'no'].each do |bool|
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/capitalize_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'capitalize function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'capitalize function' do
    55  describe 'success' do
    66    it 'should capitalize the first letter of a string' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/ceiling_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'ceiling function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'ceiling function' do
    55  describe 'success' do
    66    it 'ceilings floats' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/chomp_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'chomp function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'chomp function' do
    55  describe 'success' do
    66    it 'should eat the newline' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/chop_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'chop function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'chop function' do
    55  describe 'success' do
    66    it 'should eat the last character' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/clamp_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'clamp function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'clamp function' do
    55  describe 'success' do
    66    it 'clamps list of values' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/concat_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'concat function' do
    55  describe 'success' do
    66    it 'should concat one array to another' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/count_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'count function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'count function' do
    55  describe 'success' do
    66    it 'should count elements in an array' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/deep_merge_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'deep_merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'deep_merge function' do
    55  describe 'success' do
    66    it 'should deep merge two hashes' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/defined_with_params_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'defined_with_params function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'defined_with_params function' do
    55  describe 'success' do
    66    it 'should successfully notify' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_at_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete_at function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'delete_at function' do
    55  describe 'success' do
    66    it 'should delete elements of the array' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'delete function' do
    55  describe 'success' do
    66    it 'should delete elements of the array' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete_undef_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'delete_undef_values function' do
    55  describe 'success' do
    66    it 'should delete elements of the array' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_values_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'delete_values function' do
    55  describe 'success' do
    66    it 'should delete elements of the hash' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/difference_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'difference function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'difference function' do
    55  describe 'success' do
    66    it 'returns non-duplicates in the first array' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/dirname_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'dirname function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'dirname function' do
    55  describe 'success' do
    66    context 'absolute path' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/downcase_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'downcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'downcase function' do
    55  describe 'success' do
    66    it 'returns the downcase' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/empty_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'empty function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'empty function' do
    55  describe 'success' do
    66    it 'recognizes empty strings' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/flatten_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'flatten function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'flatten function' do
    55  describe 'success' do
    66    it 'flattens arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/floor_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'floor function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'floor function' do
    55  describe 'success' do
    66    it 'floors floats' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/fqdn_rand_string_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'fqdn_rand_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'fqdn_rand_string function' do
    55  describe 'success' do
    66    include_context "with faked facts"
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'fqdn_rotate function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'fqdn_rotate function' do
    55  describe 'success' do
    66    include_context "with faked facts"
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/get_module_path_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'get_module_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'get_module_path function' do
    55  describe 'success' do
    66    it 'get_module_paths dne' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/getparam_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'getparam function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'getparam function' do
    55  describe 'success' do
    66    it 'getparam a notify' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/getvar_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'getvar function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'getvar function' do
    55  describe 'success' do
    66    it 'getvars from classes' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/grep_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'grep function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'grep function' do
    55  describe 'success' do
    66    it 'greps arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_interface_with_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'has_interface_with function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
     4describe 'has_interface_with function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
    55  describe 'success' do
    66    it 'has_interface_with existing ipaddress' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_ip_address_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'has_ip_address function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
     4describe 'has_ip_address function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
    55  describe 'success' do
    66    it 'has_ip_address existing ipaddress' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_ip_network_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'has_ip_network function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
     4describe 'has_ip_network function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
    55  describe 'success' do
    66    it 'has_ip_network existing ipaddress' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_key_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'has_key function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'has_key function' do
    55  describe 'success' do
    66    it 'has_keys in hashes' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/hash_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'hash function' do
    55  describe 'success' do
    66    it 'hashs arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/intersection_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'intersection function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'intersection function' do
    55  describe 'success' do
    66    it 'intersections arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_a_spec.rb

    rbcf0be5 rad28f83  
    33
    44if get_puppet_version =~ /^4/
    5   describe 'is_a function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     5  describe 'is_a function' do
    66    it 'should match a string' do
    77      pp = <<-EOS
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_array_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_array function' do
    55  describe 'success' do
    66    it 'is_arrays arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_bool_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_bool function' do
    55  describe 'success' do
    66    it 'is_bools arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_domain_name_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_domain_name function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_domain_name function' do
    55  describe 'success' do
    66    it 'is_domain_names arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_float_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_float function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_float function' do
    55  describe 'success' do
    66    it 'is_floats arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_function_available_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_function_available function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_function_available function' do
    55  describe 'success' do
    66    it 'is_function_availables arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_hash_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_hash function' do
    55  describe 'success' do
    66    it 'is_hashs arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_integer_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_integer function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_integer function' do
    55  describe 'success' do
    66    it 'is_integers arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ip_address_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_ip_address function' do
    55  describe 'success' do
    66    it 'is_ip_addresss ipv4' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ipv4_address_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_ipv4_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_ipv4_address function' do
    55  describe 'success' do
    66    it 'is_ipv4_addresss' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ipv6_address_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_ipv6_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_ipv6_address function' do
    55  describe 'success' do
    66    it 'is_ipv6_addresss' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_mac_address_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_mac_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_mac_address function' do
    55  describe 'success' do
    66    it 'is_mac_addresss a mac' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_numeric_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_numeric function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_numeric function' do
    55  describe 'success' do
    66    it 'is_numerics arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_string_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'is_string function' do
    55  describe 'success' do
    66    it 'is_strings arrays' do
    … …  
    9696      end
    9797    end
     98    it 'is_strings undef' do
     99      pp = <<-EOS
     100      $a = undef
     101      $o = is_string($a)
     102      notice(inline_template('is_string is <%= @o.inspect %>'))
     103      EOS
     104
     105      apply_manifest(pp, :catch_failures => true) do |r|
     106        expect(r.stdout).to match(/is_string is true/)
     107      end
     108    end
    98109  end
    99110  describe 'failure' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'join_keys_to_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'join_keys_to_values function' do
    55  describe 'success' do
    66    it 'join_keys_to_valuess hashes' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/join_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'join function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'join function' do
    55  describe 'success' do
    66    it 'joins arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/keys_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'keys function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'keys function' do
    55  describe 'success' do
    66    it 'keyss hashes' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/loadyaml_spec.rb

    rbcf0be5 rad28f83  
    44tmpdir = default.tmpdir('stdlib')
    55
    6 describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     6describe 'loadyaml function' do
    77  describe 'success' do
    88    it 'loadyamls array of values' do
    … …  
    2727      end
    2828    end
     29
     30    it 'returns the default value if there is no file to load' do
     31      pp = <<-EOS
     32      $o = loadyaml('#{tmpdir}/no-file.yaml', {'default' => 'value'})
     33      notice(inline_template('loadyaml[default] is <%= @o["default"].inspect %>'))
     34      EOS
     35
     36      apply_manifest(pp, :catch_failures => true) do |r|
     37        expect(r.stdout).to match(/loadyaml\[default\] is "value"/)
     38      end
     39    end
     40
     41    it 'returns the default value if the file was parsed with an error' do
     42      shell("echo '!' > #{tmpdir}/testyaml.yaml")
     43      pp = <<-EOS
     44      $o = loadyaml('#{tmpdir}/testyaml.yaml', {'default' => 'value'})
     45      notice(inline_template('loadyaml[default] is <%= @o["default"].inspect %>'))
     46      EOS
     47
     48      apply_manifest(pp, :catch_failures => true) do |r|
     49        expect(r.stdout).to match(/loadyaml\[default\] is "value"/)
     50      end
     51    end
    2952  end
    3053  describe 'failure' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/lstrip_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'lstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'lstrip function' do
    55  describe 'success' do
    66    it 'lstrips arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/max_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'max function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'max function' do
    55  describe 'success' do
    66    it 'maxs arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/member_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'member function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'member function' do
    55  shared_examples 'item found' do
    66    it 'should output correctly' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/merge_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'merge function' do
    55  describe 'success' do
    66    it 'should merge two hashes' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/min_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'min function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'min function' do
    55  describe 'success' do
    66    it 'mins arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/nodesets/default.yml

    rbcf0be5 rad28f83  
    11HOSTS:
    2   centos-65-x64:
     2  ubuntu-1404-x64:
    33    roles:
    4       - master
    5     platform: el-6-x86_64
    6     box : centos-65-x64-vbox436-nocm
    7     box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box
    8     hypervisor : vagrant
     4      - agent
     5      - default
     6    platform: ubuntu-14.04-amd64
     7    hypervisor: vagrant
     8    box: puppetlabs/ubuntu-14.04-64-nocm
    99CONFIG:
    1010  type: foss
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/num2bool_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'num2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'num2bool function' do
    55  describe 'success' do
    66    it 'bools positive numbers and numeric strings as true' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/parsejson_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'parsejson function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'parsejson function' do
    55  describe 'success' do
    66    it 'parses valid json' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/parseyaml_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'parseyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'parseyaml function' do
    55  describe 'success' do
    66    it 'parses valid yaml' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pick_default_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'pick_default function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'pick_default function' do
    55  describe 'success' do
    66    it 'pick_defaults a default value' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pick_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'pick function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'pick function' do
    55  describe 'success' do
    66    it 'picks a default value' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/prefix_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'prefix function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'prefix function' do
    55  describe 'success' do
    66    it 'prefixes array of values' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pw_hash_spec.rb

    rbcf0be5 rad28f83  
    33
    44# Windows and OS X do not have useful implementations of crypt(3)
    5 describe 'pw_hash function', :unless => (UNSUPPORTED_PLATFORMS + ['windows', 'Darwin', 'SLES']).include?(fact('operatingsystem')) do
     5describe 'pw_hash function', :unless => (['windows', 'Darwin', 'SLES']).include?(fact('operatingsystem')) do
    66  describe 'success' do
    77    it 'hashes passwords' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/range_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'range function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'range function' do
    55  describe 'success' do
    66    it 'ranges letters' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/reject_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'reject function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'reject function' do
    55  describe 'success' do
    66    it 'rejects array of values' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/reverse_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'reverse function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'reverse function' do
    55  describe 'success' do
    66    it 'reverses strings' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/rstrip_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'rstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'rstrip function' do
    55  describe 'success' do
    66    it 'rstrips arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/shuffle_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'shuffle function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'shuffle function' do
    55  describe 'success' do
    66    it 'shuffles arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/size_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'size function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'size function' do
    55  describe 'success' do
    66    it 'single string size' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/sort_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'sort function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'sort function' do
    55  describe 'success' do
    66    it 'sorts arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/squeeze_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'squeeze function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'squeeze function' do
    55  describe 'success' do
    66    it 'squeezes arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/str2bool_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'str2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'str2bool function' do
    55  describe 'success' do
    66    it 'works with "y"' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'str2saltedsha512 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'str2saltedsha512 function' do
    55  describe 'success' do
    66    it 'works with "y"' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/strftime_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'strftime function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'strftime function' do
    55  describe 'success' do
    66    it 'gives the Century' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/strip_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'strip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'strip function' do
    55  describe 'success' do
    66    it 'strips arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/suffix_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'suffix function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'suffix function' do
    55  describe 'success' do
    66    it 'suffixes array of values' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/swapcase_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'swapcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'swapcase function' do
    55  describe 'success' do
    66    it 'works with strings' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/time_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'time function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'time function' do
    55  describe 'success' do
    66    it 'gives the time' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/to_bytes_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'to_bytes function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'to_bytes function' do
    55  describe 'success' do
    66    it 'converts kB to B' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/try_get_value_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'try_get_value function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'try_get_value function' do
    55  describe 'success' do
    66    it 'gets a value' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/type_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'type function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || is_future_parser_enabled?) do
     4describe 'type function' do
    55  describe 'success' do
    66    it 'types arrays' do
    … …  
    99      # Anagram: Large picture halls, I bet
    1010      $o = type($a)
    11       notice(inline_template('type is <%= @o.inspect %>'))
     11      notice(inline_template('type is <%= @o.to_s %>'))
    1212      EOS
    1313
    1414      apply_manifest(pp, :catch_failures => true) do |r|
    15         expect(r.stdout).to match(/type is "array"/)
     15        expect(r.stdout).to match(/type is Tuple\[String.*, String.*, String.*, String.*\]/)
    1616      end
    1717    end
    … …  
    2020      $a = "blowzy night-frumps vex'd jack q"
    2121      $o = type($a)
    22       notice(inline_template('type is <%= @o.inspect %>'))
     22      notice(inline_template('type is <%= @o.to_s %>'))
    2323      EOS
    2424
    2525      apply_manifest(pp, :catch_failures => true) do |r|
    26         expect(r.stdout).to match(/type is "string"/)
     26        expect(r.stdout).to match(/type is String/)
    2727      end
    2828    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/union_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'union function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'union function' do
    55  describe 'success' do
    66    it 'unions arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/unique_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'unique function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'unique function' do
    55  describe 'success' do
    66    it 'uniques arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/upcase_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'upcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'upcase function' do
    55  describe 'success' do
    66    it 'upcases arrays' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/uriescape_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'uriescape function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'uriescape function' do
    55  describe 'success' do
    66    it 'uriescape strings' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_absolute_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_absolute_path function' do
    55  describe 'success' do
    66    %w{
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_array_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_array function' do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
    23     it 'validates a non-array' do
    24       {
    25         %{validate_array({'a' => 'hash' })} => "Hash",
    26         %{validate_array('string')}         => "String",
    27         %{validate_array(false)}            => "FalseClass",
    28         %{validate_array(undef)}            => "String"
    29       }.each do |pp,type|
    30         expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
     23    [
     24      %{validate_array({'a' => 'hash' })},
     25      %{validate_array('string')},
     26      %{validate_array(false)},
     27      %{validate_array(undef)}
     28    ].each do |pp|
     29      it "rejects #{pp.inspect}" do
     30        expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not an Array\.  It looks to be a/)
    3131      end
    3232    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_augeas_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_augeas function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows')) do
     4describe 'validate_augeas function', :unless => (fact('osfamily') == 'windows') do
    55  describe 'prep' do
    66    it 'installs augeas for tests'
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_bool_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_bool function' do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
    23     it 'validates a non-bool' do
    24       {
    25         %{validate_bool('true')}  => "String",
    26         %{validate_bool('false')} => "String",
    27         %{validate_bool([true])}  => "Array",
    28         %{validate_bool(undef)}   => "String",
    29       }.each do |pp,type|
    30         expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
     23    [
     24      %{validate_bool('true')},
     25      %{validate_bool('false')},
     26      %{validate_bool([true])},
     27      %{validate_bool(undef)}
     28    ].each do |pp|
     29      it "rejects #{pp.inspect}" do
     30        expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not a boolean\.  It looks to be a/)
    3131      end
    3232    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_cmd_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_cmd function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_cmd function' do
    55  describe 'success' do
    66    it 'validates a true command' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_hash_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_hash function' do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
    23     it 'validates a non-hash' do
    24       {
    25         %{validate_hash('{ "not" => "hash" }')} => "String",
    26         %{validate_hash('string')}              => "String",
    27         %{validate_hash(["array"])}             => "Array",
    28         %{validate_hash(undef)}                 => "String",
    29       }.each do |pp,type|
    30         expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
     23    [
     24      %{validate_hash('{ "not" => "hash" }')},
     25      %{validate_hash('string')},
     26      %{validate_hash(["array"])},
     27      %{validate_hash(undef)}
     28    ].each do |pp|
     29      it "rejects #{pp.inspect}" do
     30        expect(apply_manifest(pp, :expect_failures => true).stderr).to match(//)
    3131      end
    3232    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_ipv4_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_ipv4_address function' do
    55  describe 'success' do
    66    it 'validates a single argument' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_ipv6_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_ipv6_address function' do
    55  describe 'success' do
    66    it 'validates a single argument' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_re_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_re function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_re function' do
    55  describe 'success' do
    66    it 'validates a string' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_slength_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_slength function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_slength function' do
    55  describe 'success' do
    66    it 'validates a single string max' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_string_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'validate_string function' do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
     23    it 'validates undef' do
     24      pp = <<-EOS
     25      validate_string(undef)
     26      EOS
     27
     28      apply_manifest(pp, :catch_failures => true)
     29    end
    2330    it 'validates a non-string' do
    2431      {
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/values_at_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'values_at function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'values_at function' do
    55  describe 'success' do
    66    it 'returns a specific value' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/values_spec.rb

    rbcf0be5 rad28f83  
    22require 'spec_helper_acceptance'
    33
    4 describe 'values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'values function' do
    55  describe 'success' do
    66    it 'returns an array of values' do
    … …  
    1414      notice(inline_template('<%= @output.sort.inspect %>'))
    1515      EOS
    16       if is_future_parser_enabled?
    17         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 2, 3\]/)
    18       else
    19         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "2", "3"\]/)
    20       end
    21 
     16      expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 2, 3\]/)
    2217    end
    2318  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/zip_spec.rb

    rbcf0be5 rad28f83  
    11#! /usr/bin/env ruby -S rspec
    22require 'spec_helper_acceptance'
    3 require 'puppet'
    43
    5 describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
     4describe 'zip function' do
    65  describe 'success' do
    76    it 'zips two arrays of numbers together' do
    … …  
    1211      notice(inline_template('<%= @output.inspect %>'))
    1312      EOS
    14       if is_future_parser_enabled?
    15         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\], \[3, 7\], \[4, 8\]\]/)
    16       else
    17         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\], \["3", "7"\], \["4", "8"\]\]/)
    18       end
     13      expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\], \[3, 7\], \[4, 8\]\]/)
    1914    end
    2015    it 'zips two arrays of numbers & bools together' do
    … …  
    2520      notice(inline_template('<%= @output.inspect %>'))
    2621      EOS
    27       if is_future_parser_enabled?
    28         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, true\], \[2, true\], \["three", false\], \[4, false\]\]/)
    29       else
    30         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", true\], \["2", true\], \["three", false\], \["4", false\]\]/)
    31       end
     22      expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, true\], \[2, true\], \["three", false\], \[4, false\]\]/)
    3223    end
    3324    it 'zips two arrays of numbers together and flattens them' do
    … …  
    4233      notice(inline_template('<%= @output.inspect %>'))
    4334      EOS
    44       if is_future_parser_enabled?
    45         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 5, 2, 6, 3, 7, 4, 8\]/)
    46       else
    47         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "5", "2", "6", "3", "7", "4", "8"\]/)
    48       end
     35      expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 5, 2, 6, 3, 7, 4, 8\]/)
    4936    end
    5037    it 'handles unmatched length' do
    … …  
    5643      notice(inline_template('<%= @output.inspect %>'))
    5744      EOS
    58       if is_future_parser_enabled?
    59         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\]\]/)
    60       else
    61         expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\]\]/)
    62       end
     45      expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\]\]/)
    6346    end
    6447  end
    … …  
    7053      notice(inline_template('<%= @output.inspect %>'))
    7154      EOS
    72 
    7355      expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/)
    7456    end
    … …  
    8062      notice(inline_template('<%= @output.inspect %>'))
    8163      EOS
    82 
    8364      expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires array/)
    8465    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/any2array_spec.rb

    rbcf0be5 rad28f83  
    1313  it { is_expected.to run.with_params({ 'key' => 'value' }).and_return(['key', 'value']) }
    1414  it { is_expected.to run.with_params({ 'key' => 'value' }).and_return(['key', 'value']) }
     15
     16  it { is_expected.to run.with_params('‰').and_return(['‰']) }
     17  it { is_expected.to run.with_params('竹').and_return(['竹']) }
     18  it { is_expected.to run.with_params('Ü').and_return(['Ü']) }
     19  it { is_expected.to run.with_params('∇').and_return(['∇']) }
     20  it { is_expected.to run.with_params('€', '万', 'Ö', '♥', '割').and_return(['€', '万', 'Ö', '♥', '割']) }
    1521end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/assert_private_spec.rb

    rbcf0be5 rad28f83  
    66      scope.expects(:lookupvar).with('module_name').returns('foo')
    77      scope.expects(:lookupvar).with('caller_module_name').returns('foo')
    8       expect {
    9         subject.call []
    10       }.not_to raise_error
    11     end
    12   end
    138
    14   context "with an explicit failure message" do
    15     it "prints the failure message on error" do
    16       scope.expects(:lookupvar).with('module_name').returns('foo')
    17       scope.expects(:lookupvar).with('caller_module_name').returns('bar')
    18       expect {
    19         subject.call ['failure message!']
    20       }.to raise_error Puppet::ParseError, /failure message!/
     9      is_expected.to run.with_params()
    2110    end
    2211  end
    2312
    2413  context "when called from private class" do
    25     it "should fail with a class error message" do
     14    before :each do
    2615      scope.expects(:lookupvar).with('module_name').returns('foo')
    2716      scope.expects(:lookupvar).with('caller_module_name').returns('bar')
     17    end
     18
     19    it "should fail with a class error message" do
    2820      scope.source.expects(:name).returns('foo::baz')
    2921      scope.source.expects(:type).returns('hostclass')
    30       expect {
    31         subject.call []
    32       }.to raise_error Puppet::ParseError, /Class foo::baz is private/
     22
     23      is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /Class foo::baz is private/)
     24    end
     25
     26    context "with an explicit failure message" do
     27      it { is_expected.to run.with_params('failure message!').and_raise_error(Puppet::ParseError, /failure message!/) }
    3328    end
    3429  end
    … …  
    4035      scope.source.expects(:name).returns('foo::baz')
    4136      scope.source.expects(:type).returns('definition')
    42       expect {
    43         subject.call []
    44       }.to raise_error Puppet::ParseError, /Definition foo::baz is private/
     37
     38      is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /Definition foo::baz is private/)
    4539    end
    4640  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/basename_spec.rb

    rbcf0be5 rad28f83  
    1212  it { is_expected.to run.with_params('relative_path/to/a/file.ext', '.ext').and_return('file') }
    1313  it { is_expected.to run.with_params('scheme:///path/to/a/file.ext').and_return('file.ext') }
     14
     15  context 'should run with UTF8 and double byte characters' do
     16    it { is_expected.to run.with_params('scheme:///√ạĺűē/竹.ext').and_return('竹.ext') }
     17    it { is_expected.to run.with_params('ҝẽγ:/√ạĺűē/竹.ㄘ', '.ㄘ').and_return('竹') }
     18  end
    1419end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chomp_spec.rb

    rbcf0be5 rad28f83  
    1818  it { is_expected.to run.with_params(AlsoString.new("one\n\n")).and_return("one\n") }
    1919  it { is_expected.to run.with_params([AlsoString.new("one\n"), AlsoString.new("two"), "three\n"]).and_return(["one", "two", "three"]) }
     20
     21  context 'should run with UTF8 and double byte characters' do
     22    it { is_expected.to run.with_params("ůťƒ8\n\n").and_return("ůťƒ8\n") }
     23    it { is_expected.to run.with_params("ネット\n\n").and_return("ネット\n") }
     24  end
    2025end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chop_spec.rb

    rbcf0be5 rad28f83  
    1818  it { is_expected.to run.with_params(AlsoString.new("one\n\n")).and_return("one\n") }
    1919  it { is_expected.to run.with_params([AlsoString.new("one\n"), AlsoString.new("two"), "three\n"]).and_return(["one", "tw", "three"]) }
     20
     21  context 'should run with UTF8 and double byte characters' do
     22    it { is_expected.to run.with_params("ůťƒ8\n\n").and_return("ůťƒ8\n") }
     23    it { is_expected.to run.with_params("ネット\n\n").and_return("ネット\n") }
     24  end
    2025end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/concat_spec.rb

    rbcf0be5 rad28f83  
    1212  it { is_expected.to run.with_params(['1','2'],['3','4'],['5','6']).and_return(['1','2','3','4','5','6']) }
    1313  it { is_expected.to run.with_params(['1','2'],'3','4',['5','6']).and_return(['1','2','3','4','5','6']) }
     14
     15context 'should run with UTF8 and double byte characters' do
    1416  it { is_expected.to run.with_params([{"a" => "b"}], {"c" => "d", "e" => "f"}).and_return([{"a" => "b"}, {"c" => "d", "e" => "f"}]) }
     17  it { is_expected.to run.with_params(['ấ','β','©'],['đ','ể','文字列']).and_return(['ấ','β','©','đ','ể','文字列']) }
     18end
    1519
    1620  it "should leave the original array intact" do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/count_spec.rb

    rbcf0be5 rad28f83  
    1616  it { is_expected.to run.with_params(["one", "", "two"]).and_return(2) }
    1717  it { is_expected.to run.with_params(["one", :undef, "two"]).and_return(2) }
     18
     19  it { is_expected.to run.with_params(["ổņ℮", "ŧщộ", "three"]).and_return(3) }
     20  it { is_expected.to run.with_params(["ổņ℮", "ŧщộ", "ŧщộ"], "ŧщộ").and_return(2) }
     21  it { is_expected.to run.with_params(["ổņ℮", nil, "ŧщộ"]).and_return(2) }
     22  it { is_expected.to run.with_params(["ổņ℮", :undef, "ŧщộ"]).and_return(2) }
    1823end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/deep_merge_spec.rb

    rbcf0be5 rad28f83  
    5353    expect(argument2).to eq(original2)
    5454  end
     55
     56  context 'should run with UTF8 and double byte characters' do
     57    it { is_expected.to run.with_params({'ĸέỹ1' => 'ϋǻļủë1'}, {'この文字列' => '万' }).and_return({'ĸέỹ1' => 'ϋǻļủë1', 'この文字列' => '万'}) }
     58  end
    5559end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/defined_with_params_spec.rb

    rbcf0be5 rad28f83  
    1212    it { is_expected.to run.with_params('User[bob]', {}).and_return(false) }
    1313    it { is_expected.to run.with_params('User[dan]', {'foo' => 'bar'}).and_return(false) }
     14
     15    context 'should run with UTF8 and double byte characters' do
     16      it { is_expected.to run.with_params('User[ĵĭмოү]', {}).and_return(false) }
     17      it { is_expected.to run.with_params('User[ポーラ]', {}).and_return(false) }
     18    end
    1419  end
    1520
    … …  
    2429    it { is_expected.to run.with_params('User[dan]', {'ensure' => 'absent', 'managehome' => false}).and_return(false) }
    2530  end
     31
     32  describe 'when passing undef values' do
     33    let :pre_condition do
     34      'file { "/tmp/a": ensure => present }'
     35    end
     36
     37    it { is_expected.to run.with_params('File[/tmp/a]', {}).and_return(true) }
     38    it { is_expected.to run.with_params('File[/tmp/a]', { 'ensure' => 'present', 'owner' => :undef }).and_return(true) }
     39  end
     40
     41  describe 'when the reference is a' do
     42    let :pre_condition do
     43      'user { "dan": }'
     44    end
     45    context 'reference' do
     46      it { is_expected.to run.with_params(Puppet::Resource.new('User[dan]'), {}).and_return(true) }
     47    end
     48    if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0
     49      context 'array' do
     50        it 'fails' do
     51          expect {
     52            subject.call([['User[dan]'], {}])
     53          }.to raise_error ArgumentError, /not understood: 'Array'/
     54        end
     55      end
     56    end
     57  end
     58
     59  describe 'when passed a defined type' do
     60    let :pre_condition do
     61      'test::deftype { "foo": }'
     62    end
     63    it { is_expected.to run.with_params('Test::Deftype[foo]', {}).and_return(true) }
     64    it { is_expected.to run.with_params('Test::Deftype[bar]', {}).and_return(false) }
     65    it { is_expected.to run.with_params(Puppet::Resource.new('Test::Deftype[foo]'), {}).and_return(true) }
     66    it { is_expected.to run.with_params(Puppet::Resource.new('Test::Deftype[bar]'), {}).and_return(false) }
     67  end
    2668end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_at_spec.rb

    rbcf0be5 rad28f83  
    1919  it { is_expected.to run.with_params([0, 1, 2], -1).and_return([0, 1]) }
    2020  it { is_expected.to run.with_params([0, 1, 2], -4).and_return([0, 1, 2]) }
     21  it { is_expected.to run.with_params(["ƒờở", "βāř", "ьầż"], 1).and_return(["ƒờở", "ьầż"]) }
     22
    2123
    2224  it "should leave the original array intact" do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_spec.rb

    rbcf0be5 rad28f83  
    55  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }
    66  it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError) }
     7  it { is_expected.to run.with_params([], 'two') }
    78  it { is_expected.to run.with_params([], 'two', 'three').and_raise_error(Puppet::ParseError) }
    89  it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError) }
    … …  
    1314    it { is_expected.to run.with_params(['two'], 'two').and_return([]) }
    1415    it { is_expected.to run.with_params(['two', 'two'], 'two').and_return([]) }
     16    it { is_expected.to run.with_params(['ab', 'b', 'c', 'b'], 'b').and_return(['ab', 'c']) }
    1517    it { is_expected.to run.with_params(['one', 'two', 'three'], 'four').and_return(['one', 'two', 'three']) }
    1618    it { is_expected.to run.with_params(['one', 'two', 'three'], 'e').and_return(['one', 'two', 'three']) }
    … …  
    1820    it { is_expected.to run.with_params(['two', 'one', 'two', 'three', 'two'], 'two').and_return(['one', 'three']) }
    1921    it { is_expected.to run.with_params(['one', 'two', 'three', 'two'], ['one', 'two']).and_return(['three']) }
     22    it { is_expected.to run.with_params(['ồאּẻ', 'ŧẅơ', 'ŧңŗё℮', 'ŧẅơ'], ['ồאּẻ', 'ŧẅơ']).and_return(['ŧңŗё℮']) }
    2023  end
    2124
    … …  
    2932    it { is_expected.to run.with_params('foobarbabarz', 'bar').and_return('foobaz') }
    3033    it { is_expected.to run.with_params('foobarbabarz', ['foo', 'bar']).and_return('baz') }
    31     # this is so sick
     34    it { is_expected.to run.with_params('ƒōōβậяβậβậяź', ['ƒōō', 'βậя']).and_return('βậź') }
     35
    3236    it { is_expected.to run.with_params('barfoobar', ['barbar', 'foo']).and_return('barbar') }
    3337    it { is_expected.to run.with_params('barfoobar', ['foo', 'barbar']).and_return('') }
    … …  
    4549      .with_params({'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'}, ['key1', 'key2']) \
    4650      .and_return( {'key3' => 'value3'})
     51    }
     52    it { is_expected.to run \
     53      .with_params({'ĸəұ1' => 'νãŀủĕ1', 'ĸəұ2' => 'νãŀủĕ2', 'ĸəұ3' => 'νãŀủĕ3'}, ['ĸəұ1', 'ĸəұ2']) \
     54      .and_return( {'ĸəұ3' => 'νãŀủĕ3'})
    4755    }
    4856  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_undef_values_spec.rb

    rbcf0be5 rad28f83  
    1717        it { is_expected.to run.with_params([undef_value]).and_return([]) }
    1818        it { is_expected.to run.with_params(['one',undef_value,'two','three']).and_return(['one','two','three']) }
     19        it { is_expected.to run.with_params(['ớņέ',undef_value,'ŧשּׁō','ŧħґëə']).and_return(['ớņέ','ŧשּׁō','ŧħґëə']) }
    1920      end
    2021
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_values_spec.rb

    rbcf0be5 rad28f83  
    2020    }
    2121    it { is_expected.to run \
    22       .with_params({'key1' => 'value1', 'key2' => 'value to delete'}, 'value to delete') \
     22      .with_params({'ҝếỵ1 ' => 'νâĺūẹ1', 'ҝếỵ2' => 'value to delete'}, 'value to delete') \
     23      .and_return({'ҝếỵ1 ' => 'νâĺūẹ1'})
     24    }
     25    it { is_expected.to run \
     26      .with_params({'key1' => 'value1', 'key2' => 'νǎŀữ℮ ťớ đêłểťė'}, 'νǎŀữ℮ ťớ đêłểťė') \
    2327      .and_return({'key1' => 'value1'})
    2428    }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/difference_spec.rb

    rbcf0be5 rad28f83  
    1313  it { is_expected.to run.with_params([], ['one']).and_return([]) }
    1414  it { is_expected.to run.with_params(['one'], ['one']).and_return([]) }
     15  it { is_expected.to run.with_params(['ớņέ'], ['']).and_return(['ớņέ']) }
    1516  it { is_expected.to run.with_params(['one'], []).and_return(['one']) }
    1617  it { is_expected.to run.with_params(['one', 'two', 'three'], ['two', 'three']).and_return(['one']) }
     18  it { is_expected.to run.with_params(['ớņέ', 'ŧשּׁō', 'ŧħґëə', 2], ['ŧשּׁō', 'ŧħґëə']).and_return(['ớņέ', 2]) }
    1719  it { is_expected.to run.with_params(['one', 'two', 'two', 'three'], ['two', 'three']).and_return(['one']) }
    1820  it { is_expected.to run.with_params(['one', 'two', 'three'], ['two', 'two', 'three']).and_return(['one']) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dig_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'dig' do
    4   it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }
    5   it { is_expected.to run.with_params('bad', []).and_raise_error(Puppet::ParseError) }
    6   it { is_expected.to run.with_params({}, 'bad').and_raise_error(Puppet::ParseError) }
    74
    8   it { is_expected.to run.with_params({}, []).and_return({}) }
    9   it { is_expected.to run.with_params({"a" => "b"}, ["a"]).and_return("b") }
    10   it { is_expected.to run.with_params({"a" => {"b" => "c"}}, ["a", "b"]).and_return("c") }
    11   it { is_expected.to run.with_params({}, ["a", "b"], "d").and_return("d") }
    12   it { is_expected.to run.with_params({"a" => false}, ["a"]).and_return(false) }
     5  it "should exist" do
     6    expect(Puppet::Parser::Functions.function("dig")).to eq("function_dig")
     7  end
     8
     9  it "should give a deprecation warning when called" do
     10    scope.expects(:warning).with("dig() DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version.")
     11    scope.function_dig([{}, []])
     12  end
    1313end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dirname_spec.rb

    rbcf0be5 rad28f83  
    1111  it { is_expected.to run.with_params('/path/to/a/file.ext').and_return('/path/to/a') }
    1212  it { is_expected.to run.with_params('relative_path/to/a/file.ext').and_return('relative_path/to/a') }
     13
     14  context 'should run with UTF8 and double byte characters' do
     15    it { is_expected.to run.with_params('scheme:///√ạĺűē/竹.ext').and_return('scheme:///√ạĺűē') }
     16    it { is_expected.to run.with_params('ҝẽγ:/√ạĺűē/竹.ㄘ').and_return('ҝẽγ:/√ạĺűē') }
     17  end
    1318end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dos2unix_spec.rb

    rbcf0be5 rad28f83  
    3030  end
    3131
    32   context 'Converting from unix to unix format' do
    33     sample_text    = "Hello\nWorld\n"
    34     desired_output = "Hello\nWorld\n"
     32  context 'Internationalization (i18N) values' do
     33    sample_text_utf8    = "Ħ℮ļłǿ\r\nשׁөŕłđ\r\n"
     34    desired_output_utf8 = "Ħ℮ļłǿ\nשׁөŕłđ\n"
    3535
    36     it 'should output unix format' do
    37       should run.with_params(sample_text).and_return(desired_output)
     36    sample_text_doublebyte    = "こんにちは\r\n世界\r\n"
     37    desired_output_doublebyte = "こんにちは\n世界\n"
     38
     39    it 'should output uft8 string' do
     40      should run.with_params(sample_text_utf8).and_return(desired_output_utf8)
     41    end
     42
     43    it 'should output double byte string' do
     44      should run.with_params(sample_text_doublebyte).and_return(desired_output_doublebyte)
    3845    end
    3946  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_packages_spec.rb

    rbcf0be5 rad28f83  
    3434    end
    3535  end
     36
     37  context 'given an empty packages array' do
     38    let(:pre_condition) { 'notify { "hi": } -> Package <| |>; $somearray = ["vim",""]; ensure_packages($somearray)' }
     39
     40    describe 'after running ensure_package(["vim", ""])' do
     41      it { expect { catalogue }.to raise_error(Puppet::ParseError, /Empty String provided/) }
     42    end
     43  end
     44
     45  context 'given hash of packages' do
     46    before { subject.call([{"foo" => { "provider" => "rpm" }, "bar" => { "provider" => "gem" }}, { "ensure" => "present"}]) }
     47    before { subject.call([{"パッケージ" => { "ensure" => "absent"}}]) }
     48    before { subject.call([{"ρǻ¢κầģẻ" => { "ensure" => "absent"}}]) }
     49
     50    # this lambda is required due to strangeness within rspec-puppet's expectation handling
     51    it { expect(lambda { catalogue }).to contain_package('foo').with({'provider' => 'rpm', 'ensure' => 'present'}) }
     52    it { expect(lambda { catalogue }).to contain_package('bar').with({'provider' => 'gem', 'ensure' => 'present'}) }
     53
     54    context 'should run with UTF8 and double byte characters' do
     55    it { expect(lambda { catalogue }).to contain_package('パッケージ').with({'ensure' => 'absent'}) }
     56    it { expect(lambda { catalogue }).to contain_package('ρǻ¢κầģẻ').with({'ensure' => 'absent'}) }
     57    end
     58  end
    3659end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_resource_spec.rb

    rbcf0be5 rad28f83  
    55  it { is_expected.to run.with_params().and_raise_error(ArgumentError, /Must specify a type/) }
    66  it { is_expected.to run.with_params('type').and_raise_error(ArgumentError, /Must specify a title/) }
    7   it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) }
     7  if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0
     8    it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(ArgumentError) }
     9  else
     10    it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) }
     11  end
     12
    813  it {
    914    pending("should not accept numbers as arguments")
    1015    is_expected.to run.with_params(1,2,3).and_raise_error(Puppet::ParseError)
    1116  }
     17
     18  context 'given an empty catalog' do
     19    describe 'after running ensure_resource("user", "username1", {})' do
     20      before { subject.call(['User', 'username1', {}]) }
     21
     22      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     23      it { expect(lambda { catalogue }).to contain_user('username1').without_ensure }
     24    end
     25
     26    describe 'after running ensure_resource("user", "username1", { gid => undef })' do
     27      before { subject.call(['User', 'username1', { 'gid' => :undef }]) }
     28
     29      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     30      it { expect(lambda { catalogue }).to contain_user('username1').without_ensure }
     31      it { expect(lambda { catalogue }).to contain_user('username1').without_gid }
     32    end
     33
     34    describe 'after running ensure_resource("user", "username1", { ensure => present, gid => undef })' do
     35      before { subject.call(['User', 'username1', { 'ensure' => 'present', 'gid' => :undef }]) }
     36
     37      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     38      it { expect(lambda { catalogue }).to contain_user('username1').with_ensure('present') }
     39      it { expect(lambda { catalogue }).to contain_user('username1').without_gid }
     40    end
     41
     42    describe 'after running ensure_resource("test::deftype", "foo", {})' do
     43      before { subject.call(['test::deftype', 'foo', {}]) }
     44
     45      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     46      it { expect(lambda { catalogue }).to contain_test__deftype('foo').without_ensure }
     47    end
     48  end
     49
     50  context 'given a catalog with UTF8 chars' do
     51    describe 'after running ensure_resource("user", "Şắოрŀễ Ţëם", {})' do
     52      before { subject.call(['User', 'Şắოрŀễ Ţëם', {}]) }
     53
     54      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     55      it { expect(lambda { catalogue }).to contain_user('Şắოрŀễ Ţëם').without_ensure }
     56    end
     57
     58    describe 'after running ensure_resource("user", "Şắოрŀễ Ţëם", { gid => undef })' do
     59      before { subject.call(['User', 'Şắოрŀễ Ţëם', { 'gid' => :undef }]) }
     60
     61      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     62      it { expect(lambda { catalogue }).to contain_user('Şắოрŀễ Ţëם').without_ensure }
     63      it { expect(lambda { catalogue }).to contain_user('Şắოрŀễ Ţëם').without_gid }
     64    end
     65
     66    describe 'after running ensure_resource("user", "Şắოрŀễ Ţëם", { ensure => present, gid => undef })' do
     67      before { subject.call(['User', 'Şắოрŀễ Ţëם', { 'ensure' => 'present', 'gid' => :undef }]) }
     68
     69      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     70      it { expect(lambda { catalogue }).to contain_user('Şắოрŀễ Ţëם').with_ensure('present') }
     71      it { expect(lambda { catalogue }).to contain_user('Şắოрŀễ Ţëם').without_gid }
     72    end
     73  end
    1274
    1375  context 'given a catalog with "user { username1: ensure => present }"' do
    … …  
    2789      it { expect(lambda { catalogue }).to contain_user('username1').with_ensure('present') }
    2890      it { expect(lambda { catalogue }).to contain_user('username2').without_ensure }
     91    end
     92
     93    describe 'after running ensure_resource("user", "username1", { gid => undef })' do
     94      before { subject.call(['User', 'username1', { 'gid' => :undef }]) }
     95
     96      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     97      it { expect(lambda { catalogue }).to contain_user('username1').with_ensure('present') }
    2998    end
    3099
    … …  
    53122    end
    54123  end
     124
     125  context 'given a catalog with "test::deftype { foo: }"' do
     126    let(:pre_condition) { 'test::deftype { "foo": }' }
     127
     128    describe 'after running ensure_resource("test::deftype", "foo", {})' do
     129      before { subject.call(['test::deftype', 'foo', {}]) }
     130
     131      # this lambda is required due to strangeness within rspec-puppet's expectation handling
     132      it { expect(lambda { catalogue }).to contain_test__deftype('foo').without_ensure }
     133    end
     134  end
    55135end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/flatten_spec.rb

    rbcf0be5 rad28f83  
    1212  it { is_expected.to run.with_params(["a","b","c","d","e","f","g"]).and_return(["a","b","c","d","e","f","g"]) }
    1313  it { is_expected.to run.with_params([["a","b",["c",["d","e"],"f","g"]]]).and_return(["a","b","c","d","e","f","g"]) }
     14  it { is_expected.to run.with_params(["ã","β",["ĉ",["đ","ẽ","ƒ","ġ"]]]).and_return(["ã","β","ĉ","đ","ẽ","ƒ","ġ"]) }
    1415end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/fqdn_rand_string_spec.rb

    rbcf0be5 rad28f83  
    2121  it { is_expected.to run.with_params(100, 'a').and_return(/\Aa{100}\z/) }
    2222  it { is_expected.to run.with_params(100, 'ab').and_return(/\A[ab]{100}\z/) }
     23  it { is_expected.to run.with_params(100, 'ãβ').and_return(/\A[ãβ]{100}\z/) }
    2324
    2425  it "provides the same 'random' value on subsequent calls for the same host" do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/fqdn_rotate_spec.rb

    rbcf0be5 rad28f83  
    88  it { is_expected.to run.with_params('').and_return('') }
    99  it { is_expected.to run.with_params('a').and_return('a') }
     10  it { is_expected.to run.with_params('ã').and_return('ã') }
    1011
    1112  it { is_expected.to run.with_params([]).and_return([]) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getparam_spec.rb

    rbcf0be5 rad28f83  
    2323    it { is_expected.to run.with_params('User[two]', 'ensure').and_return('') }
    2424    it { is_expected.to run.with_params('User[one]', 'shell').and_return('/bin/sh') }
    25     it {
    26       pending("both rspec-puppet as well as the function do the wrong thing here.")
    27       is_expected.to run.with_params('User[one]', 'managehome').and_return(false)
    28     }
     25    it { is_expected.to run.with_params('User[one]', 'managehome').and_return(false) }
     26  end
     27
     28  describe 'when compared against a user resource with UTF8 and double byte params' do
     29    let(:pre_condition) { 'user { ["三", "ƒốưř"]: ensure => present }' }
     30
     31    it { is_expected.to run.with_params('User[三]', 'ensure').and_return('present') }
     32    it { is_expected.to run.with_params('User[ƒốưř]', 'ensure').and_return('present') }
     33
    2934  end
    3035end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getvar_spec.rb

    rbcf0be5 rad28f83  
    66  it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    77  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
     8
     9  it { is_expected.to run.with_params('$::foo').and_return(nil) }
    810
    911  context 'given variables in namespaces' do
    … …  
    1921    it { is_expected.to run.with_params('::site::data::bar').and_return(nil) }
    2022  end
     23
     24  context 'given variables in namespaces' do
     25    let(:pre_condition) {
     26      <<-'ENDofPUPPETcode'
     27      class site::info { $lock = 'ŧҺîš íš ắ śţřĭŋĝ' }
     28      class site::new { $item = '万Ü€‰' }
     29      include site::info
     30      include site::new
     31      ENDofPUPPETcode
     32    }
     33
     34    it { is_expected.to run.with_params('site::info::lock').and_return('ŧҺîš íš ắ śţřĭŋĝ') }
     35    it { is_expected.to run.with_params('::site::new::item').and_return('万Ü€‰') }
     36  end
    2137end
     38
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/grep_spec.rb

    rbcf0be5 rad28f83  
    1717  it { is_expected.to run.with_params(['one', 'two', 'three'], 'two').and_return(['two']) }
    1818  it { is_expected.to run.with_params(['one', 'two', 'three'], 't(wo|hree)').and_return(['two', 'three']) }
     19  it { is_expected.to run.with_params(['ờאּê', 'ţשּׂỡ', 'ţһŗəè'], 'ţ(שּׂỡ|һŗəè)').and_return(['ţשּׂỡ', 'ţһŗəè']) }
    1920end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_ip_network_spec.rb

    rbcf0be5 rad28f83  
    1010      {
    1111        :interfaces => 'eth0,lo',
    12         :network => :undefined,
    1312        :network_lo => '127.0.0.0',
    1413        :network_eth0 => '10.0.0.0',
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_key_spec.rb

    rbcf0be5 rad28f83  
    1313  it { is_expected.to run.with_params({}, "key").and_return(false) }
    1414  it { is_expected.to run.with_params({ 'key' => 'value'}, "not a key").and_return(false) }
     15
     16  context 'should run with UTF8 and double byte characters' do
     17    it { is_expected.to run.with_params({ 'κéỳ ' => '٧ậļųể' }, "κéỳ ").and_return(true) }
     18    it { is_expected.to run.with_params({ 'キー' => '٧ậļųể' }, "キー").and_return(true) }
     19  end
    1520end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/hash_spec.rb

    rbcf0be5 rad28f83  
    1111  it { is_expected.to run.with_params([]).and_return({}) }
    1212  it { is_expected.to run.with_params(['key1', 'value1']).and_return({ 'key1' => 'value1' }) }
     13  it { is_expected.to run.with_params(['κ℮ұ1', '√āĺűẻ1']).and_return({ 'κ℮ұ1' => '√āĺűẻ1' }) }
    1314  it { is_expected.to run.with_params(['key1', 'value1', 'key2', 'value2']).and_return({ 'key1' => 'value1', 'key2' => 'value2' }) }
    1415end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/intersection_spec.rb

    rbcf0be5 rad28f83  
    1515  it { is_expected.to run.with_params(['one'], ['one']).and_return(['one']) }
    1616  it { is_expected.to run.with_params(['one', 'two', 'three'], ['two', 'three']).and_return(['two', 'three']) }
     17  it { is_expected.to run.with_params(['ōŋể', 'ŧשợ', 'ţђŕẽё'], ['ŧשợ', 'ţђŕẽё']).and_return(['ŧשợ', 'ţђŕẽё']) }
    1718  it { is_expected.to run.with_params(['one', 'two', 'two', 'three'], ['two', 'three']).and_return(['two', 'three']) }
    1819  it { is_expected.to run.with_params(['one', 'two', 'three'], ['two', 'two', 'three']).and_return(['two', 'three']) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_a_spec.rb

    rbcf0be5 rad28f83  
    2222      is_expected.to run.with_params(5, String).and_return(false)
    2323    end
     24
     25    it 'suceeds when comparing an UTF8 and double byte characters' do
     26      is_expected.to run.with_params('このテキスト', String).and_return(true)
     27      is_expected.to run.with_params('ŧћịś ŧêχŧ', String).and_return(true)
     28    end
    2429  end
    2530end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_array_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'is_array' do
     4 
    45  it { is_expected.not_to eq(nil) }
    56  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    1718  it { is_expected.to run.with_params(1).and_return(false) }
    1819  it { is_expected.to run.with_params({}).and_return(false) }
     20  context 'Checking for deprecation warning' do
     21    after(:all) do
     22      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     23    end
     24    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     25    it 'should display a single deprecation' do
     26      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     27      scope.expects(:warning).with(includes('This method is deprecated'))
     28      is_expected.to run.with_params(['1.2.3.4']).and_return(true)
     29    end
     30    it 'should display no warning for deprecation' do
     31      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     32      scope.expects(:warning).with(includes('This method is deprecated')).never
     33      is_expected.to run.with_params(['1.2.3.4']).and_return(true)
     34    end
     35  end
    1936end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_bool_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'is_bool' do
     4 
    45  it { is_expected.not_to eq(nil) }
    56  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    1314  it { is_expected.to run.with_params('true').and_return(false) }
    1415  it { is_expected.to run.with_params('false').and_return(false) }
     16  context 'Checking for deprecation warning' do
     17    after(:all) do
     18      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     19    end
     20    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     21    it 'should display a single deprecation' do
     22      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     23      scope.expects(:warning).with(includes('This method is deprecated'))
     24      is_expected.to run.with_params(true).and_return(true)
     25    end
     26    it 'should display no warning for deprecation' do
     27      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     28      scope.expects(:warning).with(includes('This method is deprecated')).never
     29      is_expected.to run.with_params(false).and_return(true)
     30    end
     31  end
    1532end
     33
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_float_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'is_float' do
     4
    45  it { is_expected.not_to eq(nil) }
     6
    57  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    68  it { is_expected.to run.with_params(0.1, 0.2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    2022    it { is_expected.to run.with_params(1).and_return(false) }
    2123  end
     24
     25  context 'Checking for deprecation warning' do
     26    after(:all) do
     27      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     28    end
     29    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     30    it 'should display a single deprecation' do
     31      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     32      scope.expects(:warning).with(includes('This method is deprecated'))
     33      is_expected.to run.with_params(2.2).and_return(true)
     34    end
     35    it 'should display no warning for deprecation' do
     36      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     37      scope.expects(:warning).with(includes('This method is deprecated')).never
     38      is_expected.to run.with_params(1.0).and_return(true)
     39    end
     40  end
     41
    2242end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_integer_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'is_integer' do
     4 
    45  it { is_expected.not_to eq(nil) }
     6
    57  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    68  it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    1012  it { is_expected.to run.with_params(-3).and_return(true) }
    1113  it { is_expected.to run.with_params('-3').and_return(true) }
    12  
     14
    1315  it { is_expected.to run.with_params(3.7).and_return(false) }
    1416  it { is_expected.to run.with_params('3.7').and_return(false) }
    … …  
    2325  it { is_expected.to run.with_params(false).and_return(false) }
    2426  it { is_expected.to run.with_params('0001234').and_return(false) }
     27
     28  context 'Checking for deprecation warning' do
     29    after(:all) do
     30      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     31    end
     32    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     33    it 'should display a single deprecation' do
     34      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     35      scope.expects(:warning).with(includes('This method is deprecated'))
     36      is_expected.to run.with_params(50).and_return(true)
     37    end
     38    it 'should display no warning for deprecation' do
     39      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     40      scope.expects(:warning).with(includes('This method is deprecated')).never
     41      is_expected.to run.with_params(50).and_return(true)
     42    end
     43  end
     44
    2545end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_ip_address_spec.rb

    rbcf0be5 rad28f83  
    2121  it { is_expected.to run.with_params({}).and_return(false) }
    2222  it { is_expected.to run.with_params([]).and_return(false) }
     23
     24  context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
     25    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     26    it 'should display a single deprecation' do
     27      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     28      scope.expects(:warning).with(includes('This method is deprecated'))
     29      is_expected.to run.with_params('1.2.3.4').and_return(true)
     30    end
     31    it 'should display no warning for deprecation' do
     32      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     33      scope.expects(:warning).with(includes('This method is deprecated')).never
     34      is_expected.to run.with_params('1.2.3.4').and_return(true)
     35    end
     36    after(:all) do
     37      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     38    end
     39  end
    2340end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_mac_address_spec.rb

    rbcf0be5 rad28f83  
    1010  it { is_expected.to run.with_params('').and_return(false) }
    1111  it { is_expected.to run.with_params('one').and_return(false) }
     12
     13  context 'function can handle UTF8 and double byte characters' do
     14    it { is_expected.to run.with_params('ƒốưř').and_return(false) }
     15    it { is_expected.to run.with_params('三+').and_return(false) }
     16  end
     17
    1218  it {
    1319    pending "should properly typecheck its arguments"
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_numeric_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'is_numeric' do
     4 
    45  it { is_expected.not_to eq(nil) }
     6
    57  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    68  it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    2628  it { is_expected.to run.with_params('0001234').and_return(false) }
    2729  it { is_expected.to run.with_params(' - 1234').and_return(false) }
     30
     31  context 'Checking for deprecation warning' do
     32    after(:all) do
     33      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     34    end
     35    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     36    it 'should display a single deprecation' do
     37      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     38      scope.expects(:warning).with(includes('This method is deprecated'))
     39      is_expected.to run.with_params(7).and_return(true)
     40    end
     41    it 'should display no warning for deprecation' do
     42      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     43      scope.expects(:warning).with(includes('This method is deprecated')).never
     44      is_expected.to run.with_params(7).and_return(true)
     45    end
     46  end
     47
    2848end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_string_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'is_string' do
     4
    45  it { is_expected.not_to eq(nil) }
    56  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    2627  it { is_expected.to run.with_params('one').and_return(true) }
    2728  it { is_expected.to run.with_params('0001234').and_return(true) }
     29
     30  context 'Checking for deprecation warning' do
     31    after(:all) do
     32      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     33    end
     34    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     35    it 'should display a single deprecation' do
     36      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     37      scope.expects(:warning).with(includes('This method is deprecated'))
     38      is_expected.to run.with_params('sponge').and_return(true)
     39    end
     40    it 'should display no warning for deprecation' do
     41      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     42      scope.expects(:warning).with(includes('This method is deprecated')).never
     43      is_expected.to run.with_params('bob').and_return(true)
     44    end
     45  end
     46
    2847end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_keys_to_values_spec.rb

    rbcf0be5 rad28f83  
    1212  it { is_expected.to run.with_params({ 'key' => 'value' }, '').and_return(['keyvalue']) }
    1313  it { is_expected.to run.with_params({ 'key' => 'value' }, ':').and_return(['key:value']) }
     14
     15  context 'should run with UTF8 and double byte characters' do
     16    it { is_expected.to run.with_params({ 'ҝẽγ' => '√ạĺűē' }, ':').and_return(['ҝẽγ:√ạĺűē']) }
     17    it  { is_expected.to run.with_params({ 'ҝẽγ' => '√ạĺűē' }, '万').and_return(['ҝẽγ万√ạĺűē']) }
     18  end
     19
    1420  it { is_expected.to run.with_params({ 'key' => nil }, ':').and_return(['key:']) }
    1521  it 'should run join_keys_to_values(<hash with multiple keys>, ":") and return the proper array' do
    … …  
    1723    expect(result.sort).to eq(['key1:value1', 'key2:value2'].sort)
    1824  end
     25  it 'should run join_keys_to_values(<hash with array value>, " ") and return the proper array' do
     26    result = subject.call([{ 'key1' => 'value1', 'key2' => ['value2', 'value3'] }, ' '])
     27    expect(result.sort).to eq(['key1 value1', 'key2 value2', 'key2 value3'].sort)
     28  end
    1929end
     30
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_spec.rb

    rbcf0be5 rad28f83  
    1717  it { is_expected.to run.with_params(['one', 'two', 'three']).and_return('onetwothree') }
    1818  it { is_expected.to run.with_params(['one', 'two', 'three'], ':').and_return('one:two:three') }
     19  it { is_expected.to run.with_params(['ōŋể', 'ŧשợ', 'ţђŕẽё'], ':').and_return('ōŋể:ŧשợ:ţђŕẽё') }
    1920end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/keys_spec.rb

    rbcf0be5 rad28f83  
    1717    expect(result).to match_array(['key1', 'key2'])
    1818  end
     19
     20  it 'should run with UTF8 and double byte characters' do
     21    result = subject.call([{ 'ҝểү' => '√ẳŀμệ', 'キー' => '値' }])
     22    expect(result).to match_array(['ҝểү', 'キー'])
     23  end
    1924end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/load_module_metadata_spec.rb

    rbcf0be5 rad28f83  
    66  it { is_expected.to run.with_params("one", "two", "three").and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    77
    8   it "should json parse the file" do
    9      allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
    10      allow(File).to receive(:exists?).with(/metadata.json/).and_return(true)
    11      allow(File).to receive(:read).with(/metadata.json/).and_return('{"name": "spencer-science"}')
     8  describe "when calling with valid arguments" do
     9    before :each do
     10      allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/, {:encoding=>"utf-8"}).and_return('{"name": "puppetlabs-stdlib"}')
     11      allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/).and_return('{"name": "puppetlabs-stdlib"}')
     12    end
    1213
    13      result = subject.call(['science'])
    14      expect(result['name']).to eq('spencer-science')
    15   end
     14    context "when calling with valid utf8 and double byte character arguments" do
     15      before :each do
     16        allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/, {:encoding=>"utf-8"}).and_return('{"ĭďèʼnţĩƒіểя": "ċơņťęאּť ỡƒ ţħíš -
     17この文字"}')
     18        allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/).and_return('{"ĭďèʼnţĩƒіểя": "ċơņťęאּť ỡƒ ţħíš -
     19この文字"}')
     20      end
    1621
    17   it "should fail by default if there is no metadata.json" do
    18      allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
    19      allow(File).to receive(:exists?).with(/metadata.json/).and_return(false)
    20      expect {subject.call(['science'])}.to raise_error(Puppet::ParseError)
    21   end
     22    it "should json parse the file" do
     23      if Puppet::Util::Platform.windows?
     24        allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/')
     25        allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(true)
     26        allow(File).to receive(:read).with('C:/path/to/module/metadata.json').and_return('{"name": "spencer-science"}')
     27      else
     28        allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
     29        allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(true)
     30        allow(File).to receive(:read).with('/path/to/module/metadata.json').and_return('{"name": "spencer-science"}')
     31      end
    2232
    23   it "should return nil if user allows empty metadata.json" do
    24      allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
    25      allow(File).to receive(:exists?).with(/metadata.json/).and_return(false)
    26      result = subject.call(['science', true])
    27      expect(result).to eq({})
     33      result = subject.call(['science'])
     34      expect(result['name']).to eq('spencer-science')
     35    end
     36
     37    it "should fail by default if there is no metadata.json" do
     38      if Puppet::Util::Platform.windows?
     39        allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/')
     40        allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(false)
     41      else
     42        allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
     43        allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false)
     44      end
     45      expect {subject.call(['science'])}.to raise_error(Puppet::ParseError)
     46    end
     47
     48    it "should return nil if user allows empty metadata.json" do
     49      if Puppet::Util::Platform.windows?
     50        allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/')
     51        allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(false)
     52      else
     53        allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/')
     54        allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false)
     55      end
     56      result = subject.call(['science', true])
     57      expect(result).to eq({})
     58    end
     59    end
    2860  end
    2961end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/loadyaml_spec.rb

    rbcf0be5 rad28f83  
    33describe 'loadyaml' do
    44  it { is_expected.not_to eq(nil) }
    5   it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    6   it { is_expected.to run.with_params('', '').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
     5  it { is_expected.to run.with_params().and_raise_error(ArgumentError, /wrong number of arguments/i) }
     6
    77  context 'when a non-existing file is specified' do
    88    let(:filename) { '/tmp/doesnotexist' }
    … …  
    1111      YAML.expects(:load_file).never
    1212    }
    13     it { is_expected.to run.with_params(filename).and_return(nil) }
     13    it { is_expected.to run.with_params(filename, {'default' => 'value'}).and_return({'default' => 'value'}) }
     14    it { is_expected.to run.with_params(filename, {'đẽƒằưļŧ' => '٧ẵłựέ'}).and_return({'đẽƒằưļŧ' => '٧ẵłựέ'}) }
     15    it { is_expected.to run.with_params(filename, {'デフォルト' => '値'}).and_return({'デフォルト' => '値'}) }
    1416  end
     17
    1518  context 'when an existing file is specified' do
    1619    let(:filename) { '/tmp/doesexist' }
    17     let(:data) { { 'key' => 'value' } }
     20    let(:data) { { 'key' => 'value', 'ķęŷ' => 'νậŀųề', 'キー' => '値'} }
    1821    before {
    1922      File.expects(:exists?).with(filename).returns(true).once
    … …  
    2225    it { is_expected.to run.with_params(filename).and_return(data) }
    2326  end
     27
     28  context 'when the file could not be parsed' do
     29    let(:filename) { '/tmp/doesexist' }
     30    before {
     31      File.expects(:exists?).with(filename).returns(true).once
     32      YAML.stubs(:load_file).with(filename).once.raises StandardError, 'Something terrible have happened!'
     33    }
     34    it { is_expected.to run.with_params(filename, {'default' => 'value'}).and_return({'default' => 'value'}) }
     35  end
    2436end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/lstrip_spec.rb

    rbcf0be5 rad28f83  
    2323  it { is_expected.to run.with_params(' one ').and_return('one ') }
    2424  it { is_expected.to run.with_params('     one ').and_return('one ') }
     25  it { is_expected.to run.with_params('     ǿňè ').and_return('ǿňè ') }
    2526  it { is_expected.to run.with_params("\tone ").and_return('one ') }
    2627  it { is_expected.to run.with_params("\t one ").and_return('one ') }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/member_spec.rb

    rbcf0be5 rad28f83  
    1818  it { is_expected.to run.with_params(['one'], ['one']).and_return(true) }
    1919  it { is_expected.to run.with_params(['one', 'two', 'three', 'four'], ['four', 'two']).and_return(true) }
     20  it { is_expected.to run.with_params(['ọאּẹ', 'ŧẅồ', 'ţҺŗęē', 'ƒơџŕ'], ['ƒơџŕ', 'ŧẅồ']).and_return(true) }
    2021  it { is_expected.to run.with_params(['one', 'two', 'three', 'four'], ['four', 'five']).and_return(false) }
     22  it { is_expected.to run.with_params(['ọאּẹ', 'ŧẅồ', 'ţҺŗęē', 'ƒơџŕ'], ['ƒơџŕ', 'ƒί√ə']).and_return(false) }
    2123end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parsejson_spec.rb

    rbcf0be5 rad28f83  
    1313  context 'with correct JSON data' do
    1414
    15     it 'should be able to parse a JSON data with a Hash' do
     15    it 'should be able to parse JSON data with a Hash' do
    1616      is_expected.to run.with_params('{"a":"1","b":"2"}').
    1717                         and_return({'a'=>'1', 'b'=>'2'})
    1818    end
    1919
    20     it 'should be able to parse a JSON data with an Array' do
     20    it 'should be able to parse JSON data with an Array' do
    2121      is_expected.to run.with_params('["a","b","c"]').
    2222                         and_return(['a', 'b', 'c'])
    … …  
    3030    end
    3131
    32     it 'should be able to parse a JSON data with a mixed structure' do
     32    it 'should be able to parse JSON data with a mixed structure' do
    3333      is_expected.to run.with_params('{"a":"1","b":2,"c":{"d":[true,false]}}').
    3434                         and_return({'a' =>'1', 'b' => 2, 'c' => { 'd' => [true, false] } })
     35    end
     36
     37    it 'should be able to parse JSON data with a UTF8 and double byte characters' do
     38      is_expected.to run.with_params('{"×":"これ","ý":"記号","です":{"©":["Á","ß"]}}').
     39          and_return({'×' =>'これ', 'ý' => '記号', 'です' => { '©' => ['Á', 'ß'] } })
    3540    end
    3641
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parseyaml_spec.rb

    rbcf0be5 rad28f83  
    1919    end
    2020
    21     it 'should be able to parse a YAML data with a Hash' do
     21    it 'should be able to parse YAML data with a Hash' do
    2222      is_expected.to run.with_params("---\na: '1'\nb: '2'\n").
    2323                         and_return({'a' => '1', 'b' => '2'})
    2424    end
    2525
    26     it 'should be able to parse a YAML data with an Array' do
     26    it 'should be able to parse YAML data with an Array' do
    2727      is_expected.to run.with_params("---\n- a\n- b\n- c\n").
    2828                         and_return(['a', 'b', 'c'])
    2929    end
    3030
    31     it 'should be able to parse a YAML data with a mixed structure' do
     31    it 'should be able to parse YAML data with a mixed structure' do
    3232      is_expected.to run.with_params("---\na: '1'\nb: 2\nc:\n  d:\n  - :a\n  - true\n  - false\n").
    3333                         and_return({'a' => '1', 'b' => 2, 'c' => {'d' => [:a, true, false]}})
     34    end
     35
     36    it 'should be able to parse YAML data with a UTF8 and double byte characters' do
     37      is_expected.to run.with_params("---\na: ×\nこれ: 記号\nです:\n  ©:\n  - Á\n  - ß\n").
     38          and_return({"a"=>"×", "これ"=>"記号", "です"=>{"©"=>["Á", "ß"]} })
    3439    end
    3540
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/pick_default_spec.rb

    rbcf0be5 rad28f83  
    66
    77  it { is_expected.to run.with_params('one', 'two').and_return('one') }
     8  it { is_expected.to run.with_params('ớņệ', 'ťωơ').and_return('ớņệ') }
    89  it { is_expected.to run.with_params('', 'two').and_return('two') }
    910  it { is_expected.to run.with_params(:undef, 'two').and_return('two') }
    … …  
    1415    describe "when providing #{value.inspect} as default" do
    1516      it { is_expected.to run.with_params('one', value).and_return('one') }
     17      it { is_expected.to run.with_params('ớņệ', value).and_return('ớņệ') }
    1618      it { is_expected.to run.with_params([], value).and_return([]) }
    1719      it { is_expected.to run.with_params({}, value).and_return({}) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/pick_spec.rb

    rbcf0be5 rad28f83  
    1010  it { is_expected.to run.with_params(:undefined, 'two').and_return('two') }
    1111  it { is_expected.to run.with_params(nil, 'two').and_return('two') }
     12
     13  context 'should run with UTF8 and double byte characters' do
     14  it { is_expected.to run.with_params(nil, 'このテキスト').and_return('このテキスト') }
     15  it { is_expected.to run.with_params('', 'ŝẳмрłề џţƒ8 ţẽם', 'このテキスト').and_return('ŝẳмрłề џţƒ8 ţẽם') }
     16  end
    1217end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/prefix_spec.rb

    rbcf0be5 rad28f83  
    1212  it { is_expected.to run.with_params([]).and_return([]) }
    1313  it { is_expected.to run.with_params(['one', 2]).and_return(['one', '2']) }
     14  it { is_expected.to run.with_params(['ớņệ', 2]).and_return(['ớņệ', '2']) }
    1415  it { is_expected.to run.with_params([], '').and_return([]) }
    1516  it { is_expected.to run.with_params([''], '').and_return(['']) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/range_spec.rb

    rbcf0be5 rad28f83  
    8080  end
    8181
     82  context 'with prefixed numbers as utf8 strings as bounds' do
     83    it { is_expected.to run.with_params('ħөŝŧ01', 'ħөŝŧ04').and_return(['ħөŝŧ01', 'ħөŝŧ02', 'ħөŝŧ03', 'ħөŝŧ04']) }
     84  end
     85
     86  context 'with prefixed numbers as double byte character strings as bounds' do
     87    it { is_expected.to run.with_params('ホスト01', 'ホスト04').and_return(['ホスト01', 'ホスト02', 'ホスト03', 'ホスト04']) }
     88  end
     89
    8290  context 'with dash-range syntax' do
    8391    it { is_expected.to run.with_params('4-1').and_return([]) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reject_spec.rb

    rbcf0be5 rad28f83  
    1717  it { is_expected.to run.with_params(['one', 'two', 'three'], 'two').and_return(['one', 'three']) }
    1818  it { is_expected.to run.with_params(['one', 'two', 'three'], 't(wo|hree)').and_return(['one']) }
     19  it { is_expected.to run.with_params(['όʼnệ', 'ţщồ', 'ţңяέέ'], 'ţ(щồ|ңяέέ)').and_return(['όʼnệ']) }
    1920end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reverse_spec.rb

    rbcf0be5 rad28f83  
    1616  it { is_expected.to run.with_params(['one', 'two', 'three']).and_return(['three', 'two', 'one']) }
    1717  it { is_expected.to run.with_params(['one', 'two', 'three', 'four']).and_return(['four', 'three', 'two', 'one']) }
     18  it { is_expected.to run.with_params(['ổňë', 'ťŵọ', 'ŧңяəė', 'ƒŏůŗ']).and_return(['ƒŏůŗ', 'ŧңяəė', 'ťŵọ', 'ổňë']) }
    1819
    1920  it { is_expected.to run.with_params('').and_return('') }
    … …  
    2122  it { is_expected.to run.with_params('abc').and_return('cba') }
    2223  it { is_expected.to run.with_params('abcd').and_return('dcba') }
     24  it { is_expected.to run.with_params('āβćđ').and_return('đćβā') }
    2325
    2426  context 'when using a class extending String' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/rstrip_spec.rb

    rbcf0be5 rad28f83  
    2323  it { is_expected.to run.with_params(' one ').and_return(' one') }
    2424  it { is_expected.to run.with_params('     one ').and_return('     one') }
     25  it { is_expected.to run.with_params(' ǿňè    ').and_return(' ǿňè') }
    2526  it { is_expected.to run.with_params("\tone ").and_return("\tone") }
    2627  it { is_expected.to run.with_params("\t one ").and_return("\t one") }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/seeded_rand_spec.rb

    rbcf0be5 rad28f83  
    5151    scope.function_seeded_rand([max, seed])
    5252  end
     53
     54  context 'should run with UTF8 and double byte characters' do
     55    it { is_expected.to run.with_params(1000, 'ǿňè')}
     56    it { is_expected.to run.with_params(1000, '文字列')}
     57  end
    5358end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/shuffle_spec.rb

    rbcf0be5 rad28f83  
    2727    it { is_expected.to run.with_params('abcd').and_return('dcba') }
    2828
     29    context 'should run with UTF8 and double byte characters' do
     30      it { is_expected.to run.with_params('ůţƒ8 ŧέχŧ şŧґíńģ').and_return('ģńş ůχţέƒŧí8ґŧŧ ') }
     31      it { is_expected.to run.with_params('日本語の文字列').and_return('字本日語文列の') }
     32    end
     33
    2934    context 'when using a class extending String' do
    3035      it { is_expected.to run.with_params(AlsoString.new('asdfghjkl')).and_return('lkhdsfajg') }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/size_spec.rb

    rbcf0be5 rad28f83  
    2020  it { is_expected.to run.with_params({'1' => '2'}).and_return(1) }
    2121  it { is_expected.to run.with_params({'1' => '2', '4' => '4'}).and_return(2) }
     22  it { is_expected.to run.with_params({'€' => '@', '竹' => 'ǿňè'}).and_return(2) }
    2223
    2324  it { is_expected.to run.with_params('').and_return(0) }
    … …  
    2526  it { is_expected.to run.with_params('abc').and_return(3) }
    2627  it { is_expected.to run.with_params('abcd').and_return(4) }
     28  it { is_expected.to run.with_params('万').and_return(1) }
     29  it { is_expected.to run.with_params('āβćđ').and_return(4) }
    2730
    2831  context 'when using a class extending String' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/squeeze_spec.rb

    rbcf0be5 rad28f83  
    1515    it { is_expected.to run.with_params('aaaaaaaaa', 'a').and_return('a') }
    1616    it { is_expected.to run.with_params('aaaaaaaaabbbbbbbbbbcccccccccc', 'b-c').and_return('aaaaaaaaabc') }
     17  end
     18
     19  context 'should run with UTF8 and double byte characters' do
     20    it { is_expected.to run.with_params('ậậậậậậậậậậậậậậậậậậậậ').and_return('ậ') }
     21    it { is_expected.to run.with_params('語語語語語語語', '語').and_return('語') }
     22    it { is_expected.to run.with_params('ậậậậậậậậậậậậậậậậậ語語語語©©©©©', '©').and_return('ậậậậậậậậậậậậậậậậậ語語語語©') }
    1723  end
    1824
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/strip_spec.rb

    rbcf0be5 rad28f83  
    3131  it { is_expected.to run.with_params("\t one \t").and_return('one') }
    3232  it { is_expected.to run.with_params(' o n e ').and_return('o n e') }
     33  it { is_expected.to run.with_params('      ỏŋέ  ').and_return('ỏŋέ') }
    3334  it { is_expected.to run.with_params(AlsoString.new(' one ')).and_return('one') }
    3435end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/suffix_spec.rb

    rbcf0be5 rad28f83  
    1616  it { is_expected.to run.with_params(['one'], 'post').and_return(['onepost']) }
    1717  it { is_expected.to run.with_params(['one', 'two', 'three'], 'post').and_return(['onepost', 'twopost', 'threepost']) }
     18  it { is_expected.to run.with_params(['ỗńέ', 'ťשׂǿ', 'ŧҺř℮ə'], 'рổŝţ').and_return(['ỗńέрổŝţ', 'ťשׂǿрổŝţ', 'ŧҺř℮əрổŝţ']) }
     19
    1820  it {
    1921    is_expected.to run.with_params({}).and_return({})
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/union_spec.rb

    rbcf0be5 rad28f83  
    2121  it { is_expected.to run.with_params(['one', 'two'], ['two', 'three'], ['one', 'three']).and_return(['one', 'two', 'three']) }
    2222  it { is_expected.to run.with_params(['one', 'two'], ['three', 'four'], ['one', 'two', 'three'], ['four']).and_return(['one', 'two', 'three', 'four']) }
     23  it { is_expected.to run.with_params(['ốńə', 'ţשׂợ'], ['ŧĥяếệ', 'ƒởųŗ'], ['ốńə', 'ţשׂợ', 'ŧĥяếệ'], ['ƒởųŗ']).and_return(['ốńə', 'ţשׂợ', 'ŧĥяếệ', 'ƒởųŗ']) }
    2324  it 'should not confuse types' do is_expected.to run.with_params(['1', '2', '3'], [1, 2]).and_return(['1', '2', '3', 1, 2]) end
    2425end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/unique_spec.rb

    rbcf0be5 rad28f83  
    1818    it { is_expected.to run.with_params(['a']).and_return(['a']) }
    1919    it { is_expected.to run.with_params(['a', 'b', 'a']).and_return(['a', 'b']) }
     20    it { is_expected.to run.with_params(['ã', 'ъ', 'ã']).and_return(['ã', 'ъ']) }
    2021  end
    2122
    … …  
    2425    it { is_expected.to run.with_params('a').and_return('a') }
    2526    it { is_expected.to run.with_params('aaba').and_return('ab') }
     27    it { is_expected.to run.with_params('ããъã').and_return('ãъ') }
    2628  end
    2729end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_absolute_path_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_absolute_path' do
     4  after(:all) do
     5    ENV.delete('STDLIB_LOG_DEPRECATIONS')
     6  end
     7
     8  # Checking for deprecation warning
     9  it 'should display a single deprecation' do
     10    ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     11    scope.expects(:warning).with(includes('This method is deprecated'))
     12    is_expected.to run.with_params('c:/')
     13  end
     14
    415  describe 'signature validation' do
    516    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_array_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_array' do
     4
    45  describe 'signature validation' do
     6    after(:all) do
     7      ENV.delete('STDLIB_LOG_DEPRECATIONS')
     8    end
    59    it { is_expected.not_to eq(nil) }
     10    # Checking for deprecation warning
     11    it 'should display a single deprecation' do
     12      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     13      scope.expects(:warning).with(includes('This method is deprecated'))
     14      is_expected.to run.with_params([])
     15    end
    616    it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    717
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_bool_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_bool' do
     4  after(:all) do
     5    ENV.delete('STDLIB_LOG_DEPRECATIONS')
     6  end
     7
     8  # Checking for deprecation warning
     9  it 'should display a single deprecation' do
     10    ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     11    scope.expects(:warning).with(includes('This method is deprecated'))
     12    is_expected.to run.with_params(true)
     13  end
     14
    415  describe 'signature validation' do
    516    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_cmd_spec.rb

    rbcf0be5 rad28f83  
    11require 'spec_helper'
    22
    3 describe 'validate_cmd' do
     3describe 'validate_cmd', :unless => Puppet::Util::Platform.windows? do
    44  let(:touch) { File.exists?('/usr/bin/touch') ? '/usr/bin/touch' : '/bin/touch' }
    55
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_hash_spec.rb

    rbcf0be5 rad28f83  
    55    it { is_expected.not_to eq(nil) }
    66    it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
     7
     8    describe 'check for deprecation warning' do
     9      after(:all) do
     10        ENV.delete('STDLIB_LOG_DEPRECATIONS')
     11      end
     12      # Checking for deprecation warning
     13      it 'should display a single deprecation' do
     14        ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     15        scope.expects(:warning).with(includes('This method is deprecated'))
     16        is_expected.to run.with_params({'key' => 'value'})
     17      end
     18    end
    719
    820    describe 'valid inputs' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_integer_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_integer' do
     4  after(:all) do
     5    ENV.delete('STDLIB_LOG_DEPRECATIONS')
     6  end
     7
     8  # Checking for deprecation warning
     9  it 'should display a single deprecation' do
     10    ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     11    scope.expects(:warning).with(includes('This method is deprecated'))
     12    is_expected.to run.with_params(3)
     13  end
     14
    415  describe 'signature validation' do
    516    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ip_address_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_ip_address' do
     4
    45  describe 'signature validation' do
    56    it { is_expected.not_to eq(nil) }
    … …  
    2021    it { is_expected.to run.with_params('::1/64') }
    2122    it { is_expected.to run.with_params('fe80::a00:27ff:fe94:44d6/64') }
     23
     24    context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
     25      after(:all) do
     26        ENV.delete('STDLIB_LOG_DEPRECATIONS')
     27      end
     28      # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     29      it 'should display a single deprecation' do
     30        ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     31        scope.expects(:warning).with(includes('This method is deprecated'))
     32        is_expected.to run.with_params('1.2.3.4')
     33      end
     34      it 'should display no warning for deprecation' do
     35        ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     36        scope.expects(:warning).with(includes('This method is deprecated')).never
     37        is_expected.to run.with_params('1.2.3.4')
     38      end
     39    end
     40   
    2241    context 'with netmasks' do
    2342      it { is_expected.to run.with_params('8.8.8.8/0') }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_ipv4_address' do
     4
    45  describe 'signature validation' do
    56    it { is_expected.not_to eq(nil) }
    67    it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
     8  end
    79
    8     describe 'valid inputs' do
    9       it { is_expected.to run.with_params('0.0.0.0') }
    10       it { is_expected.to run.with_params('8.8.8.8') }
    11       it { is_expected.to run.with_params('127.0.0.1') }
    12       it { is_expected.to run.with_params('10.10.10.10') }
    13       it { is_expected.to run.with_params('194.232.104.150') }
    14       it { is_expected.to run.with_params('244.24.24.24') }
    15       it { is_expected.to run.with_params('255.255.255.255') }
    16       it { is_expected.to run.with_params('1.2.3.4', '5.6.7.8') }
    17       context 'with netmasks' do
    18         it { is_expected.to run.with_params('8.8.8.8/0') }
    19         it { is_expected.to run.with_params('8.8.8.8/16') }
    20         it { is_expected.to run.with_params('8.8.8.8/32') }
    21         it { is_expected.to run.with_params('8.8.8.8/255.255.0.0') }
    22       end
     10  context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
     11    after(:all) do
     12      ENV.delete('STDLIB_LOG_DEPRECATIONS')
    2313    end
     14    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     15    it 'should display a single deprecation' do
     16      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     17      scope.expects(:warning).with(includes('This method is deprecated'))
     18      is_expected.to run.with_params(SharedData::IPV4_PATTERNS.first)
     19    end
     20    it 'should display no warning for deprecation' do
     21      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     22      scope.expects(:warning).with(includes('This method is deprecated')).never
     23      is_expected.to run.with_params(SharedData::IPV4_PATTERNS.first)
     24    end
     25  end
    2426
    25     describe 'invalid inputs' do
    26       it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /is not a string/) }
    27       it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /is not a string/) }
    28       it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /is not a string/) }
    29       it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) }
    30       it { is_expected.to run.with_params('0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) }
    31       it { is_expected.to run.with_params('0.0.0.256').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) }
    32       it { is_expected.to run.with_params('0.0.0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) }
    33       it { is_expected.to run.with_params('affe::beef').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) }
    34       it { is_expected.to run.with_params('1.2.3.4', {}).and_raise_error(Puppet::ParseError, /is not a string/) }
    35       it { is_expected.to run.with_params('1.2.3.4', 1).and_raise_error(Puppet::ParseError, /is not a string/) }
    36       it { is_expected.to run.with_params('1.2.3.4', true).and_raise_error(Puppet::ParseError, /is not a string/) }
    37       it { is_expected.to run.with_params('1.2.3.4', 'one').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) }
     27  SharedData::IPV4_PATTERNS.each do |value|
     28    it { is_expected.to run.with_params(value) }
     29  end
     30
     31  SharedData::IPV4_NEGATIVE_PATTERNS.each do |value|
     32    it { is_expected.to run.with_params(value).and_raise_error(Puppet::ParseError, /is not a valid IPv4/) }
     33  end
     34
     35  describe 'invalid inputs' do
     36    [ {}, [], 1, true ].each do |invalid|
     37      it { is_expected.to run.with_params(invalid).and_raise_error(Puppet::ParseError, /is not a string/) }
     38      it { is_expected.to run.with_params(SharedData::IPV4_PATTERNS.first, invalid).and_raise_error(Puppet::ParseError, /is not a string/) }
    3839    end
    3940  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_ipv6_address' do
     4 
    45  describe 'signature validation' do
    56    it { is_expected.not_to eq(nil) }
    67    it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
     8  end
    79
    8     describe 'valid inputs' do
    9       it { is_expected.to run.with_params('3ffe:0505:0002::') }
    10       it { is_expected.to run.with_params('3ffe:0505:0002::', '3ffe:0505:0002::2') }
    11       it { is_expected.to run.with_params('::1/64') }
    12       it { is_expected.to run.with_params('fe80::a00:27ff:fe94:44d6/64') }
     10  context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
     11    after(:all) do
     12      ENV.delete('STDLIB_LOG_DEPRECATIONS')
    1313    end
     14    # Checking for deprecation warning, which should only be provoked when the env variable for it is set.
     15    it 'should display a single deprecation' do
     16      ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     17      scope.expects(:warning).with(includes('This method is deprecated'))
     18      is_expected.to run.with_params('3ffe:0505:0002::')
     19    end
     20    it 'should display no warning for deprecation' do
     21      ENV['STDLIB_LOG_DEPRECATIONS'] = "false"
     22      scope.expects(:warning).with(includes('This method is deprecated')).never
     23      is_expected.to run.with_params('3ffe:0505:0002::')
     24    end
     25  end
    1426
    15     describe 'invalid inputs' do
    16       it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /is not a string/) }
    17       it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /is not a string/) }
    18       it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
    19       it { is_expected.to run.with_params('0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
    20       it { is_expected.to run.with_params('0.0.0.256').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
    21       it { is_expected.to run.with_params('0.0.0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
    22       it { is_expected.to run.with_params('affe:beef').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
    23       it { is_expected.to run.with_params('::1', {}).and_raise_error(Puppet::ParseError, /is not a string/) }
    24       it { is_expected.to run.with_params('::1', true).and_raise_error(Puppet::ParseError, /is not a string/) }
    25       it { is_expected.to run.with_params('::1', 'one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
    26       context 'unless running on ruby 1.8.7', :if => RUBY_VERSION != '1.8.7' do
    27         it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /is not a string/) }
    28         it { is_expected.to run.with_params('::1', 1).and_raise_error(Puppet::ParseError, /is not a string/) }
    29       end
     27  describe 'valid inputs' do
     28    it { is_expected.to run.with_params('3ffe:0505:0002::') }
     29    it { is_expected.to run.with_params('3ffe:0505:0002::', '3ffe:0505:0002::2') }
     30    it { is_expected.to run.with_params('::1/64') }
     31    it { is_expected.to run.with_params('fe80::a00:27ff:fe94:44d6/64') }
     32    it { is_expected.to run.with_params('fe80:0000:0000:0000:0204:61ff:fe9d:f156') }
     33    it { is_expected.to run.with_params('fe80:0:0:0:204:61ff:fe9d:f156') }
     34    it { is_expected.to run.with_params('fe80::204:61ff:fe9d:f156') }
     35    it { is_expected.to run.with_params('fe80:0:0:0:0204:61ff:254.157.241.86') }
     36    it { is_expected.to run.with_params('::1') }
     37    it { is_expected.to run.with_params('fe80::') }
     38    it { is_expected.to run.with_params('2001::') }
     39  end
     40
     41  describe 'invalid inputs' do
     42    it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /is not a string/) }
     43    it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /is not a string/) }
     44    it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     45    it { is_expected.to run.with_params('0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     46    it { is_expected.to run.with_params('0.0.0.256').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     47    it { is_expected.to run.with_params('0.0.0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     48    it { is_expected.to run.with_params('::ffff:2.3.4').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     49    it { is_expected.to run.with_params('::ffff:257.1.2.3').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     50    it { is_expected.to run.with_params('::ffff:12345678901234567890.1.26').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     51    it { is_expected.to run.with_params('affe:beef').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     52    it { is_expected.to run.with_params('::1', {}).and_raise_error(Puppet::ParseError, /is not a string/) }
     53    it { is_expected.to run.with_params('::1', true).and_raise_error(Puppet::ParseError, /is not a string/) }
     54    it { is_expected.to run.with_params('::1', 'one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) }
     55    context 'unless running on ruby 1.8.7', :if => RUBY_VERSION != '1.8.7' do
     56      it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /is not a string/) }
     57      it { is_expected.to run.with_params('::1', 1).and_raise_error(Puppet::ParseError, /is not a string/) }
    3058    end
    3159  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_numeric_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_numeric' do
     4  after(:all) do
     5    ENV.delete('STDLIB_LOG_DEPRECATIONS')
     6  end
     7 
     8  # Checking for deprecation warning
     9  it 'should display a single deprecation' do
     10    ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     11    scope.expects(:warning).with(includes('This method is deprecated'))
     12    is_expected.to run.with_params(3)
     13  end
     14
    415  describe 'signature validation' do
    516    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_re_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_re' do
     4  after(:all) do
     5    ENV.delete('STDLIB_LOG_DEPRECATIONS')
     6  end
     7
     8  # Checking for deprecation warning
     9  it 'should display a single deprecation' do
     10    ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     11    scope.expects(:warning).with(includes('This method is deprecated'))
     12    is_expected.to run.with_params('', '')
     13  end
     14
    415  describe 'signature validation' do
    516    it { is_expected.not_to eq(nil) }
    … …  
    1829
    1930    describe 'invalid inputs' do
    20       it {
    21         pending('should implement stricter type checking')
    22         is_expected.to run.with_params([], '').and_raise_error(Puppet::ParseError, /is not a String/)
    23       }
    24       it {
    25         pending('should implement stricter type checking')
    26         is_expected.to run.with_params('', {}).and_raise_error(Puppet::ParseError, /is not an Array/)
    27       }
    28       it {
    29         pending('should implement stricter type checking')
    30         is_expected.to run.with_params('', '', []).and_raise_error(Puppet::ParseError, /is not a String/)
    31       }
    32       it {
    33         pending('should implement stricter type checking')
    34         is_expected.to run.with_params(nil, nil).and_raise_error(Puppet::ParseError, /is not a String/)
    35       }
    3631      it { is_expected.to run.with_params('', []).and_raise_error(Puppet::ParseError, /does not match/) }
    3732      it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, /does not match/) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_slength_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_slength' do
     4  after(:all) do
     5    ENV.delete('STDLIB_LOG_DEPRECATIONS')
     6  end
     7
     8  # Checking for deprecation warning
     9  it 'should display a single deprecation' do
     10    ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     11    scope.expects(:warning).with(includes('This method is deprecated'))
     12    is_expected.to run.with_params('1234567890', 10)
     13  end
     14 
    415  describe 'signature validation' do
    516    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_string_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'validate_string' do
     4  after(:all) do
     5    ENV.delete('STDLIB_LOG_DEPRECATIONS')
     6  end
     7 
     8  # Checking for deprecation warning
     9  it 'should display a single deprecation' do
     10    ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
     11    scope.expects(:warning).with(includes('This method is deprecated'))
     12    is_expected.to run.with_params('', '')
     13  end
     14
    415  describe 'signature validation' do
    516    it { is_expected.not_to eq(nil) }
    … …  
    819    describe 'valid inputs' do
    920      it { is_expected.to run.with_params('') }
     21      it { is_expected.to run.with_params(nil) }
    1022      it { is_expected.to run.with_params('one') }
    1123      it { is_expected.to run.with_params('one', 'two') }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/values_at_spec.rb

    rbcf0be5 rad28f83  
    3131  end
    3232
     33  context 'when requesting a single item using UTF8 and double byte characters' do
     34    it { is_expected.to run.with_params(['ẩ', 'β', 'с', 'ď'], 0).and_return(['ẩ']) }
     35    it { is_expected.to run.with_params(['文', '字', 'の', '値'], 2).and_return(['の']) }
     36  end
     37
    3338  context 'when requesting multiple items' do
    3439    it { is_expected.to run.with_params([0, 1, 2], [1, -1]).and_raise_error(Puppet::ParseError, /Unknown format of given index/) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/values_spec.rb

    rbcf0be5 rad28f83  
    1717    expect(result).to match_array(['value1', 'value2', 'value2'])
    1818  end
     19
     20  it 'should run with UTF8 and double byte characters' do
     21    result = subject.call([{ 'かぎ' => '使用', 'ҝĕұ' => '√ẩŀứệ', 'ҝĕұďŭрļǐçằťè' => '√ẩŀứệ' }])
     22    expect(result).to match_array(['使用', '√ẩŀứệ', '√ẩŀứệ'])
     23  end
    1924end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/zip_spec.rb

    rbcf0be5 rad28f83  
    1313  it { is_expected.to run.with_params([1,2,3], [4,5,6], false).and_return([[1,4], [2,5], [3,6]]) }
    1414  it { is_expected.to run.with_params([1,2,3], [4,5,6], true).and_return([1, 4, 2, 5, 3, 6]) }
     15
     16  context 'should run with UTF8 and double byte characters' do
     17   it { is_expected.to run.with_params(['ầ', 'ь', 'ć'], ['đ', 'ề', 'ƒ']).and_return([['ầ','đ'], ['ь','ề'], ['ć', 'ƒ']]) }
     18   it { is_expected.to run.with_params(['ペ', '含', '値'], ['ッ', '文', 'イ']).and_return([['ペ','ッ'], ['含','文'], ['値', 'イ']]) }
     19  end
    1520end
     21
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper_acceptance.rb

    rbcf0be5 rad28f83  
    11#! /usr/bin/env ruby -S rspec
     2require 'puppet'
    23require 'beaker-rspec'
    34require 'beaker/puppet_install_helper'
    4 
    5 UNSUPPORTED_PLATFORMS = []
     5require 'beaker/module_install_helper'
    66
    77run_puppet_install_helper
     8install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ /pe/i
     9install_module_on(hosts)
     10install_module_dependencies_on(hosts)
    811
    912RSpec.configure do |c|
    10   # Project root
    11   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
    12 
    1313  # Readable test descriptions
    1414  c.formatter = :documentation
    … …  
    1616  # Configure all nodes in nodeset
    1717  c.before :suite do
    18     if ENV['FUTURE_PARSER'] == 'yes'
    19       default[:default_apply_opts] ||= {}
    20       default[:default_apply_opts].merge!({:parser => 'future'})
    21     end
    22 
    23     copy_root_module_to(default, :source => proj_root, :module_name => 'stdlib')
    2418  end
    25 end
    26 
    27 def is_future_parser_enabled?
    28   if default[:type] == 'aio'
    29     return true
    30   elsif default[:default_apply_opts]
    31     return default[:default_apply_opts][:parser] == 'future'
    32   end
    33   return false
    3419end
    3520
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper_local.rb

    rbcf0be5 rad28f83  
     1# automatically load any shared examples or contexts
     2Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
    13
    24# hack to enable all the expect syntax (like allow_any_instance_of) in rspec-puppet examples
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb

    rbcf0be5 rad28f83  
    364364    end
    365365
     366    it 'should find a line to match' do
     367      File.open(@tmpfile, 'w') do |fh|
     368        fh.write("foo1\nfoo\nfoo2")
     369      end
     370      expect(@provider.exists?).to be_truthy
     371    end
     372
    366373    it 'should remove one line if it matches' do
    367374      File.open(@tmpfile, 'w') do |fh|
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb

    rbcf0be5 rad28f83  
    33require 'tempfile'
    44describe Puppet::Type.type(:file_line) do
     5  let :tmp_path do
     6    if Puppet::Util::Platform.windows?
     7      'C:\tmp\path'
     8    else
     9      '/tmp/path'
     10    end
     11  end
     12  let :my_path do
     13    if Puppet::Util::Platform.windows?
     14      'C:\my\path'
     15    else
     16      '/my/path'
     17    end
     18  end
    519  let :file_line do
    6     Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => '/tmp/path')
     20    Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => tmp_path)
    721  end
    822  it 'should accept a line and path' do
    923    file_line[:line] = 'my_line'
    1024    expect(file_line[:line]).to eq('my_line')
    11     file_line[:path] = '/my/path'
    12     expect(file_line[:path]).to eq('/my/path')
     25    file_line[:path] = my_path
     26    expect(file_line[:path]).to eq(my_path)
    1327  end
    1428  it 'should accept a match regex' do
    … …  
    2034      Puppet::Type.type(:file_line).new(
    2135          :name   => 'foo',
    22           :path   => '/my/path',
     36          :path   => my_path,
    2337          :line   => 'foo=bar',
    2438          :match  => '^bar=blah$'
    … …  
    2943      Puppet::Type.type(:file_line).new(
    3044          :name   => 'foo',
    31           :path   => '/my/path',
     45          :path   => my_path,
    3246          :line   => 'foo=bar',
    3347          :match  => '^\s*foo=.*$'
    3448      )}.not_to raise_error
    3549  end
     50  it 'should accept utf8 characters' do
     51    expect {
     52      Puppet::Type.type(:file_line).new(
     53          :name   => 'ƒồỗ',
     54          :path   => my_path,
     55          :line   => 'ƒồỗ=ьåя',
     56          :match  => '^ьåя=βļάħ$'
     57      )}.not_to raise_error
     58  end
     59  it 'should accept double byte characters' do
     60    expect {
     61      Puppet::Type.type(:file_line).new(
     62          :name   => 'フーバー',
     63          :path   => my_path,
     64          :line   => 'この=それ',
     65          :match  => '^この=ああ$'
     66      )}.not_to raise_error
     67  end
    3668  it 'should accept posix filenames' do
    37     file_line[:path] = '/tmp/path'
    38     expect(file_line[:path]).to eq('/tmp/path')
     69    file_line[:path] = tmp_path
     70    expect(file_line[:path]).to eq(tmp_path)
    3971  end
    4072  it 'should not accept unqualified path' do
    … …  
    4274  end
    4375  it 'should require that a line is specified' do
    44     expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => '/tmp/file') }.to raise_error(Puppet::Error, /line is a required attribute/)
     76    expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path) }.to raise_error(Puppet::Error, /line is a required attribute/)
    4577  end
    4678  it 'should not require that a line is specified when matching for absence' do
    47     expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => '/tmp/file', :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error
     79    expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error
    4880  end
    4981  it 'should require that a file is specified' do
    … …  
    5688    expect(file_line[:replace]).to eq :true
    5789  end
    58 
     90  it 'should default to encoding => UTF-8' do
     91    expect(file_line[:encoding]).to eq 'UTF-8'
     92  end
     93  it 'should accept encoding => iso-8859-1' do
     94    expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :ensure => :present, :encoding => 'iso-8859-1', :line => 'bar') }.not_to raise_error
     95  end
    5996  it "should autorequire the file it manages" do
    6097    catalog = Puppet::Resource::Catalog.new
    61     file = Puppet::Type.type(:file).new(:name => "/tmp/path")
     98    file = Puppet::Type.type(:file).new(:name => tmp_path)
    6299    catalog.add_resource file
    63100    catalog.add_resource file_line
    64101
    65102    relationship = file_line.autorequire.find do |rel|
    66       (rel.source.to_s == "File[/tmp/path]") and (rel.target.to_s == file_line.to_s)
     103      (rel.source.to_s == "File[#{tmp_path}]") and (rel.target.to_s == file_line.to_s)
    67104    end
    68105    expect(relationship).to be_a Puppet::Relationship
Note: See TracChangeset for help on using the changeset viewer.