Changes in / [ad28f83:bcf0be5]


Ignore:
Files:
36 added
148 deleted
343 edited

Legend:

Unmodified
Added
Removed
  • debian/changelog

    rad28f83 rbcf0be5  
    1 gnuboat (0.4.5) jessie; urgency=low
    2 
    3   * Added chrony as time server sourcing gpsd
    4 
    5  -- EngSaS - Joachim Langenbach <info@engsas.de>  Tue, 01 Aug 2017 15:45:00 +0200
    61gnuboat (0.4.4) jessie; urgency=low
    72
  • src/puppetcode/environments/gnuboat/hieradata/common.yaml

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

    rad28f83 rbcf0be5  
    1 ## Supported Release 4.1.0
    2 ### Summary
    3 
    4 This 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 
    18 This 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 
    20 If 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 
    22 If 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 
    24 Changes
    25 
    26 Data 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.
    27 EPP templating: Uses the Puppet language as a base for templates to create simpler and safer templates. No need for Ruby anymore!
    28 The $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.
    29 Data 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
    33 A 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
    52 A 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 
    731##Supported Release 2.2.2
    742###Summary
    753
    76 Several bug fixes and the addition of support updates to Debian 8 and Ubuntu Wily.
     4Several bug fixes and the addition of support updates to Debian 8 and Ubunto Wily.
    775
    786####Bugfixes
    797- Small fixes to descriptions within the readme and the addition of some examples.
    80 - Updates to run on Ubuntu Wily.
     8- Updates to run on Ubunto Wily.
    819- Fixed apt_key tempfile race condition.
    8210- Run stages limitation added to the documentation.
  • src/puppetcode/environments/gnuboat/modules/apt/CONTRIBUTING.md

    rad28f83 rbcf0be5  
    4444      - Make sure you have a [GitHub account](https://github.com/join)
    4545
    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.
     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.
    4747
    4848    * Preferred method:
    … …  
    209209====================
    210210
    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)
     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)
    214216
    215217* [General GitHub documentation](http://help.github.com/)
    216218
    217219* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
     220
  • src/puppetcode/environments/gnuboat/modules/apt/Gemfile

    rad28f83 rbcf0be5  
    33source ENV['GEM_SOURCE'] || "https://rubygems.org"
    44
    5 # Determines what type of gem is requested based on place_or_version.
    6 def gem_type(place_or_version)
    7   if place_or_version =~ /^git:/
    8     :git
    9   elsif place_or_version =~ /^file:/
    10     :file
     5def 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}]
    1110  else
    12     :gem
     11    [place, version, { :require => false}].compact
    1312  end
    1413end
    1514
    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`.
    20 def 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
     15group :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
     23end
     24group :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'])
    2831end
    2932
    30 # Used for gem conditionals
    31 supports_windows = false
    32 ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
    33 minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
    34 
    35 group :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')
    43 end
    44 
    45 group :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')       
    53 end
    54 
     33gem 'facter', *location_for(ENV['FACTER_GEM_VERSION'])
    5534gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
    5635
    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.
    61 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
    62 gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
    6336
    64 
    65 # Evaluate Gemfile.local if it exists
    6637if File.exists? "#{__FILE__}.local"
    6738  eval(File.read("#{__FILE__}.local"), binding)
    6839end
    69 
    70 # Evaluate ~/.gemfile if it exists
    71 if File.exists?(File.join(Dir.home, '.gemfile'))
    72   eval(File.read(File.join(Dir.home, '.gemfile')), binding)
    73 end
    74 
    75 # vim:ft=ruby
  • src/puppetcode/environments/gnuboat/modules/apt/NOTICE

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

    rad28f83 rbcf0be5  
    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` defined type:
     61Declare the `apt::key` class:
    6262
    6363```puppet
    6464apt::key { 'puppetlabs':
    65   id      => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
     65  id      => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
    6666  server  => 'pgp.mit.edu',
    6767  options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',
    … …  
    148148  repos    => 'main',
    149149  key      => {
    150     'id'     => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
     150    'id'     => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
    151151    'server' => 'pgp.mit.edu',
    152152  },
    153 }
     153},
    154154```
    155155
    … …  
    179179    repos: 'main'
    180180    key:
    181       id: '6F6B15509CF8E59E6E469F327F438280EF8D349F'
     181      id: '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
    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 
    265263* `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: {}.
    266264
    … …  
    423421
    424422  * Lucid and Precise: 'python-software-properties'
    425   * Trusty and newer: 'software-properties-common'
    426   * All others: 'python-software-properties'
     423  * Trusty, Utopic, and Vivid: 'software-properties-common'
     424  * All others: undef
    427425
    428426* `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".
    429427
    430 #### Defined Type: `apt::setting`
     428#### Defined Type: `apt:setting`
    431429
    432430Manages Apt configuration files.
    … …  
    487485
    488486* `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'.
    491487
    492488#### Type: `apt_key`
  • src/puppetcode/environments/gnuboat/modules/apt/Rakefile

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

    rad28f83 rbcf0be5  
    11{
    2   "CHANGELOG.md": "a91cd94a75b1abd4b28b3ff089d81c60",
    3   "CONTRIBUTING.md": "77d0440d7cd4206497f99065c60bed46",
    4   "Gemfile": "bedf635025b279d7c7732adcc8ae9a29",
     2  "CHANGELOG.md": "6a1e5e7a7b25137bab30512b425c0634",
     3  "CONTRIBUTING.md": "ad65d271f183b5adb9fdd58207939f5f",
     4  "Gemfile": "a5493d10f1c1fec87972b13a9fe1afcf",
    55  "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57",
    6   "MAINTAINERS.md": "35674b233c6d12c0f56ee8afbdae29e4",
    7   "NOTICE": "9533d13591355591f69619be28e9cfce",
    8   "README.md": "06945ba980070be5f9e9b755fcfa4d8b",
    9   "Rakefile": "3851f083966b9bbd6d46e50dba5aa52a",
    10   "examples/backports.pp": "af57ea62ed1b73f540858e00327e6517",
     6  "NOTICE": "f0fd8d07c4a816a2655400c7403db877",
     7  "README.md": "f27f862d74944cbd90d6e9e310602eaa",
     8  "Rakefile": "ab91824042ec3fd085a41cab7e0e90d4",
     9  "examples/backports.pp": "17882e4b05751cd28069dcc72705e470",
    1110  "examples/builddep.pp": "eddb8b7d7c0ef7383d85a74c1cd0de3f",
    1211  "examples/debian_testing.pp": "2e50a41180e2afeac2de15ade05ddaa1",
    … …  
    1615  "examples/force.pp": "f71857eba704a0eb3d8d6b146e80da6d",
    1716  "examples/hold.pp": "5e58e0a30d6407a05691d96c7647ae14",
    18   "examples/key.pp": "d85507365bd2753e14e04c344c2f7703",
     17  "examples/key.pp": "d1d63e76f1ca8a004dbeac9261c9045a",
    1918  "examples/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab",
    2019  "examples/ppa.pp": "b902cce8159128b5e8b21bed540743ff",
    2120  "examples/release.pp": "2bc960babf8c4dd24b7ffa4220a601f8",
    22   "examples/source.pp": "c79817e129305f86a495f7558de3d3ec",
     21  "examples/source.pp": "2f402ae0218fdf070d5388a66e85f82f",
    2322  "examples/unattended_upgrades.pp": "e7a797388ef03077f110f4f268f5ecd1",
    2423  "lib/facter/apt_reboot_required.rb": "7c3fc46f254fc4b4579d011578caaadb",
    2524  "lib/facter/apt_update_last_success.rb": "2926ff059cd2f63a2a7824ba898837f9",
    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",
     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",
    2928  "lib/puppet_x/apt_key/patch_openuri.rb": "951bad007a3b5db035be069c1d1c9c09",
    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",
     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",
    6265  "spec/spec_helper.rb": "b2db3bc02b4ac2fd5142a6621c641b07",
    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",
     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",
    6669  "spec/unit/facter/apt_reboot_required_spec.rb": "9d58cb2aeaed624f7c4ca118ec1b6410",
    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"
     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"
    7781}
  • src/puppetcode/environments/gnuboat/modules/apt/examples/backports.pp

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

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

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

    rad28f83 rbcf0be5  
    22Facter.add("apt_has_updates") do
    33  confine :osfamily => 'Debian'
    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
     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(';')
    248    end
    259  end
    … …  
    2711  setcode do
    2812    if not apt_package_updates.nil? and apt_package_updates.length == 2
    29       apt_package_updates != [[], []]
     13      apt_package_updates != ['0', '0']
    3014    end
    3115  end
    … …  
    3519  confine :apt_has_updates => true
    3620  setcode do
     21    packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>&1').split("\n")
    3722    if Facter.version < '2.0.0'
    38       apt_package_updates[0].join(',')
     23      packages.join(',')
    3924    else
    40       apt_package_updates[0]
     25      packages
    4126    end
    4227  end
    … …  
    4631  confine :apt_has_updates => true
    4732  setcode do
    48     Integer(apt_package_updates[0].length)
     33    Integer(apt_package_updates[0])
    4934  end
    5035end
    … …  
    5338  confine :apt_has_updates => true
    5439  setcode do
    55     Integer(apt_package_updates[1].length)
     40    Integer(apt_package_updates[1])
    5641  end
    5742end
  • src/puppetcode/environments/gnuboat/modules/apt/lib/puppet/provider/apt_key/apt_key.rb

    rad28f83 rbcf0be5  
    128128    else
    129129      begin
    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
     130        key = parsedValue.read
    139131      rescue OpenURI::HTTPError, Net::FTPPermError => e
    140132        fail("#{e.message} for #{resource[:source]}")
  • src/puppetcode/environments/gnuboat/modules/apt/lib/puppet/type/apt_key.rb

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

    rad28f83 rbcf0be5  
    11class apt::backports (
    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,
     2  $location = undef,
     3  $release  = undef,
     4  $repos    = undef,
     5  $key      = undef,
     6  $pin      = 200,
    77){
    88  if $location {
     9    validate_string($location)
    910    $_location = $location
    1011  }
    1112  if $release {
     13    validate_string($release)
    1214    $_release = $release
    1315  }
    1416  if $repos {
     17    validate_string($repos)
    1518    $_repos = $repos
    1619  }
    1720  if $key {
     21    unless is_hash($key) {
     22      validate_string($key)
     23    }
    1824    $_key = $key
    1925  }
    20   if ($facts['lsbdistid'] == 'Debian' or $facts['lsbdistid'] == 'Ubuntu') {
     26  if ($::apt::xfacts['lsbdistid'] == 'debian' or $::apt::xfacts['lsbdistid'] == 'ubuntu') {
    2127    unless $location {
    2228      $_location = $::apt::backports['location']
    2329    }
    2430    unless $release {
    25       $_release = "${facts['lsbdistcodename']}-backports"
     31      $_release = "${::apt::xfacts['lsbdistcodename']}-backports"
    2632    }
    2733    unless $repos {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/conf.pp

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

    rad28f83 rbcf0be5  
    1 # == Class: apt
    21#
    3 # Manage APT (Advanced Packaging Tool)
    4 #
    5 class 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   }
     2class apt(
     3  $update   = {},
     4  $purge    = {},
     5  $proxy    = {},
     6  $sources  = {},
     7  $keys     = {},
     8  $ppas     = {},
     9  $pins     = {},
     10  $settings = {},
     11) inherits ::apt::params {
    3712
    3813  $frequency_options = ['always','daily','weekly','reluctantly']
    39 
     14  validate_hash($update)
    4015  if $update['frequency'] {
    4116    validate_re($update['frequency'], $frequency_options)
    4217  }
    4318  if $update['timeout'] {
    44     assert_type(Integer, $update['timeout'])
     19    unless is_integer($update['timeout']) {
     20      fail('timeout value for update must be an integer')
     21    }
    4522  }
    4623  if $update['tries'] {
    47     assert_type(Integer, $update['tries'])
     24    unless is_integer($update['tries']) {
     25      fail('tries value for update must be an integer')
     26    }
    4827  }
    4928
    … …  
    5130  include ::apt::update
    5231
     32  validate_hash($purge)
    5333  if $purge['sources.list'] {
    54     assert_type(Boolean, $purge['sources.list'])
     34    validate_bool($purge['sources.list'])
    5535  }
    5636  if $purge['sources.list.d'] {
    57     assert_type(Boolean, $purge['sources.list.d'])
     37    validate_bool($purge['sources.list.d'])
    5838  }
    5939  if $purge['preferences'] {
    60     assert_type(Boolean, $purge['preferences'])
     40    validate_bool($purge['preferences'])
    6141  }
    6242  if $purge['preferences.d'] {
    63     assert_type(Boolean, $purge['preferences.d'])
     43    validate_bool($purge['preferences.d'])
    6444  }
    6545
    6646  $_purge = merge($::apt::purge_defaults, $purge)
    6747
     48  validate_hash($proxy)
    6849  if $proxy['ensure'] {
    6950    validate_re($proxy['ensure'], ['file', 'present', 'absent'])
    7051  }
    7152  if $proxy['host'] {
    72     assert_type(String, $proxy['host'])
     53    validate_string($proxy['host'])
    7354  }
    7455  if $proxy['port'] {
    75     assert_type(Integer, $proxy['port'])
     56    unless is_integer($proxy['port']) {
     57      fail('$proxy port must be an integer')
     58    }
    7659  }
    77   if $proxy['https']{
    78     assert_type(Boolean, $proxy['https'])
     60  if $proxy['https'] {
     61    validate_bool($proxy['https'])
    7962  }
    8063
    8164  $_proxy = merge($apt::proxy_defaults, $proxy)
    8265
    83   $confheadertmp = epp('apt/_conf_header.epp')
    84   $proxytmp = epp('apt/proxy.epp', {'proxies' => $_proxy})
    85   $updatestamptmp = epp('apt/15update-stamp.epp')
     66  validate_hash($sources)
     67  validate_hash($keys)
     68  validate_hash($settings)
     69  validate_hash($ppas)
     70  validate_hash($pins)
    8671
    8772  if $_proxy['ensure'] == 'absent' or $_proxy['host'] {
    … …  
    8974      ensure   => $_proxy['ensure'],
    9075      priority => '01',
    91       content  => "${confheadertmp}${proxytmp}",
     76      content  => template('apt/_conf_header.erb', 'apt/proxy.erb'),
    9277    }
    9378  }
    … …  
    11196  apt::setting { 'conf-update-stamp':
    11297    priority => 15,
    113     content  => "${confheadertmp}${updatestamptmp}",
     98    content  => template('apt/_conf_header.erb', 'apt/15update-stamp.erb'),
    11499  }
    115100
    … …  
    155140  }
    156141
    157   if $confs {
    158     create_resources('apt::conf', $confs)
    159   }
    160142  # manage sources if present
    161143  if $sources {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/key.pp

    rad28f83 rbcf0be5  
    11# == Define: apt::key
    22define apt::key (
    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     ) {
     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) {
    1015
    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+'])
     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
    1521  }
    1622
    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})?$'])
     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)
    1968  }
    2069
    2170  case $ensure {
    2271    present: {
    23       if defined(Anchor["apt_key ${id} absent"]){
    24         fail("key with id ${id} already ensured as absent")
     72      if defined(Anchor["apt_key ${_id} absent"]){
     73        fail("key with id ${_id} already ensured as absent")
    2574      }
    2675
    27       if !defined(Anchor["apt_key ${id} present"]) {
     76      if !defined(Anchor["apt_key ${_id} present"]) {
    2877        apt_key { $title:
    2978          ensure  => $ensure,
    30           id      => $id,
    31           source  => $source,
    32           content => $content,
    33           server  => $server,
    34           options => $options,
    35         } -> anchor { "apt_key ${id} present": }
     79          id      => $_id,
     80          source  => $_source,
     81          content => $_content,
     82          server  => $_server,
     83          options => $_options,
     84        } ->
     85        anchor { "apt_key ${_id} present": }
    3686      }
    3787    }
    3888
    3989    absent: {
    40       if defined(Anchor["apt_key ${id} present"]){
    41         fail("key with id ${id} already ensured as present")
     90      if defined(Anchor["apt_key ${_id} present"]){
     91        fail("key with id ${_id} already ensured as present")
    4292      }
    4393
    44       if !defined(Anchor["apt_key ${id} absent"]){
     94      if !defined(Anchor["apt_key ${_id} absent"]){
    4595        apt_key { $title:
    4696          ensure  => $ensure,
    47           id      => $id,
    48           source  => $source,
    49           content => $content,
    50           server  => $server,
    51           options => $options,
    52         } -> anchor { "apt_key ${id} absent": }
     97          id      => $_id,
     98          source  => $_source,
     99          content => $_content,
     100          server  => $_server,
     101          options => $_options,
     102        } ->
     103        anchor { "apt_key ${_id} absent": }
    53104      }
    54105    }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/params.pp

    rad28f83 rbcf0be5  
    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    }
    546  }
    647
    … …  
    1354  $preferences_d  = "${root}/preferences.d"
    1455  $keyserver      = 'keyserver.ubuntu.com'
    15   $confs          = {}
    16   $update         = {}
    17   $purge          = {}
    18   $proxy          = {}
    19   $sources        = {}
    20   $keys           = {}
    21   $ppas           = {}
    22   $pins           = {}
    23   $settings       = {}
    2456
    2557  $config_files = {
    … …  
    70102  }
    71103
    72   case $facts['os']['name']{
    73     'Debian': {
    74       case $facts['os']['release']['full'] {
    75         '6.0': {
     104  case $xfacts['lsbdistid'] {
     105    'debian': {
     106      case $xfacts['lsbdistcodename'] {
     107        'squeeze': {
    76108          $backports = {
    77109            'location' => 'http://httpredir.debian.org/debian-backports',
    … …  
    93125
    94126    }
    95     'Ubuntu': {
     127    'ubuntu': {
    96128      $backports = {
    97129        'location' => 'http://archive.ubuntu.com/ubuntu',
    … …  
    100132      }
    101133
    102       case $facts['os']['release']['full'] {
    103         '10.04': {
     134      case $xfacts['lsbdistcodename'] {
     135        'lucid': {
    104136          $ppa_options        = undef
    105137          $ppa_package        = 'python-software-properties'
    106138        }
    107         '12.04': {
     139        'precise': {
    108140          $ppa_options        = '-y'
    109141          $ppa_package        = 'python-software-properties'
    110142        }
    111         '14.04', '14.10', '15.04', '15.10': {
     143        'trusty', 'utopic', 'vivid', 'wily': {
    112144          $ppa_options        = '-y'
    113145          $ppa_package        = 'software-properties-common'
    … …  
    120152    }
    121153    undef: {
    122       fail('Unable to determine full release number')
     154      fail('Unable to determine lsbdistid, please install lsb-release first')
    123155    }
    124156    default: {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/pin.pp

    rad28f83 rbcf0be5  
    33
    44define apt::pin(
    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=
     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=
    1818) {
     19  if $order and !is_integer($order) {
     20    fail('Only integers are allowed in the apt::pin order param')
     21  }
    1922
    2023  if $explanation {
    … …  
    3437    $component,
    3538    $originator,
    36     $label,
    37   ]
     39    $label]
    3840  $pin_release = join($pin_release_array, '')
    3941
    … …  
    7072  $file_name = regsubst($title, '[^0-9a-z\-_\.]', '_', 'IG')
    7173
    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 
    9074  apt::setting { "pref-${file_name}":
    9175    ensure        => $ensure,
    9276    priority      => $order,
    93     content       => "${headertmp}${pinpreftmp}",
     77    content       => template('apt/_header.erb', 'apt/pin.pref.erb'),
    9478    notify_update => false,
    9579  }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/ppa.pp

    rad28f83 rbcf0be5  
    11# ppa.pp
    22define apt::ppa(
    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,
     3  $ensure         = 'present',
     4  $options        = $::apt::ppa_options,
     5  $release        = $::apt::xfacts['lsbdistcodename'],
     6  $package_name  = $::apt::ppa_package,
     7  $package_manage = false,
    88) {
    99  unless $release {
    … …  
    1111  }
    1212
    13   if $facts['lsbdistid'] == 'Debian' {
     13  if $::apt::xfacts['lsbdistid'] == 'Debian' {
    1414    fail('apt::ppa is not currently supported on Debian.')
    1515  }
    1616
    17   if versioncmp($facts['lsbdistrelease'], '15.10') >= 0 {
    18     $distid = downcase($facts['lsbdistid'])
     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'])
    1922    $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2-${release}")
    2023  } else {
    … …  
    2932    if $package_manage {
    3033      ensure_packages($package_name)
     34
    3135      $_require = [File['sources.list.d'], Package[$package_name]]
    3236    } else {
    … …  
    4852      environment => $_proxy_env,
    4953      command     => "/usr/bin/add-apt-repository ${options} ${name}",
    50       unless      => "/usr/bin/test -f ${::apt::sources_list_d}/${sources_list_d_filename}",
     54      unless      => "/usr/bin/test -s ${::apt::sources_list_d}/${sources_list_d_filename}",
    5155      user        => 'root',
    5256      logoutput   => 'on_failure',
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/setting.pp

    rad28f83 rbcf0be5  
    11define apt::setting (
    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,
     2  $priority      = 50,
     3  $ensure        = file,
     4  $source        = undef,
     5  $content       = undef,
     6  $notify_update = true,
    77) {
    88
     9  include 'apt::params'
    910  if $content and $source {
    1011    fail('apt::setting cannot have both content and source')
    … …  
    1415    fail('apt::setting needs either of content or source')
    1516  }
     17
     18  validate_re($ensure,  ['file', 'present', 'absent'])
     19  validate_bool($notify_update)
    1620
    1721  $title_array = split($title, '-')
    … …  
    2630  }
    2731
     32  if $source {
     33    validate_string($source)
     34  }
     35
     36  if $content {
     37    validate_string($content)
     38  }
     39
    2840  if ($setting_type == 'list') or ($setting_type == 'pref') {
    2941    $_priority = ''
    … …  
    3244  }
    3345
    34   $_path = $::apt::config_files[$setting_type]['path']
    35   $_ext  = $::apt::config_files[$setting_type]['ext']
     46  $_path = $::apt::params::config_files[$setting_type]['path']
     47  $_ext  = $::apt::params::config_files[$setting_type]['ext']
    3648
    3749  if $notify_update {
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/source.pp

    rad28f83 rbcf0be5  
    22# add an apt source
    33define apt::source(
    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,
     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,
    1521) {
     22  validate_string($architecture, $comment, $location, $repos)
     23  validate_bool($allow_unsigned)
     24  validate_hash($include)
    1625
    1726  # This is needed for compat with 1.8.x
    … …  
    2029  $_before = Apt::Setting["list-${title}"]
    2130
    22   if !$release {
    23     if $facts['lsbdistcodename'] {
    24       $_release = $facts['lsbdistcodename']
    25     } else {
     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 {
    2673      fail('lsbdistcodename fact not available: release parameter required')
    2774    }
    … …  
    3481  }
    3582
    36   $includes = merge($::apt::include_defaults, $include)
     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  }
    37103
    38104  if $key {
    … …  
    41107        fail('key hash must contain at least an id entry')
    42108      }
    43       $_key = merge($::apt::source_key_defaults, $key)
     109      $_key = merge($::apt::params::source_key_defaults, $_deprecated_key, $key)
    44110    } else {
    45       validate_legacy(String, 'validate_string', $key)
    46       $_key = { 'id' => $key }
     111      validate_string($key)
     112      $_key = merge( { 'id' => $key }, $_deprecated_key)
    47113    }
    48114  }
    49115
    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 
    62116  apt::setting { "list-${name}":
    63     ensure        => $ensure,
    64     content       => "${header}${sourcelist}",
    65     notify_update => $notify_update,
     117    ensure  => $ensure,
     118    content => template('apt/_header.erb', 'apt/source.list.erb'),
    66119  }
    67120
    … …  
    70123      $_pin = merge($pin, { 'ensure' => $ensure, 'before' => $_before })
    71124    } elsif (is_numeric($pin) or is_string($pin)) {
    72       $url_split = split($location, '[:\/]+')
    73       $host      = $url_split[1]
     125      $url_split = split($location, '/')
     126      $host      = $url_split[2]
    74127      $_pin = {
    75128        'ensure'   => $ensure,
    … …  
    88141    if is_hash($_key) {
    89142      apt::key { "Add key: ${$_key['id']} from Apt::Source ${title}":
    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,
     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,
    97153      }
    98154    }
  • src/puppetcode/environments/gnuboat/modules/apt/manifests/update.pp

    rad28f83 rbcf0be5  
    1414      $daily_threshold = (strftime('%s') - 86400)
    1515      if $::apt_update_last_success {
    16         if $::apt_update_last_success + 0 < $daily_threshold {
     16        if $::apt_update_last_success < $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 + 0 < $weekly_threshold ) {
     31        if ( $::apt_update_last_success < $weekly_threshold ) {
    3232          $_kick_apt = true
    3333        } else {
  • src/puppetcode/environments/gnuboat/modules/apt/metadata.json

    rad28f83 rbcf0be5  
    11{
    22  "name": "puppetlabs-apt",
    3   "version": "4.1.0",
     3  "version": "2.2.2",
    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.16.0 < 5.0.0"}
     11    {"name":"puppetlabs/stdlib","version_requirement":">= 4.5.0 < 5.0.0"}
    1212  ],
    13   "data_provider": null,
    1413  "operatingsystem_support": [
    1514    {
    … …  
    2625        "10.04",
    2726        "12.04",
    28         "14.04",
    29         "16.04"
     27        "14.04"
    3028      ]
    3129    }
    … …  
    3331  "requirements": [
    3432    {
     33      "name": "pe",
     34      "version_requirement": ">= 3.3.0 < 2015.4.0"
     35    },
     36    {
    3537      "name": "puppet",
    36       "version_requirement": ">= 4.7.0 < 5.0.0"
     38      "version_requirement": ">= 3.0.0 < 5.0.0"
    3739    }
    3840  ]
  • src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/apt_key_provider_spec.rb

    rad28f83 rbcf0be5  
    11require 'spec_helper_acceptance'
    22
    3 PUPPETLABS_GPG_KEY_SHORT_ID    = 'EF8D349F'
    4 PUPPETLABS_GPG_KEY_LONG_ID     = '7F438280EF8D349F'
    5 PUPPETLABS_GPG_KEY_FINGERPRINT = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
     3PUPPETLABS_GPG_KEY_SHORT_ID    = '4BD6EC30'
     4PUPPETLABS_GPG_KEY_LONG_ID     = '1054B7A24BD6EC30'
     5PUPPETLABS_GPG_KEY_FINGERPRINT = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
    66PUPPETLABS_APT_URL             = 'apt.puppetlabs.com'
    7 PUPPETLABS_GPG_KEY_FILE        = 'DEB-GPG-KEY-puppet'
     7PUPPETLABS_GPG_KEY_FILE        = 'pubkey.gpg'
    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          = 'EF8D349F'
     14SHOULD_NEVER_EXIST_ID          = '4BD6EC30'
    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 
    20 MAX_TIMEOUT_RETRY              = 3
    21 TIMEOUT_RETRY_WAIT             = 5
    22 TIMEOUT_ERROR_MATCHER    = /no valid OpenPGP data found/
    2319
    2420describe 'apt_key' do
    … …  
    3430  describe 'default options' do
    3531    key_versions = {
    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}",
     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',
    4844    }
    4945
    … …  
    6965        pp = <<-EOS
    7066        apt_key { 'puppetlabs':
    71           id => '8280EF8D349F',
     67          id => '4B7A24BD6EC30',
    7268        }
    7369        EOS
    … …  
    9086        EOS
    9187
    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 \
     88        # Install the key first
     89        shell("apt-key adv --keyserver keyserver.ubuntu.com \
    9590              --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}")
    96         end
    9791        shell(CENTOS_KEY_CHECK_COMMAND)
    9892
    9993        # Time to remove it using Puppet
    10094        apply_manifest(pp, :catch_failures => true)
    101         apply_manifest(pp, :catch_changes => true)
     95        apply_manifest(pp, :catch_failures => true)
    10296
    10397        shell(CENTOS_KEY_CHECK_COMMAND,
    10498              :acceptable_exit_codes => [1])
    10599
    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
     100        shell("apt-key adv --keyserver keyserver.ubuntu.com \
     101              --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}")
    111102      end
    112103    end
    … …  
    121112        EOS
    122113
    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 
     114        # Install the key first
     115        shell("apt-key adv --keyserver keyserver.ubuntu.com \
     116              --recv-keys #{PUPPETLABS_GPG_KEY_LONG_ID}")
    129117        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    130118
    131119        # Time to remove it using Puppet
    132120        apply_manifest(pp, :catch_failures => true)
    133         apply_manifest(pp, :catch_changes => true)
     121        apply_manifest(pp, :catch_failures => true)
    134122
    135123        shell(PUPPETLABS_KEY_CHECK_COMMAND,
    … …  
    147135            ensure  => 'present',
    148136            content => "-----BEGIN PGP PUBLIC KEY BLOCK-----
    149 
    150 mQINBFe2Iz4BEADqbv/nWmR26bsivTDOLqrfBEvRu9kSfDMzYh9Bmik1A8Z036Eg
    151 h5+TZD8Rrd5TErLQ6eZFmQXk9yKFoa9/C4aBjmsL/u0yeMmVb7/66i+x3eAYGLzV
    152 FyunArjtefZyxq0B2mdRHE8kwl5XGl8015T5RGHCTEhpX14O9yigI7gtliRoZcl3
    153 hfXtedcvweOf9VrV+t5LF4PrZejom8VcB5CE2pdQ+23KZD48+Cx/sHSLHDtahOTQ
    154 5HgwOLK7rBll8djFgIqP/UvhOqnZGIsg4MzTvWd/vwanocfY8BPwwodpX6rPUrD2
    155 aXPsaPeM3Q0juDnJT03c4i0jwCoYPg865sqBBrpOQyefxWD6UzGKYkZbaKeobrTB
    156 xUKUlaz5agSK12j4N+cqVuZUBAWcokXLRrcftt55B8jz/Mwhx8kl6Qtrnzco9tBG
    157 T5JN5vXMkETDjN/TqfB0D0OsLTYOp3jj4hpMpG377Q+6D71YuwfAsikfnpUtEBxe
    158 NixXuKAIqrgG8trfODV+yYYWzfdM2vuuYiZW9pGAdm8ao+JalDZss3HL7oVYXSJp
    159 MIjjhi78beuNflkdL76ACy81t2TvpxoPoUIG098kW3xd720oqQkyWJTgM+wV96bD
    160 ycmRgNQpvqHYKWtZIyZCTzKzTTIdqg/sbE/D8cHGmoy0eHUDshcE0EtxsQARAQAB
    161 tEhQdXBwZXQsIEluYy4gUmVsZWFzZSBLZXkgKFB1cHBldCwgSW5jLiBSZWxlYXNl
    162 IEtleSkgPHJlbGVhc2VAcHVwcGV0LmNvbT6JAj4EEwECACgFAle2Iz4CGwMFCQlm
    163 AYAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEH9DgoDvjTSfIN0P/jcCRzK8
    164 WIdhcNz5dkj7xRZb8Oft2yDfenQmzb1SwGGa96IwJFcjF4Nq7ymcDUqunS2DEDb2
    165 gCucsqmW1ubkaggsYbc9voz/SQwhsQpBjfWbuyOX9DWmW6av/aB1F85wP79gyfqT
    166 uidTGxQE6EhDbLe7tuvxOHfM1bKsUtI+0n9TALLLHfXUEdtaXCwMlJuO1IIn1PWa
    167 H7HzyEjw6OW/cy73oM9nuErBIio1O60slPLOW2XNhdWZJCRWkcXyuumRjoepz7WN
    168 1JgsLOTcB7rcQaBP3pDN0O/Om5dlDQ6oYitoJs/F0gfEgwK68Uy8k8sUR+FLLJqM
    169 o0CwOg6CeWU4ShAEd1xZxVYW6VOOKlz9x9dvjIVDn2SlTBDmLS99ySlQS57rjGPf
    170 GwlRUnuZP4OeSuoFNNJNb9PO6XFSP66eNHFbEpIoBU7phBzwWpTXNsW+kAcY8Rno
    171 8GzKR/2FRsxe5Nhfh8xy88U7BA0tqxWdqpk/ym+wDcgHBfSRt0dPFnbaHAiMRlgX
    172 J/NPHBQtkoEdQTKA+ICxcNTUMvsPDQgZcU1/ViLMN+6kZaGNDVcPeMgDvqxu0e/T
    173 b3uYiId38HYbHmD6rDrOQL/2VPPXbdGbxDGQUgX1DfdOuFXw1hSTilwI1KdXxUXD
    174 sCsZbchgliqGcI1l2En62+6pI2x5XQqqiJ7+uQINBFe2Iz4BEADzbs8WhdBxBa0t
    175 JBl4Vz0brDgU3YDqNkqnra/T17kVPI7s27VEhoHERmZJ17pKqb2pElpr9mN/FzuN
    176 0N9wvUaumd9gxzsOCam7DPTmuSIvwysk391mjCJkboo01bhuVXe2FBkgOPFzAJEH
    177 YFPxmu7tWOmCxNYiuuYtxLywU7lC/Zp6CZuq57xJqUWK47I5wDK9/iigkwSb3nDs
    178 6A2LpkDmCr+rcOwLh5bxDSei7vYW+3TNOkPlC/h6fO9dPeC9AfyW6qPdVFQq1mpZ
    179 Zcj1ALz7zFiciIB4NrD3PTjDlRnaJCWKPafVSsMbyIWmQaJ01ifuE0Owianrau8c
    180 I264VXmI5pA9C8k9f2aVBuJiLsXaLEb03CzFWz9JpBLttA9ccaam3feU2EmnC3sb
    181 9xD+Ibkxq5mKFN3lEzUAAIqbI1QYGZXPgLxMY7JSvoUxAqeHwpf/dO2LIUqYUpx0
    182 bF/GWRV9Uql8omNQbhwP0p2X/0Gfxj9Abg2IJM8LeOu3Xk0HACwwyVXgxcgk5FO+
    183 +KZpTN3iynjmbIzB9qcd9TeSzjVh/RDPSdn5K6Ao5ynubGYmaPwCk+DdVBRDlgWo
    184 7yNIF4N9rFuSMAEJxA1nS5TYFgIN9oDF3/GHngVGfFCv4EG3yS08Hk1tDV0biKdK
    185 ypcx402TAwVRWP5Pzmxc6/ZXU4ZhZQARAQABiQIlBBgBAgAPBQJXtiM+AhsMBQkJ
    186 ZgGAAAoJEH9DgoDvjTSfbWYQALwafIQK9avVNIuhMsyYPa/yHf6rUOLqrYO1GCmj
    187 vyG4cYmryzdxyfcXEmuE5QAIbEKSISrcO6Nvjt9PwLCjR/dUvco0f0YFTPv+kamn
    188 +Bwp2Zt6d3MenXC6mLXPHR4OqFjzCpUT8kFwycvGPsuqZQ/CO0qzLDmAGTY+4ly3
    189 9aQEsQyFhV3P+6SWnaC2TldWpfG/2pCSaSa8dbYbRe3SUNKXwT8kw3WoQYNofF6n
    190 or8oFVA+UIVlvHc5h7L3tfFylRy5CwtR5rBQtoBicRVxEQc7ARNmB1XWuPntMQl/
    191 N1Fcfc+KSILFblAR6eVv+6BhMvRqzxqe81AEAP+oKVVwJ7H+wTQun2UKAgZATDWP
    192 /LQsYinmLADpraDPqxT2WJe8kjszMDQZCK+jhsVrhZdkiw9EHAM0z7BKz6JERmLu
    193 TIEcickkTfzbJWXZgv40Bvl99yPMswnR1lQHD7TKxyHYrI7dzJQri4mbORg4lOnZ
    194 3Tyodv21Ocf4as2No1p6esZW+M46zjZeO8zzExmmENI2+P7/VUt+LWyQFiqRM0iW
    195 zGioYMWgVePywFGaTV51/0uF9ymHHC7BDIcLgUWHdg/1B67jR5YQfzPJUqLhnylt
    196 1sjDRQIlf+3U+ddvre2YxX/rYUI2gBT32QzQrv016KsiZO+N+Iya3B4D68s6xxQS
    197 3xJn
    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-----
    221 Version: GnuPG v1
     137Version: GnuPG v1.4.12 (GNU/Linux)
     138Comment: GPGTools - http://gpgtools.org
    222139
    223140mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b
    … …  
    233150f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB
    234151tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL
    235 ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokBHAQQAQIABgUCTDfARgAKCRAhWv5Q
    236 5BRwMq8TCACgG44+c+KgHBinygdU9Oj/r1wmfXbbmR+tpRgZ5sJytHC6gp3wjKFH
    237 XrmddgmYPzKsAUGTxJxRUqxD+lKeo2sEKuXNAPo1C+4hZUV6Ah2N1qytZfpLOP43
    238 U6WVvMgluQTl6jRaMIwQolUj8ZNjYCdNZQCbfo8tALkedIBPKSrDF5kOwn+zxFyR
    239 3v5A3mwFXK0bepvjlDuMsmktwk7opgfivP1mA3svPLIZu70PKk+u6UAMb06svt6V
    240 SewYMbgTUzw+SCT1e/0xEpqjUqNgsPnPE6hW116goRB2cz6VYwmKfVe+ioljsVMM
    241 mTqj5xWqoeR0ov6yCyxwVVCWOAIR3QSAiQEcBBABAgAGBQJUCeGFAAoJEBM5V+oR
    242 Ao3zE3AH/1GQTS4JX3kS3WXE2Pi8L+gGylfYsf1dDbaDBX8mPfxKO6usZZmX9fIu
    243 qQwQDIEksGrdcb6nrGecHufJDbLmFZiE77LjjoREFlG9tEyaIAVSCw/vyng9wVo8
    244 InDF7j1VHuUueh6eu+yvLjUrFuh3CVNHcx2rEIFzx+X5660TbbRfMgxLpTMkkb4w
    245 7DQjCUmFQD4yLzZzXAzjELc/TgsFGZc3lxo7UuzwX0ZEm15WjrdYwvtMU1TGjjI2
    246 6dgk24K3Kb2OeUnCybQ1mLx6qVx0aFd21beKRG9u3Stp8HHXpfLh/aznbCY5JavO
    247 ShOXgNgq3f0/UImLjyuFv27x0HQFxfeJARwEEAEKAAYFAlQHuw4ACgkQpHBvotfb
    248 FDW/pwf+J6JBPpUHi/EsuLLbqDTQjGbnMTsH35pZRApKheaISPRZH8oqgdmWE599
    249 6e5GwnXMoBJoUvU0VbcO7aEarWlKmO6dpTKsfvjP+PtiSBeXUa8ewNcTq5N0Z7O5
    250 IwF2CiHrSTEcySjjboMKJHS/vQCmsLg1j+MA7wq3quzX0vQsGBX3X1x+n2KOH4s8
    251 BGoXFJs6sM1SInnqkPwryCesj61zc9I72kTM6IsG17X586INWMHoMDzpF/hTWKKw
    252 2c0kFMDIJDpU+KBKr/e4mbKrp8ToP64GjB0MOx6MqjZI6I3k1PQu8zgWmOQ+yQhI
    253 e/UfB8u+eGbhDwUMqKBEHUzV3b5lj4kCHAQQAQIABgUCUeTczgAKCRBKMwua1kj6
    254 4/mED/9RNl8PfjS6SKnqM+UzPHBIP9BqnC07sPiCwZOxd7MOQ73sPbV3Wk1o1PRG
    255 tcAxqDCTUSUPGaf9gdQN8yi9lrZspqCNaZXfzGRaz4+uHU/ji9QMbfQIBTopn6ZM
    256 YtRuiV868N98JOb0yfWLaTEVonFtWFZHrNHbwplHbyzUgGyup5MKSxh90p2S7DX+
    257 PznSFbwwzeE8En/jxUvHlAQV+eVfC3V+n4vKAC+sjInDu8m2xr1CMIiRCTa1y/vu
    258 uGSJnoAO2GBUjHmPfINZKbicuoWnBtBMqs1GsJvldsv+ggx4cm4UgJvYdyQNLUq4
    259 pceaq8O4uhGvT/AURkymzldB6+iZRrsmQx5LmP0C5sIbiDXMoS089oYOx8MoGWMI
    260 cErBTKxCPmgZTnDxW+U4+dLrYMF+yBTbLmKmaYhNiSNI4votfA7rEbn+zEDxzKgl
    261 KZs3bzqKZxjoAeWhOKK7r83tSz4I2uHD9XscC6fnp61YGfdtlYJEYYA8XeomvjLa
    262 xQxjQTcdrs48Qcgp8FvgyImelee1ZPbydB8Xd2VMVO2EDPBydlyHHZ6zjKt8Neff
    263 djh6KyrFYJtOW4StdSiBQQofUqiFJq1gy3F6dy/ttSXMivbbNJQJjJV/1zKDnSQH
    264 L7Qnux4SmobkrlHzP2z/rcFPk6CGaLpsHazmIrl8G3dO7UhinIkCHAQQAQIABgUC
    265 VAesWAAKCRBGnps2mw8PHet2EACTyXdYh4kXGgSwQpY8hUJwd9FPrXPyYMTfeJFq
    266 kIBpG/q60Q72Kqvn0AqUSmnROoKzPnwYW/jE+89tx1JBAT+8EtRAJvJaNH9Hovw4
    267 S3GV5wqImdsmIqJUxl8lh9moB9zfpsqWz2Laa1Xn/TGwmLl/zFL0PWQ4rv8r6pZ/
    268 OhEE/pnqZDLh/+6PxYmQRsIvDfmeVd57XSYLnT6JNXkAYBnmMouw+L7b2B9LWMIs
    269 10lfjdOCplNE1FCTFS7K/j13x8Cyul6yF6eeq+rd5ftcw84XW+1qh3Jsw4bSNc0Z
    270 LvGh7zgRznEWhxZrcGzWwtxnEG1aW7wXiDJ/kqAvBNP1LOhIQQH2NVp3oRW+hB1o
    271 Cb/pbIht3xin7g5EJ0cpplTKNvfVdcitIflpgV9CT51oNkV7dVCtkXbFxwGdxP1L
    272 CnYmfJ8IBumX6a3ue741E1tHHp2dZOHXWiMUI6TjYISQjx4KiiFTXJRpMsm5AQDi
    273 ps+TSnF5TsNJ4776aAhP0hTN6Wy864NRoWEPs9OHltmZFCHzzTixQZrNxaUvLALP
    274 vCmQ++U8f4mxD1+/eLXSzcfWolUoqyneTH/DEWpYXaoE5NalLfmoH7WxCR32LXWR
    275 tJ748SZXI5SFjOzIzLsFr/qq36hGqDb7fqsc4LSz8uvJYo7vAdvkSUL2mkHeX4lD
    276 QzwR/4kCHAQQAQgABgUCTPlA6QAKCRBcE9bbkwUuAxdYD/40FxAeNCYByxkr/XRT
    277 0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAfDzVfqWjC0G0RnQBve+vcjpY4/rJu
    278 4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaeiBPSb3ip3P0of1iZZDQrNHMW5VcyL
    279 1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5ZXG4jswMF0U6Q5s3S0tG7Y+oQhKNF
    280 JS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2+zeHzuRdRWGjb2rUiVxnIvPPBGxF
    281 2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpUfCw/WRT3gGXJHpGPOzFAvr3Xl7Vc
    282 DUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucHdvE4SIKQ77vBLRlZIoXXVb6Wu7Vq
    283 +eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4qGTXQy/E9+dyUP1sXn3RRwb+ZkdI
    284 77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F27mfo0/522hObhdAe73VO3ttEPiri
    285 Wy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzqUuWjBmZ35UlXjKQsGeUHlOiEh84a
    286 ondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7xKk+F0qb9+/pGLiT3rqeQTr8fYsb4
    287 xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIAKAIbAwYLCQgHAwIGFQgCCQoLBBYC
    288 AwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3okvW7DAIKQ/9HvZyf+LHVSkCk92K
    289 b6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7bdtWjAILzR/IBY0xj6OHKhYP2k8T
    290 Lc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz44B0bPmhiE+LL46ET5IThLKu/Kfih
    291 zkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gXvSZKP3hmvnK/FdylUY3nWtPedr+l
    292 HpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0jIq2V77wfmbD9byIV7dXcxApzciK
    293 +ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863YZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre
    294 2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD7xBI7PPvOlyzCX4QJhy2Fn/fvzaN
    295 jHp4/FSiCw0HvX01epcersyun3xxPkRIjwwRM9m5MJ0o4hhPfa97zibXSh8XXBno
    296 sBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUfREsFmNOBUbi8xlKNS5CZypH3Zh88
    297 EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5yDHmg7unCk4JyVopQ2KHMoqG886el
    298 u+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAkugVIB2pi+8u84f+an4Hml4xlyijg
    299 Yu05pqNvnLRyJDLd61hviLC8GYWJAj4EEwECACgFAkw3u0ACGwMFCQPCZwAGCwkI
    300 BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBBUt6JL1uwwGWsP/2i5hP3qG6V6SFFc
    301 glFkMRLz7TP4f0gCbBtyqBzfbttensLPlB7C/+xfdXHlV0EHQ9nvArWFhXizTNEU
    302 jPYvyjOtIOAryEJZjanaoYtR7IBqiJ2e9v1ywF7p9IGm3wt+qy8MNpHpfmjKUX+f
    303 Eq0rrJGN9tTZzBCZeDrB1doXzbQCIMNnv85vUYaDKRisaB2QrxYZz+7tjNsDKu4j
    304 Qw1m+nVbC6c3ZVX9uNswm7mzwscUFzqQOeq85FD7ifOZnVcOItfaDyBSGVS+aMIr
    305 dUsQjsQYOG/KGjEt+oRJd6rWRvN+K7S33KgJqo4cemibiSzgGDfOEIwxFNzSOSHz
    306 UTL5biHk3A+A7eRQmGoTdOObVtUXOrORgEfEVuORmMEA8xvpJJHnhscBIaglu5zh
    307 7sGSKFSbnzYXdvFBZ/NyhiRwkLeDQQa9yuU3GOmw0BCK6UqZVkgwW3d6dSGqGWNV
    308 kg3T/Tk1Tkm7M9CYoJVplFhlgnXfwjElvw+/91VDiTmEQ8Kbb7UmHIyXPNVFftcw
    309 fq7eS2vzlnuFDjkQ/o1NQE4o0BGhWMQW6gQZBW6ABF6vW7UUMnoKpPnlaR4c2nD+
    310 TWBUzE4bx7k2qTcrXArKOWrv3DMsKgoGNQ33DCco6HLuGwrawHesOJBijTFHcDQ2
    311 ELpR2QyPlIySJ4a2psp4Hc2S43XhiQI+BBMBAgAoAhsDBgsJCAcDAgYVCAIJCgsE
    312 FgIDAQIeAQIXgAUCVwb4BQUJDDXSzQAKCRAQVLeiS9bsMLwBEACtdY+PvfNw8SFu
    313 RpIM2rvdjGsEfJPKpUK5Dx90m1NSVyhMwQeYLdBb0GGgeGjjX8E5kCqhsD53VPWH
    314 AD13nPc3zCeiDJiwpjYXeuGIH7AOG+gZZDLdy14myEN0JQIXQslOK8SiaTn/yI4s
    315 2Lrje0Ubf6wbJ3uX9MwsqIkugkJrYn9e1BC1uPgESbE1SjiIbB4iL8lrxE6fdyxc
    316 QnUEzneOFQ9kScfPc/M5U9COMuQOuoefiAEh+FRrjxf9ag3NzecTlwk/EdpgmfSj
    317 a+ClS+BJv83zYForrHRfUU1SDiueuWXAH1OTaUpAsZIiXpigTB4X3hLJXB1iKoA1
    318 TEM/9bZGPdJsS1mwUUy3ukDW1rhOodxojhN1XhT3f7X9Cl8lKxKw1tloRijfL3n4
    319 njwk6hEyKaURTo4iOs12HDlBZV3zhWONNZTvqrFMkz4OB+q8RGpfO8G4Mbba+fNQ
    320 2At+cAWmGCoZeX3KfyRtqYe6vtKJf5ptQZgjl3EFPl6OxKjopzomB7o9lXbxARgO
    321 6Pf9NSyYwlv0sNfy88N5iSsa7Sw7yi9t9tO5KFGoGYLmXXgyjvNZrE8KMh6/hJOW
    322 HsW19noVdogd73q+gjRAl+eZ4J1nKpbSPkbufNoD8uB/j3rr5/sRJrtvVnMTJXwC
    323 iTItalyg7XRJSQ9kAqzvRlxdGobo95kCDQRXtiM+ARAA6m7/51pkdum7Ir0wzi6q
    324 3wRL0bvZEnwzM2IfQZopNQPGdN+hIIefk2Q/Ea3eUxKy0OnmRZkF5PcihaGvfwuG
    325 gY5rC/7tMnjJlW+/+uovsd3gGBi81RcrpwK47Xn2csatAdpnURxPJMJeVxpfNNeU
    326 +URhwkxIaV9eDvcooCO4LZYkaGXJd4X17XnXL8Hjn/Va1freSxeD62Xo6JvFXAeQ
    327 hNqXUPttymQ+PPgsf7B0ixw7WoTk0OR4MDiyu6wZZfHYxYCKj/1L4Tqp2RiLIODM
    328 071nf78Gp6HH2PAT8MKHaV+qz1Kw9mlz7Gj3jN0NI7g5yU9N3OItI8AqGD4POubK
    329 gQa6TkMnn8Vg+lMximJGW2inqG60wcVClJWs+WoEitdo+DfnKlbmVAQFnKJFy0a3
    330 H7beeQfI8/zMIcfJJekLa583KPbQRk+STeb1zJBEw4zf06nwdA9DrC02Dqd44+Ia
    331 TKRt++0Pug+9WLsHwLIpH56VLRAcXjYsV7igCKq4BvLa3zg1fsmGFs33TNr7rmIm
    332 VvaRgHZvGqPiWpQ2bLNxy+6FWF0iaTCI44Yu/G3rjX5ZHS++gAsvNbdk76caD6FC
    333 BtPfJFt8Xe9tKKkJMliU4DPsFfemw8nJkYDUKb6h2ClrWSMmQk8ys00yHaoP7GxP
    334 w/HBxpqMtHh1A7IXBNBLcbEAEQEAAbRIUHVwcGV0LCBJbmMuIFJlbGVhc2UgS2V5
    335 IChQdXBwZXQsIEluYy4gUmVsZWFzZSBLZXkpIDxyZWxlYXNlQHB1cHBldC5jb20+
    336 iQI+BBMBAgAoBQJXtiM+AhsDBQkJZgGABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX
    337 gAAKCRB/Q4KA7400nyDdD/43AkcyvFiHYXDc+XZI+8UWW/Dn7dsg33p0Js29UsBh
    338 mveiMCRXIxeDau8pnA1Krp0tgxA29oArnLKpltbm5GoILGG3Pb6M/0kMIbEKQY31
    339 m7sjl/Q1plumr/2gdRfOcD+/YMn6k7onUxsUBOhIQ2y3u7br8Th3zNWyrFLSPtJ/
    340 UwCyyx311BHbWlwsDJSbjtSCJ9T1mh+x88hI8Ojlv3Mu96DPZ7hKwSIqNTutLJTy
    341 zltlzYXVmSQkVpHF8rrpkY6Hqc+1jdSYLCzk3Ae63EGgT96QzdDvzpuXZQ0OqGIr
    342 aCbPxdIHxIMCuvFMvJPLFEfhSyyajKNAsDoOgnllOEoQBHdcWcVWFulTjipc/cfX
    343 b4yFQ59kpUwQ5i0vfckpUEue64xj3xsJUVJ7mT+DnkrqBTTSTW/TzulxUj+unjRx
    344 WxKSKAVO6YQc8FqU1zbFvpAHGPEZ6PBsykf9hUbMXuTYX4fMcvPFOwQNLasVnaqZ
    345 P8pvsA3IBwX0kbdHTxZ22hwIjEZYFyfzTxwULZKBHUEygPiAsXDU1DL7Dw0IGXFN
    346 f1YizDfupGWhjQ1XD3jIA76sbtHv0297mIiHd/B2Gx5g+qw6zkC/9lTz123Rm8Qx
    347 kFIF9Q33TrhV8NYUk4pcCNSnV8VFw7ArGW3IYJYqhnCNZdhJ+tvuqSNseV0Kqoie
    348 /okBHAQQAQoABgUCV7d12AAKCRATOVfqEQKN8xl+B/0cdW8EhjyBXFWi4B0RzVXR
    349 TIi5vUEe2mL+/cwt/qD70VJbe6Vy2X1VwGX5QrpMtjSnouGAa7aMU+oYXlzz+RPW
    350 MtJTWMMVgOidRnAWw61wFAabZLFyJfVUg/QxI/sUQYkA3VC1XxSHLK+bjfglULRC
    351 Q+JKpuK2D1jz0SrJhQtX6IGkVmT0t1tlwMUWhW3EIuHpc8TwvgxP0wjg8KLd01vK
    352 KJTRLNb6Z3pFlT8rEF0Cw5LFReJM8i4+w1DqIy18xMkuDh09WBJhhCUH8LIHgGlz
    353 D5p3fRmbtkW6T/wpjP2XR+eiGABJ0nr4WTDAwWn9SxnjXapp/QvKd+lOPRYUqRB5
    354 iQEcBBABAgAGBQJXt3igAAoJEF5FJ36WgCWsN2wH/RBYyRHcIXW3F3oYS884JNj+
    355 KA4Fl04kmuF9oQ3OnF8JYaYyZ1uuRErGH1UB8BVxTudKcowGCYi8AV4iQHSLx5dr
    356 qY0w2MVlcxC2+8vUYEHYXU2i9EoGa6vwIJU+oSB/evnCJGe5DmzR6EbgQPADlkX3
    357 IW8GzrnPionDJhP7POwOY4HNOOBRm6AfAE3JMjH++TUuEgAuB0urjCNPmZ2/t9ic
    358 uSS5hDp5HepoaQ2rfEI1Df+/wd8vXAD5Zdi1wZhmDWX8pq/spdAgV4/kMlcKzdRS
    359 FINyA4wajLVLfsYPavBCW18aHV6pEBc9mdhQ3xsqardcnyX+rd9kMgXKsG69WAGJ
    360 ARwEEAEKAAYFAle3ca8ACgkQpHBvotfbFDWkRQf8CZtvvGM1sHJk7l07KDmG2zSM
    361 rWb/GPsySK+DZRZDBJz3m7FWazWnfb2cuqRSMnoDDvnjg5EVSFqdZ3GaTsjKFBNe
    362 NnLp/dC+sjSfKoi+a1iCP5wuhiXOwwWz4O45ekYUKrIwCXh3C32mtnqc6460YQwp
    363 a1pdGqEeGq4aqcZPHUYAb294GuelA1TUkxibCIIDo5f223UNwGV3m9LPTyf0uOwO
    364 1cht4ZdvccWBFXuDvzMQ9AGh6jHq8SX1uopQkEOY8AY53Lul6ubHzoHIvrld/GaQ
    365 9osF1dm2/llGtHbQDqnVYVXg+lLNqW0u6JhNSE/EHDi9S2zWmK8J60m4akJRRokB
    366 HAQQAQgABgUCV7eBzwAKCRDfnAdsUd5/xDeuB/0aVR8KKFpEjV+mYspTMJMUi0ku
    367 0iqXYqVmvMCfrwP2fzKu2MbLqWjgutG9RiwtrMmqaRPx+AYGJMU6k/TVd9bxWP8+
    368 vxvZzsEz9lPIoH6xCEAgA6AQ6TIYswwU0G6duR/iRUtn57oTixfoFazUFXriY3yk
    369 gAeSphPmG2ZBVU/VEvht6qjkKrxIT46sjNEl5+5R3R9EekrW19D9S0TjtjPOGjfo
    370 +6ZMxKWlGW5gCREliuSTQY1/56MTQdrA6bFdiim0TPftC+aK+6l2kzTyVbygBPPo
    371 8/p30iOYHOX179HZNwGyGnP9fNxaURLsx7Zymaf2esA4mGVApDDE6QrZbeGHiQEc
    372 BBABCAAGBQJXu01KAAoJEOe7Y9N+knoevtAH/2VjCnLU1xc25iuIDnDKtPdgdclY
    373 tV5w4kLpDxo1WTieCPOjSK5Xbsfe9eSSSqjgsHm1EkejunzuDcmm57LXfcdf3MA3
    374 1u6qIkS/fdctj9hkEMonEeWN2NnyYLAkcjWf6+I4u/qhM8BdoT/UmB80rgdq07yr
    375 14zxMhetoZaqcLMCtZuaVpQMmoa/SbaADQSISiYRN3xWeZUmeWBjU10avK7YeRMN
    376 tyYTCAsRCvrwcKTN9XKdzHgm5kMZfo9UDuqnD2TsUxDwRcwYfe1+ZiHWV6sWZtGv
    377 zPqJ4t7fUO8tlo3LnCCdZRXp3U5i9G8f4xZCkH0fY2kEMHMxOn4T5NS1WxmJARwE
    378 EAEKAAYFAle3euIACgkQutXwo5LphXJtOAf/QvpHm4MsGYMFe0GamNcfCqgPQBfr
    379 +/7SIreIG9BJDpsB+JkNZX3+tcZR5m7tfXl7Zt8+t+ENJVs62FPPzOA8EuXQAMGW
    380 NkyQlV9Y4lFerccUX3gK3rP4BMxTQ372quGXfOIeYwUmTEPaA0me6M0ODla3jT+g
    381 dl9HSwCCLTfv4/2djK/Oi/+m1r3grfeFLbOjoznR4xZoPbWFBWCn7iweWE3B6r1X
    382 n+99DEaLmuEG4Mk8ohlKzIgReZ1wTkHcIt27GG60to8TUhbgqtGcOtE3Qc9hxZXh
    383 wRbYaNFM8gkIAmo4eJuuWd+VWjnMeFH9JKtcrSEgMhI/qyt97c8g5497sYkBHAQQ
    384 AQoABgUCV7d67gAKCRCCRVGYVPwajc8QB/93fnBi8sKAaaWIjFA5ZrZkjZEsVE2a
    385 y8G4hCKUPFk8qwacVSC78I/yFqZPhy1DE2zsXEQEdu9VBNxVvEHuRBrs79XU7L92
    386 8xtdzEZF06my+xqYhhgBTqK1VguU4ayD9jKNgE1jGjPnHPFcjLaadyEtDDk9MMwC
    387 fzvtFPGepRi1LYRMYxR4CNxAvAlgb0uVnZ+9dEfo9nfBfRL7ACLtnQbkazJZXyfP
    388 zKeRmxlA9RTRlGm+ufHN5TgzsKFiTBbkQOF51ItAVJcKZVEARuyuMqWXIlZyURXq
    389 kG9x1jAx0oZDW2iVRb6Ft21pAJd5P1ovGacX6EhTubAeAmlkqvmuPh3viQEcBBAB
    390 CgAGBQJXt3sHAAoJEDy4a/JFI238WrgIAJS1gtpqw/tzyeAgopnKUyl+/ocCWoye
    391 0wkS4/9QLzttQ718oDeb1EIcGnQEkazES1NAPoHAnc6TbvPfu71sfPqiTVMRE4VI
    392 6AwXdjNT8ZWi0ip8fog1YVzFBxxMpYThDAPqkKPQG3kj3TAUMpmTlM/h63ndOOOU
    393 5clUmuqT2agX7Xo/lP4qApcvcXe/EhwtWttYkFW9pPtjXUoHA7R4iEw/HZZRGvgi
    394 RRuVkVnta63SBMasyypO8Km35dg/UAE4RRsPV1QLwl+uqgvD6zGt3A8+GNEXoAki
    395 agKt8GJ43DlsD8aDkFzsp0E2iQ+idkqkqy7FXJMe4eG/LL4WG72fNL6JAhwEEAEC
    396 AAYFAle3e60ACgkQyXOBc2z4R/lCtQ//SCePwH2R35N2h9EMYsCH9iypJmFWMcwN
    397 HlEXOKmJrQ3viD0X3iXEa2SNRKKK7Evn3ggN9zbKwLLBIvZimut8LBLiF6TFnK/u
    398 +8kZxGHLW0dhR/IokUY5zadx/E1F0C0IAkY7hNh791K6e7rwjw49pxSUnAQ00YMc
    399 hNFeuq+IRtty+Jnw8uYz9m5CRAzBqPeAQ3mtXeYgkNPWEMQSTW5FDHnINlZItup9
    400 BSwIQxYJymKFkG3YxcJsx18dQNuVdzhg81b4XS35C2mOjlOhUsD+5Pp+8L0SQ3GC
    401 u3qj/xXazdB9U0yJIs0u3JYb1Rl73v/fQji6UYyU/4TbEAhjl4n8JRgje1bJ4W1g
    402 ugjalCM9YVaLrgjf5CIf0t8rn3G4Hl26ddNm/VroTCMLKXvg4kdFKF1oc6xImqoo
    403 WJblVa4B4la9LxuRsgN9PamGlBUg1cDUftjpSstW1PYQPiGhc0jJh8vXNmIg5fzq
    404 5dcLLWXOlrQOkg4ce30YzDculzn6ntBl30sCzVi/hxQrX3c0cpAqgRT3azAkO7JT
    405 4J8fXO8CyAwuXjpDv6g4N9xfIdgTrbtqgnZb3MzOzpd11s7Q6ypCcEZVxt+FKVS1
    406 LgzJoWMQNVJ31sBwI1KenfB2/YfF6uILtpdFM+soKt86IvQub726rw56JWrIiP8w
    407 +ojBTcDZGM6JAhwEEAEIAAYFAle3gC8ACgkQEFS3okvW7DCFfQ//SduNnxVJqud1
    408 +c1B+N1G/M3jfkMvSb6Sujb5/4qu5yL2Yo/PoTHesvqkFh5zILGuepCLI4ravZd7
    409 zyxy31o+egTC+adR4s6118k9swe9XDuZ+SNxBhK9A18pnaPcwa6b0j2q5KZI4klF
    410 DKCg3u+D6qJQ3jqMPKbfPymVn1LE4qzkj/SXll0Nxkw7jIapn30UNONdY+q2nXpZ
    411 Ej4xI01X66v9Zh/IRj8H0jwtJsTKfAoCkRmE9aJW4ywDUMJ0iHAqxYuGX2y617F6
    412 b1IY1JoWvBlNDTlCwj0v8xF6CK02JQecKhHl9hvAoAuJDhGIqSGkKH3ENAOFN6I0
    413 7orX6UrHDafphfqLYmEYCHJhz/QXC6Y4hxWS4cpcGbNqzfoerFkQimi0FT2lLPtn
    414 DH1OOvBvibKAVKkifkAUjYCGN4EJYI39x9VX1I++sqoXWZoAgRTGd7Ppm7PQFdvM
    415 pHQYDMLIzdFex5xvcQGrga1r7kOjUgpSP3rqBTgNfZtDNRucQE1iLOCu6Iias8HW
    416 B66ya5eN7tpAN3vXvtMs1qpOU7748HbUKTOPvccj6abxJ5OKFluK286eLMXW1hHP
    417 rB8I1WuIyYuqgtyuvdiRqhq0d+LyWuM2ZVos0usa03OtAuvnlaaTLE4qsW0cc73l
    418 TAUI89WEAZ4yrD+IIVbR8WNv+F0O0GaJAhwEEAEIAAYFAle3ge4ACgkQhyhST+Id
    419 P8Y9VBAAij8tXwW0Kl/cpJo0AEh1zPObs2ChFucwdj3DIbMOziV4d3cD/agGTL2H
    420 rjNQnfGqr+oxvBOPGTXFJGllhmXYFISWdWQFGNM0G8XF0/zlnMP6c7XEpmUmr0O1
    421 OQuTVi31lY3kBmFLuZiTmN4YENIo3vCG1z7P8hHb3jpDUR4112KZdqWnvTGznDsA
    422 lFTiNdlX9bU7eoQtFC0bueYv+rvHQ3PdzT4O8NBPuRhrfqVaaCUOERlUGuqjJzlK
    423 TfxRq949Ts7piTqlnwIgw+mWfuvyVtKcRnrIkTSMmDcojKnYmi8FjRQoEyZp5DOZ
    424 NLoJ5OMLCb3gyjQDLtGaPeDuLBiAPfb+dB+FtTplwbeevpOks/Cnbr8eCY2DflMd
    425 3cgOA7xT5NyoZrUY9nhlRGStqIjJ/QrB1orFt8hqisshGJLgGp+64wvbFORgXvcY
    426 3M2qoSeCRz03IFjeIf58TxcmaTC+aYffWTFKuGmvUKNCbGod20MyRtl5/xzQ3K5S
    427 bt9u6MXeLw50psnu/GzQEgN52dU36fsh3XNWQrlV3YdTihJHTSeFAs1LA/eg/qJL
    428 4WPGXmg/sBHFXuv4NC7aqI+0sUjlZfDk3aJCZHmnBTQ8izuvlUhhYy3+8N5D9i5E
    429 KjaIAsEoHGIljwcenI5lLZNSNqlREW3ZED7vJZrbblOWq7ezlhKJAhwEEAEKAAYF
    430 Ale3e7cACgkQAl2/Z5bsLy5UhA/+JZ/I5Zscici5SnbVKTIefcJWwlylWCale/IV
    431 0m+YXl1GTLOxNFMgeSHlISVDWeo1g22jtT/ln4mfYfKJFN+Hy2lHuknxqZOCwti/
    432 T6DDSCqk8SZBIJliESPp1yOC6a1I1LhZWGzq1fUc3JtPng/CuiFKgxVQvrKooFTT
    433 eFFzC3+S5Bjfcgz/vw/Hfuf8C2kMW6FFg3SQJIo1Iz8Z4C/f++J9kMKgkU7lfauK
    434 9B3teN5F7gavOMv1C3SeM7xv0smaayM+coSA29/8LOKbfc5oSucNldXMI9CZTWQa
    435 Kq7gfN5Lq7MPYDScS9UbEXAGQQIWsMIkeLadkdVpOqTjMfvnUX3d+rFdOCI4xFEA
    436 5mm9o2qsmKTdZtGBeoY1M1Quq4qITtZifqthe6cZ83YulyKCEZniqiQzfCjWYZoS
    437 tcW8rc+DIC/pakwRN7K7nZRNpoYb50+C+vlHfk7tuQuR3B95QFiOdfob9lSrnNtM
    438 pli+diK5g1xmBbhSCUvbSK22ELCEtek6CZxKvkQclscteEhvVDIiq6rl5fMZsQCz
    439 85L4fMX1HhVQ4fSPIIAfMi1sup36DEtTM9ensT8jKSB0gp9ZHsUAX+NA8PeUsjB1
    440 p6i7ywHuA0kS4NC8a7uACXgWyQq6rVZPn9w9ogu1k2KdtcHLcQSAgq8jB0Xw3056
    441 K7S6EVK5Ag0EV7YjPgEQAPNuzxaF0HEFrS0kGXhXPRusOBTdgOo2Sqetr9PXuRU8
    442 juzbtUSGgcRGZknXukqpvakSWmv2Y38XO43Q33C9Rq6Z32DHOw4JqbsM9Oa5Ii/D
    443 KyTf3WaMImRuijTVuG5Vd7YUGSA48XMAkQdgU/Ga7u1Y6YLE1iK65i3EvLBTuUL9
    444 mnoJm6rnvEmpRYrjsjnAMr3+KKCTBJvecOzoDYumQOYKv6tw7AuHlvENJ6Lu9hb7
    445 dM06Q+UL+Hp871094L0B/Jbqo91UVCrWalllyPUAvPvMWJyIgHg2sPc9OMOVGdok
    446 JYo9p9VKwxvIhaZBonTWJ+4TQ7CJqetq7xwjbrhVeYjmkD0LyT1/ZpUG4mIuxdos
    447 RvTcLMVbP0mkEu20D1xxpqbd95TYSacLexv3EP4huTGrmYoU3eUTNQAAipsjVBgZ
    448 lc+AvExjslK+hTECp4fCl/907YshSphSnHRsX8ZZFX1SqXyiY1BuHA/SnZf/QZ/G
    449 P0BuDYgkzwt467deTQcALDDJVeDFyCTkU774pmlM3eLKeOZsjMH2px31N5LONWH9
    450 EM9J2fkroCjnKe5sZiZo/AKT4N1UFEOWBajvI0gXg32sW5IwAQnEDWdLlNgWAg32
    451 gMXf8YeeBUZ8UK/gQbfJLTweTW0NXRuIp0rKlzHjTZMDBVFY/k/ObFzr9ldThmFl
    452 ABEBAAGJAiUEGAECAA8FAle2Iz4CGwwFCQlmAYAACgkQf0OCgO+NNJ9tZhAAvBp8
    453 hAr1q9U0i6EyzJg9r/Id/qtQ4uqtg7UYKaO/IbhxiavLN3HJ9xcSa4TlAAhsQpIh
    454 Ktw7o2+O30/AsKNH91S9yjR/RgVM+/6Rqaf4HCnZm3p3cx6dcLqYtc8dHg6oWPMK
    455 lRPyQXDJy8Y+y6plD8I7SrMsOYAZNj7iXLf1pASxDIWFXc/7pJadoLZOV1al8b/a
    456 kJJpJrx1thtF7dJQ0pfBPyTDdahBg2h8XqeivygVUD5QhWW8dzmHsve18XKVHLkL
    457 C1HmsFC2gGJxFXERBzsBE2YHVda4+e0xCX83UVx9z4pIgsVuUBHp5W/7oGEy9GrP
    458 Gp7zUAQA/6gpVXAnsf7BNC6fZQoCBkBMNY/8tCxiKeYsAOmtoM+rFPZYl7ySOzMw
    459 NBkIr6OGxWuFl2SLD0QcAzTPsErPokRGYu5MgRyJySRN/NslZdmC/jQG+X33I8yz
    460 CdHWVAcPtMrHIdisjt3MlCuLiZs5GDiU6dndPKh2/bU5x/hqzY2jWnp6xlb4zjrO
    461 Nl47zPMTGaYQ0jb4/v9VS34tbJAWKpEzSJbMaKhgxaBV4/LAUZpNXnX/S4X3KYcc
    462 LsEMhwuBRYd2D/UHruNHlhB/M8lSouGfKW3WyMNFAiV/7dT512+t7ZjFf+thQjaA
    463 FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc=
    464 =TREp
    465 -----END PGP PUBLIC KEY BLOCK----- ",
     152ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn
     153AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob
     154pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF
     155eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+
     156aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M
     1572wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ
     158VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU
     1593NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh
     160qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1
     161IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8
     1621UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp
     163HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN
     164MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+
     165UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh
     166R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+
     167N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc
     168kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e
     169lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT
     170DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb
     171kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf
     172DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei
     173BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z
     174XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2
     175+zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU
     176fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH
     177dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4
     178qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2
     1797mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq
     180UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x
     181Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA
     182KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3
     183okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7
     184bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4
     1854B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX
     186vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0
     187jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y
     188ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD
     1897xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR
     190M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf
     191REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y
     192DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk
     193ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU=
     194=a34C
     195-----END PGP PUBLIC KEY BLOCK-----",
    466196          }
    467197        EOS
    468198
    469199        apply_manifest(pp, :catch_failures => true)
    470         apply_manifest(pp, :catch_changes => 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-----
     212Version: GnuPG v1.4.12 (GNU/Linux)
     213Comment: GPGTools - http://gpgtools.org
     214
     215mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b
     216fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg
     2175iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+
     218S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY
     219GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH
     220Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v
     221VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0
     222Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI
     223wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN
     224NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl
     225f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB
     226tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL
     227ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn
     228AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob
     229pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF
     230eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+
     231aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M
     2322wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ
     233VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU
     2343NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh
     235qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1
     236IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8
     2371UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp
     238HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN
     239MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+
     240UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh
     241R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+
     242N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc
     243kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e
     244lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT
     245DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb
     246kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf
     247DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei
     248BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z
     249XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2
     250+zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU
     251fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH
     252dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4
     253qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2
     2547mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq
     255UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x
     256Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA
     257KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3
     258okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7
     259bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4
     2604B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX
     261vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0
     262jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y
     263ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD
     2647xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR
     265M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf
     266REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y
     267DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk
     268ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYWJAhwEEAEC
     269AAYFAlHk3M4ACgkQSjMLmtZI+uP5hA//UTZfD340ukip6jPlMzxwSD/QapwtO7D4
     270gsGTsXezDkO97D21d1pNaNT0RrXAMagwk1ElDxmn/YHUDfMovZa2bKagjWmV38xk
     271Ws+Prh1P44vUDG30CAU6KZ+mTGLUbolfOvDffCTm9Mn1i2kxFaJxbVhWR6zR28KZ
     272R28s1IBsrqeTCksYfdKdkuw1/j850hW8MM3hPBJ/48VLx5QEFfnlXwt1fp+LygAv
     273rIyJw7vJtsa9QjCIkQk2tcv77rhkiZ6ADthgVIx5j3yDWSm4nLqFpwbQTKrNRrCb
     2745XbL/oIMeHJuFICb2HckDS1KuKXHmqvDuLoRr0/wFEZMps5XQevomUa7JkMeS5j9
     275AubCG4g1zKEtPPaGDsfDKBljCHBKwUysQj5oGU5w8VvlOPnS62DBfsgU2y5ipmmI
     276TYkjSOL6LXwO6xG5/sxA8cyoJSmbN286imcY6AHloTiiu6/N7Us+CNrhw/V7HAun
     27756etWBn3bZWCRGGAPF3qJr4y2sUMY0E3Ha7OPEHIKfBb4MiJnpXntWT28nQfF3dl
     278TFTthAzwcnZchx2es4yrfDXn33Y4eisqxWCbTluErXUogUEKH1KohSatYMtxencv
     2797bUlzIr22zSUCYyVf9cyg50kBy+0J7seEpqG5K5R8z9s/63BT5Oghmi6bB2s5iK5
     280fBt3Tu1IYpyZAg0EURGeeQEQALoU2rlo+usvGKqmBKaEl8Cbx0UZY4tQa1OQSDCj
     2816QeCBc36rq2NCAFpjYg0nrxMN86e0aHYVVetT75rSX701jRJD/TRCPzr03QVwEtk
     282GpGIpBXtdx0962I0We5rSZL2TWKuPtGRKrbs6CSVlNynLprIEnN+2sJYd/1yEsrR
     2839wBtUfVOkq6o4hBWOj4oEqhqQv1MPv1RPqGEgJl19s4LS9277cMIwrj553nGzsy1
     284XwO6BQIP8IhJQZ+8Okw3UaJjLHkJExgo3UHMFdZhAOOYbrlxwq3lENmkdgjxCUBZ
     285iVNiEX9NLm8x1HWaW/nnBIHu6g7r+1Ff5qMSI2hBVan6om4gKHdI9wThG89V16Nq
     2863YztuK5L6Nh9a7BVQJos0r419NHGXPqXqN99jWRL+jAqwKozviUYijDx8k4xLnpQ
     2871dIbHfwE0MPuIkgHeQIoBMkxD1tiQC7ouqVRqU1gg9VKhOZf0opDnvqQ+cDMyfUC
     288hgrjjikSoCBIVCDvr1r7T/gUMDEXfnaMfAdEy1z9qnUzTRRzMbl4BN3Zn+4Htf+B
     289zpAln6H8h7sBb6CO1TX2Qh3JPTrV9zSSbbOW/kuySU+rkHBQPza5l+pnWD7eXaVj
     2907+WEx+TsYIP9Gpe/FOVp2ht93NgjNFAodPW+i5jm7MRk+vlzjidHJ69pEUoQQtuk
     291Td8LABEBAAG0V1B1cHBldCBMYWJzIE5pZ2h0bHkgQnVpbGQgS2V5IChQdXBwZXQg
     292TGFicyBOaWdodGx5IEJ1aWxkIEtleSkgPGRlbGl2ZXJ5QHB1cHBldGxhYnMuY29t
     293PokCPwQTAQIAKQUCURGzrQIbAwUJBaOagAcLCQgHAwIBBhUIAgkKCwQWAgMBAh4B
     294AheAAAoJELj5mcAHu2xX7UUQAKGDOQS20BRNEa3top+dQONWmC/j1ABDVTOkF7Zc
     2959JT5oEESzVof/yIWKAfCbYyH5l3yySZI3NOQt7CswIWDYe0JR/uBhyGoHkA1t52L
     296zP45UxI29K5XaeBm3qoQbV3W6GWScGkijfaJ2yz/dIHh0m3SkC8mUGBrIqqVwV38
     297JcsW1/CzTetZiWGlk8/nPeUg+snGwd22zUlZkTaVh3FbHrqh2xsMFdrphDOtSU5s
     298Jzebu5h6mp7cMZELaRNNmg3O7VeQMA1hwaq05jQuPisS/ktOqSgJXh8pOaUpDoV0
     299ta4JSwaqEkWsZHv3tmaXGy0Qzs9X9bOjRbIKgN2w9JY+z2OKJ5L4Yg5VMJPYMdKp
     300wGSQf70YaaT0d1N/84P8j7CRsDBnVME/TDuE2u1XM/9B7xmdcI28FxZrqQc06OGS
     301UvK9vSgTkTxXSsjobah8ssi4C4/zRgTZu94KOhSlH4YGrzLX7g25M708NxgXJiPZ
     3027K8Ceea28mHYf3f+JobEbpzPeewURAFCXHCm4cFU31FsiXQrNhGmUpRKVayiMMzN
     303JF8yjuHpwB2DjGdV3QR5C8Ms+RO86JnD/Yq9zeoF7T7jCAkQKuh76cQe60XllKhV
     304Dlh2rpKXAtLAbea9hcSraZkm3Lj+oKzXUSf3Ml9xp65yjUjm9O+a4AMQ1wFroGEP
     305QUEEiQEcBBABCgAGBQJT0XkMAAoJELrV8KOS6YVy7O8IAKJYT0Afd6Ufkx4cR0rj
     306soCoPpDDiyITmSdeLSzvl9rr1X39+PqR0dcncEhO1heCZo8sm/iMNsiV4UORv2Wh
     307lCriE2fDpu9ByX1rwuKl9nEu9xx2WTRWtdx4M4fB+ZXYiJbgb1vuM46mGp51NYRK
     308ByPIm1EAjOhsfXm14BZICOQO5WLy5Sv/oRVSEBiGXNXf1kweXSzrhRCNEWYfPhQJ
     3094pCsvNeiQuhqQIB+J9FbA48x47JikMM92w0aEa4aVVokNF2PBCp9/SdRAzlY7Ikx
     310aAdIzuyc0ANIZBPgYxIgdH/Fltwz6VW6iFNk3gS7jR6TFBjRQba73I53IBbiVIRq
     311dnWJAhwEEAECAAYFAlPRd2QACgkQRp6bNpsPDx1HiQ//TEOYPkp+iHT/wNcTUO4A
     312r00La6xl9bw3v5XlnW83YjrB0ieChbXcHpChNRk08vdRSgxyWCtbIwmMeOO8mDiv
     313aJbYrgngJY+FSMsAzhSyPauze0l4PV3dnLRMZmK5Nro4GNI4oiOGp0qXPcBjstlc
     314BnEa6XuLHDnRYFhkcVboZDu2o/tdz+OJD+CZjyeiIAtChMJ+ghlpfO3cOuK0wmTh
     315Jtn/eDAfjB34CZdkt1paKZap5bLZCF0QwP+DbJd189HZy/ot6w2jpNXFt1JFnoyn
     3167Nluo6MPNTZSG3pzh7fvzb924M1sm+CyLFzEV1rYi6ujyHOsW+KYc6fOUB5jk/BZ
     317QPaU6vG1JRDLHWPjbPf9Ax8uGQSrVXC3txiu2OLZcn4Ti54PoHed5m7Fxk9fnaiT
     318gNGL0ox/wmIPbIsdGrXuTHcdmPyuRM5btXFWCMbknTIbefEEOQdbPl+e5QgWR5cf
     319EVOvo6qTBstH7aHqiWMQpuvnU7l9xpfcJ40SawHxiY/UCKXhpf7SJXAvE8zkMIvi
     320PJaHKDy2FyCwtCHwG1wiQSqjnCJt5gmTGCXzO/yAGhcgUWbTpykIMij9IPboL7VL
     321er+I/3CikWeszcjBp5lJhg4k2OCBi5LOiI+8EUTlFcAqxbTFEyM+IQDOwnW8Gznf
     322nMb070gS9iBk0GTVC9iXHla0U1B1cHBldCBMYWJzIE5pZ2h0bHkgQnVpbGQgS2V5
     323IChQdXBwZXQgTGFicyBOaWdodGx5IEJ1aWxkIEtleSkgPGluZm9AcHVwcGV0bGFi
     324cy5jb20+iQI+BBMBAgAoBQJREZ55AhsDBQkFo5qABgsJCAcDAgYVCAIJCgsEFgID
     325AQIeAQIXgAAKCRC4+ZnAB7tsVyjmEACSw9ZLq1ehcq8/QemiB+i8W/yVYZAxphmq
     326w547JXOxk19V5joR5Wp0fwqIEvE1Thw0mAiMUDAgM4TpdZc8zOaILj2OH1gWsuyi
     327fbFTHExTZAuZ1Lx1Nc1AlUv5Q+bmrzjAhx13Nk3LE7yfe4DLZnSyF3cZxAcSXYSq
     328wSo1sBrWxf2bOYnuyJwLlz94eeEkNdSi0mfANqt+ihiiAeTe9OXf65iPFn8SYRqV
     329W0hUayVlOedoCl0kviVXHvIgHxgkfazeIPqncFgPiRyYGNCVhKjaFjpUm+RzBFOk
     330HQzzcyNovlnjHmhxKkN+L2f1JqmHmUQguTTpJfpRdwmnEkA1BYY6m0WQ5Owga1eE
     331WEeHh9AjtVrukJOOibvpoS/M5FdAgaUgGXPIOziURDKBjQ0zuYMtlXgEDzKt0ugp
     3327YO74EAv1JiyeZ0Mu+m6WnxRX0Sb/op0ef74xZYD4eKYixOxahQ7kxtO9qTy+pOs
     333c3/KSNGv+oQh/CgChBbN3oq1UBfL6gVioRIp2GmP6Jmfipfod+VGIVI8xyfD3h/Z
     334nKF7dEHHMsyB03Ap2ypCcy8OEVwCeAZ4eY+lKXNyBSnddXcMGuFTqgJ1IMvTm0T8
     335BfYn74A4fDqwNKKQGYjb67MZ+3N7YaWwCgWUvFpfd557fTQmZfV1arok2urvWIGa
     336x82lgKTA64kBHAQQAQoABgUCU9F5DwAKCRC61fCjkumFchUwB/wLfX/PA0LUbSen
     337es6ilcbHOZVZKyppMA5bIU6fG6SIS9FVauL0lgkEnJAhr5w3rXGd14LM33QkkPbs
     338/uNe2YQHzzrsffLhFyJkKJXH5rc6sSM7RYbAxtMNXKpkdMhPGmHgIgMzJo3ZuD8+
     339ixsyR/8tGAMXbHwX5aAJDKYfg8X4kkPBxzysWJzN5/wFbYEK8FHiULkHNfJv480H
     340UBLNwczVeg9Etaje0tCQuGkD/CJHR50Kxuc/BiGYdYVjAnQVILXa2NcBizXtUU3f
     341N+6L+K2m9Fm3Dvhw0ZVEq7TxTMmHA23HGt8fMJ7zNCRO3krK7vtjUQxSXKOM7HF+
     342D60QA/oGiQIcBBABAgAGBQJT0XdkAAoJEEaemzabDw8dtt0QAITarh4rsJWupVXD
     343BFHbxsUyT7AXspJ7kW3vxG3Y/gHSjleDX0VdblzUUBmD5y5JvR/DHrAgDd8XQN4E
     3444+hTOpZhzILZcoSWhiAW+VuL5b+R5NxSzIiHEt/qKgslvcx/sbQz8+Ro/zWHxhn9
     3451uFf5JOFw+5W2wBmC4OdQby7B8AiV58OBAGcVUs0+57oJRYIU0zTRAJKRstMlD7s
     346F3R1d6EyNUbGjnJhPcltk6RRsYuJJx8vJzyY4pEy5eZPNSPEpFBjWlWyRnKDbQ6/
     347TbtSB7bojbtjQFhh905kvdKxzcBkFgYTyzqJffUwHqJti8QQMraGAtC79/D/0vmf
     348lIJtzTB+gA/NOhyriaSXoGzi0oA/ZKReU3uJd5Yl202s/hvG+xpBkh7ouaVa5zFX
     349cqfi6gmmpQzVo6snI7d+Wonyvg1lhqZ7TXvtUIilsmbc5zEedidaCei77buX/ZuV
     3508jo+32HtsSKTYYHVsJzY6YzEy1SVfrUY+EdXXWG7Y97JaXKJc8oCNT1YA8BG4c+M
     3511cMXO1LTiP56gyYnrH6/oTIFrBXMl3dO/gKpcwUmf8lScFXIfVn5Wm3D0n6cUBKT
     352aRmmpfu7UhzBMEA7ZrIGxNBuD8WwfVi8ZSwBbV92fHkukkfixkhmeUmCB9vyq31+
     353UfTwFXkHDTMZ4jfctKuBU+3p5sEwuQINBFERnnkBEAC0XpaBe0L9yvF1oc7rDLEt
     354XMrjDWHL6qPEW8ei94D619n1eo1QbZA4zZSZFjmN1SWtxg+2VRJazIlaFNMTpp+q
     3557lpmHPwzGdFdZZPVvjwd7cIe5KrGjEiTD1zf7i5Ws5Xh9jTh6VzY8nseakhIGTOC
     356lWzxl/+X2cJlMAR4/nLJjiTi3VwI2JBT8w2H8j8EgfRpjf6P1FyLv0WWMODc/hgc
     357/o5koLb4WRsK2w5usP/a3RNeh6L6iqHiiAL1Y9+0GZXOrjtNpkzPRarIL3MiX29o
     358VKSFcjUREpsEZHBHLwuA3WIR6WBX49LhrA6uLgofYhALeky6/H3ZFEH9ZS3plmnX
     359/vow8YWmz0Lyzzf848qsg5E5cHg36m2CXSEUeZfH748H78R62uIf/shusffl9Op2
     360aZnQoPyeYIkA6N8m29CqIa/pzd68rLEQ+MNHHkp0KjQ0oKyrz9/YCXeQg3lIBXAv
     361+FIVK/04fMA3rr5tnynkeG9Ow6fGEtqzNjZhMZtx5BnkhdLTt6qu+wyaDw3q9X1/
     362/j3lhplXteYzUkNUIinCHODGXaI55R/I4HNsbvtvy904g5sTHZX9QBn0x7QpVZaW
     36390jCgl6+NPH96g1cuHFuk+HED4H6XYFcdt1VRVb9YA7GgRXkSyfw6KdtGFT15e7o
     3647PcaD6NpqyBfbYfrNQmiOwARAQABiQIlBBgBAgAPBQJREZ55AhsMBQkFo5qAAAoJ
     365ELj5mcAHu2xXR8cP/Ai4PqUKBZdN6Jz628VQdiVX2EO7jhQ7KYdt9RWz87kfm0rC
     366LhdROCyeddgGsYbpdikC3Gzrk0JFIs/qAzpZOMIip0cXTxDEWWObuwShIac8hmZz
     367BE5SM7TcA9+/jmBwLajcreGgKs/MfDkkWkiBT/B+FyHkqS6O/rdBvYqFzLtvUigG
     368SRf1clP4QEGWcR6LLsJ1uiH+brK3G1GsILVpX5iQ0Y4wNv0xNRGZzAPVZ1/vgHCM
     369sAG7TZy26oOraigvnZeo1Q9r7pg+i6uSIu4ywfdNTOuoBK+VY+RKyAybBHIqH07w
     370p9TmYOY1x+wmIe0oSYcR47OcvZU57fdLsEB9djYvkGkkmbz0gwXQL0iEW3kX+05J
     371zrLzPsx6muR35SPNCvfR2T/0VCDwtNwwxACWuZI/tqsobU/+lA/MqRZ4kOD/Bx07
     372CpZfYIAi2STc0MIDvpyDnZLiYVMMkqV4+gn2ANtkF+GKbra3Aeof9b4KEVabSaQ5
     3735W70DJF0G5bmHBSdyqdYnKB/yRj1rH+dgRbiRMv7rBAx5Q8rbYiym8im+5XNUDy2
     374ZTQcCD53HcBLvKX6RJ4ByYawKaQqMa27WK/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)
    471382        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    472383      end
    … …  
    491402
    492403  describe 'server =>' 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
     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
    514421      it 'works' do
    515422        pp = <<-EOS
    … …  
    517424          id     => '#{PUPPETLABS_GPG_KEY_FINGERPRINT}',
    518425          ensure => 'present',
    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)
     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)
    528432        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    529433      end
    … …  
    575479
    576480        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)
     481        apply_manifest(pp, :catch_failures => true)
    592482        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    593483      end
    … …  
    638528
    639529        apply_manifest(pp, :catch_failures => true)
    640         apply_manifest(pp, :catch_changes => true)
     530        apply_manifest(pp, :catch_failures => true)
    641531        shell(CENTOS_KEY_CHECK_COMMAND)
    642532      end
    … …  
    682572
    683573        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)
     574        apply_manifest(pp, :catch_failures => true)
    699575        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    700576      end
    … …  
    742618        pp = <<-EOS
    743619        apt_key { 'puppetlabs':
    744           id     => 'EF8D349F',
     620          id     => '4BD6EC30',
    745621          ensure => 'present',
    746622          source => '/tmp/puppetlabs-pubkey.gpg',
    … …  
    749625
    750626        apply_manifest(pp, :catch_failures => true)
    751         apply_manifest(pp, :catch_changes => true)
     627        apply_manifest(pp, :catch_failures => true)
    752628        shell(PUPPETLABS_KEY_CHECK_COMMAND)
    753629      end
    … …  
    806682
    807683        apply_manifest(pp, :catch_failures => true)
    808         apply_manifest(pp, :catch_changes => true)
    809         shell(PUPPETLABS_KEY_CHECK_COMMAND)
     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
    810701      end
    811702    end
    … …  
    824715
    825716        apply_manifest(pp, :catch_failures => true)
    826         apply_manifest(pp, :catch_changes => true)
     717        apply_manifest(pp, :catch_failures => true)
    827718      end
    828719    end
    … …  
    832723        pp = <<-EOS
    833724        apt_key { 'puppetlabs':
    834           id      => '6F6B15509CF8E59E6E469F327F438280EF8D9999',
     725          id      => '47B320EB4C7C375AA9DAE1A01054B7A24BD6E666',
    835726          ensure  => 'present',
    836727          source  => 'https://#{PUPPETLABS_APT_URL}/#{PUPPETLABS_GPG_KEY_FILE}',
  • src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/apt_spec.rb

    rad28f83 rbcf0be5  
    11require 'spec_helper_acceptance'
    2 
    3 MAX_TIMEOUT_RETRY              = 3
    4 TIMEOUT_RETRY_WAIT             = 5
    5 TIMEOUT_ERROR_MATCHER    = /no valid OpenPGP data found/
    62
    73describe 'apt class' do
    … …  
    2521            'repos'    => 'main',
    2622            'key'      => {
    27               'id'     => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
    28               'server' => 'hkps.pool.sks-keyservers.net',
     23              'id'     => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
     24              'server' => 'pgp.mit.edu',
    2925            },
    3026          },
    … …  
    3430        update => {
    3531          'frequency' => 'always',
    36           'timeout'   => 400,
    37           'tries'     => 3,
     32          'timeout'   => '400',
     33          'tries'     => '3',
    3834        },
    3935        purge => {
    … …  
    4743      EOS
    4844
    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 
     45      apply_manifest(pp, :catch_failures => true)
    5446      apply_manifest(pp, :catch_failures => true)
    5547    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/class_spec.rb

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

    rad28f83 rbcf0be5  
    11HOSTS:
    2   ubuntu-1404-x64:
     2  ubuntu-server-12042-x64:
    33    roles:
    4       - agent
    5       - default
    6     platform: ubuntu-14.04-amd64
    7     hypervisor: vagrant
    8     box: puppetlabs/ubuntu-14.04-64-nocm
     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
    99CONFIG:
    1010  type: foss
     11  vagrant_ssh_port_random: true
  • src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_backports_spec.rb

    rad28f83 rbcf0be5  
    88      let(:facts) do
    99        {
    10           :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    1110          :lsbdistid       => 'Debian',
    1211          :osfamily        => 'Debian',
    … …  
    2726      let(:facts) do
    2827        {
    29           :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0' }},
    3028          :lsbdistid       => 'Debian',
    3129          :osfamily        => 'Debian',
    … …  
    4644      let(:facts) do
    4745        {
    48           :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    4946          :lsbdistid       => 'Ubuntu',
    5047          :osfamily        => 'Debian',
    5148          :lsbdistcodename => 'trusty',
    52           :lsbdistrelease  => '14.04',
    5349          :puppetversion   => Puppet.version,
    5450        }
    … …  
    6662      let(:facts) do
    6763        {
    68           :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    6964          :lsbdistid       => 'Ubuntu',
    7065          :osfamily        => 'Debian',
    7166          :lsbdistcodename => 'trusty',
    72           :lsbdistrelease  => '14.04',
    7367          :puppetversion   => Puppet.version,
    7468        }
    … …  
    9589      let(:facts) do
    9690        {
    97           :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    9891          :lsbdistid       => 'Ubuntu',
    9992          :osfamily        => 'Debian',
    10093          :lsbdistcodename => 'trusty',
    101           :lsbdistrelease  => '14.04',
    10294          :puppetversion   => Puppet.version,
    10395        }
    … …  
    123115    let(:facts) do
    124116      {
    125         :os => { :family => 'Debian', :name => 'Linuxmint', :release => { :major => '17', :full => '17' }},
    126117        :lsbdistid       => 'linuxmint',
    127118        :osfamily        => 'Debian',
    … …  
    208199    let(:facts) do
    209200      {
    210         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    211201        :lsbdistid       => 'Ubuntu',
    212202        :osfamily        => 'Debian',
    213203        :lsbdistcodename => 'trusty',
    214         :lsbdistrelease  => '14.04',
    215204        :puppetversion   => Puppet.version,
    216205      }
    … …  
    225214        expect {
    226215          subject.call
    227         }.to raise_error(Puppet::Error, /expects a/)
     216        }.to raise_error(Puppet::Error, /is not a string/)
    228217      end
    229218    end
    … …  
    237226        expect {
    238227          subject.call
    239         }.to raise_error(Puppet::Error, /expects a/)
     228        }.to raise_error(Puppet::Error, /is not a string/)
    240229      end
    241230    end
    … …  
    249238        expect {
    250239          subject.call
    251         }.to raise_error(Puppet::Error, /expects a/)
     240        }.to raise_error(Puppet::Error, /is not a string/)
    252241      end
    253242    end
    … …  
    261250        expect {
    262251          subject.call
    263         }.to raise_error(Puppet::Error, /expects a/)
     252        }.to raise_error(Puppet::Error, /is not a string/)
    264253      end
    265254    end
    … …  
    273262        expect {
    274263          subject.call
    275         }.to raise_error(Puppet::Error, /expects a/)
     264        }.to raise_error(Puppet::Error, /pin must be either a string, number or hash/)
    276265      end
    277266    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_spec.rb

    rad28f83 rbcf0be5  
    11require 'spec_helper'
    22describe 'apt' do
    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
     3  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version} }
     4
    125  context 'defaults' do
    136    it { is_expected.to contain_file('sources.list').that_notifies('Class[Apt::Update]').only_with({
    … …  
    145138  context 'with sources defined on valid osfamily' do
    146139    let :facts do
    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',
     140      { :osfamily        => 'Debian',
     141        :lsbdistcodename => 'precise',
     142        :lsbdistid       => 'Debian',
    152143        :puppetversion   => Puppet.version,
    153144      }
    … …  
    165156        'location'   => 'http://apt.puppetlabs.com',
    166157        'repos'      => 'main',
    167         'key'        => { 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 'server' => 'pgp.mit.edu' },
     158        'key'        => { 'id' => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30', 'server' => 'pgp.mit.edu' },
    168159      }
    169160    } } }
    … …  
    187178  end
    188179
    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 
    217180  context 'with keys defined on valid osfamily' do
    218181    let :facts do
    219       {
    220         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
    221         :osfamily        => 'Debian',
     182      { :osfamily        => 'Debian',
    222183        :lsbdistcodename => 'precise',
    223184        :lsbdistid       => 'Debian',
    … …  
    229190        'server' => 'subkeys.pgp.net',
    230191      },
    231       'EF8D349F' => {
     192      '4BD6EC30' => {
    232193        'server' => 'pgp.mit.edu',
    233194      }
    … …  
    238199    })}
    239200
    240     it { is_expected.to contain_apt__key('EF8D349F').with({
     201    it { is_expected.to contain_apt__key('4BD6EC30').with({
    241202        :server => 'pgp.mit.edu',
    242203    })}
    … …  
    245206  context 'with ppas defined on valid osfamily' do
    246207    let :facts do
    247       {
    248         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
    249         :osfamily        => 'Debian',
     208      { :osfamily        => 'Debian',
    250209        :lsbdistcodename => 'precise',
    251210        :lsbdistid       => 'ubuntu',
    … …  
    265224  context 'with settings defined on valid osfamily' do
    266225    let :facts do
    267       {
    268         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
    269         :osfamily        => 'Debian',
     226      { :osfamily        => 'Debian',
    270227        :lsbdistcodename => 'precise',
    271228        :lsbdistid       => 'Debian',
    … …  
    284241  context 'with pins defined on valid osfamily' do
    285242    let :facts do
    286       {
    287         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }},
    288         :osfamily        => 'Debian',
     243      { :osfamily        => 'Debian',
    289244        :lsbdistcodename => 'precise',
    290245        :lsbdistid       => 'Debian',
    … …  
    337292      end
    338293    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
    339306  end
    340307end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_update_spec.rb

    rad28f83 rbcf0be5  
    44describe 'apt::update', :type => :class do
    55  context "and apt::update['frequency']='always'" do
    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|
     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|
    117      context "and $::apt_update_last_success indicates #{desc}" do
    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         }
     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' },}" }
    2310        it 'should trigger an apt-get update run' do
    2411          #set the apt_update exec's refreshonly attribute to false
    … …  
    2815    end
    2916    context 'when $::apt_update_last_success is nil' do
    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       } }
     17      let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    3718      let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'always' },}" }
    3819      it 'should trigger an apt-get update run' do
    … …  
    4324  end
    4425  context "and apt::update['frequency']='reluctantly'" do
    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|
     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|
    5027      context "and $::apt_update_last_success indicates #{desc}" do
    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         } }
     28        let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version,} }
    5929        let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" }
    6030        it 'should not trigger an apt-get update run' do
    … …  
    6535    end
    6636    context 'when $::apt_update_last_success is nil' do
    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       } }
     37      let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    7438      let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" }
    7539      it 'should not trigger an apt-get update run' do
    … …  
    8347      { 'we are due for a run' => 1406660561,'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval|
    8448        context "and $::apt_update_last_success indicates #{desc}" do
    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           } }
     49          let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    9350          let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
    9451          it 'should trigger an apt-get update run' do
    … …  
    9956      end
    10057      context 'when the $::apt_update_last_success fact has a recent value' do
    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         } }
     58        let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :apt_update_last_success => Time.now.to_i, :puppetversion   => Puppet.version, } }
    10959        let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
    11060        it 'should not trigger an apt-get update run' do
    … …  
    11464      end
    11565      context 'when $::apt_update_last_success is nil' do
    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         } }
     66        let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :apt_update_last_success => nil, :puppetversion   => Puppet.version, } }
    12467        let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
    12568        it 'should trigger an apt-get update run' do
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/conf_spec.rb

    rad28f83 rbcf0be5  
    44    'class { "apt": }'
    55  end
    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   } }
     6  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    137  let :title do
    148    'norecommends'
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/key_compat_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'apt::key', :type => :define do
    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'
     4  let(:facts) { { :lsbdistid => 'Debian' } }
     5  GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
    116
    127  let :title do
    … …  
    149  end
    1510
    16   let :pre_condition do
    17     'include apt'
    18   end
    19 
    2011  describe 'normal operation' do
    2112    describe 'default options' do
    22       it {
    23         is_expected.to contain_apt_key(title).with({
     13      it 'contains the apt_key' do
     14        should contain_apt_key(title).with({
    2415          :id                => title,
    2516          :ensure            => 'present',
    2617          :source            => nil,
    27           :server            => 'keyserver.ubuntu.com',
     18          :server            => nil,
    2819          :content           => nil,
    29         })
    30       }
     20          :keyserver_options => nil,
     21        })
     22      end
    3123      it 'contains the apt_key present anchor' do
    32         is_expected.to contain_anchor("apt_key #{title} present")
     24        should contain_anchor("apt_key #{title} present")
    3325      end
    3426    end
    … …  
    4032
    4133      let :params do {
    42         :id => GPG_KEY_ID,
    43       } end
    44 
    45       it 'contains the apt_key' do
    46         is_expected.to contain_apt_key(title).with({
     34        :key => GPG_KEY_ID,
     35      } end
     36
     37      it 'contains the apt_key' do
     38        should contain_apt_key(title).with({
    4739          :id                => GPG_KEY_ID,
    4840          :ensure            => 'present',
    4941          :source            => nil,
    50           :server            => 'keyserver.ubuntu.com',
     42          :server            => nil,
    5143          :content           => nil,
     44          :keyserver_options => nil,
    5245        })
    5346      end
    5447      it 'contains the apt_key present anchor' do
    55         is_expected.to contain_anchor("apt_key #{GPG_KEY_ID} present")
     48        should contain_anchor("apt_key #{GPG_KEY_ID} present")
    5649      end
    5750    end
    … …  
    6356
    6457      it 'contains the apt_key' do
    65         is_expected.to contain_apt_key(title).with({
     58        should contain_apt_key(title).with({
    6659          :id                => title,
    6760          :ensure            => 'absent',
    6861          :source            => nil,
    69           :server            => 'keyserver.ubuntu.com',
     62          :server            => nil,
    7063          :content           => nil,
     64          :keyserver_options => nil,
    7165        })
    7266      end
    7367      it 'contains the apt_key absent anchor' do
    74         is_expected.to contain_anchor("apt_key #{title} absent")
     68        should contain_anchor("apt_key #{title} absent")
    7569      end
    7670    end
    … …  
    7872    describe 'set a bunch of things!' do
    7973      let :params do {
    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({
     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({
    8882          :id      => title,
    8983          :ensure  => 'present',
    9084          :source  => 'http://apt.puppetlabs.com/pubkey.gpg',
    9185          :server  => 'pgp.mit.edu',
    92           :content => params[:content],
     86          :content => params[:key_content],
    9387          :options => 'debug',
    9488        })
    9589      end
    9690      it 'contains the apt_key present anchor' do
    97         is_expected.to contain_anchor("apt_key #{title} present")
     91        should contain_anchor("apt_key #{title} present")
    9892      end
    9993    end
    … …  
    10195    context "domain with dash" do
    10296      let(:params) do{
    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({
     97        :key_server => 'p-gp.m-it.edu',
     98      } end
     99      it 'contains the apt_key' do
     100        should contain_apt_key(title).with({
    107101          :id        => title,
    108102          :server => 'p-gp.m-it.edu',
    … …  
    114108      let :params do
    115109        {
    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({
     110          :key_server => 'hkp://pgp.mit.edu',
     111        }
     112      end
     113      it 'contains the apt_key' do
     114        should contain_apt_key(title).with({
    121115          :id        => title,
    122116          :server => 'hkp://pgp.mit.edu',
    … …  
    127121      let :params do
    128122        {
    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({
     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({
    134128          :id        => title,
    135129          :server => 'hkp://pgp.mit.edu:80',
    … …  
    142136    context "domain begin with dash" do
    143137      let(:params) do{
    144         :server => '-pgp.mit.edu',
     138        :key_server => '-pgp.mit.edu',
    145139      } end
    146140      it 'fails' do
    … …  
    151145    context "domain begin with dot" do
    152146      let(:params) do{
    153         :server => '.pgp.mit.edu',
     147        :key_server => '.pgp.mit.edu',
    154148      } end
    155149      it 'fails' do
    … …  
    160154    context "domain end with dot" do
    161155      let(:params) do{
    162         :server => "pgp.mit.edu.",
     156        :key_server => "pgp.mit.edu.",
    163157      } end
    164158      it 'fails' do
    … …  
    169163      let :params do
    170164        {
    171           :server => 'hkp://pgpiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.mit.edu'
     165          :key_server => 'hkp://pgpiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.mit.edu'
    172166        }
    173167      end
    … …  
    179173      let :params do
    180174        {
    181           :server => 'hkp://pgp.mit.edu:8008080'
     175          :key_server => 'hkp://pgp.mit.edu:8008080'
    182176        }
    183177      end
    … …  
    189183      let :params do
    190184        {
    191           :server => 'abc://pgp.mit.edu:80'
     185          :key_server => 'abc://pgp.mit.edu:80'
    192186        }
    193187      end
    … …  
    199193      let :params do
    200194        {
    201           :server => 'hkp://pgp.mit.edu:'
     195          :key_server => 'hkp://pgp.mit.edu:'
    202196        }
    203197      end
    … …  
    209203      let :params do
    210204        {
    211           :server => 'hkp://pgp.mit.edu.'
     205          :key_server => 'hkp://pgp.mit.edu.'
    212206        }
    213207      end
    … …  
    218212    context "url begin with a dash" do
    219213      let(:params) do{
    220         :server => "hkp://-pgp.mit.edu",
     214        :key_server => "hkp://-pgp.mit.edu",
    221215      } end
    222216      it 'fails' do
    … …  
    235229    context 'invalid source' do
    236230      let :params do {
    237         :source => 'afp://puppetlabs.com/key.gpg',
     231        :key_source => 'afp://puppetlabs.com/key.gpg',
    238232      } end
    239233      it 'fails' do
    … …  
    244238    context 'invalid content' do
    245239      let :params do {
    246         :content => [],
    247       } end
    248       it 'fails' do
    249         expect { subject.call }.to raise_error(/expects a/)
     240        :key_content => [],
     241      } end
     242      it 'fails' do
     243        expect { subject.call }.to raise_error(/is not a string/)
    250244      end
    251245    end
    … …  
    253247    context 'invalid server' do
    254248      let :params do {
    255         :server => 'two bottles of rum',
     249        :key_server => 'two bottles of rum',
    256250      } end
    257251      it 'fails' do
    … …  
    262256    context 'invalid keyserver_options' do
    263257      let :params do {
    264         :options => {},
    265       } end
    266       it 'fails' do
    267         expect { subject.call }.to raise_error(/expects a/)
     258        :key_options => {},
     259      } end
     260      it 'fails' do
     261        expect { subject.call }.to raise_error(/is not a string/)
    268262      end
    269263    end
    … …  
    276270      end
    277271      it 'fails' do
    278         expect { subject.call }.to raise_error(/Enum\['absent', 'present'\]/)
     272        expect { subject.call }.to raise_error(/does not match/)
    279273      end
    280274    end
    … …  
    283277      context 'two apt::key resources for same key, different titles' do
    284278        let :pre_condition do
    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,
     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,
    291285            :ensure => 'present',
    292286          })
    293         end
    294 
    295         it 'contains the original apt::key resource' do
    296           is_expected.to contain_apt__key(title).with({
     287          should contain_apt__key(title).with({
    297288            :id     => title,
    298289            :ensure => 'present',
    … …  
    300291        end
    301292
    302         it 'contains the native apt_key' do
    303           is_expected.to contain_apt_key('duplicate').with({
     293        it 'contains only a single apt_key' do
     294          should contain_apt_key('duplicate').with({
    304295            :id                => title,
    305296            :ensure            => 'present',
    306297            :source            => nil,
    307             :server            => 'keyserver.ubuntu.com',
     298            :server            => nil,
    308299            :content           => nil,
    309300            :keyserver_options => nil,
    310301          })
    311         end
    312 
    313         it 'does not contain the original apt_key' do
    314           is_expected.not_to contain_apt_key(title)
     302          should_not contain_apt_key(title)
    315303        end
    316304      end
    … …  
    318306      context 'two apt::key resources, different ensure' do
    319307        let :pre_condition do
    320           "#{super()}\napt::key { 'duplicate': id => '#{title}', ensure => 'absent', }"
     308          "apt::key { 'duplicate': key => '#{title}', ensure => 'absent', }"
    321309        end
    322310        it 'informs the user of the impossibility' do
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/key_spec.rb

    rad28f83 rbcf0be5  
    66  end
    77
    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'
     8  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
     9
     10  GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
    1711
    1812  let :title do
    … …  
    252246      } end
    253247      it 'fails' do
    254         expect { subject.call }.to raise_error(/expects a/)
     248        expect { subject.call }.to raise_error(/is not a string/)
    255249      end
    256250    end
    … …  
    270264      } end
    271265      it 'fails' do
    272         expect { subject.call }.to raise_error(/expects a/)
     266        expect { subject.call }.to raise_error(/is not a string/)
    273267      end
    274268    end
    275269
    276270    context 'invalid ensure' do
    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
     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/)
    286278      end
    287279    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/pin_spec.rb

    rad28f83 rbcf0be5  
    44    'class { "apt": }'
    55  end
    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   } }
     6  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    137  let(:title) { 'my_pin' }
    148
    159  context 'defaults' do
    1610    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") }
    1712  end
    1813
    … …  
    2116      {
    2217        'packages' => 'vim',
    23         'version'  => "1",
     18        'version'  => '1',
    2419      }
    2520    end
    2621    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") }
    2723  end
    2824
    … …  
    3531    end
    3632    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") }
    3734  end
    3835
    … …  
    8582        expect {
    8683          subject.call
    87         }.to raise_error(Puppet::Error, /expects an Integer value, got String/)
     84        }.to raise_error(Puppet::Error, /Only integers are allowed/)
    8885      end
    8986    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/ppa_spec.rb

    rad28f83 rbcf0be5  
    88    let :facts do
    99      {
    10         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    1110        :lsbdistrelease  => '11.04',
    1211        :lsbdistcodename => 'natty',
    … …  
    2322      :environment => [],
    2423      :command     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type',
    25       :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list',
     24      :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list',
    2625      :user        => 'root',
    2726      :logoutput   => 'on_failure',
    … …  
    3332    let :facts do
    3433      {
    35         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '15', :full => '15.10' }},
    3634        :lsbdistrelease  => '15.10',
    3735        :lsbdistcodename => 'wily',
    … …  
    4745      :environment => [],
    4846      :command     => '/usr/bin/add-apt-repository -y ppa:user/foo',
    49       :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-wily.list',
     47      :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-ubuntu-foo-wily.list',
    5048      :user        => 'root',
    5149      :logoutput   => 'on_failure',
    … …  
    7270    let :facts do
    7371      {
    74         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    7572        :lsbdistrelease  => '11.04',
    7673        :lsbdistcodename => 'natty',
    … …  
    8784      'environment' => [],
    8885      'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow',
    89       'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
     86      'unless'      => '/usr/bin/test -s /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
    9087      'user'        => 'root',
    9188      'logoutput'   => 'on_failure',
    … …  
    108105    let :facts do
    109106      {
    110         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    111107        :lsbdistrelease  => '11.04',
    112108        :lsbdistcodename => 'natty',
    … …  
    128124      'environment' => [],
    129125      'command'     => '/usr/bin/add-apt-repository -y ppa:user/bar',
    130       'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/user-bar-natty.list',
     126      'unless'      => '/usr/bin/test -s /etc/apt/sources.list.d/user-bar-natty.list',
    131127      'user'        => 'root',
    132128      'logoutput'   => 'on_failure',
    … …  
    146142    let :facts do
    147143      {
    148         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }},
    149144        :lsbdistrelease  => '11.04',
    150145        :lsbdistcodename => 'natty',
    … …  
    166161      'environment' => [],
    167162      'command'     => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow',
    168       'unless'      => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
     163      'unless'      => '/usr/bin/test -s /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
    169164      'user'        => 'root',
    170165      'logoutput'   => 'on_failure',
    … …  
    186181    let :facts do
    187182      {
    188         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    189183        :lsbdistrelease  => '14.04',
    190184        :lsbdistcodename => 'trusty',
    … …  
    208202      :environment => [],
    209203      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    210       :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
     204      :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
    211205      :user        => 'root',
    212206      :logoutput   => 'on_failure',
    … …  
    223217    let :facts do
    224218      {
    225         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    226219        :lsbdistrelease  => '14.04',
    227220        :lsbdistcodename => 'trusty',
    … …  
    243236      :environment => ['http_proxy=http://localhost:8080'],
    244237      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    245       :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
     238      :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
    246239      :user        => 'root',
    247240      :logoutput   => 'on_failure',
    … …  
    258251    let :facts do
    259252      {
    260         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    261253        :lsbdistrelease  => '14.04',
    262254        :lsbdistcodename => 'trusty',
    … …  
    278270      :environment => ['http_proxy=http://localhost:8180'],
    279271      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    280       :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
     272      :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
    281273      :user        => 'root',
    282274      :logoutput   => 'on_failure',
    … …  
    293285    let :facts do
    294286      {
    295         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    296287        :lsbdistrelease  => '14.04',
    297288        :lsbdistcodename => 'trusty',
    … …  
    313304      :environment => ['http_proxy=http://localhost:8180', 'https_proxy=https://localhost:8180'],
    314305      :command     => '/usr/bin/add-apt-repository  ppa:user/foo',
    315       :unless      => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
     306      :unless      => '/usr/bin/test -s /etc/apt/sources.list.d/user-foo-trusty.list',
    316307      :user        => 'root',
    317308      :logoutput   => 'on_failure',
    … …  
    326317    let :facts do
    327318      {
    328         :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    329319        :lsbdistrelease  => '14.04',
    330320        :lsbdistcodename => 'trusty',
    … …  
    351341      let :facts do
    352342        {
    353           :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }},
    354343          :lsbdistrelease  => '14.04',
    355344          :operatingsystem => 'Ubuntu',
    … …  
    371360      let :facts do
    372361        {
    373           :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0.7' }},
    374362          :lsbdistrelease  => '6.0.7',
    375363          :lsbdistcodename => 'wheezy',
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/setting_spec.rb

    rad28f83 rbcf0be5  
    33describe 'apt::setting' do
    44  let(:pre_condition) { 'class { "apt": }' }
    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
     5  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    166  let(:title) { 'conf-teddybear' }
    177
    … …  
    7262      '
    7363    end
    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     } }
     64    let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
    8165    let(:title) { 'conf-teddybear' }
    8266    let(:default_params) { { :content => 'di' } }
    … …  
    9983      let(:params) { default_params }
    10084      it do
    101         expect { subject.call }.to raise_error(Puppet::Error, /must start with either/)
     85        expect { subject.call }.to raise_error(Puppet::Error, /must start with /)
    10286      end
    10387    end
    … …  
    10690      let(:params) { default_params.merge({ :ensure => 'banana' }) }
    10791      it do
    108         expect { subject.call }.to raise_error(Puppet::Error, /Enum\['absent', 'file', 'present'\]/)
     92        expect { subject.call }.to raise_error(Puppet::Error, /"banana" does not /)
    10993      end
    11094    end
    … …  
    11296    context 'with priority=1.2' do
    11397      let(:params) { default_params.merge({ :priority => 1.2 }) }
    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/) }
     98      it do
     99        expect { subject.call }.to raise_error(Puppet::Error, /be an integer /)
    118100      end
    119101    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/source_compat_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'apt::source', :type => :define do
    4   GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
     4  GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
    55
    66  let :title do
    … …  
    1111    let :facts do
    1212      {
    13         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    1413        :lsbdistid       => 'Debian',
    1514        :lsbdistcodename => 'wheezy',
    1615        :osfamily        => 'Debian',
    17         :puppetversion   => Puppet.version,
    1816      }
    1917    end
    … …  
    2119    let :params do
    2220      {
    23         'include' => { 'deb' => false, 'src' => true },
     21        'include_deb' => false,
     22        'include_src' => true,
    2423        'location'    => 'http://debian.mirror.iweb.ca/debian/',
    2524      }
    … …  
    3332    let :facts do
    3433      {
    35         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    3634        :lsbdistid       => 'Debian',
    3735        :lsbdistcodename => 'wheezy',
    38         :osfamily        => 'Debian',
    39         :puppetversion   => Puppet.version,
     36        :osfamily        => 'Debian'
    4037      }
    4138    end
    4239    let :params do
    4340      {
    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,
     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,
    5354      }
    5455    end
    … …  
    6465    }
    6566
     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
    6676    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({
    6777      'ensure' => 'present',
    6878      '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',
    6982    })
    7083    }
    7184  end
    7285
    73   context 'allow_unsigned true' do
     86  context 'trusted_source true' do
    7487    let :facts do
    7588      {
    76         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    7789        :lsbdistid       => 'Debian',
    7890        :lsbdistcodename => 'wheezy',
    79         :osfamily        => 'Debian',
    80         :puppetversion   => Puppet.version,
     91        :osfamily        => 'Debian'
    8192      }
    8293    end
    8394    let :params do
    8495      {
    85         'include'        => {'src' => false},
     96        'include_src'    => false,
    8697        'location'       => 'http://debian.mirror.iweb.ca/debian/',
    87         'allow_unsigned' => true,
     98        'trusted_source' => true,
    8899      }
    89100    end
    … …  
    95106    let :facts do
    96107      {
    97         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    98108        :lsbdistid       => 'Debian',
    99109        :lsbdistcodename => 'wheezy',
    100         :osfamily        => 'Debian',
    101         :puppetversion   => Puppet.version,
     110        :osfamily        => 'Debian'
    102111      }
    103112    end
    … …  
    116125    let :facts do
    117126      {
    118         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    119127        :lsbdistid       => 'Debian',
    120128        :lsbdistcodename => 'wheezy',
    121         :osfamily        => 'Debian',
    122         :puppetversion   => Puppet.version,
     129        :osfamily        => 'Debian'
    123130      }
    124131    end
    … …  
    139146      let :facts do
    140147        {
    141           :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    142148          :lsbdistid       => 'Debian',
    143           :osfamily        => 'Debian',
    144           :puppetversion   => Puppet.version,
     149          :osfamily        => 'Debian'
    145150        }
    146151      end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/defines/source_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'apt::source' do
    4   GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
     4  GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
    55
    66  let :pre_condition do
    … …  
    1616      let :facts do
    1717        {
    18           :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     18          :lsbdistid       => 'Debian',
     19          :lsbdistcodename => 'wheezy',
    1920          :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' }},
    3433          :lsbdistid       => 'Debian',
    3534          :lsbdistcodename => 'wheezy',
    … …  
    5049    let :facts do
    5150      {
    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',
     51        :lsbdistid       => 'Debian',
     52        :lsbdistcodename => 'wheezy',
     53        :osfamily        => 'Debian',
    5854        :puppetversion   => Puppet.version,
    5955      }
    … …  
    194190    let :facts do
    195191      {
    196         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    197192        :lsbdistid       => 'Debian',
    198193        :lsbdistcodename => 'wheezy',
    … …  
    217212    let :facts do
    218213      {
    219         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    220214        :lsbdistid       => 'Debian',
    221215        :lsbdistcodename => 'wheezy',
    … …  
    227221      {
    228222        :location     => 'hello.there',
    229         :include      => {'deb' => false, 'src' => true},
     223        :include      => {'deb' => false, 'src' => true,},
    230224        :architecture => 'x86_64',
    231225      }
    … …  
    238232  end
    239233
    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 
    264234  context 'include_src => true' do
    265235    let :facts do
    266236      {
    267         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    268237        :lsbdistid       => 'Debian',
    269238        :lsbdistcodename => 'wheezy',
    … …  
    275244      {
    276245        :location    => 'hello.there',
    277         :include     => {'src' => true},
     246        :include_src => true,
    278247      }
    279248    end
    … …  
    285254  end
    286255
    287   context 'include deb => false' do
    288     let :facts do
    289       {
    290         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
     256  context 'include_deb => false' do
     257    let :facts do
     258      {
    291259        :lsbdistid       => 'debian',
    292260        :lsbdistcodename => 'wheezy',
    … …  
    297265    let :params do
    298266      {
    299         :include => { 'deb' => false },
    300267        :location    => 'hello.there',
     268        :include_deb => false,
    301269      }
    302270    end
    … …  
    309277  end
    310278
    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' }},
     279  context 'include_src => true and include_deb => false' do
     280    let :facts do
     281      {
    315282        :lsbdistid       => 'debian',
    316283        :lsbdistcodename => 'wheezy',
    … …  
    321288    let :params do
    322289      {
    323         :include => { 'deb' => false, 'src' => true },
    324290        :location    => 'hello.there',
     291        :include_deb => false,
     292        :include_src => true,
    325293      }
    326294    end
    … …  
    333301  end
    334302
     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
    335328  context 'ensure => absent' do
    336329    let :facts do
    337330      {
    338         :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    339331        :lsbdistid       => 'Debian',
    340332        :lsbdistcodename => 'wheezy',
    … …  
    359351      let :facts do
    360352        {
    361           :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    362353          :lsbdistid       => 'Debian',
    363354          :osfamily        => 'Debian',
    … …  
    374365    end
    375366
    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 
    390367    context 'invalid pin' do
    391368      let :facts do
    392369        {
    393           :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
    394370          :lsbdistid       => 'Debian',
    395371          :lsbdistcodename => 'wheezy',
    … …  
    412388    end
    413389
    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 
    470390  end
    471391end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/spec_helper_acceptance.rb

    rad28f83 rbcf0be5  
    11require 'beaker-rspec'
    22require 'beaker/puppet_install_helper'
    3 require 'beaker/module_install_helper'
    43
    54run_puppet_install_helper
    6 install_module_on(hosts)
    7 install_module_dependencies_on(hosts)
    85
    96UNSUPPORTED_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
    22 def 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
    35 end
    367
    378RSpec.configure do |c|
    … …  
    4112  # Readable test descriptions
    4213  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
    4324end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_has_updates_spec.rb

    rad28f83 rbcf0be5  
    1212  end
    1313
    14   describe 'on Debian based distro missing apt-get' do
     14  describe 'on Debian based distro missing update-notifier-common' 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/bin/apt-get').returns false
     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)"
    1941    }
    2042    it { is_expected.to be_nil }
    … …  
    2648      File.stubs(:executable?) # Stub all other calls
    2749      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    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"
     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"
    3452    }
    3553    it { is_expected.to be true }
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_package_updates_spec.rb

    rad28f83 rbcf0be5  
    1717      File.stubs(:executable?) # Stub all other calls
    1818      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    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"
     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"
    2522    }
    2623    it {
    2724      if Facter.version < '2.0.0'
    28         is_expected.to eq('tzdata,unhide.rb')
     25        is_expected.to eq('puppet-common,linux-generic,linux-image-generic')
    2926      else
    30         is_expected.to eq(['tzdata','unhide.rb'])
     27        is_expected.to eq(['puppet-common', 'linux-generic', 'linux-image-generic'])
    3128      end
    3229    }
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_security_updates_spec.rb

    rad28f83 rbcf0be5  
    1717      File.stubs(:executable?) # Stub all other calls
    1818      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    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"
     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"
    2521    }
    26     it { is_expected.to eq(1) }
     22    it { is_expected.to eq(7) }
    2723  end
    2824
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_update_last_success_spec.rb

    rad28f83 rbcf0be5  
    33describe 'apt_update_last_success fact' do
    44  subject { Facter.fact(:apt_update_last_success).value }
    5   before(:each) { Facter.clear }
    65  after(:each) { Facter.clear }
    76
    87  describe 'on Debian based distro which has not yet created the update-success-stamp file' do
     8    before {
     9      Facter.fact(:osfamily).stubs(:value).returns 'Debian'
     10      File.stubs(:exists?).returns false
     11    }
    912    it 'should have a value of -1' do
    10       Facter.fact(:osfamily).stubs(:value).returns 'Debian'
    11       File.expects(:exists?).with('/var/lib/apt/periodic/update-success-stamp').returns false
    1213      is_expected.to eq(-1)
    1314    end
    … …  
    1516
    1617  describe 'on Debian based distro which has created the update-success-stamp' do
    17     it 'should have the value of the mtime of the file' do
     18    before {
    1819      Facter.fact(:osfamily).stubs(:value).returns 'Debian'
    1920      File.stubs(:exists?).returns true
    2021      File.stubs(:mtime).returns 1407660561
     22    }
     23    it 'should have the value of the mtime of the file' do
    2124      is_expected.to eq(1407660561)
    2225    end
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_updates_spec.rb

    rad28f83 rbcf0be5  
    1717      File.stubs(:executable?) # Stub all other calls
    1818      Facter::Util::Resolution.stubs(:exec) # Catch all other calls
    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"
     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"
    2521    }
    26     it { is_expected.to eq(2) }
     22    it { is_expected.to eq(14) }
    2723  end
    2824
  • src/puppetcode/environments/gnuboat/modules/apt/spec/unit/puppet/type/apt_key_spec.rb

    rad28f83 rbcf0be5  
    55  context 'only namevar 32bit key id' do
    66    let(:resource) { Puppet::Type.type(:apt_key).new(
    7       :id => 'EF8D349F'
     7      :id => '4BD6EC30'
    88    )}
    99    it 'id is set' do
    10       expect(resource[:id]).to eq 'EF8D349F'
     10      expect(resource[:id]).to eq '4BD6EC30'
    1111    end
    1212
    1313    it 'name is set to id' do
    14       expect(resource[:name]).to eq 'EF8D349F'
     14      expect(resource[:name]).to eq '4BD6EC30'
    1515    end
    1616
    … …  
    3030  context 'with a lowercase 32bit key id' do
    3131    let(:resource) { Puppet::Type.type(:apt_key).new(
    32       :id => 'ef8d349f'
     32      :id => '4bd6ec30'
    3333    )}
    3434    it 'id is set' do
    35       expect(resource[:id]).to eq 'EF8D349F'
     35      expect(resource[:id]).to eq '4BD6EC30'
    3636    end
    3737  end
    … …  
    3939  context 'with a 64bit key id' do
    4040    let(:resource) { Puppet::Type.type(:apt_key).new(
    41       :id => 'FFFFFFFFEF8D349F'
     41      :id => 'FFFFFFFF4BD6EC30'
    4242    )}
    4343    it 'id is set' do
    44       expect(resource[:id]).to eq 'FFFFFFFFEF8D349F'
     44      expect(resource[:id]).to eq 'FFFFFFFF4BD6EC30'
    4545    end
    4646  end
    … …  
    4848  context 'with a 0x formatted key id' do
    4949    let(:resource) { Puppet::Type.type(:apt_key).new(
    50       :id => '0xEF8D349F'
     50      :id => '0x4BD6EC30'
    5151    )}
    5252    it 'id is set' do
    53       expect(resource[:id]).to eq 'EF8D349F'
     53      expect(resource[:id]).to eq '4BD6EC30'
    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 => '0xef8d349f'
     59      :id => '0x4bd6ec30'
    6060    )}
    6161    it 'id is set' do
    62       expect(resource[:id]).to eq 'EF8D349F'
     62      expect(resource[:id]).to eq '4BD6EC30'
    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 => '0xFFFFFFFFEF8D349F'
     68      :id => '0xFFFFFFFF4BD6EC30'
    6969    )}
    7070    it 'id is set' do
    71       expect(resource[:id]).to eq 'FFFFFFFFEF8D349F'
     71      expect(resource[:id]).to eq 'FFFFFFFF4BD6EC30'
    7272    end
    7373  end
    … …  
    7575  context 'with source' do
    7676    let(:resource) { Puppet::Type.type(:apt_key).new(
    77       :id => 'EF8D349F',
     77      :id => '4BD6EC30',
    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 => 'EF8D349F',
     88      :id => '4BD6EC30',
    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 => 'EF8D349F',
     99      :id => '4BD6EC30',
    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      => 'EF8D349F',
     111        :id      => '4BD6EC30',
    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      => 'FEF8D349F',
     119        :id      => 'F4BD6EC30',
    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      => 'EF8D349F',
     127        :id      => '4BD6EC30',
    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      => 'EF8D349F',
     134        :id      => '4BD6EC30',
    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'
    143136      )}.to_not raise_error
    144137    end
    … …  
    146139    it 'allows the https URI scheme in source' do
    147140      expect { Puppet::Type.type(:apt_key).new(
    148         :id      => 'EF8D349F',
     141        :id      => '4BD6EC30',
    149142        :source  => 'https://pgp.mit.edu'
    150143      )}.to_not raise_error
    … …  
    153146    it 'allows the https URI with username and password' do
    154147      expect { Puppet::Type.type(:apt_key).new(
    155           :id      => 'EF8D349F',
     148          :id      => '4BD6EC30',
    156149          :source  => 'https://testme:Password2@pgp.mit.edu'
    157150      )}.to_not raise_error
    … …  
    160153    it 'allows the ftp URI scheme in source' do
    161154      expect { Puppet::Type.type(:apt_key).new(
    162         :id      => 'EF8D349F',
     155        :id      => '4BD6EC30',
    163156        :source  => 'ftp://pgp.mit.edu'
    164157      )}.to_not raise_error
    … …  
    167160    it 'allows an absolute path in source' do
    168161      expect { Puppet::Type.type(:apt_key).new(
    169         :id      => 'EF8D349F',
     162        :id      => '4BD6EC30',
    170163        :source  => '/path/to/a/file'
    171164      )}.to_not raise_error
    … …  
    174167    it 'allows 5-digit ports' do
    175168      expect { Puppet::Type.type(:apt_key).new(
    176         :id      => 'EF8D349F',
     169        :id      => '4BD6EC30',
    177170        :source  => 'http://pgp.mit.edu:12345/key'
    178171      )}.to_not raise_error
    … …  
    181174    it 'allows 5-digit ports when using key servers' do
    182175      expect { Puppet::Type.type(:apt_key).new(
    183         :id      => 'EF8D349F',
     176        :id      => '4BD6EC30',
    184177        :server  => 'http://pgp.mit.edu:12345'
    185178      )}.to_not raise_error
  • src/puppetcode/environments/gnuboat/modules/gnuboat_gpsd/manifests/service.pp

    rad28f83 rbcf0be5  
    66        String $devices = '/dev/ttyAMA0',
    77        Boolean $network_access = false,
    8         Boolean $poll_on_startup = false,
    98)
    109inherits gnuboat_gpsd
    … …  
    1615        }
    1716
    18        
    1917        if(!$network_access)
    2018        {
    21                 $options_network = ''
     19                $options = ''
    2220        }
    2321        else
    2422        {
    25                 $options_network = '-G'
     23                $options = '-G'
    2624                $listen_stream = '0.0.0.0:2947'
    2725                file{'/etc/systemd/system/gpsd.socket':
    … …  
    4442        }
    4543
    46         if($poll_on_startup)
    47         {
    48                 $options_startup = '-n'
    49         }
    50         else
    51         {
    52                 $options_startup = ''
    53         }
    5444
    55         $options = [$options_network, $options_startup]
    5645        file{'/etc/default/gpsd':
    5746                ensure => present,
  • src/puppetcode/environments/gnuboat/modules/gnuboat_gpsd/templates/gpsd.epp

    rad28f83 rbcf0be5  
    22        Boolean $usb_auto,
    33        String $devices,
    4         Array $options
     4        String $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.join(' ') %>"
     29GPSD_OPTIONS="<%= $options %>"
  • src/puppetcode/environments/gnuboat/modules/stdlib/CHANGELOG.md

    rad28f83 rbcf0be5  
    1 ## Supported Release 4.17.1
    2 ### Summary
    3 
    4 Small 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
    13 This 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 
    28 This 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 
    51 This 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 
    67 Adds 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 
    86 This bugfix release addresses the `undefined method 'optional_repeated_param'` error messages seen by users of puppet 3.7.
    87 
    88 It 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 
    101 This 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 
    103 Many 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 
    105 Special 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 
    1451## Supported Release 4.12.0
    1462###Summary
  • src/puppetcode/environments/gnuboat/modules/stdlib/CONTRIBUTING.md

    rad28f83 rbcf0be5  
    4444      - Make sure you have a [GitHub account](https://github.com/join)
    4545
    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.
     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.
    4747
    4848    * Preferred method:
    … …  
    209209====================
    210210
    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)
     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)
    214216
    215217* [General GitHub documentation](http://help.github.com/)
    216218
    217219* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
     220
  • src/puppetcode/environments/gnuboat/modules/stdlib/Gemfile

    rad28f83 rbcf0be5  
    33source ENV['GEM_SOURCE'] || "https://rubygems.org"
    44
    5 # Determines what type of gem is requested based on place_or_version.
    6 def gem_type(place_or_version)
    7   if place_or_version =~ /^git:/
    8     :git
    9   elsif place_or_version =~ /^file:/
    10     :file
     5def 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}]
    1110  else
    12     :gem
     11    [place, version, { :require => false}].compact
    1312  end
    1413end
    1514
    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`.
    20 def 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
     15group :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
     23end
     24group :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'])
    2831end
    2932
    30 # Used for gem conditionals
    31 supports_windows = false
    32 ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
    33 minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
    34 
    35 group :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')
    43 end
    44 
    45 group :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')       
    53 end
    54 
     33gem 'facter', *location_for(ENV['FACTER_GEM_VERSION'])
    5534gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
    5635
    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.
    61 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
    62 gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
    6336
    64 
    65 # Evaluate Gemfile.local if it exists
    6637if File.exists? "#{__FILE__}.local"
    6738  eval(File.read("#{__FILE__}.local"), binding)
    6839end
    69 
    70 # Evaluate ~/.gemfile if it exists
    71 if File.exists?(File.join(Dir.home, '.gemfile'))
    72   eval(File.read(File.join(Dir.home, '.gemfile')), binding)
    73 end
    74 
    75 # vim:ft=ruby
  • src/puppetcode/environments/gnuboat/modules/stdlib/Rakefile

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

    rad28f83 rbcf0be5  
    11{
    2   "CHANGELOG.md": "b6fa51fd30594614b963fb98a6a0fffb",
    3   "CONTRIBUTING.md": "77d0440d7cd4206497f99065c60bed46",
    4   "Gemfile": "bedf635025b279d7c7732adcc8ae9a29",
     2  "CHANGELOG.md": "62822f2fe9d7362a4b99156d01c846c4",
     3  "CONTRIBUTING.md": "ad65d271f183b5adb9fdd58207939f5f",
     4  "Gemfile": "a5493d10f1c1fec87972b13a9fe1afcf",
    55  "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57",
    6   "MAINTAINERS.md": "b40ec4f2c16145af6f723c2c34bb2ff9",
    76  "NOTICE": "b2e552587e5969886fdd60481e8b0351",
    8   "README.md": "ac4c03f7f00304de7ed5a9eb9c6b84b7",
     7  "README.markdown": "9ff8d7869c0139409311df63f3bb0361",
    98  "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165",
    109  "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1",
    1110  "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9",
    12   "Rakefile": "3851f083966b9bbd6d46e50dba5aa52a",
    13   "appveyor.yml": "7e0ff52cc2abe3fa4f2d8d978bf18ad7",
    14   "examples/file_line.pp": "d8126b139dd1dce21ff26910d1c5a245",
     11  "Rakefile": "ab91824042ec3fd085a41cab7e0e90d4",
     12  "examples/file_line.pp": "48f7f162127beffea8f8e3e58db2355a",
    1513  "examples/has_interface_with.pp": "d69d520cf3ff4d0b495480afaca359ef",
    1614  "examples/has_ip_address.pp": "32f42575e49aa66f0f2398a70ae2a9f4",
    … …  
    2018  "lib/facter/package_provider.rb": "539766a71dfb2f65e94a7c91bf413fcf",
    2119  "lib/facter/pe_version.rb": "60d47406026c8201e51394227ddf780d",
    22   "lib/facter/puppet_settings.rb": "9438c0839ae28dc52fffb8348ae5124f",
     20  "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d",
    2321  "lib/facter/root_home.rb": "35702ae0c7410ec4d2101113e2f697fa",
    2422  "lib/facter/service_provider.rb": "66cc42526eae631e306b397391f1f01c",
    2523  "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1",
    26   "lib/puppet/functions/deprecation.rb": "59b803eaa15b5a559040497bffc172ae",
    2724  "lib/puppet/functions/is_a.rb": "9dad7f8c9b75348cd97aca986ac0b29a",
    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",
     25  "lib/puppet/functions/type_of.rb": "71e19f89e167c45ec691ea6c7d319625",
     26  "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b",
    5327  "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75",
    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",
     28  "lib/puppet/parser/functions/assert_private.rb": "1365284f9e474ecec24cfe43ee8e7cf4",
     29  "lib/puppet/parser/functions/base64.rb": "ac8d0565df2931470447effa502c9ad3",
    5730  "lib/puppet/parser/functions/basename.rb": "c61952b3f68fd86408c84fca2c3febb1",
    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",
     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",
    6740  "lib/puppet/parser/functions/convert_base.rb": "c3b3e59a49318af98dcb88aed7156629",
    68   "lib/puppet/parser/functions/count.rb": "325bbd89a29e6ed0f31e0462d0a0d301",
     41  "lib/puppet/parser/functions/count.rb": "9eb74eccd93e2b3c87fd5ea14e329eba",
    6942  "lib/puppet/parser/functions/deep_merge.rb": "d83696855578fb81b64b9e92b9c7cc7c",
    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",
     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",
    8050  "lib/puppet/parser/functions/dirname.rb": "8a5579f9a9a13fd737ba65eccf8e6d5a",
    8151  "lib/puppet/parser/functions/dos2unix.rb": "be8359a5106a7832be4180e8207dd586",
    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",
     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",
    8656  "lib/puppet/parser/functions/ensure_resource.rb": "de703fe63392b939fc2b4392975263de",
    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",
     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",
    9060  "lib/puppet/parser/functions/fqdn_rand_string.rb": "9ac5f18e563094aee62ef7586267025d",
    91   "lib/puppet/parser/functions/fqdn_rotate.rb": "2483d17df4e6cb25d92b4e8520f30957",
    92   "lib/puppet/parser/functions/fqdn_uuid.rb": "d357e8837ba2ed8196e926f3697be521",
     61  "lib/puppet/parser/functions/fqdn_rotate.rb": "770d510a2e50d19b2dd42b6edef3fb1f",
    9362  "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45",
    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",
     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",
    10169  "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e",
    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",
     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",
    12290  "lib/puppet/parser/functions/load_module_metadata.rb": "805c5476a6e7083d133e167129885924",
    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",
     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",
    12895  "lib/puppet/parser/functions/merge.rb": "f3dcc5c83440cdda2036cce69b61a14b",
    129   "lib/puppet/parser/functions/min.rb": "8d829c8a55c9330ab02f962926221d4f",
    130   "lib/puppet/parser/functions/num2bool.rb": "ddb603cf74f92e16a00f1447a4403429",
     96  "lib/puppet/parser/functions/min.rb": "0d2a1b7e735ab251c5469e735fa3f4c6",
     97  "lib/puppet/parser/functions/num2bool.rb": "605c12fa518c87ed2c66ae153e0686ce",
    13198  "lib/puppet/parser/functions/parsejson.rb": "15165fd3807d9f3d657697fa854d643d",
    13299  "lib/puppet/parser/functions/parseyaml.rb": "db54578d9d798ced75952217cf11b737",
    133100  "lib/puppet/parser/functions/pick.rb": "bf01f13bbfe2318e7f6a302ac7c4433f",
    134101  "lib/puppet/parser/functions/pick_default.rb": "ad3ea60262de408767786d37a54d45dc",
    135   "lib/puppet/parser/functions/prefix.rb": "ece9341c5b232a25c58545718a54e92f",
     102  "lib/puppet/parser/functions/prefix.rb": "e377fd64bd63dde6c9660aa75aca4942",
    136103  "lib/puppet/parser/functions/private.rb": "1500a21d5cf19961c5b1d476df892d92",
    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",
     104  "lib/puppet/parser/functions/pw_hash.rb": "d82221f667050026cd6d155432a31802",
     105  "lib/puppet/parser/functions/range.rb": "76f693d1dd50ffee409e58ff6d9a58bb",
    141106  "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9",
    142   "lib/puppet/parser/functions/reverse.rb": "209e7ef512963251571c515e2d0aee10",
    143   "lib/puppet/parser/functions/rstrip.rb": "f3226709247741825f07d9ec20bd3887",
     107  "lib/puppet/parser/functions/reverse.rb": "b234b54b8cd62b2d67ccd70489ffdccf",
     108  "lib/puppet/parser/functions/rstrip.rb": "b4e4ada41f7c1d2fcad073ce6344980f",
    144109  "lib/puppet/parser/functions/seeded_rand.rb": "2ad22e7613d894ae779c0c5b0e65dade",
    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",
     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",
    160122  "lib/puppet/parser/functions/try_get_value.rb": "09cd079ec5f0e5e2ac862c9ebe0f54fe",
    161123  "lib/puppet/parser/functions/type.rb": "4709f7ab8a8aad62d77a3c5d91a3aa08",
    162   "lib/puppet/parser/functions/type3x.rb": "5d0391205bd1cfe8de985a44e8c3e8a9",
    163   "lib/puppet/parser/functions/union.rb": "c02fca3fe102875ba020072b7edee532",
    164   "lib/puppet/parser/functions/unique.rb": "0f79a96896149f7034cd85e31eed1e54",
     124  "lib/puppet/parser/functions/type3x.rb": "f9bf4de8341afb0c677c26b40ec8a2b2",
     125  "lib/puppet/parser/functions/union.rb": "3cf57ea53f2522f586264feb67293cd6",
     126  "lib/puppet/parser/functions/unique.rb": "c1bb4a8aeebd09ba3e4c8bc3702cfd60",
    165127  "lib/puppet/parser/functions/unix2dos.rb": "b1f5087fcaca69d9395094204cce887a",
    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",
     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",
    170132  "lib/puppet/parser/functions/validate_augeas.rb": "61e828e7759ba3e1e563e1fdd68aa80f",
    171   "lib/puppet/parser/functions/validate_bool.rb": "971700229c4b581f67f6fadc9019eb2c",
     133  "lib/puppet/parser/functions/validate_bool.rb": "a712634a000024398b3c6cd4ecc46463",
    172134  "lib/puppet/parser/functions/validate_cmd.rb": "7df12370db442eddddcf4dd7a5364b5e",
    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",
     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",
    183145  "lib/puppet/parser/functions/validate_x509_rsa_key_pair.rb": "f17427dfc42128dc1df0ab04f37942e5",
    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",
     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",
    188150  "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c",
    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",
     151  "lib/puppet/type/file_line.rb": "21214f23b82b909dba6d7a57dd6464b6",
    193152  "manifests/init.pp": "9560a09f657d7eebbfdb920cefcc1d4f",
    194153  "manifests/stages.pp": "72eb4fa624474faf23b39e57cf1590bd",
    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",
     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",
    202160  "spec/acceptance/build_csv.rb": "f28ef587de764ade1513091c4906412c",
    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",
     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",
    221178  "spec/acceptance/ensure_resource_spec.rb": "c0193d79f1db1985d313bedb93a4c7ae",
    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",
     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",
    345277  "spec/functions/abs_spec.rb": "7c0ebbd787b788d32b9bb21fe9061a2f",
    346   "spec/functions/any2array_spec.rb": "22b7ce032a34d02b6858360025eb7644",
    347   "spec/functions/any2bool_spec.rb": "d090dde9be26601a38980e8f77fa5970",
    348   "spec/functions/assert_private_spec.rb": "a7e79ac7a1b28610a0e57e38e913c9fa",
     278  "spec/functions/any2array_spec.rb": "c5990164adbaaf4f6536df4022309176",
     279  "spec/functions/assert_private_spec.rb": "3bf58bd53467248cc221b9f846b13d98",
    349280  "spec/functions/base64_spec.rb": "fa279d9a4f3060ee3f467e35b050d528",
    350   "spec/functions/basename_spec.rb": "4aec9efc4fc6ed35de82d93b34dc0fab",
     281  "spec/functions/basename_spec.rb": "84a6567266725376d7ab518ab7dc5fe8",
    351282  "spec/functions/bool2num_spec.rb": "6609136ff067b90d41cf27bf8838c3ea",
    352283  "spec/functions/bool2str_spec.rb": "52560617234393f960aedb496b49a628",
    … …  
    354285  "spec/functions/capitalize_spec.rb": "31a8d497b274653d5ede70a0187d4053",
    355286  "spec/functions/ceiling_spec.rb": "47bd74569f8979d9195df06a863de93b",
    356   "spec/functions/chomp_spec.rb": "8be3a83a34945dcaa6e8e193cf2751e4",
    357   "spec/functions/chop_spec.rb": "8e1f661e93dd87b8bbeebe293fe16612",
     287  "spec/functions/chomp_spec.rb": "6749a0b358b34e73843e1a284cead44a",
     288  "spec/functions/chop_spec.rb": "6e33e61f50459191387c87e474d3d127",
    358289  "spec/functions/clamp_spec.rb": "65dab1e9aceb2cb4e41ef9c0c65a7ba3",
    359   "spec/functions/concat_spec.rb": "4161a254ff4c21497e61a62ce84dafe8",
     290  "spec/functions/concat_spec.rb": "d217a63169e819e1ae2445083c248aa6",
    360291  "spec/functions/convert_base_spec.rb": "f031e84b18cb010bc6233be3e4bcff83",
    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",
     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",
    375303  "spec/functions/downcase_spec.rb": "e2c24d41c6fb840f7b66c5205c942780",
    376304  "spec/functions/empty_spec.rb": "e6d06c193869ce8c97d3e67d5c5c5b4f",
    377   "spec/functions/ensure_packages_spec.rb": "cb741ab1e99e7ad9057eea258730cd19",
    378   "spec/functions/ensure_resource_spec.rb": "e1ebbf9475781d86b58541a5846eda0b",
    379   "spec/functions/flatten_spec.rb": "5d59251fa8da0e4c8a376a513a25bc7a",
     305  "spec/functions/ensure_packages_spec.rb": "76e89bf81ae98e52d2a07263c0e8d4f4",
     306  "spec/functions/ensure_resource_spec.rb": "57634d7b6f86ac77dc47fb5da36410c2",
     307  "spec/functions/flatten_spec.rb": "6fb563c36daf40599a414c1f3af8dc0b",
    380308  "spec/functions/floor_spec.rb": "7d110b1f994432e1c6c7c004a3dedbe4",
    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",
     309  "spec/functions/fqdn_rand_string_spec.rb": "2edaae1764df4d751684d8ceda7b9cda",
     310  "spec/functions/fqdn_rotate_spec.rb": "e9b1ce122788f18611cf64696d666328",
    384311  "spec/functions/get_module_path_spec.rb": "ef22bd80ce5dedb069830d5aa10572c1",
    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",
     312  "spec/functions/getparam_spec.rb": "dbbdde0a72653feb479e9fb971b94ec7",
     313  "spec/functions/getvar_spec.rb": "18a9340442dd59cea8a6c98e95d38f4d",
     314  "spec/functions/grep_spec.rb": "b9d0722e7708351b0114c46d4272f760",
    389315  "spec/functions/has_interface_with_spec.rb": "473c000e461c3497f8461eb17cf73430",
    390316  "spec/functions/has_ip_address_spec.rb": "7b36b993ea32757e74be9909906bd165",
    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",
     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",
    398324  "spec/functions/is_domain_name_spec.rb": "4ea3825d5b77a5d75eab8228dcc738f9",
    399325  "spec/functions/is_email_address_spec.rb": "699c4573dfd00db8993a18afc0eaf875",
    400   "spec/functions/is_float_spec.rb": "8aedd9e622cd1b861d99523532dc4fc1",
     326  "spec/functions/is_float_spec.rb": "42b7f071e02af58e3154643b84445af1",
    401327  "spec/functions/is_function_available.rb": "f8ab234d536532c3629ff6a5068e7877",
    402328  "spec/functions/is_hash_spec.rb": "11563529f0f1f821769edb3131277100",
    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",
     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",
    418340  "spec/functions/max_spec.rb": "47de8d59070d8d51b2184731f5d1aa43",
    419   "spec/functions/member_spec.rb": "6a988e6368c1ce090b47fe41efbc041c",
     341  "spec/functions/member_spec.rb": "02891f40caaca15a5aba43443c7d2ccb",
    420342  "spec/functions/merge_spec.rb": "56297527d192640bbe82c7ccf1e39815",
    421343  "spec/functions/min_spec.rb": "8b38e2a989912406cd2c57dcd3a460c4",
    422344  "spec/functions/num2bool_spec.rb": "7c4fd30e41a11b1bd0d9e5233340f16b",
    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",
     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",
    428350  "spec/functions/private_spec.rb": "f404771c4590a0cd7ce61ddff8f3eb7b",
    429351  "spec/functions/pw_hash_spec.rb": "640609cc73b4c8bbcdfc88c3e9797664",
    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",
     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",
    441359  "spec/functions/sort_spec.rb": "d9533dd37c6263b92895f7eba8485248",
    442   "spec/functions/squeeze_spec.rb": "ffcf3b44cbdd45e14eb1173d2b7d1d99",
     360  "spec/functions/squeeze_spec.rb": "549af334b7f9dd5f06d6b45c3e3e8303",
    443361  "spec/functions/str2bool_spec.rb": "607b25fb0badd0da5acb86c63437c8be",
    444362  "spec/functions/str2saltedsha512_spec.rb": "07586b0026757cd39229c12c7221808b",
    445363  "spec/functions/strftime_spec.rb": "f1a34fc930940213abfba3095d5d8065",
    446   "spec/functions/strip_spec.rb": "023132b8bd0820da254f74c6fe31bb80",
    447   "spec/functions/suffix_spec.rb": "dfe26a61bf0185291b6ae868e9d0de20",
     364  "spec/functions/strip_spec.rb": "0cb8537f2e7df14f42247349ab3161a6",
     365  "spec/functions/suffix_spec.rb": "65172f6879c902802230f718ea9df7da",
    448366  "spec/functions/swapcase_spec.rb": "90bace1b004aa63d46eb6481c6dce2b1",
    449367  "spec/functions/time_spec.rb": "6dc8f5b42cf89345d2de424bfe19be90",
    … …  
    453371  "spec/functions/type_of_spec.rb": "83755d9390b9c00e086a007edff7fd9b",
    454372  "spec/functions/type_spec.rb": "7a61b4af7d3d83be590d783a7e5e80f8",
    455   "spec/functions/union_spec.rb": "a290a38e443b856a476d14d4b1dc72fb",
    456   "spec/functions/unique_spec.rb": "97fbcc73a0e0d82e23c723837627c712",
     373  "spec/functions/union_spec.rb": "089b03e9a6ef25cdcf68157bb986d8a8",
     374  "spec/functions/unique_spec.rb": "b793c531b4d227ae55d05a187b706fb8",
    457375  "spec/functions/unix2dos_spec.rb": "628c8a0c608d1fa0dd09bd1b5af97c1f",
    458376  "spec/functions/upcase_spec.rb": "4f0461a20c03d618f0c18da39bebcf65",
    459377  "spec/functions/uriescape_spec.rb": "1458afbe7e7e11dcaad8d295a7f2be59",
    460   "spec/functions/validate_absolute_path_spec.rb": "5adbf0a0ac8b23e86195deaf3e4bd371",
    461   "spec/functions/validate_array_spec.rb": "3aa76f3731754c637acc94b59c79efb0",
     378  "spec/functions/validate_absolute_path_spec.rb": "26e00ce6122016b9b53797806e681682",
     379  "spec/functions/validate_array_spec.rb": "df0bcf372b3efdd1f4de16b508987616",
    462380  "spec/functions/validate_augeas_spec.rb": "d598e89a23912be9f24d39b809f30b47",
    463   "spec/functions/validate_bool_spec.rb": "d1b43cd294d0588ac6d67d5d3c77a42a",
    464   "spec/functions/validate_cmd_spec.rb": "34a4e623ab0ce7d4c218a837f896c1ea",
     381  "spec/functions/validate_bool_spec.rb": "93cfbecbe8cc4707ada13f48f5c8c8a6",
     382  "spec/functions/validate_cmd_spec.rb": "05eb581532fc689ff91212413b2e678d",
    465383  "spec/functions/validate_email_address_spec.rb": "1296f9934d102258091379ee07f9a2a8",
    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",
     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",
    476393  "spec/functions/validate_x509_rsa_key_pair_spec.rb": "24810bdb8ac473ae1168f1b2c5708170",
    477   "spec/functions/values_at_spec.rb": "866ba43a4b606f6e9e72ac91c07408bd",
    478   "spec/functions/values_spec.rb": "6b8f39665cb8fdb03658d838e50b55b0",
    479   "spec/functions/zip_spec.rb": "986defd43a001ff28fe7c90b0366812e",
     394  "spec/functions/values_at_spec.rb": "c318f66de43f8e6095d28f733f55ec5d",
     395  "spec/functions/values_spec.rb": "5550da71a69514f8be87a12b575d5228",
     396  "spec/functions/zip_spec.rb": "4c991f26985096b3e8b336cef528aa00",
    480397  "spec/monkey_patches/alias_should_to_must.rb": "b19ee31563afb91a72f9869f9d7362ff",
    481398  "spec/monkey_patches/publicize_methods.rb": "c690e444b77c871375d321e413e28ca1",
    482399  "spec/spec_helper.rb": "b2db3bc02b4ac2fd5142a6621c641b07",
    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",
     400  "spec/spec_helper_acceptance.rb": "4da340042246df9b9e3dc221a5807528",
     401  "spec/spec_helper_local.rb": "845be3a017611728b73e73af427f7431",
    487402  "spec/unit/facter/facter_dot_d_spec.rb": "420339a544851f2c7ee6fa4c651bdce8",
    488403  "spec/unit/facter/package_provider_spec.rb": "3a6ba799822fbcabc9adab5880260b7a",
    … …  
    493408  "spec/unit/puppet/parser/functions/enclose_ipv6_spec.rb": "0145a78254ea716e5e7600d9464318a8",
    494409  "spec/unit/puppet/parser/functions/is_absolute_path_spec.rb": "52f8d3b9011fb1fd8a2a429fe8b2ae08",
    495   "spec/unit/puppet/provider/file_line/ruby_spec.rb": "d269e18953fc297786a8393b20842abc",
     410  "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e70f3093b17aeccef198b52901ab2f94",
    496411  "spec/unit/puppet/type/anchor_spec.rb": "06a669dffa44d716bf19b4e7f5f1d75d",
    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"
     412  "spec/unit/puppet/type/file_line_spec.rb": "af824724caf0071d84464042490a6f88"
    515413}
  • src/puppetcode/environments/gnuboat/modules/stdlib/examples/file_line.pp

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

    rad28f83 rbcf0be5  
    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.
    1513Puppet::Functions.create_function(:type_of) do
    1614  def type_of(value)
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/abs.rb

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

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

    rad28f83 rbcf0be5  
    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 
    41module Puppet::Parser::Functions
    52
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/bool2num.rb

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

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

    rad28f83 rbcf0be5  
    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.
    43#
    54
    … …  
    109  ) do |arguments|
    1110
    12     raise(Puppet::ParseError, "camelcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "camelcase(): Wrong number of arguments " +
     12      "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 array or string to work with')
     18      raise(Puppet::ParseError, 'camelcase(): Requires either ' +
     19        'array or string to work with')
    1920    end
    2021
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/capitalize.rb

    rad28f83 rbcf0be5  
    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.
    43#
    54
    … …  
    1110  ) do |arguments|
    1211
    13     raise(Puppet::ParseError, "capitalize(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
     12    raise(Puppet::ParseError, "capitalize(): Wrong number of arguments " +
     13      "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 array or string to work with')
     18      raise(Puppet::ParseError, 'capitalize(): Requires either ' +
     19        'array or string to work with')
    1920    end
    2021
    … …  
    2930  end
    3031end
     32
     33# vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ceiling.rb

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

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

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

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

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

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

    rad28f83 rbcf0be5  
    2525  end
    2626  ret = false
    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)
     27  if resource = findresource(reference.to_s)
    4628    matches = params.collect do |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)
     29      resource[key] == value
    5130    end
    5231    ret = params.empty? || !matches.include?(false)
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete.rb

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

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

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

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

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

    rad28f83 rbcf0be5  
    55module Puppet::Parser::Functions
    66  newfunction(:dig, :type => :rvalue, :doc => <<-EOS
    7     DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version.
     7Looks up into a complex structure of arrays and hashes and returns nil
     8or the default value if nothing was found.
     9
     10Path is an array of keys to be looked up in data argument. The function
     11will 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
     23a -> first hash key
     24b -> second hash key
     252 -> array index starting with 0
     26
     27not_found -> (optional) will be returned if there is no value or the path
     28did not match. Defaults to nil.
     29
     30In addition to the required "path" argument, "dig" accepts default
     31argument. It will be returned if no value was found or a path component is
     32missing. And the fourth argument can set a variable path separator.
    833    EOS
    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)
     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}")
    1344    end
    14     function_dig44(arguments)
     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
    1553  end
    1654end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/downcase.rb

    rad28f83 rbcf0be5  
    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.
    43#
    54
    … …  
    109  ) do |arguments|
    1110
    12     raise(Puppet::ParseError, "downcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
     11    raise(Puppet::ParseError, "downcase(): Wrong number of arguments " +
     12      "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 array or string to work with')
     17      raise(Puppet::ParseError, 'downcase(): Requires either ' +
     18        'array or string to work with')
    1819    end
    1920
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/empty.rb

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

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

    rad28f83 rbcf0be5  
    1212
    1313    if arguments.size > 2 or arguments.size == 0
    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)
     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)
    1617      raise(Puppet::ParseError, 'ensure_packages(): Requires second argument to be a Hash')
    1718    end
    … …  
    2526
    2627      Puppet::Parser::Functions.function(:ensure_resources)
    27       function_ensure_resources(['package', arguments[0].dup, defaults ])
     28      function_ensure_resources(['package', Hash(arguments[0]), defaults ])
    2829    else
    2930      packages = Array(arguments[0])
    … …  
    3738      Puppet::Parser::Functions.function(:ensure_resource)
    3839      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}]")
    4140        function_ensure_resource(['package', package_name, defaults ])
    42       end
    4341    }
    4442    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ensure_resources.rb

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

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

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

    rad28f83 rbcf0be5  
    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 given (#{args.size} for 1)") if args.size < 1
     18    raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments " +
     19      "given (#{args.size} for 1)") if args.size < 1
    1920
    2021    value = args.shift
    … …  
    2223
    2324    unless value.is_a?(Array) || value.is_a?(String)
    24       raise(Puppet::ParseError, 'fqdn_rotate(): Requires either array or string to work with')
     25      raise(Puppet::ParseError, 'fqdn_rotate(): Requires either ' +
     26        'array or string to work with')
    2527    end
    2628
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/getparam.rb

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

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

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

    rad28f83 rbcf0be5  
    2020  ) do |args|
    2121
    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
     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
    2324
    2425    interfaces = lookupvar('interfaces')
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb

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

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

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

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

    rad28f83 rbcf0be5  
    2424
    2525  ENDHEREDOC
    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.'])
     26
    2727    require 'puppet/util'
    2828
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_array.rb

    rad28f83 rbcf0be5  
    99  ) do |arguments|
    1010
    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
     11    raise(Puppet::ParseError, "is_array(): Wrong number of arguments " +
     12      "given (#{arguments.size} for 1)") if arguments.size < 1
    1413
    1514    type = arguments[0]
    … …  
    2019  end
    2120end
     21
     22# vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_bool.rb

    rad28f83 rbcf0be5  
    99  ) do |arguments|
    1010
    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
     11    raise(Puppet::ParseError, "is_bool(): Wrong number of arguments " +
     12      "given (#{arguments.size} for 1)") if arguments.size != 1
    1413
    1514    type = arguments[0]
    … …  
    2019  end
    2120end
     21
     22# vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb

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

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

    rad28f83 rbcf0be5  
    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 
    1311    if (arguments.size != 1) then
    14       raise(Puppet::ParseError, "is_float(): Wrong number of arguments given #{arguments.size} for 1")
     12      raise(Puppet::ParseError, "is_float(): Wrong number of arguments "+
     13        "given #{arguments.size} for 1")
    1514    end
    1615
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb

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

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

    rad28f83 rbcf0be5  
    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 
    1816    if (arguments.size != 1) then
    19       raise(Puppet::ParseError, "is_integer(): Wrong number of arguments given #{arguments.size} for 1")
     17      raise(Puppet::ParseError, "is_integer(): Wrong number of arguments "+
     18        "given #{arguments.size} for 1")
    2019    end
    2120
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb

    rad28f83 rbcf0be5  
    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 
    1513    if (arguments.size != 1) then
    16       raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments given #{arguments.size} for 1")
     14      raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments "+
     15        "given #{arguments.size} for 1")
    1716    end
    1817
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ipv4_address.rb

    rad28f83 rbcf0be5  
    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 
    1513    if (arguments.size != 1) then
    16       raise(Puppet::ParseError, "is_ipv4_address(): Wrong number of arguments given #{arguments.size} for 1")
     14      raise(Puppet::ParseError, "is_ipv4_address(): Wrong number of arguments "+
     15        "given #{arguments.size} for 1")
    1716    end
    1817
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ipv6_address.rb

    rad28f83 rbcf0be5  
    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 
    1311    require 'ipaddr'
    1412
    1513    if (arguments.size != 1) then
    16       raise(Puppet::ParseError, "is_ipv6_address(): Wrong number of arguments given #{arguments.size} for 1")
     14      raise(Puppet::ParseError, "is_ipv6_address(): Wrong number of arguments "+
     15        "given #{arguments.size} for 1")
    1716    end
    1817
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb

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

    rad28f83 rbcf0be5  
    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 
    2927    if (arguments.size != 1) then
    30       raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments given #{arguments.size} for 1")
     28      raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments "+
     29        "given #{arguments.size} for 1")
    3130    end
    3231
    … …  
    7372  end
    7473end
     74
     75# vim: set ts=2 sw=2 et :
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_string.rb

    rad28f83 rbcf0be5  
    99  ) do |arguments|
    1010
    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
     11    raise(Puppet::ParseError, "is_string(): Wrong number of arguments " +
     12      "given (#{arguments.size} for 1)") if arguments.size < 1
    1413
    1514    type = arguments[0]
    1615
    17     # when called through the v4 API shim, undef gets translated to nil
    18     result = type.is_a?(String) || type.nil?
     16    result = type.is_a?(String)
    1917
    2018    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

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

    rad28f83 rbcf0be5  
    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 are cast to strings. If values are arrays, multiple keys
    9 are added for each element. The return value is an array in
     8separator. Keys and values are cast to strings. The return value is an array in
    109which each element is one joined key/value pair.
    1110
    … …  
    1514
    1615Would result in: ["a is 1","b is 2"]
    17 
    18     join_keys_to_values({'a'=>1,'b'=>[2,3]}, " is ")
    19 
    20 Would result in: ["a is 1","b is 2","b is 3"]
    2116    EOS
    2217  ) do |arguments|
    … …  
    2419    # Validate the number of arguments.
    2520    if arguments.size != 2
    26       raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two arguments, but #{arguments.size} given.")
     21      raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two " +
     22            "arguments, but #{arguments.size} given.")
    2723    end
    2824
    … …  
    3026    hash = arguments[0]
    3127    if not hash.is_a?(Hash)
    32       raise(TypeError, "join_keys_to_values(): The first argument must be a hash, but a #{hash.class} was given.")
     28      raise(TypeError, "join_keys_to_values(): The first argument must be a " +
     29            "hash, but a #{hash.class} was given.")
    3330    end
    3431
    … …  
    3633    separator = arguments[1]
    3734    if not separator.is_a?(String)
    38       raise(TypeError, "join_keys_to_values(): The second argument must be a string, but a #{separator.class} was given.")
     35      raise(TypeError, "join_keys_to_values(): The second argument must be a " +
     36            "string, but a #{separator.class} was given.")
    3937    end
    4038
    4139    # Join the keys to their values.
    4240    hash.map do |k,v|
    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
     41      String(k) + separator + String(v)
     42    end
    4943
    5044  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/keys.rb

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

    rad28f83 rbcf0be5  
    11module Puppet::Parser::Functions
    2   newfunction(:loadyaml, :type => :rvalue, :arity => -2, :doc => <<-'ENDHEREDOC') do |args|
    3 Load a YAML file containing an array, string, or hash, and return the data
    4 in the corresponding native data type.
    5 The second parameter is the default value. It will be returned if the file
    6 was not found or could not be parsed.
    72
    8 For example:
     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.
    96
    10     $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
    11     $myhash = loadyaml('no-file.yaml', {'default' => 'value'})
    12   ENDHEREDOC
     7    For example:
    138
    14     raise ArgumentError, 'Wrong number of arguments. 1 or 2 arguments should be provided.' unless args.length >= 1
    15     require 'yaml'
     9        $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
     10    ENDHEREDOC
    1611
    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
     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])
    2718    else
    28       warning("Can't load '#{args[0]}' File does not exist!")
    29       args[1]
     19      warning("Can't load " + args[0] + ". File does not exist!")
     20      nil
    3021    end
    3122
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/lstrip.rb

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

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

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

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

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

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

    rad28f83 rbcf0be5  
    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 
    41Puppet::Parser::Functions::newfunction(
    52  :pw_hash,
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/range.rb

    rad28f83 rbcf0be5  
    2626
    2727    range("host01", "host10")
     28
    2829Will return: ["host01", "host02", ..., "host09", "host10"]
    29 NB 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 arguments given (0 for 1)') if arguments.size == 0
     40    raise(Puppet::ParseError, 'range(): Wrong number of ' +
     41      'arguments given (0 for 1)') if arguments.size == 0
    4142
    4243    if arguments.size > 1
    … …  
    5758        step = 1
    5859      elsif value.match(/^.+$/)
    59         raise(Puppet::ParseError, "range(): Unable to compute range from the value: #{value}")
     60        raise(Puppet::ParseError, "range(): Unable to compute range " +
     61          "from the value: #{value}")
    6062      else
    6163        raise(Puppet::ParseError, "range(): Unknown range format: #{value}")
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/reverse.rb

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

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

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

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

    rad28f83 rbcf0be5  
    11#
    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.
     2# sort.rb
    43#
    54
    … …  
    1110
    1211    if (arguments.size != 1) then
    13       raise(Puppet::ParseError, "sort(): Wrong number of arguments given #{arguments.size} for 1")
     12      raise(Puppet::ParseError, "sort(): Wrong number of arguments "+
     13        "given #{arguments.size} for 1")
    1414    end
    1515
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/squeeze.rb

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

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

    rad28f83 rbcf0be5  
    11#
    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.
     2# str2saltedsha512.rb
    43#
    54
    … …  
    1413    require 'digest/sha2'
    1514
    16     raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments passed (#{arguments.size} but we require 1)") if arguments.size != 1
     15    raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments " +
     16      "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 String argument, you passed: #{password.class}")
     21      raise(Puppet::ParseError, 'str2saltedsha512(): Requires a ' +
     22        "String argument, you passed: #{password.class}")
    2223    end
    2324
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/strftime.rb

    rad28f83 rbcf0be5  
    11#
    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.
     2# strftime.rb
    43#
    54
    … …  
    7372
    7473    # Technically we support two arguments but only first is mandatory ...
    75     raise(Puppet::ParseError, "strftime(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
     74    raise(Puppet::ParseError, "strftime(): Wrong number of arguments " +
     75      "given (#{arguments.size} for 1)") if arguments.size < 1
    7676
    7777    format = arguments[0]
    7878
    79     raise(Puppet::ParseError, 'strftime(): You must provide format for evaluation') if format.empty?
     79    raise(Puppet::ParseError, 'strftime(): You must provide ' +
     80      'format for evaluation') if format.empty?
    8081
    8182    # The Time Zone argument is optional ...
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/strip.rb

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

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

    rad28f83 rbcf0be5  
    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.
    43#
    54
    … …  
    1615  ) do |arguments|
    1716
    18     raise(Puppet::ParseError, "swapcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
     17    raise(Puppet::ParseError, "swapcase(): Wrong number of arguments " +
     18      "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 array or string to work with')
     23      raise(Puppet::ParseError, 'swapcase(): Requires either ' +
     24        'array or string to work with')
    2425    end
    2526
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/time.rb

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

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

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

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

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

    rad28f83 rbcf0be5  
    11#
    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.
     2# upcase.rb
    43#
    54
    … …  
    1817  ) do |arguments|
    1918
    20     raise(Puppet::ParseError, "upcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
     19    raise(Puppet::ParseError, "upcase(): Wrong number of arguments " +
     20                                "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 array, hash or object that responds to upcase in order to work')
     25      raise(Puppet::ParseError, 'upcase(): Requires an ' +
     26                                  'array, hash or object that responds to upcase in order to work')
    2627    end
    2728
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/uriescape.rb

    rad28f83 rbcf0be5  
    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.
    43#
    54require 'uri'
    … …  
    1211  ) do |arguments|
    1312
    14     raise(Puppet::ParseError, "uriescape(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
     13    raise(Puppet::ParseError, "uriescape(): Wrong number of arguments " +
     14      "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 array or string to work with')
     19      raise(Puppet::ParseError, 'uriescape(): Requires either ' +
     20        'array or string to work with')
    2021    end
    2122
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb

    rad28f83 rbcf0be5  
    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 
    3229    require 'puppet/util'
    3330
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_array.rb

    rad28f83 rbcf0be5  
    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 
    2321    unless args.length > 0 then
    2422      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

    rad28f83 rbcf0be5  
    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 
    2522    unless args.length > 0 then
    2623      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

    rad28f83 rbcf0be5  
    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

    rad28f83 rbcf0be5  
    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 
    2321    unless args.length > 0 then
    2422      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

    rad28f83 rbcf0be5  
    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.'])
    5755
    5856    # 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

    rad28f83 rbcf0be5  
    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.'])
    2725
    2826    if defined?(IPAddr::InvalidAddressError)
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb

    rad28f83 rbcf0be5  
    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.'])
    2220
    2321    require "ipaddr"
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb

    rad28f83 rbcf0be5  
    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.'])
    2321
    2422    require "ipaddr"
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_numeric.rb

    rad28f83 rbcf0be5  
    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.'])
    1917
    2018    # 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

    rad28f83 rbcf0be5  
    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 
    3532    if (args.length < 2) or (args.length > 3) then
    3633      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

    rad28f83 rbcf0be5  
    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.'])
    2523
    2624    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

    rad28f83 rbcf0be5  
    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.'])
    2725
    2826    unless args.length > 0 then
    … …  
    3129
    3230    args.each do |arg|
    33       # when called through the v4 API shim, undef gets translated to nil
    34       unless arg.is_a?(String) || arg.nil?
     31      unless arg.is_a?(String)
    3532        raise Puppet::ParseError, ("#{arg.inspect} is not a string.  It looks to be a #{arg.class}")
    3633      end
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/values.rb

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

    rad28f83 rbcf0be5  
    3030  ) do |arguments|
    3131
    32     raise(Puppet::ParseError, "values_at(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2
     32    raise(Puppet::ParseError, "values_at(): Wrong number of " +
     33      "arguments given (#{arguments.size} for 2)") if arguments.size < 2
    3334
    3435    array = arguments.shift
    … …  
    4142
    4243    if not indices or indices.empty?
    43       raise(Puppet::ParseError, 'values_at(): You must provide at least one positive index to collect')
     44      raise(Puppet::ParseError, 'values_at(): You must provide ' +
     45        'at least one positive index to collect')
    4446    end
    4547
    … …  
    5658
    5759        if start > stop
    58           raise(Puppet::ParseError, 'values_at(): Stop index in given indices range is smaller than the start index')
     60          raise(Puppet::ParseError, 'values_at(): Stop index in ' +
     61            'given indices range is smaller than the start index')
    5962        elsif stop > array.size - 1 # First element is at index 0 is it not?
    60           raise(Puppet::ParseError, 'values_at(): Stop index in given indices range exceeds array size')
     63          raise(Puppet::ParseError, 'values_at(): Stop index in ' +
     64            'given indices range exceeds array size')
    6165        end
    6266
    … …  
    7074        # Only positive numbers allowed in this case ...
    7175        if not i.match(/^\d+$/)
    72           raise(Puppet::ParseError, 'values_at(): Unknown format of given index')
     76          raise(Puppet::ParseError, 'values_at(): Unknown format ' +
     77            'of given index')
    7378        end
    7479
    … …  
    7782
    7883        if i > array.size - 1 # Same story.  First element is at index 0 ...
    79           raise(Puppet::ParseError, 'values_at(): Given index exceeds array size')
     84          raise(Puppet::ParseError, 'values_at(): Given index ' +
     85            'exceeds array size')
    8086        end
    8187
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/zip.rb

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

    rad28f83 rbcf0be5  
    55    else
    66      lines.find do |line|
    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
     7        line.chomp == resource[:line].chomp
    128      end
    139    end
    … …  
    4137    #  small-ish config files that can fit into memory without
    4238    #  too much trouble.
    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
     39    @lines ||= File.readlines(resource[:path])
    4940  end
    5041
  • src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/type/file_line.rb

    rad28f83 rbcf0be5  
    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 
    6751    **Autorequires:** If Puppet is managing the file that will contain the line
    6852    being managed, the file_line resource will autorequire that file.
    … …  
    8872    desc 'An optional value to determine if match should be applied when ensure => absent.' +
    8973         ' If set to true and match is set, the line that matches match will be deleted.' +
    90          ' If set to false (the default), match is ignored when ensure => absent.' +
    91          ' When `ensure => present`, match_for_absence is ignored.'
     74         ' If set to false (the default), match is ignored when ensure => absent.'
    9275    newvalues(true, false)
    9376    defaultto false
    … …  
    10184
    10285  newparam(:after) do
    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.'
     86    desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)'
    10587  end
    10688
    … …  
    11294    desc 'The file Puppet will ensure contains the line specified by the line parameter.'
    11395    validate do |value|
    114       unless Puppet::Util.absolute_path?(value)
    115         raise Puppet::Error, "File paths must be fully qualified, not '#{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}'")
    11698      end
    11799    end
    … …  
    122104    newvalues(true, false)
    123105    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'
    129106  end
    130107
  • src/puppetcode/environments/gnuboat/modules/stdlib/metadata.json

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

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

    rad28f83 rbcf0be5  
    11require 'spec_helper_acceptance'
    22
    3 describe 'anchor type' do
     3describe 'anchor type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'base64 function' do
     4describe 'base64 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'bool2num function' do
     4describe 'bool2num function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'capitalize function' do
     4describe 'capitalize function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

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

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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'concat function' do
     4describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'count function' do
     4describe 'count function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'deep_merge function' do
     4describe 'deep_merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete_at function' do
     4describe 'delete_at function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete function' do
     4describe 'delete function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete_undef_values function' do
     4describe 'delete_undef_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'delete_values function' do
     4describe 'delete_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'difference function' do
     4describe 'difference function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

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

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

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

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

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

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

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

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

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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'has_interface_with function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
     4describe 'has_interface_with function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'has_ip_address function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
     4describe 'has_ip_address function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'has_ip_network function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
     4describe 'has_ip_network function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (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

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

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

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

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

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

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

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

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

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

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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_ip_address function' do
     4describe 'is_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_mac_address function' do
     4describe 'is_mac_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'is_string function' do
     4describe 'is_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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
    10998  end
    11099  describe 'failure' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb

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

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

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

    rad28f83 rbcf0be5  
    44tmpdir = default.tmpdir('stdlib')
    55
    6 describe 'loadyaml function' do
     6describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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
    5229  end
    5330  describe 'failure' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/lstrip_spec.rb

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

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

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

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

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

    rad28f83 rbcf0be5  
    11HOSTS:
    2   ubuntu-1404-x64:
     2  centos-65-x64:
    33    roles:
    4       - agent
    5       - default
    6     platform: ubuntu-14.04-amd64
    7     hypervisor: vagrant
    8     box: puppetlabs/ubuntu-14.04-64-nocm
     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
    99CONFIG:
    1010  type: foss
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/num2bool_spec.rb

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'num2bool function' do
     4describe 'num2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

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

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

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

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

    rad28f83 rbcf0be5  
    33
    44# Windows and OS X do not have useful implementations of crypt(3)
    5 describe 'pw_hash function', :unless => (['windows', 'Darwin', 'SLES']).include?(fact('operatingsystem')) do
     5describe 'pw_hash function', :unless => (UNSUPPORTED_PLATFORMS + ['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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'to_bytes function' do
     4describe 'to_bytes function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'type function' do
     4describe 'type function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || is_future_parser_enabled?) 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.to_s %>'))
     11      notice(inline_template('type is <%= @o.inspect %>'))
    1212      EOS
    1313
    1414      apply_manifest(pp, :catch_failures => true) do |r|
    15         expect(r.stdout).to match(/type is Tuple\[String.*, String.*, String.*, String.*\]/)
     15        expect(r.stdout).to match(/type is "array"/)
    1616      end
    1717    end
    … …  
    2020      $a = "blowzy night-frumps vex'd jack q"
    2121      $o = type($a)
    22       notice(inline_template('type is <%= @o.to_s %>'))
     22      notice(inline_template('type is <%= @o.inspect %>'))
    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

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

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

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

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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_array function' do
     4describe 'validate_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
    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/)
     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}/)
    3131      end
    3232    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_augeas_spec.rb

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_augeas function', :unless => (fact('osfamily') == 'windows') do
     4describe 'validate_augeas function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_bool function' do
     4describe 'validate_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
    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/)
     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}/)
    3131      end
    3232    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_cmd_spec.rb

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_hash function' do
     4describe 'validate_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
    55  describe 'success' do
    66    it 'validates a single argument' do
    … …  
    2121      apply_manifest(pp, :catch_failures => true)
    2222    end
    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(//)
     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}/)
    3131      end
    3232    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_ipv4_address function' do
     4describe 'validate_ipv4_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

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

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_slength function' do
     4describe 'validate_slength function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'validate_string function' do
     4describe 'validate_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) 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
    3023    it 'validates a non-string' do
    3124      {
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/values_at_spec.rb

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

    rad28f83 rbcf0be5  
    22require 'spec_helper_acceptance'
    33
    4 describe 'values function' do
     4describe 'values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
    55  describe 'success' do
    66    it 'returns an array of values' do
    … …  
    1414      notice(inline_template('<%= @output.sort.inspect %>'))
    1515      EOS
    16       expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 2, 3\]/)
     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
    1722    end
    1823  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/zip_spec.rb

    rad28f83 rbcf0be5  
    11#! /usr/bin/env ruby -S rspec
    22require 'spec_helper_acceptance'
     3require 'puppet'
    34
    4 describe 'zip function' do
     5describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
    56  describe 'success' do
    67    it 'zips two arrays of numbers together' do
    … …  
    1112      notice(inline_template('<%= @output.inspect %>'))
    1213      EOS
    13       expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\], \[3, 7\], \[4, 8\]\]/)
     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
    1419    end
    1520    it 'zips two arrays of numbers & bools together' do
    … …  
    2025      notice(inline_template('<%= @output.inspect %>'))
    2126      EOS
    22       expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, true\], \[2, true\], \["three", false\], \[4, false\]\]/)
     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
    2332    end
    2433    it 'zips two arrays of numbers together and flattens them' do
    … …  
    3342      notice(inline_template('<%= @output.inspect %>'))
    3443      EOS
    35       expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 5, 2, 6, 3, 7, 4, 8\]/)
     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
    3649    end
    3750    it 'handles unmatched length' do
    … …  
    4356      notice(inline_template('<%= @output.inspect %>'))
    4457      EOS
    45       expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\]\]/)
     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
    4663    end
    4764  end
    … …  
    5370      notice(inline_template('<%= @output.inspect %>'))
    5471      EOS
     72
    5573      expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/)
    5674    end
    … …  
    6280      notice(inline_template('<%= @output.inspect %>'))
    6381      EOS
     82
    6483      expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires array/)
    6584    end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/any2array_spec.rb

    rad28f83 rbcf0be5  
    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(['€', '万', 'Ö', '♥', '割']) }
    2115end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/assert_private_spec.rb

    rad28f83 rbcf0be5  
    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
    813
    9       is_expected.to run.with_params()
     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!/
    1021    end
    1122  end
    1223
    1324  context "when called from private class" do
    14     before :each do
     25    it "should fail with a class error message" do
    1526      scope.expects(:lookupvar).with('module_name').returns('foo')
    1627      scope.expects(:lookupvar).with('caller_module_name').returns('bar')
    17     end
    18 
    19     it "should fail with a class error message" do
    2028      scope.source.expects(:name).returns('foo::baz')
    2129      scope.source.expects(:type).returns('hostclass')
    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!/) }
     30      expect {
     31        subject.call []
     32      }.to raise_error Puppet::ParseError, /Class foo::baz is private/
    2833    end
    2934  end
    … …  
    3540      scope.source.expects(:name).returns('foo::baz')
    3641      scope.source.expects(:type).returns('definition')
    37 
    38       is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /Definition foo::baz is private/)
     42      expect {
     43        subject.call []
     44      }.to raise_error Puppet::ParseError, /Definition foo::baz is private/
    3945    end
    4046  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/basename_spec.rb

    rad28f83 rbcf0be5  
    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
    1914end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chomp_spec.rb

    rad28f83 rbcf0be5  
    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
    2520end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chop_spec.rb

    rad28f83 rbcf0be5  
    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
    2520end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/concat_spec.rb

    rad28f83 rbcf0be5  
    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 
    15 context 'should run with UTF8 and double byte characters' do
    1614  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(['ấ','β','©','đ','ể','文字列']) }
    18 end
    1915
    2016  it "should leave the original array intact" do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/count_spec.rb

    rad28f83 rbcf0be5  
    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) }
    2318end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/deep_merge_spec.rb

    rad28f83 rbcf0be5  
    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
    5955end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/defined_with_params_spec.rb

    rad28f83 rbcf0be5  
    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
    1914  end
    2015
    … …  
    2924    it { is_expected.to run.with_params('User[dan]', {'ensure' => 'absent', 'managehome' => false}).and_return(false) }
    3025  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
    6826end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_at_spec.rb

    rad28f83 rbcf0be5  
    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 
    2321
    2422  it "should leave the original array intact" do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_spec.rb

    rad28f83 rbcf0be5  
    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') }
    87  it { is_expected.to run.with_params([], 'two', 'three').and_raise_error(Puppet::ParseError) }
    98  it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError) }
    … …  
    1413    it { is_expected.to run.with_params(['two'], 'two').and_return([]) }
    1514    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']) }
    1715    it { is_expected.to run.with_params(['one', 'two', 'three'], 'four').and_return(['one', 'two', 'three']) }
    1816    it { is_expected.to run.with_params(['one', 'two', 'three'], 'e').and_return(['one', 'two', 'three']) }
    … …  
    2018    it { is_expected.to run.with_params(['two', 'one', 'two', 'three', 'two'], 'two').and_return(['one', 'three']) }
    2119    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(['ŧңŗё℮']) }
    2320  end
    2421
    … …  
    3229    it { is_expected.to run.with_params('foobarbabarz', 'bar').and_return('foobaz') }
    3330    it { is_expected.to run.with_params('foobarbabarz', ['foo', 'bar']).and_return('baz') }
    34     it { is_expected.to run.with_params('ƒōōβậяβậβậяź', ['ƒōō', 'βậя']).and_return('βậź') }
    35 
     31    # this is so sick
    3632    it { is_expected.to run.with_params('barfoobar', ['barbar', 'foo']).and_return('barbar') }
    3733    it { is_expected.to run.with_params('barfoobar', ['foo', 'barbar']).and_return('') }
    … …  
    4945      .with_params({'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'}, ['key1', 'key2']) \
    5046      .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'})
    5547    }
    5648  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_undef_values_spec.rb

    rad28f83 rbcf0be5  
    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(['ớņέ','ŧשּׁō','ŧħґëə']) }
    2019      end
    2120
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_values_spec.rb

    rad28f83 rbcf0be5  
    2020    }
    2121    it { is_expected.to run \
    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' => 'νǎŀữ℮ ťớ đêłểťė'}, 'νǎŀữ℮ ťớ đêłểťė') \
     22      .with_params({'key1' => 'value1', 'key2' => 'value to delete'}, 'value to delete') \
    2723      .and_return({'key1' => 'value1'})
    2824    }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/difference_spec.rb

    rad28f83 rbcf0be5  
    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(['ớņέ']) }
    1615  it { is_expected.to run.with_params(['one'], []).and_return(['one']) }
    1716  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]) }
    1917  it { is_expected.to run.with_params(['one', 'two', 'two', 'three'], ['two', 'three']).and_return(['one']) }
    2018  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

    rad28f83 rbcf0be5  
    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) }
    47
    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
     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) }
    1313end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dirname_spec.rb

    rad28f83 rbcf0be5  
    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
    1813end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dos2unix_spec.rb

    rad28f83 rbcf0be5  
    3030  end
    3131
    32   context 'Internationalization (i18N) values' do
    33     sample_text_utf8    = "Ħ℮ļłǿ\r\nשׁөŕłđ\r\n"
    34     desired_output_utf8 = "Ħ℮ļłǿ\nשׁөŕłđ\n"
     32  context 'Converting from unix to unix format' do
     33    sample_text    = "Hello\nWorld\n"
     34    desired_output = "Hello\nWorld\n"
    3535
    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)
     36    it 'should output unix format' do
     37      should run.with_params(sample_text).and_return(desired_output)
    4538    end
    4639  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_packages_spec.rb

    rad28f83 rbcf0be5  
    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
    5936end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_resource_spec.rb

    rad28f83 rbcf0be5  
    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   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 
     7  it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) }
    138  it {
    149    pending("should not accept numbers as arguments")
    1510    is_expected.to run.with_params(1,2,3).and_raise_error(Puppet::ParseError)
    1611  }
    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
    7412
    7513  context 'given a catalog with "user { username1: ensure => present }"' do
    … …  
    8927      it { expect(lambda { catalogue }).to contain_user('username1').with_ensure('present') }
    9028      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') }
    9829    end
    9930
    … …  
    12253    end
    12354  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
    13555end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/flatten_spec.rb

    rad28f83 rbcf0be5  
    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(["ã","β","ĉ","đ","ẽ","ƒ","ġ"]) }
    1514end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/fqdn_rand_string_spec.rb

    rad28f83 rbcf0be5  
    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/) }
    2423
    2524  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

    rad28f83 rbcf0be5  
    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('ã') }
    1110
    1211  it { is_expected.to run.with_params([]).and_return([]) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getparam_spec.rb

    rad28f83 rbcf0be5  
    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 { 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 
     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    }
    3429  end
    3530end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getvar_spec.rb

    rad28f83 rbcf0be5  
    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) }
    108
    119  context 'given variables in namespaces' do
    … …  
    2119    it { is_expected.to run.with_params('::site::data::bar').and_return(nil) }
    2220  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
    3721end
    38 
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/grep_spec.rb

    rad28f83 rbcf0be5  
    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(['ţשּׂỡ', 'ţһŗəè']) }
    2019end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_ip_network_spec.rb

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

    rad28f83 rbcf0be5  
    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
    2015end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/hash_spec.rb

    rad28f83 rbcf0be5  
    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' }) }
    1413  it { is_expected.to run.with_params(['key1', 'value1', 'key2', 'value2']).and_return({ 'key1' => 'value1', 'key2' => 'value2' }) }
    1514end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/intersection_spec.rb

    rad28f83 rbcf0be5  
    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(['ŧשợ', 'ţђŕẽё']) }
    1817  it { is_expected.to run.with_params(['one', 'two', 'two', 'three'], ['two', 'three']).and_return(['two', 'three']) }
    1918  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

    rad28f83 rbcf0be5  
    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
    2924  end
    3025end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_array_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'is_array' do
    4  
    54  it { is_expected.not_to eq(nil) }
    65  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    1817  it { is_expected.to run.with_params(1).and_return(false) }
    1918  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
    3619end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_bool_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'is_bool' do
    4  
    54  it { is_expected.not_to eq(nil) }
    65  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    1413  it { is_expected.to run.with_params('true').and_return(false) }
    1514  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
    3215end
    33 
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_float_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'is_float' do
    4 
    54  it { is_expected.not_to eq(nil) }
    6 
    75  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    86  it { is_expected.to run.with_params(0.1, 0.2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    2220    it { is_expected.to run.with_params(1).and_return(false) }
    2321  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 
    4222end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_integer_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'is_integer' do
    4  
    54  it { is_expected.not_to eq(nil) }
    6 
    75  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    86  it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    1210  it { is_expected.to run.with_params(-3).and_return(true) }
    1311  it { is_expected.to run.with_params('-3').and_return(true) }
    14 
     12 
    1513  it { is_expected.to run.with_params(3.7).and_return(false) }
    1614  it { is_expected.to run.with_params('3.7').and_return(false) }
    … …  
    2523  it { is_expected.to run.with_params(false).and_return(false) }
    2624  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 
    4525end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_ip_address_spec.rb

    rad28f83 rbcf0be5  
    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
    4023end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_mac_address_spec.rb

    rad28f83 rbcf0be5  
    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 
    1812  it {
    1913    pending "should properly typecheck its arguments"
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_numeric_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'is_numeric' do
    4  
    54  it { is_expected.not_to eq(nil) }
    6 
    75  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    86  it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    2826  it { is_expected.to run.with_params('0001234').and_return(false) }
    2927  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 
    4828end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_string_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'is_string' do
    4 
    54  it { is_expected.not_to eq(nil) }
    65  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    2726  it { is_expected.to run.with_params('one').and_return(true) }
    2827  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 
    4728end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_keys_to_values_spec.rb

    rad28f83 rbcf0be5  
    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 
    2014  it { is_expected.to run.with_params({ 'key' => nil }, ':').and_return(['key:']) }
    2115  it 'should run join_keys_to_values(<hash with multiple keys>, ":") and return the proper array' do
    … …  
    2317    expect(result.sort).to eq(['key1:value1', 'key2:value2'].sort)
    2418  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
    2919end
    30 
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_spec.rb

    rad28f83 rbcf0be5  
    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('ōŋể:ŧשợ:ţђŕẽё') }
    2019end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/keys_spec.rb

    rad28f83 rbcf0be5  
    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
    2419end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/load_module_metadata_spec.rb

    rad28f83 rbcf0be5  
    66  it { is_expected.to run.with_params("one", "two", "three").and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    77
    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
     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"}')
    1312
    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
     13     result = subject.call(['science'])
     14     expect(result['name']).to eq('spencer-science')
     15  end
    2116
    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
     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
    3222
    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
     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({})
    6028  end
    6129end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/loadyaml_spec.rb

    rad28f83 rbcf0be5  
    33describe 'loadyaml' do
    44  it { is_expected.not_to eq(nil) }
    5   it { is_expected.to run.with_params().and_raise_error(ArgumentError, /wrong number of arguments/i) }
    6 
     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) }
    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, {'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({'デフォルト' => '値'}) }
     13    it { is_expected.to run.with_params(filename).and_return(nil) }
    1614  end
    17 
    1815  context 'when an existing file is specified' do
    1916    let(:filename) { '/tmp/doesexist' }
    20     let(:data) { { 'key' => 'value', 'ķęŷ' => 'νậŀųề', 'キー' => '値'} }
     17    let(:data) { { 'key' => 'value' } }
    2118    before {
    2219      File.expects(:exists?).with(filename).returns(true).once
    … …  
    2522    it { is_expected.to run.with_params(filename).and_return(data) }
    2623  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
    3624end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/lstrip_spec.rb

    rad28f83 rbcf0be5  
    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('ǿňè ') }
    2625  it { is_expected.to run.with_params("\tone ").and_return('one ') }
    2726  it { is_expected.to run.with_params("\t one ").and_return('one ') }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/member_spec.rb

    rad28f83 rbcf0be5  
    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) }
    2120  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) }
    2321end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parsejson_spec.rb

    rad28f83 rbcf0be5  
    1313  context 'with correct JSON data' do
    1414
    15     it 'should be able to parse JSON data with a Hash' do
     15    it 'should be able to parse a 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 JSON data with an Array' do
     20    it 'should be able to parse a 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 JSON data with a mixed structure' do
     32    it 'should be able to parse a 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({'×' =>'これ', 'ý' => '記号', 'です' => { '©' => ['Á', 'ß'] } })
    4035    end
    4136
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parseyaml_spec.rb

    rad28f83 rbcf0be5  
    1919    end
    2020
    21     it 'should be able to parse YAML data with a Hash' do
     21    it 'should be able to parse a 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 YAML data with an Array' do
     26    it 'should be able to parse a 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 YAML data with a mixed structure' do
     31    it 'should be able to parse a 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"=>"×", "これ"=>"記号", "です"=>{"©"=>["Á", "ß"]} })
    3934    end
    4035
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/pick_default_spec.rb

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

    rad28f83 rbcf0be5  
    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
    1712end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/prefix_spec.rb

    rad28f83 rbcf0be5  
    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']) }
    1514  it { is_expected.to run.with_params([], '').and_return([]) }
    1615  it { is_expected.to run.with_params([''], '').and_return(['']) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/range_spec.rb

    rad28f83 rbcf0be5  
    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 
    9082  context 'with dash-range syntax' do
    9183    it { is_expected.to run.with_params('4-1').and_return([]) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reject_spec.rb

    rad28f83 rbcf0be5  
    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ệ']) }
    2019end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reverse_spec.rb

    rad28f83 rbcf0be5  
    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(['ƒŏůŗ', 'ŧңяəė', 'ťŵọ', 'ổňë']) }
    1918
    2019  it { is_expected.to run.with_params('').and_return('') }
    … …  
    2221  it { is_expected.to run.with_params('abc').and_return('cba') }
    2322  it { is_expected.to run.with_params('abcd').and_return('dcba') }
    24   it { is_expected.to run.with_params('āβćđ').and_return('đćβā') }
    2523
    2624  context 'when using a class extending String' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/rstrip_spec.rb

    rad28f83 rbcf0be5  
    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(' ǿňè') }
    2625  it { is_expected.to run.with_params("\tone ").and_return("\tone") }
    2726  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

    rad28f83 rbcf0be5  
    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
    5853end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/shuffle_spec.rb

    rad28f83 rbcf0be5  
    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 
    3429    context 'when using a class extending String' do
    3530      it { is_expected.to run.with_params(AlsoString.new('asdfghjkl')).and_return('lkhdsfajg') }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/size_spec.rb

    rad28f83 rbcf0be5  
    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) }
    2322
    2423  it { is_expected.to run.with_params('').and_return(0) }
    … …  
    2625  it { is_expected.to run.with_params('abc').and_return(3) }
    2726  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) }
    3027
    3128  context 'when using a class extending String' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/squeeze_spec.rb

    rad28f83 rbcf0be5  
    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('ậậậậậậậậậậậậậậậậậ語語語語©') }
    2317  end
    2418
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/strip_spec.rb

    rad28f83 rbcf0be5  
    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('ỏŋέ') }
    3433  it { is_expected.to run.with_params(AlsoString.new(' one ')).and_return('one') }
    3534end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/suffix_spec.rb

    rad28f83 rbcf0be5  
    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 
    2018  it {
    2119    is_expected.to run.with_params({}).and_return({})
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/union_spec.rb

    rad28f83 rbcf0be5  
    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(['ốńə', 'ţשׂợ', 'ŧĥяếệ', 'ƒởųŗ']) }
    2423  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
    2524end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/unique_spec.rb

    rad28f83 rbcf0be5  
    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(['ã', 'ъ']) }
    2120  end
    2221
    … …  
    2524    it { is_expected.to run.with_params('a').and_return('a') }
    2625    it { is_expected.to run.with_params('aaba').and_return('ab') }
    27     it { is_expected.to run.with_params('ããъã').and_return('ãъ') }
    2826  end
    2927end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_absolute_path_spec.rb

    rad28f83 rbcf0be5  
    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 
    154  describe 'signature validation' do
    165    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_array_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'validate_array' do
    4 
    54  describe 'signature validation' do
    6     after(:all) do
    7       ENV.delete('STDLIB_LOG_DEPRECATIONS')
    8     end
    95    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
    166    it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    177
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_bool_spec.rb

    rad28f83 rbcf0be5  
    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 
    154  describe 'signature validation' do
    165    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_cmd_spec.rb

    rad28f83 rbcf0be5  
    11require 'spec_helper'
    22
    3 describe 'validate_cmd', :unless => Puppet::Util::Platform.windows? do
     3describe 'validate_cmd' 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

    rad28f83 rbcf0be5  
    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
    197
    208    describe 'valid inputs' do
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_integer_spec.rb

    rad28f83 rbcf0be5  
    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 
    154  describe 'signature validation' do
    165    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ip_address_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'validate_ip_address' do
    4 
    54  describe 'signature validation' do
    65    it { is_expected.not_to eq(nil) }
    … …  
    2120    it { is_expected.to run.with_params('::1/64') }
    2221    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    
    4122    context 'with netmasks' do
    4223      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

    rad28f83 rbcf0be5  
    22
    33describe 'validate_ipv4_address' do
    4 
    54  describe 'signature validation' do
    65    it { is_expected.not_to eq(nil) }
    76    it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    8   end
    97
    10   context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
    11     after(:all) do
    12       ENV.delete('STDLIB_LOG_DEPRECATIONS')
     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
    1323    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
    2624
    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/) }
     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/) }
    3938    end
    4039  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb

    rad28f83 rbcf0be5  
    22
    33describe 'validate_ipv6_address' do
    4  
    54  describe 'signature validation' do
    65    it { is_expected.not_to eq(nil) }
    76    it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    8   end
    97
    10   context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
    11     after(:all) do
    12       ENV.delete('STDLIB_LOG_DEPRECATIONS')
     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') }
    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
    2614
    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/) }
     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
    5830    end
    5931  end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_numeric_spec.rb

    rad28f83 rbcf0be5  
    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 
    154  describe 'signature validation' do
    165    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_re_spec.rb

    rad28f83 rbcf0be5  
    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 
    154  describe 'signature validation' do
    165    it { is_expected.not_to eq(nil) }
    … …  
    2918
    3019    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      }
    3136      it { is_expected.to run.with_params('', []).and_raise_error(Puppet::ParseError, /does not match/) }
    3237      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

    rad28f83 rbcf0be5  
    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  
    154  describe 'signature validation' do
    165    it { is_expected.not_to eq(nil) }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_string_spec.rb

    rad28f83 rbcf0be5  
    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 
    154  describe 'signature validation' do
    165    it { is_expected.not_to eq(nil) }
    … …  
    198    describe 'valid inputs' do
    209      it { is_expected.to run.with_params('') }
    21       it { is_expected.to run.with_params(nil) }
    2210      it { is_expected.to run.with_params('one') }
    2311      it { is_expected.to run.with_params('one', 'two') }
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/values_at_spec.rb

    rad28f83 rbcf0be5  
    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 
    3833  context 'when requesting multiple items' do
    3934    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

    rad28f83 rbcf0be5  
    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
    2419end
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/zip_spec.rb

    rad28f83 rbcf0be5  
    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
    2015end
    21 
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper_acceptance.rb

    rad28f83 rbcf0be5  
    11#! /usr/bin/env ruby -S rspec
    2 require 'puppet'
    32require 'beaker-rspec'
    43require 'beaker/puppet_install_helper'
    5 require 'beaker/module_install_helper'
     4
     5UNSUPPORTED_PLATFORMS = []
    66
    77run_puppet_install_helper
    8 install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ /pe/i
    9 install_module_on(hosts)
    10 install_module_dependencies_on(hosts)
    118
    129RSpec.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')
    1824  end
     25end
     26
     27def 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
    1934end
    2035
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper_local.rb

    rad28f83 rbcf0be5  
    1 # automatically load any shared examples or contexts
    2 Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
    31
    42# 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

    rad28f83 rbcf0be5  
    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 
    373366    it 'should remove one line if it matches' do
    374367      File.open(@tmpfile, 'w') do |fh|
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb

    rad28f83 rbcf0be5  
    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
    195  let :file_line do
    20     Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => tmp_path)
     6    Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => '/tmp/path')
    217  end
    228  it 'should accept a line and path' do
    239    file_line[:line] = 'my_line'
    2410    expect(file_line[:line]).to eq('my_line')
    25     file_line[:path] = my_path
    26     expect(file_line[:path]).to eq(my_path)
     11    file_line[:path] = '/my/path'
     12    expect(file_line[:path]).to eq('/my/path')
    2713  end
    2814  it 'should accept a match regex' do
    … …  
    3420      Puppet::Type.type(:file_line).new(
    3521          :name   => 'foo',
    36           :path   => my_path,
     22          :path   => '/my/path',
    3723          :line   => 'foo=bar',
    3824          :match  => '^bar=blah$'
    … …  
    4329      Puppet::Type.type(:file_line).new(
    4430          :name   => 'foo',
    45           :path   => my_path,
     31          :path   => '/my/path',
    4632          :line   => 'foo=bar',
    4733          :match  => '^\s*foo=.*$'
    4834      )}.not_to raise_error
    4935  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
    6836  it 'should accept posix filenames' do
    69     file_line[:path] = tmp_path
    70     expect(file_line[:path]).to eq(tmp_path)
     37    file_line[:path] = '/tmp/path'
     38    expect(file_line[:path]).to eq('/tmp/path')
    7139  end
    7240  it 'should not accept unqualified path' do
    … …  
    7442  end
    7543  it 'should require that a line is specified' do
    76     expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path) }.to raise_error(Puppet::Error, /line is a required attribute/)
     44    expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => '/tmp/file') }.to raise_error(Puppet::Error, /line is a required attribute/)
    7745  end
    7846  it 'should not require that a line is specified when matching for absence' do
    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
     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
    8048  end
    8149  it 'should require that a file is specified' do
    … …  
    8856    expect(file_line[:replace]).to eq :true
    8957  end
    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
     58
    9659  it "should autorequire the file it manages" do
    9760    catalog = Puppet::Resource::Catalog.new
    98     file = Puppet::Type.type(:file).new(:name => tmp_path)
     61    file = Puppet::Type.type(:file).new(:name => "/tmp/path")
    9962    catalog.add_resource file
    10063    catalog.add_resource file_line
    10164
    10265    relationship = file_line.autorequire.find do |rel|
    103       (rel.source.to_s == "File[#{tmp_path}]") and (rel.target.to_s == file_line.to_s)
     66      (rel.source.to_s == "File[/tmp/path]") and (rel.target.to_s == file_line.to_s)
    10467    end
    10568    expect(relationship).to be_a Puppet::Relationship
Note: See TracChangeset for help on using the changeset viewer.