Changeset be0859f for src/puppetcode
- Timestamp:
- Jul 31, 2017, 6:42:27 PM (9 years ago)
- Branches:
- 0.5, app-cordova, debian/bullseye, debian/jessie, master
- Children:
- fc9d514
- Parents:
- eb1ccd6
- Location:
- src/puppetcode/environments/gnuboat/modules
- Files:
-
- 131 added
- 33 deleted
- 339 edited
- 3 moved
-
apt/CHANGELOG.md (modified) (1 diff)
-
apt/CONTRIBUTING.md (modified) (2 diffs)
-
apt/Gemfile (modified) (1 diff)
-
apt/MAINTAINERS.md (added)
-
apt/NOTICE (modified) (2 diffs)
-
apt/README.md (modified) (9 diffs)
-
apt/Rakefile (modified) (1 diff)
-
apt/checksums.json (modified) (2 diffs)
-
apt/examples/backports.pp (modified) (1 diff)
-
apt/examples/key.pp (modified) (1 diff)
-
apt/examples/source.pp (modified) (3 diffs)
-
apt/lib/facter/apt_updates.rb (modified) (5 diffs)
-
apt/lib/puppet/provider/apt_key/apt_key.rb (modified) (1 diff)
-
apt/lib/puppet/type/apt_key.rb (modified) (1 diff)
-
apt/locales/config.yaml (added)
-
apt/manifests/backports.pp (modified) (1 diff)
-
apt/manifests/conf.pp (modified) (2 diffs)
-
apt/manifests/init.pp (modified) (5 diffs)
-
apt/manifests/key.pp (modified) (1 diff)
-
apt/manifests/params.pp (modified) (6 diffs)
-
apt/manifests/pin.pp (modified) (3 diffs)
-
apt/manifests/ppa.pp (modified) (4 diffs)
-
apt/manifests/setting.pp (modified) (4 diffs)
-
apt/manifests/source.pp (modified) (6 diffs)
-
apt/manifests/update.pp (modified) (2 diffs)
-
apt/metadata.json (modified) (4 diffs)
-
apt/spec/acceptance/apt_key_provider_spec.rb (modified) (18 diffs)
-
apt/spec/acceptance/apt_spec.rb (modified) (4 diffs)
-
apt/spec/acceptance/class_spec.rb (modified) (1 diff)
-
apt/spec/acceptance/nodesets/centos-59-x64.yml (deleted)
-
apt/spec/acceptance/nodesets/centos-64-x64-pe.yml (deleted)
-
apt/spec/acceptance/nodesets/centos-65-x64.yml (deleted)
-
apt/spec/acceptance/nodesets/centos-7-x64.yml (added)
-
apt/spec/acceptance/nodesets/debian-70rc1-x64.yml (deleted)
-
apt/spec/acceptance/nodesets/debian-73-x64.yml (deleted)
-
apt/spec/acceptance/nodesets/debian-8-x64.yml (added)
-
apt/spec/acceptance/nodesets/default.yml (modified) (1 diff)
-
apt/spec/acceptance/nodesets/docker/centos-7.yml (added)
-
apt/spec/acceptance/nodesets/docker/debian-8.yml (added)
-
apt/spec/acceptance/nodesets/docker/ubuntu-14.04.yml (added)
-
apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml (deleted)
-
apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml (deleted)
-
apt/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml (deleted)
-
apt/spec/classes/apt_backports_spec.rb (modified) (12 diffs)
-
apt/spec/classes/apt_spec.rb (modified) (10 diffs)
-
apt/spec/classes/apt_update_spec.rb (modified) (7 diffs)
-
apt/spec/classes/params_spec.rb (deleted)
-
apt/spec/defines/conf_spec.rb (modified) (1 diff)
-
apt/spec/defines/key_compat_spec.rb (modified) (25 diffs)
-
apt/spec/defines/key_spec.rb (modified) (3 diffs)
-
apt/spec/defines/pin_spec.rb (modified) (4 diffs)
-
apt/spec/defines/ppa_spec.rb (modified) (21 diffs)
-
apt/spec/defines/setting_spec.rb (modified) (5 diffs)
-
apt/spec/defines/source_compat_spec.rb (modified) (8 diffs)
-
apt/spec/defines/source_spec.rb (modified) (17 diffs)
-
apt/spec/spec.opts (deleted)
-
apt/spec/spec_helper_acceptance.rb (modified) (2 diffs)
-
apt/spec/unit/facter/apt_has_updates_spec.rb (modified) (2 diffs)
-
apt/spec/unit/facter/apt_package_updates_spec.rb (modified) (1 diff)
-
apt/spec/unit/facter/apt_security_updates_spec.rb (modified) (1 diff)
-
apt/spec/unit/facter/apt_update_last_success_spec.rb (modified) (2 diffs)
-
apt/spec/unit/facter/apt_updates_spec.rb (modified) (1 diff)
-
apt/spec/unit/puppet/type/apt_key_spec.rb (modified) (19 diffs)
-
apt/templates/15update-stamp.epp (moved) (moved from src/puppetcode/environments/gnuboat/modules/apt/templates/15update-stamp.erb )
-
apt/templates/_conf_header.epp (moved) (moved from src/puppetcode/environments/gnuboat/modules/apt/templates/_conf_header.erb )
-
apt/templates/_header.epp (moved) (moved from src/puppetcode/environments/gnuboat/modules/apt/templates/_header.erb )
-
apt/templates/conf.erb (deleted)
-
apt/templates/pin.pref.epp (added)
-
apt/templates/pin.pref.erb (deleted)
-
apt/templates/proxy.epp (added)
-
apt/templates/proxy.erb (deleted)
-
apt/templates/source.list.epp (added)
-
apt/templates/source.list.erb (deleted)
-
stdlib/CHANGELOG.md (modified) (1 diff)
-
stdlib/CONTRIBUTING.md (modified) (2 diffs)
-
stdlib/Gemfile (modified) (1 diff)
-
stdlib/MAINTAINERS.md (added)
-
stdlib/README.markdown (deleted)
-
stdlib/README.md (added)
-
stdlib/Rakefile (modified) (1 diff)
-
stdlib/appveyor.yml (added)
-
stdlib/checksums.json (modified) (5 diffs)
-
stdlib/examples/file_line.pp (modified) (1 diff)
-
stdlib/lib/facter/puppet_settings.rb (added)
-
stdlib/lib/facter/puppet_vardir.rb (deleted)
-
stdlib/lib/puppet/functions/deprecation.rb (added)
-
stdlib/lib/puppet/functions/is_absolute_path.rb (added)
-
stdlib/lib/puppet/functions/is_array.rb (added)
-
stdlib/lib/puppet/functions/is_bool.rb (added)
-
stdlib/lib/puppet/functions/is_float.rb (added)
-
stdlib/lib/puppet/functions/is_ip_address.rb (added)
-
stdlib/lib/puppet/functions/is_ipv4_address.rb (added)
-
stdlib/lib/puppet/functions/is_ipv6_address.rb (added)
-
stdlib/lib/puppet/functions/is_numeric.rb (added)
-
stdlib/lib/puppet/functions/is_string.rb (added)
-
stdlib/lib/puppet/functions/length.rb (added)
-
stdlib/lib/puppet/functions/type_of.rb (modified) (1 diff)
-
stdlib/lib/puppet/functions/validate_absolute_path.rb (added)
-
stdlib/lib/puppet/functions/validate_array.rb (added)
-
stdlib/lib/puppet/functions/validate_bool.rb (added)
-
stdlib/lib/puppet/functions/validate_hash.rb (added)
-
stdlib/lib/puppet/functions/validate_integer.rb (added)
-
stdlib/lib/puppet/functions/validate_ip_address.rb (added)
-
stdlib/lib/puppet/functions/validate_ipv4_address.rb (added)
-
stdlib/lib/puppet/functions/validate_ipv6_address.rb (added)
-
stdlib/lib/puppet/functions/validate_legacy.rb (added)
-
stdlib/lib/puppet/functions/validate_numeric.rb (added)
-
stdlib/lib/puppet/functions/validate_re.rb (added)
-
stdlib/lib/puppet/functions/validate_slength.rb (added)
-
stdlib/lib/puppet/functions/validate_string.rb (added)
-
stdlib/lib/puppet/parser/functions/abs.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/any2bool.rb (added)
-
stdlib/lib/puppet/parser/functions/assert_private.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/base64.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/bool2num.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/bool2str.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/camelcase.rb (modified) (3 diffs)
-
stdlib/lib/puppet/parser/functions/capitalize.rb (modified) (3 diffs)
-
stdlib/lib/puppet/parser/functions/ceiling.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/chomp.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/chop.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/clamp.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/concat.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/count.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/defined_with_params.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/delete.rb (modified) (3 diffs)
-
stdlib/lib/puppet/parser/functions/delete_at.rb (modified) (3 diffs)
-
stdlib/lib/puppet/parser/functions/delete_regex.rb (added)
-
stdlib/lib/puppet/parser/functions/delete_undef_values.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/delete_values.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/deprecation.rb (added)
-
stdlib/lib/puppet/parser/functions/difference.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/dig.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/dig44.rb (added)
-
stdlib/lib/puppet/parser/functions/downcase.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/empty.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/enclose_ipv6.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/ensure_packages.rb (modified) (3 diffs)
-
stdlib/lib/puppet/parser/functions/ensure_resources.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/flatten.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/floor.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/fqdn_rotate.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/fqdn_uuid.rb (added)
-
stdlib/lib/puppet/parser/functions/getparam.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/getvar.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/glob.rb (added)
-
stdlib/lib/puppet/parser/functions/grep.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/has_interface_with.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/has_ip_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/has_ip_network.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/hash.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/intersection.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_absolute_path.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_array.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/is_bool.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/is_domain_name.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_email_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_float.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_function_available.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_hash.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_integer.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_ip_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_ipv4_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_ipv6_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_mac_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/is_numeric.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/is_string.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/join.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/join_keys_to_values.rb (modified) (5 diffs)
-
stdlib/lib/puppet/parser/functions/keys.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/loadjson.rb (added)
-
stdlib/lib/puppet/parser/functions/loadyaml.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/lstrip.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/max.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/member.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/min.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/num2bool.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/prefix.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/pry.rb (added)
-
stdlib/lib/puppet/parser/functions/pw_hash.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/range.rb (modified) (3 diffs)
-
stdlib/lib/puppet/parser/functions/regexpescape.rb (added)
-
stdlib/lib/puppet/parser/functions/reverse.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/rstrip.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/shell_escape.rb (added)
-
stdlib/lib/puppet/parser/functions/shell_join.rb (added)
-
stdlib/lib/puppet/parser/functions/shell_split.rb (added)
-
stdlib/lib/puppet/parser/functions/shuffle.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/size.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/sort.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/squeeze.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/str2bool.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/str2saltedsha512.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/strftime.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/strip.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/suffix.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/swapcase.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/time.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/to_bytes.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/type3x.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/union.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/unique.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/upcase.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/uriescape.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/validate_absolute_path.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_array.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_bool.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_email_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_hash.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_integer.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/validate_ip_address.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_numeric.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/validate_re.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_slength.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/validate_string.rb (modified) (2 diffs)
-
stdlib/lib/puppet/parser/functions/values.rb (modified) (1 diff)
-
stdlib/lib/puppet/parser/functions/values_at.rb (modified) (5 diffs)
-
stdlib/lib/puppet/parser/functions/zip.rb (modified) (1 diff)
-
stdlib/lib/puppet/provider/file_line/ruby.rb (modified) (2 diffs)
-
stdlib/lib/puppet/type/file_line.rb (modified) (5 diffs)
-
stdlib/locales/config.yaml (added)
-
stdlib/locales/ja/puppetlabs-stdlib.po (added)
-
stdlib/locales/puppetlabs-stdlib.pot (added)
-
stdlib/metadata.json (modified) (4 diffs)
-
stdlib/readmes/README_ja_JP.md (added)
-
stdlib/spec/acceptance/abs_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/anchor_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/any2array_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/base64_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/bool2num_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/capitalize_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/ceiling_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/chomp_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/chop_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/clamp_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/concat_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/count_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/deep_merge_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/defined_with_params_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/delete_at_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/delete_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/delete_undef_values_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/delete_values_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/deprecation_spec.rb (added)
-
stdlib/spec/acceptance/difference_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/dirname_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/downcase_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/empty_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/flatten_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/floor_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/fqdn_rand_string_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/fqdn_rotate_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/get_module_path_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/getparam_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/getvar_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/grep_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/has_interface_with_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/has_ip_address_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/has_ip_network_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/has_key_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/hash_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/intersection_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_a_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_array_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_bool_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_domain_name_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_float_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_function_available_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_hash_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_integer_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_ip_address_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_ipv4_address_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_ipv6_address_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_mac_address_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_numeric_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/is_string_spec.rb (modified) (2 diffs)
-
stdlib/spec/acceptance/join_keys_to_values_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/join_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/keys_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/loadjson_spec.rb (added)
-
stdlib/spec/acceptance/loadyaml_spec.rb (modified) (2 diffs)
-
stdlib/spec/acceptance/lstrip_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/max_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/member_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/merge_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/min_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/nodesets/centos-59-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml (deleted)
-
stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml (deleted)
-
stdlib/spec/acceptance/nodesets/centos-64-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/centos-65-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/centos-7-x64.yml (added)
-
stdlib/spec/acceptance/nodesets/debian-8-x64.yml (added)
-
stdlib/spec/acceptance/nodesets/default.yml (modified) (1 diff)
-
stdlib/spec/acceptance/nodesets/docker/centos-7.yml (added)
-
stdlib/spec/acceptance/nodesets/docker/debian-8.yml (added)
-
stdlib/spec/acceptance/nodesets/docker/ubuntu-14.04.yml (added)
-
stdlib/spec/acceptance/nodesets/fedora-18-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/sles-11-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/windows-2003-i386.yml (deleted)
-
stdlib/spec/acceptance/nodesets/windows-2003-x86_64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/windows-2008-x86_64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/windows-2008r2-x86_64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/windows-2012-x86_64.yml (deleted)
-
stdlib/spec/acceptance/nodesets/windows-2012r2-x86_64.yml (deleted)
-
stdlib/spec/acceptance/num2bool_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/parsejson_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/parseyaml_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/pick_default_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/pick_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/prefix_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/pw_hash_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/range_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/reject_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/reverse_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/rstrip_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/shuffle_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/size_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/sort_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/squeeze_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/str2bool_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/str2saltedsha512_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/strftime_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/strip_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/suffix_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/swapcase_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/time_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/to_bytes_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/try_get_value_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/type_spec.rb (modified) (3 diffs)
-
stdlib/spec/acceptance/union_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/unique_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/unsupported_spec.rb (deleted)
-
stdlib/spec/acceptance/upcase_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/uriescape_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_absolute_path_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_array_spec.rb (modified) (2 diffs)
-
stdlib/spec/acceptance/validate_augeas_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_bool_spec.rb (modified) (2 diffs)
-
stdlib/spec/acceptance/validate_cmd_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_hash_spec.rb (modified) (2 diffs)
-
stdlib/spec/acceptance/validate_ipv4_address_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_ipv6_address_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_re_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_slength_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/validate_string_spec.rb (modified) (2 diffs)
-
stdlib/spec/acceptance/values_at_spec.rb (modified) (1 diff)
-
stdlib/spec/acceptance/values_spec.rb (modified) (2 diffs)
-
stdlib/spec/acceptance/zip_spec.rb (modified) (7 diffs)
-
stdlib/spec/aliases/absolute_path_spec.rb (added)
-
stdlib/spec/aliases/absolutepath_spec.rb (added)
-
stdlib/spec/aliases/array_spec.rb (added)
-
stdlib/spec/aliases/bool_spec.rb (added)
-
stdlib/spec/aliases/float_spec.rb (added)
-
stdlib/spec/aliases/hash_spec.rb (added)
-
stdlib/spec/aliases/httpsurl_spec.rb (added)
-
stdlib/spec/aliases/httpurl_spec.rb (added)
-
stdlib/spec/aliases/integer_spec.rb (added)
-
stdlib/spec/aliases/ip_address.rb (added)
-
stdlib/spec/aliases/ipv4_spec.rb (added)
-
stdlib/spec/aliases/ipv6_spec.rb (added)
-
stdlib/spec/aliases/numeric_spec.rb (added)
-
stdlib/spec/aliases/string_spec.rb (added)
-
stdlib/spec/aliases/unixpath_spec.rb (added)
-
stdlib/spec/aliases/windowspath_spec.rb (added)
-
stdlib/spec/fixtures/dscacheutil/root (added)
-
stdlib/spec/fixtures/lsuser/root (added)
-
stdlib/spec/fixtures/test/manifests/absolute_path.pp (added)
-
stdlib/spec/fixtures/test/manifests/absolutepath.pp (added)
-
stdlib/spec/fixtures/test/manifests/array.pp (added)
-
stdlib/spec/fixtures/test/manifests/bool.pp (added)
-
stdlib/spec/fixtures/test/manifests/deftype.pp (added)
-
stdlib/spec/fixtures/test/manifests/ensure_resources.pp (added)
-
stdlib/spec/fixtures/test/manifests/float.pp (added)
-
stdlib/spec/fixtures/test/manifests/hash.pp (added)
-
stdlib/spec/fixtures/test/manifests/httpsurl.pp (added)
-
stdlib/spec/fixtures/test/manifests/httpurl.pp (added)
-
stdlib/spec/fixtures/test/manifests/integer.pp (added)
-
stdlib/spec/fixtures/test/manifests/ip_address.pp (added)
-
stdlib/spec/fixtures/test/manifests/ipv4.pp (added)
-
stdlib/spec/fixtures/test/manifests/ipv6.pp (added)
-
stdlib/spec/fixtures/test/manifests/numeric.pp (added)
-
stdlib/spec/fixtures/test/manifests/string.pp (added)
-
stdlib/spec/fixtures/test/manifests/unixpath.pp (added)
-
stdlib/spec/fixtures/test/manifests/windowspath.pp (added)
-
stdlib/spec/functions/any2array_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/any2bool_spec.rb (added)
-
stdlib/spec/functions/assert_private_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/basename_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/chomp_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/chop_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/concat_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/count_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/deep_merge_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/defined_with_params_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/delete_at_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/delete_regex_spec.rb (added)
-
stdlib/spec/functions/delete_spec.rb (modified) (5 diffs)
-
stdlib/spec/functions/delete_undef_values_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/delete_values_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/deprecation_spec.rb (added)
-
stdlib/spec/functions/difference_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/dig44_spec.rb (added)
-
stdlib/spec/functions/dig_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/dirname_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/dos2unix_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/ensure_packages_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/ensure_resource_spec.rb (modified) (3 diffs)
-
stdlib/spec/functions/flatten_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/fqdn_rand_string_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/fqdn_rotate_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/fqdn_uuid_spec.rb (added)
-
stdlib/spec/functions/getparam_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/getvar_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/glob_spec.rb (added)
-
stdlib/spec/functions/grep_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/has_ip_network_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/has_key_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/hash_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/intersection_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/is_a_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/is_array_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/is_bool_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/is_float_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/is_integer_spec.rb (modified) (3 diffs)
-
stdlib/spec/functions/is_ip_address_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/is_ipv4_address_spec.rb (added)
-
stdlib/spec/functions/is_ipv6_address_spec.rb (added)
-
stdlib/spec/functions/is_mac_address_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/is_numeric_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/is_string_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/join_keys_to_values_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/join_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/keys_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/length.rb (added)
-
stdlib/spec/functions/load_module_metadata_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/loadjson_spec.rb (added)
-
stdlib/spec/functions/loadyaml_spec.rb (modified) (3 diffs)
-
stdlib/spec/functions/lstrip_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/member_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/parsejson_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/parseyaml_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/pick_default_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/pick_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/prefix_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/range_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/regexpescape_spec.rb (added)
-
stdlib/spec/functions/reject_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/reverse_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/rstrip_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/seeded_rand_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/shell_escape_spec.rb (added)
-
stdlib/spec/functions/shell_join_spec.rb (added)
-
stdlib/spec/functions/shell_split_spec.rb (added)
-
stdlib/spec/functions/shuffle_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/size_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/squeeze_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/strip_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/suffix_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/union_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/unique_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/validate_absolute_path_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_array_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_bool_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_cmd_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_hash_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_integer_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_ip_address_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/validate_ipv4_address_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_ipv6_address_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_legacy_spec.rb (added)
-
stdlib/spec/functions/validate_numeric_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_re_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/validate_slength_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/validate_string_spec.rb (modified) (2 diffs)
-
stdlib/spec/functions/values_at_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/values_spec.rb (modified) (1 diff)
-
stdlib/spec/functions/zip_spec.rb (modified) (1 diff)
-
stdlib/spec/spec_helper_acceptance.rb (modified) (2 diffs)
-
stdlib/spec/spec_helper_local.rb (modified) (1 diff)
-
stdlib/spec/support/shared_data.rb (added)
-
stdlib/spec/unit/ensure_resources_spec.rb (added)
-
stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb (modified) (1 diff)
-
stdlib/spec/unit/puppet/type/file_line_spec.rb (modified) (5 diffs)
-
stdlib/types/absolutepath.pp (added)
-
stdlib/types/compat/absolute_path.pp (added)
-
stdlib/types/compat/array.pp (added)
-
stdlib/types/compat/bool.pp (added)
-
stdlib/types/compat/float.pp (added)
-
stdlib/types/compat/hash.pp (added)
-
stdlib/types/compat/integer.pp (added)
-
stdlib/types/compat/ip_address.pp (added)
-
stdlib/types/compat/ipv4.pp (added)
-
stdlib/types/compat/ipv6.pp (added)
-
stdlib/types/compat/numeric.pp (added)
-
stdlib/types/compat/re.pp (added)
-
stdlib/types/compat/string.pp (added)
-
stdlib/types/httpsurl.pp (added)
-
stdlib/types/httpurl.pp (added)
-
stdlib/types/unixpath.pp (added)
-
stdlib/types/windowspath.pp (added)
Legend:
- Unmodified
- Added
- Removed
-
src/puppetcode/environments/gnuboat/modules/apt/CHANGELOG.md
reb1ccd6 rbe0859f 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 1 73 ##Supported Release 2.2.2 2 74 ###Summary 3 75 4 Several bug fixes and the addition of support updates to Debian 8 and Ubunt oWily.76 Several bug fixes and the addition of support updates to Debian 8 and Ubuntu Wily. 5 77 6 78 ####Bugfixes 7 79 - Small fixes to descriptions within the readme and the addition of some examples. 8 - Updates to run on Ubunt oWily.80 - Updates to run on Ubuntu Wily. 9 81 - Fixed apt_key tempfile race condition. 10 82 - Run stages limitation added to the documentation. -
src/puppetcode/environments/gnuboat/modules/apt/CONTRIBUTING.md
reb1ccd6 rbe0859f 44 44 - Make sure you have a [GitHub account](https://github.com/join) 45 45 46 - [Create a ticket](https://tickets.puppet labs.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppetlabs.com/browse/) you are patching for.46 - [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for. 47 47 48 48 * Preferred method: … … 209 209 ==================== 210 210 211 * [Getting additional help](http://puppetlabs.com/community/get-help) 212 213 * [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests) 214 215 * [Patchwork](https://patchwork.puppetlabs.com) 211 * [Getting additional help](http://puppet.com/community/get-help) 212 213 * [Writing tests](https://docs.puppet.com/guides/module_guides/bgtm.html#step-three-module-testing) 216 214 217 215 * [General GitHub documentation](http://help.github.com/) 218 216 219 217 * [GitHub pull request documentation](http://help.github.com/send-pull-requests/) 220 -
src/puppetcode/environments/gnuboat/modules/apt/Gemfile
reb1ccd6 rbe0859f 3 3 source ENV['GEM_SOURCE'] || "https://rubygems.org" 4 4 5 def location_for(place, version = nil) 6 if place =~ /^(git[:@][^#]*)#(.*)/ 7 [version, { :git => $1, :branch => $2, :require => false}].compact 8 elsif place =~ /^file:\/\/(.*)/ 9 ['>= 0', { :path => File.expand_path($1), :require => false}] 5 # Determines what type of gem is requested based on place_or_version. 6 def gem_type(place_or_version) 7 if place_or_version =~ /^git:/ 8 :git 9 elsif place_or_version =~ /^file:/ 10 :file 10 11 else 11 [place, version, { :require => false}].compact12 :gem 12 13 end 13 14 end 14 15 15 group :development, :unit_tests do 16 gem 'json', :require => false 17 gem 'metadata-json-lint', :require => false 18 gem 'puppet_facts', :require => false 19 gem 'puppet-blacksmith', :require => false 20 gem 'puppetlabs_spec_helper', :require => false 21 gem 'rspec-puppet', '>= 2.3.2', :require => false 22 gem 'simplecov', :require => false 23 end 24 group :system_tests do 25 gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4') 26 gem 'beaker', *location_for(ENV['BEAKER_VERSION']) 27 gem 'serverspec', :require => false 28 gem 'beaker-puppet_install_helper', :require => false 29 gem 'master_manipulator', :require => false 30 gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION']) 16 # Find a location or specific version for a gem. place_or_version can be a 17 # version, which is most often used. It can also be git, which is specified as 18 # `git://somewhere.git#branch`. You can also use a file source location, which 19 # is specified as `file://some/location/on/disk`. 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 31 28 end 32 29 33 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) 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 34 55 gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION']) 35 56 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'] 36 63 64 65 # Evaluate Gemfile.local if it exists 37 66 if File.exists? "#{__FILE__}.local" 38 67 eval(File.read("#{__FILE__}.local"), binding) 39 68 end 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
reb1ccd6 rbe0859f 1 apt puppet module 1 Puppet Module - puppetlabs-apt 2 2 3 Copyright (C) 2014-2016 Puppet Labs, Inc. 4 5 Puppet Labs can be contacted at: info@puppetlabs.com 6 3 Copyright 2017 Puppet, Inc. 7 4 8 5 Licensed under the Apache License, Version 2.0 (the "License"); … … 10 7 You may obtain a copy of the License at 11 8 12 http://www.apache.org/licenses/LICENSE-2.09 http://www.apache.org/licenses/LICENSE-2.0 13 10 14 11 Unless required by applicable law or agreed to in writing, software -
src/puppetcode/environments/gnuboat/modules/apt/README.md
reb1ccd6 rbe0859f 59 59 **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. 60 60 61 Declare the `apt::key` class:61 Declare the `apt::key` defined type: 62 62 63 63 ```puppet 64 64 apt::key { 'puppetlabs': 65 id => ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',65 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 66 66 server => 'pgp.mit.edu', 67 67 options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"', … … 148 148 repos => 'main', 149 149 key => { 150 'id' => ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',150 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 151 151 'server' => 'pgp.mit.edu', 152 152 }, 153 } ,153 } 154 154 ``` 155 155 … … 179 179 repos: 'main' 180 180 key: 181 id: ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'181 id: '6F6B15509CF8E59E6E469F327F438280EF8D349F' 182 182 server: 'pgp.mit.edu' 183 183 ``` … … 193 193 repos => 'main universe multiverse restricted', 194 194 } 195 195 196 196 apt::source { "archive.ubuntu.com-${lsbdistcodename}-security": 197 197 location => 'http://archive.ubuntu.com/ubuntu', … … 200 200 release => "${lsbdistcodename}-security" 201 201 } 202 202 203 203 apt::source { "archive.ubuntu.com-${lsbdistcodename}-updates": 204 204 location => 'http://archive.ubuntu.com/ubuntu', … … 207 207 release => "${lsbdistcodename}-updates" 208 208 } 209 209 210 210 apt::source { "archive.ubuntu.com-${lsbdistcodename}-backports": 211 211 location => 'http://archive.ubuntu.com/ubuntu', … … 261 261 ##### Parameters (all optional) 262 262 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 263 265 * `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: {}. 264 266 … … 421 423 422 424 * Lucid and Precise: 'python-software-properties' 423 * Trusty , Utopic, and Vivid: 'software-properties-common'424 * All others: undef425 * Trusty and newer: 'software-properties-common' 426 * All others: 'python-software-properties' 425 427 426 428 * `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". 427 429 428 #### Defined Type: `apt: setting`430 #### Defined Type: `apt::setting` 429 431 430 432 Manages Apt configuration files. … … 485 487 486 488 * `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'. 487 491 488 492 #### Type: `apt_key` -
src/puppetcode/environments/gnuboat/modules/apt/Rakefile
reb1ccd6 rbe0859f 1 require 'puppet _blacksmith/rake_tasks'1 require 'puppetlabs_spec_helper/rake_tasks' 2 2 require 'puppet-lint/tasks/puppet-lint' 3 require 'puppet labs_spec_helper/rake_tasks'3 require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? 4 4 5 5 PuppetLint.configuration.fail_on_warnings = true 6 6 PuppetLint.configuration.send('relative') 7 PuppetLint.configuration.send('disable_80chars')8 PuppetLint.configuration.send('disable_class_inherits_from_params_class')9 PuppetLint.configuration.send('disable_documentation')10 PuppetLint.configuration.send('disable_single_quote_string_with_variables')11 PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]12 7 13 8 desc 'Generate pooler nodesets' -
src/puppetcode/environments/gnuboat/modules/apt/checksums.json
reb1ccd6 rbe0859f 1 1 { 2 "CHANGELOG.md": " 6a1e5e7a7b25137bab30512b425c0634",3 "CONTRIBUTING.md": " ad65d271f183b5adb9fdd58207939f5f",4 "Gemfile": " a5493d10f1c1fec87972b13a9fe1afcf",2 "CHANGELOG.md": "a91cd94a75b1abd4b28b3ff089d81c60", 3 "CONTRIBUTING.md": "77d0440d7cd4206497f99065c60bed46", 4 "Gemfile": "bedf635025b279d7c7732adcc8ae9a29", 5 5 "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57", 6 "NOTICE": "f0fd8d07c4a816a2655400c7403db877", 7 "README.md": "f27f862d74944cbd90d6e9e310602eaa", 8 "Rakefile": "ab91824042ec3fd085a41cab7e0e90d4", 9 "examples/backports.pp": "17882e4b05751cd28069dcc72705e470", 6 "MAINTAINERS.md": "35674b233c6d12c0f56ee8afbdae29e4", 7 "NOTICE": "9533d13591355591f69619be28e9cfce", 8 "README.md": "06945ba980070be5f9e9b755fcfa4d8b", 9 "Rakefile": "3851f083966b9bbd6d46e50dba5aa52a", 10 "examples/backports.pp": "af57ea62ed1b73f540858e00327e6517", 10 11 "examples/builddep.pp": "eddb8b7d7c0ef7383d85a74c1cd0de3f", 11 12 "examples/debian_testing.pp": "2e50a41180e2afeac2de15ade05ddaa1", … … 15 16 "examples/force.pp": "f71857eba704a0eb3d8d6b146e80da6d", 16 17 "examples/hold.pp": "5e58e0a30d6407a05691d96c7647ae14", 17 "examples/key.pp": "d 1d63e76f1ca8a004dbeac9261c9045a",18 "examples/key.pp": "d85507365bd2753e14e04c344c2f7703", 18 19 "examples/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab", 19 20 "examples/ppa.pp": "b902cce8159128b5e8b21bed540743ff", 20 21 "examples/release.pp": "2bc960babf8c4dd24b7ffa4220a601f8", 21 "examples/source.pp": " 2f402ae0218fdf070d5388a66e85f82f",22 "examples/source.pp": "c79817e129305f86a495f7558de3d3ec", 22 23 "examples/unattended_upgrades.pp": "e7a797388ef03077f110f4f268f5ecd1", 23 24 "lib/facter/apt_reboot_required.rb": "7c3fc46f254fc4b4579d011578caaadb", 24 25 "lib/facter/apt_update_last_success.rb": "2926ff059cd2f63a2a7824ba898837f9", 25 "lib/facter/apt_updates.rb": " 6c2f2204761b2d8842e0db6235d900cb",26 "lib/puppet/provider/apt_key/apt_key.rb": " f6ad8e3cacfa8a199921730d61e96105",27 "lib/puppet/type/apt_key.rb": " b167dc62db19a482a5b46abf3095904b",26 "lib/facter/apt_updates.rb": "2662a82fe574e565d225f7838278d9eb", 27 "lib/puppet/provider/apt_key/apt_key.rb": "33d0ab1b0a21cea5c120d63173d514a4", 28 "lib/puppet/type/apt_key.rb": "9c6ca9618cdcb863275c23cf32c77f2d", 28 29 "lib/puppet_x/apt_key/patch_openuri.rb": "951bad007a3b5db035be069c1d1c9c09", 29 "manifests/backports.pp": "7d4a6e58ae3dc364e6279358e4f4b957", 30 "manifests/conf.pp": "403cee9be6284d6f47759482759f4b6d", 31 "manifests/init.pp": "3640560b938701bbc0c4ed8c93c5a64a", 32 "manifests/key.pp": "ad58e1224124b5b4a2617123d74eed00", 33 "manifests/params.pp": "d8799f415d36e4b50b1bf9a8a107a17c", 34 "manifests/pin.pp": "5abe01b9106f1f3c00f02e3ad81eec75", 35 "manifests/ppa.pp": "e745db50b160d7519e3dc97f137e0ca4", 36 "manifests/setting.pp": "cde5492c31b2b94c49bf67c7c96a6058", 37 "manifests/source.pp": "c1be91ad56665839711ada25c6f10850", 38 "manifests/update.pp": "93f132802d6280debfc46b35c656486f", 39 "metadata.json": "c6ad04eceebce0185b4882acb517a7da", 40 "spec/acceptance/apt_key_provider_spec.rb": "1e19756f710dbc8799b630721197786e", 41 "spec/acceptance/apt_spec.rb": "0bd13c6cb16e56d049ad0a5770f9c1f3", 42 "spec/acceptance/class_spec.rb": "7fa3ee3cade5e27891fe01aa8af8941d", 43 "spec/acceptance/nodesets/centos-59-x64.yml": "57eb3e471b9042a8ea40978c467f8151", 44 "spec/acceptance/nodesets/centos-64-x64-pe.yml": "ec075d95760df3d4702abea1ce0a829b", 45 "spec/acceptance/nodesets/centos-65-x64.yml": "3e5c36e6aa5a690229e720f4048bb8af", 46 "spec/acceptance/nodesets/debian-70rc1-x64.yml": "715f798e696d3582c66d13f0e8e5f009", 47 "spec/acceptance/nodesets/debian-73-x64.yml": "b44b7146a828c37482c06879862fb5d9", 48 "spec/acceptance/nodesets/default.yml": "e27bb4d7526ad3c7a1c4aeb87decec15", 49 "spec/acceptance/nodesets/ubuntu-server-10044-x64.yml": "75e86400b7889888dc0781c0ae1a1297", 50 "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "d30d73e34cd50b043c7d14e305955269", 51 "spec/acceptance/nodesets/ubuntu-server-1404-x64.yml": "5f0aed10098ac5b78e4217bb27c7aaf0", 52 "spec/classes/apt_backports_spec.rb": "20492356c4ebddcfe8739b8f4a0beac6", 53 "spec/classes/apt_spec.rb": "73023d41e3d02b760bad354deae321a1", 54 "spec/classes/apt_update_spec.rb": "e1bae3848f53c709a14c1e6def93865e", 55 "spec/classes/params_spec.rb": "87ac980e35fbc87e4d5a61809b99c1d8", 56 "spec/defines/conf_spec.rb": "4c07a034a6e55098962535d5dca611b0", 57 "spec/defines/key_compat_spec.rb": "3676c87d803d19d92f35ba74bad1db7c", 58 "spec/defines/key_spec.rb": "a69d96e761e40767ee3526503b9ce63c", 59 "spec/defines/pin_spec.rb": "5a3866f7a49f88e6e14e3335872e387b", 60 "spec/defines/ppa_spec.rb": "b8aed505789e507775de01749cda49f4", 61 "spec/defines/setting_spec.rb": "740578ed09763c7573c0bfafab6c94a1", 62 "spec/defines/source_compat_spec.rb": "aee5bea3d7f13749f7e245efc572bb9e", 63 "spec/defines/source_spec.rb": "783ed8308e71699b7f0b6f7cc925d178", 64 "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", 30 "locales/config.yaml": "46660fe63119d48b8fb7dc3b38ee0856", 31 "manifests/backports.pp": "87a05ecfa0243d152ab225feec963d92", 32 "manifests/conf.pp": "8a33d3106e75422f82abc63ec41c4d84", 33 "manifests/init.pp": "fe403437b485318b9c9c384abfb6bb06", 34 "manifests/key.pp": "2ef8581029647d3d5a12234c86eff85f", 35 "manifests/params.pp": "621974da9b92d75e943aba2c1b384188", 36 "manifests/pin.pp": "d4fd040d22da4b418771a01fab8336fe", 37 "manifests/ppa.pp": "5c05b41477ba7613af1855ec38be5971", 38 "manifests/setting.pp": "50e39637905de1dfcfdaad95672a2890", 39 "manifests/source.pp": "797edd25ee64b3128a04dbf70e1443a4", 40 "manifests/update.pp": "46330dc5a8e69b62b2dfd9072cd4f26c", 41 "metadata.json": "fd6d46586030158faa92d2af7aa46e7b", 42 "spec/acceptance/apt_key_provider_spec.rb": "68e448171b89dcf535ac3f985937f1a7", 43 "spec/acceptance/apt_spec.rb": "7b2ed0430e2288250586c5a17a51c21c", 44 "spec/acceptance/class_spec.rb": "d3a2ff84333f0f9ee0143aeac414e46b", 45 "spec/acceptance/nodesets/centos-7-x64.yml": "a713f3abd3657f0ae2878829badd23cd", 46 "spec/acceptance/nodesets/debian-8-x64.yml": "d2d2977900989f30086ad251a14a1f39", 47 "spec/acceptance/nodesets/default.yml": "b42da5a1ea0c964567ba7495574b8808", 48 "spec/acceptance/nodesets/docker/centos-7.yml": "8a3892807bdd62306ae4774f41ba11ae", 49 "spec/acceptance/nodesets/docker/debian-8.yml": "ac8e871d1068c96de5e85a89daaec6df", 50 "spec/acceptance/nodesets/docker/ubuntu-14.04.yml": "dc42ee922a96908d85b8f0f08203ce58", 51 "spec/classes/apt_backports_spec.rb": "9a2c5fd8b451ace56fcbca4e89d9a397", 52 "spec/classes/apt_spec.rb": "1a132e04a5e9b4284105a6b2c8e202ce", 53 "spec/classes/apt_update_spec.rb": "2061f6c2827b0ab9a3b461b2bb40fbaf", 54 "spec/defines/conf_spec.rb": "57230dec18839ed45d695453f8e74978", 55 "spec/defines/key_compat_spec.rb": "970b0cec22e99af9cf158e4338fef5a1", 56 "spec/defines/key_spec.rb": "75f4d0880e7b3b4930f9fdf5cda760d1", 57 "spec/defines/pin_spec.rb": "3bab03c1ac67f651334fc1e7d0c97000", 58 "spec/defines/ppa_spec.rb": "7791f279e6c77f835fc4a21fbd6ec168", 59 "spec/defines/setting_spec.rb": "fb41b3d28b7e1860a53846d99b811677", 60 "spec/defines/source_compat_spec.rb": "8bed1d3acf3e6713d2795d4ab71ebb83", 61 "spec/defines/source_spec.rb": "32d68cce3d579e9121602d87b0078bab", 65 62 "spec/spec_helper.rb": "b2db3bc02b4ac2fd5142a6621c641b07", 66 "spec/spec_helper_acceptance.rb": " 2d4884491c0eed85a780cbe694074945",67 "spec/unit/facter/apt_has_updates_spec.rb": " fdc0d48ed55ebc72ae16c3f09cf82d2c",68 "spec/unit/facter/apt_package_updates_spec.rb": " 9102ea3ea94a286f5accd2fb2f040725",63 "spec/spec_helper_acceptance.rb": "ba9896539a0b9d550e4d27803ba5214c", 64 "spec/unit/facter/apt_has_updates_spec.rb": "8294711c589fb1efa9aa23be0faf8500", 65 "spec/unit/facter/apt_package_updates_spec.rb": "2a0549f8656f094d9d0006ce12f61b2c", 69 66 "spec/unit/facter/apt_reboot_required_spec.rb": "9d58cb2aeaed624f7c4ca118ec1b6410", 70 "spec/unit/facter/apt_security_updates_spec.rb": "41c9c1d84a0feaa3938f6f3d8def9772", 71 "spec/unit/facter/apt_update_last_success_spec.rb": "cbc907ca27e6f9bb803fa9654c4a1836", 72 "spec/unit/facter/apt_updates_spec.rb": "22f290cfbe2dc1d6bb321ce782e90bb8", 73 "spec/unit/puppet/type/apt_key_spec.rb": "986c3cf60937eb89cbf6335dc7923dc5", 74 "templates/15update-stamp.erb": "b9de0ac9e2c9854b1bb213e362dc4e41", 75 "templates/_conf_header.erb": "6f3077f2eabd3e929a44d55bc1c5446e", 76 "templates/_header.erb": "9300ac105fe777787ac9e793b8df8d25", 77 "templates/conf.erb": "b4bc626b0d998cd681ee6b8c507c0d1d", 78 "templates/pin.pref.erb": "c3885c6816db46cf66e3a9bf57973c61", 79 "templates/proxy.erb": "3d0f7b88020d8a29bafc690e05ca69d6", 80 "templates/source.list.erb": "72648dd11918d5c03db82065d3bef73b" 67 "spec/unit/facter/apt_security_updates_spec.rb": "ec8a6711feac739866743dfaf4baf3d0", 68 "spec/unit/facter/apt_update_last_success_spec.rb": "0c6320a500d44948b4ec965194970840", 69 "spec/unit/facter/apt_updates_spec.rb": "ffde1130fda5990d2786ff7878ade5e0", 70 "spec/unit/puppet/type/apt_key_spec.rb": "311c79d817ad03fbae8923fa2a075221", 71 "templates/15update-stamp.epp": "b9de0ac9e2c9854b1bb213e362dc4e41", 72 "templates/_conf_header.epp": "6f3077f2eabd3e929a44d55bc1c5446e", 73 "templates/_header.epp": "9300ac105fe777787ac9e793b8df8d25", 74 "templates/pin.pref.epp": "ab7a64e3779f93028fe965a6393fad74", 75 "templates/proxy.epp": "540643b8da51aa4cb209ab4713d3bbb3", 76 "templates/source.list.epp": "c32995778d056f204d51a6d79505a5aa" 81 77 } -
src/puppetcode/environments/gnuboat/modules/apt/examples/backports.pp
reb1ccd6 rbe0859f 7 7 key => { 8 8 id => '630239CC130E1A7FD81A27B140976EAF437D05B5', 9 server => ' pgp.mit.edu',9 server => 'hkps.pool.sks-keyservers.net', 10 10 }, 11 11 } -
src/puppetcode/environments/gnuboat/modules/apt/examples/key.pp
reb1ccd6 rbe0859f 1 1 # Declare Apt key for apt.puppetlabs.com source 2 2 apt::key { 'puppetlabs': 3 id => ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',4 server => ' pgp.mit.edu',3 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 4 server => 'hkps.pool.sks-keyservers.net', 5 5 options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"', 6 6 } -
src/puppetcode/environments/gnuboat/modules/apt/examples/source.pp
reb1ccd6 rbe0859f 8 8 repos => 'main', 9 9 key => { 10 id => ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',11 server => ' pgp.mit.edu',10 id => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 11 server => 'hkps.pool.sks-keyservers.net', 12 12 }, 13 13 } … … 20 20 key => { 21 21 id => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553', 22 server => ' subkeys.pgp.net',22 server => 'hkps.pool.sks-keyservers.net', 23 23 }, 24 24 pin => '-10', … … 30 30 key => { 31 31 id => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553', 32 server => ' subkeys.pgp.net',32 server => 'hkps.pool.sks-keyservers.net', 33 33 }, 34 34 pin => '-10', -
src/puppetcode/environments/gnuboat/modules/apt/lib/facter/apt_updates.rb
reb1ccd6 rbe0859f 2 2 Facter.add("apt_has_updates") do 3 3 confine :osfamily => 'Debian' 4 if File.executable?("/usr/lib/update-notifier/apt-check") 5 apt_check_result = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>&1') 6 if not apt_check_result.nil? and apt_check_result =~ /^\d+;\d+$/ 7 apt_package_updates = apt_check_result.split(';') 4 if File.executable?("/usr/bin/apt-get") 5 apt_get_result = Facter::Util::Resolution.exec('/usr/bin/apt-get -s upgrade 2>&1') 6 if not apt_get_result.nil? 7 apt_package_updates = [[], []] 8 apt_get_result.each_line do |line| 9 if line =~ /^Inst\s/ 10 package = line.gsub(/^Inst\s([^\s]+)\s.*/, '\1').strip 11 apt_package_updates[0].push(package) 12 security_matches = [ 13 / Debian[^\s]+-updates /, 14 / Debian-Security:/, 15 / Ubuntu[^\s]+-security /, 16 / gNewSense[^\s]+-security / 17 ] 18 re = Regexp.union(security_matches) 19 if line.match(re) 20 apt_package_updates[1].push(package) 21 end 22 end 23 end 8 24 end 9 25 end … … 11 27 setcode do 12 28 if not apt_package_updates.nil? and apt_package_updates.length == 2 13 apt_package_updates != [ '0', '0']29 apt_package_updates != [[], []] 14 30 end 15 31 end … … 19 35 confine :apt_has_updates => true 20 36 setcode do 21 packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>&1').split("\n")22 37 if Facter.version < '2.0.0' 23 packages.join(',')38 apt_package_updates[0].join(',') 24 39 else 25 packages40 apt_package_updates[0] 26 41 end 27 42 end … … 31 46 confine :apt_has_updates => true 32 47 setcode do 33 Integer(apt_package_updates[0] )48 Integer(apt_package_updates[0].length) 34 49 end 35 50 end … … 38 53 confine :apt_has_updates => true 39 54 setcode do 40 Integer(apt_package_updates[1] )55 Integer(apt_package_updates[1].length) 41 56 end 42 57 end -
src/puppetcode/environments/gnuboat/modules/apt/lib/puppet/provider/apt_key/apt_key.rb
reb1ccd6 rbe0859f 128 128 else 129 129 begin 130 key = parsedValue.read 130 # Only send basic auth if URL contains userinfo 131 # Some webservers (e.g. Amazon S3) return code 400 if empty basic auth is sent 132 if parsedValue.userinfo.nil? 133 key = parsedValue.read 134 else 135 user_pass = parsedValue.userinfo.split(':') 136 parsedValue.userinfo = '' 137 key = open(parsedValue, :http_basic_authentication => user_pass).read 138 end 131 139 rescue OpenURI::HTTPError, Net::FTPPermError => e 132 140 fail("#{e.message} for #{resource[:source]}") -
src/puppetcode/environments/gnuboat/modules/apt/lib/puppet/type/apt_key.rb
reb1ccd6 rbe0859f 8 8 be manipulated through the `apt-key` command. 9 9 10 apt_key { ' 4BD6EC30':10 apt_key { '6F6B15509CF8E59E6E469F327F438280EF8D349F': 11 11 source => 'http://apt.puppetlabs.com/pubkey.gpg' 12 12 } -
src/puppetcode/environments/gnuboat/modules/apt/manifests/backports.pp
reb1ccd6 rbe0859f 1 1 class apt::backports ( 2 $location= undef,3 $release= undef,4 $repos= undef,5 $key= undef,6 $pin= 200,2 Optional[String] $location = undef, 3 Optional[String] $release = undef, 4 Optional[String] $repos = undef, 5 Optional[Variant[String, Hash]] $key = undef, 6 Optional[Variant[Integer, String, Hash]] $pin = 200, 7 7 ){ 8 8 if $location { 9 validate_string($location)10 9 $_location = $location 11 10 } 12 11 if $release { 13 validate_string($release)14 12 $_release = $release 15 13 } 16 14 if $repos { 17 validate_string($repos)18 15 $_repos = $repos 19 16 } 20 17 if $key { 21 unless is_hash($key) {22 validate_string($key)23 }24 18 $_key = $key 25 19 } 26 if ($ ::apt::xfacts['lsbdistid'] == 'debian' or $::apt::xfacts['lsbdistid'] == 'ubuntu') {20 if ($facts['lsbdistid'] == 'Debian' or $facts['lsbdistid'] == 'Ubuntu') { 27 21 unless $location { 28 22 $_location = $::apt::backports['location'] 29 23 } 30 24 unless $release { 31 $_release = "${ ::apt::xfacts['lsbdistcodename']}-backports"25 $_release = "${facts['lsbdistcodename']}-backports" 32 26 } 33 27 unless $repos { -
src/puppetcode/environments/gnuboat/modules/apt/manifests/conf.pp
reb1ccd6 rbe0859f 1 1 define apt::conf ( 2 $content= undef,3 $ensure= present,4 $priority = '50',5 $notify_update= undef,2 Optional[String] $content = undef, 3 Enum['present', 'absent'] $ensure = present, 4 Variant[String, Integer] $priority = 50, 5 Optional[Boolean] $notify_update = undef, 6 6 ) { 7 7 … … 12 12 } 13 13 14 $confheadertmp = epp('apt/_conf_header.epp') 14 15 apt::setting { "conf-${name}": 15 16 ensure => $ensure, 16 17 priority => $priority, 17 content => template('apt/_conf_header.erb', 'apt/conf.erb'),18 content => "${confheadertmp}${content}", 18 19 notify_update => $notify_update, 19 20 } -
src/puppetcode/environments/gnuboat/modules/apt/manifests/init.pp
reb1ccd6 rbe0859f 1 # == Class: apt 1 2 # 2 class apt( 3 $update = {}, 4 $purge = {}, 5 $proxy = {}, 6 $sources = {}, 7 $keys = {}, 8 $ppas = {}, 9 $pins = {}, 10 $settings = {}, 11 ) inherits ::apt::params { 3 # Manage APT (Advanced Packaging Tool) 4 # 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 } 12 37 13 38 $frequency_options = ['always','daily','weekly','reluctantly'] 14 validate_hash($update) 39 15 40 if $update['frequency'] { 16 41 validate_re($update['frequency'], $frequency_options) 17 42 } 18 43 if $update['timeout'] { 19 unless is_integer($update['timeout']) { 20 fail('timeout value for update must be an integer') 21 } 44 assert_type(Integer, $update['timeout']) 22 45 } 23 46 if $update['tries'] { 24 unless is_integer($update['tries']) { 25 fail('tries value for update must be an integer') 26 } 47 assert_type(Integer, $update['tries']) 27 48 } 28 49 … … 30 51 include ::apt::update 31 52 32 validate_hash($purge)33 53 if $purge['sources.list'] { 34 validate_bool($purge['sources.list'])54 assert_type(Boolean, $purge['sources.list']) 35 55 } 36 56 if $purge['sources.list.d'] { 37 validate_bool($purge['sources.list.d'])57 assert_type(Boolean, $purge['sources.list.d']) 38 58 } 39 59 if $purge['preferences'] { 40 validate_bool($purge['preferences'])60 assert_type(Boolean, $purge['preferences']) 41 61 } 42 62 if $purge['preferences.d'] { 43 validate_bool($purge['preferences.d'])63 assert_type(Boolean, $purge['preferences.d']) 44 64 } 45 65 46 66 $_purge = merge($::apt::purge_defaults, $purge) 47 67 48 validate_hash($proxy)49 68 if $proxy['ensure'] { 50 69 validate_re($proxy['ensure'], ['file', 'present', 'absent']) 51 70 } 52 71 if $proxy['host'] { 53 validate_string($proxy['host'])72 assert_type(String, $proxy['host']) 54 73 } 55 74 if $proxy['port'] { 56 unless is_integer($proxy['port']) { 57 fail('$proxy port must be an integer') 58 } 75 assert_type(Integer, $proxy['port']) 59 76 } 60 if $proxy['https'] {61 validate_bool($proxy['https'])77 if $proxy['https']{ 78 assert_type(Boolean, $proxy['https']) 62 79 } 63 80 64 81 $_proxy = merge($apt::proxy_defaults, $proxy) 65 82 66 validate_hash($sources) 67 validate_hash($keys) 68 validate_hash($settings) 69 validate_hash($ppas) 70 validate_hash($pins) 83 $confheadertmp = epp('apt/_conf_header.epp') 84 $proxytmp = epp('apt/proxy.epp', {'proxies' => $_proxy}) 85 $updatestamptmp = epp('apt/15update-stamp.epp') 71 86 72 87 if $_proxy['ensure'] == 'absent' or $_proxy['host'] { … … 74 89 ensure => $_proxy['ensure'], 75 90 priority => '01', 76 content => template('apt/_conf_header.erb', 'apt/proxy.erb'),91 content => "${confheadertmp}${proxytmp}", 77 92 } 78 93 } … … 96 111 apt::setting { 'conf-update-stamp': 97 112 priority => 15, 98 content => template('apt/_conf_header.erb', 'apt/15update-stamp.erb'),113 content => "${confheadertmp}${updatestamptmp}", 99 114 } 100 115 … … 140 155 } 141 156 157 if $confs { 158 create_resources('apt::conf', $confs) 159 } 142 160 # manage sources if present 143 161 if $sources { -
src/puppetcode/environments/gnuboat/modules/apt/manifests/key.pp
reb1ccd6 rbe0859f 1 1 # == Define: apt::key 2 2 define apt::key ( 3 $id = $title, 4 $ensure = present, 5 $content = undef, 6 $source = undef, 7 $server = $::apt::keyserver, 8 $options = undef, 9 $key = undef, 10 $key_content = undef, 11 $key_source = undef, 12 $key_server = undef, 13 $key_options = undef, 14 ) { 3 String $id = $title, 4 Enum['present', 'absent'] $ensure = present, 5 Optional[String] $content = undef, 6 Optional[String] $source = undef, 7 String $server = $::apt::keyserver, 8 Optional[String] $options = undef, 9 ) { 15 10 16 if $key != undef { 17 warning('$key is deprecated and will be removed in the next major release. Please use $id instead.') 18 $_id = $key 19 } else { 20 $_id = $id 11 validate_re($id, ['\A(0x)?[0-9a-fA-F]{8}\Z', '\A(0x)?[0-9a-fA-F]{16}\Z', '\A(0x)?[0-9a-fA-F]{40}\Z']) 12 13 if $source { 14 validate_re($source, ['\Ahttps?:\/\/', '\Aftp:\/\/', '\A\/\w+']) 21 15 } 22 16 23 if $key_content != undef { 24 warning('$key_content is deprecated and will be removed in the next major release. Please use $content instead.') 25 $_content = $key_content 26 } else { 27 $_content = $content 28 } 29 30 if $key_source != undef { 31 warning('$key_source is deprecated and will be removed in the next major release. Please use $source instead.') 32 $_source = $key_source 33 } else { 34 $_source = $source 35 } 36 37 if $key_server != undef { 38 warning('$key_server is deprecated and will be removed in the next major release. Please use $server instead.') 39 $_server = $key_server 40 } else { 41 $_server = $server 42 } 43 44 if $key_options != undef { 45 warning('$key_options is deprecated and will be removed in the next major release. Please use $options instead.') 46 $_options = $key_options 47 } else { 48 $_options = $options 49 } 50 51 validate_re($_id, ['\A(0x)?[0-9a-fA-F]{8}\Z', '\A(0x)?[0-9a-fA-F]{16}\Z', '\A(0x)?[0-9a-fA-F]{40}\Z']) 52 validate_re($ensure, ['\Aabsent|present\Z',]) 53 54 if $_content { 55 validate_string($_content) 56 } 57 58 if $_source { 59 validate_re($_source, ['\Ahttps?:\/\/', '\Aftp:\/\/', '\A\/\w+']) 60 } 61 62 if $_server { 63 validate_re($_server,['\A((hkp|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$']) 64 } 65 66 if $_options { 67 validate_string($_options) 17 if $server { 18 validate_re($server,['\A((hkp|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$']) 68 19 } 69 20 70 21 case $ensure { 71 22 present: { 72 if defined(Anchor["apt_key ${ _id} absent"]){73 fail("key with id ${ _id} already ensured as absent")23 if defined(Anchor["apt_key ${id} absent"]){ 24 fail("key with id ${id} already ensured as absent") 74 25 } 75 26 76 if !defined(Anchor["apt_key ${ _id} present"]) {27 if !defined(Anchor["apt_key ${id} present"]) { 77 28 apt_key { $title: 78 29 ensure => $ensure, 79 id => $_id, 80 source => $_source, 81 content => $_content, 82 server => $_server, 83 options => $_options, 84 } -> 85 anchor { "apt_key ${_id} present": } 30 id => $id, 31 source => $source, 32 content => $content, 33 server => $server, 34 options => $options, 35 } -> anchor { "apt_key ${id} present": } 86 36 } 87 37 } 88 38 89 39 absent: { 90 if defined(Anchor["apt_key ${ _id} present"]){91 fail("key with id ${ _id} already ensured as present")40 if defined(Anchor["apt_key ${id} present"]){ 41 fail("key with id ${id} already ensured as present") 92 42 } 93 43 94 if !defined(Anchor["apt_key ${ _id} absent"]){44 if !defined(Anchor["apt_key ${id} absent"]){ 95 45 apt_key { $title: 96 46 ensure => $ensure, 97 id => $_id, 98 source => $_source, 99 content => $_content, 100 server => $_server, 101 options => $_options, 102 } -> 103 anchor { "apt_key ${_id} absent": } 47 id => $id, 48 source => $source, 49 content => $content, 50 server => $server, 51 options => $options, 52 } -> anchor { "apt_key ${id} absent": } 104 53 } 105 54 } -
src/puppetcode/environments/gnuboat/modules/apt/manifests/params.pp
reb1ccd6 rbe0859f 3 3 if $::osfamily != 'Debian' { 4 4 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 defined8 # 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 compatibility20 $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 }46 5 } 47 6 … … 54 13 $preferences_d = "${root}/preferences.d" 55 14 $keyserver = 'keyserver.ubuntu.com' 15 $confs = {} 16 $update = {} 17 $purge = {} 18 $proxy = {} 19 $sources = {} 20 $keys = {} 21 $ppas = {} 22 $pins = {} 23 $settings = {} 56 24 57 25 $config_files = { … … 102 70 } 103 71 104 case $ xfacts['lsbdistid']{105 ' debian': {106 case $ xfacts['lsbdistcodename'] {107 ' squeeze': {72 case $facts['os']['name']{ 73 'Debian': { 74 case $facts['os']['release']['full'] { 75 '6.0': { 108 76 $backports = { 109 77 'location' => 'http://httpredir.debian.org/debian-backports', … … 125 93 126 94 } 127 ' ubuntu': {95 'Ubuntu': { 128 96 $backports = { 129 97 'location' => 'http://archive.ubuntu.com/ubuntu', … … 132 100 } 133 101 134 case $ xfacts['lsbdistcodename'] {135 ' lucid': {102 case $facts['os']['release']['full'] { 103 '10.04': { 136 104 $ppa_options = undef 137 105 $ppa_package = 'python-software-properties' 138 106 } 139 ' precise': {107 '12.04': { 140 108 $ppa_options = '-y' 141 109 $ppa_package = 'python-software-properties' 142 110 } 143 ' trusty', 'utopic', 'vivid', 'wily': {111 '14.04', '14.10', '15.04', '15.10': { 144 112 $ppa_options = '-y' 145 113 $ppa_package = 'software-properties-common' … … 152 120 } 153 121 undef: { 154 fail('Unable to determine lsbdistid, please install lsb-release first')122 fail('Unable to determine full release number') 155 123 } 156 124 default: { -
src/puppetcode/environments/gnuboat/modules/apt/manifests/pin.pp
reb1ccd6 rbe0859f 3 3 4 4 define apt::pin( 5 $ensure= present,6 $explanation= undef,7 $order = undef,8 $packages= '*',9 $priority= 0,10 $release= '', # a=11 $origin= '',12 $version= '',13 $codename= '', # n=14 $release_version= '', # v=15 $component= '', # c=16 $originator= '', # o=17 $label = ''# l=5 Optional[Enum['file', 'present', 'absent']] $ensure = present, 6 Optional[String] $explanation = undef, 7 Variant[Integer] $order = 50, 8 Variant[String, Array] $packages = '*', 9 Variant[Numeric, String] $priority = 0, 10 Optional[String] $release = '', # a= 11 Optional[String] $origin = '', 12 Optional[String] $version = '', 13 Optional[String] $codename = '', # n= 14 Optional[String] $release_version = '', # v= 15 Optional[String] $component = '', # c= 16 Optional[String] $originator = '', # o= 17 Optional[String] $label = '', # l= 18 18 ) { 19 if $order and !is_integer($order) {20 fail('Only integers are allowed in the apt::pin order param')21 }22 19 23 20 if $explanation { … … 37 34 $component, 38 35 $originator, 39 $label] 36 $label, 37 ] 40 38 $pin_release = join($pin_release_array, '') 41 39 … … 72 70 $file_name = regsubst($title, '[^0-9a-z\-_\.]', '_', 'IG') 73 71 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 74 90 apt::setting { "pref-${file_name}": 75 91 ensure => $ensure, 76 92 priority => $order, 77 content => template('apt/_header.erb', 'apt/pin.pref.erb'),93 content => "${headertmp}${pinpreftmp}", 78 94 notify_update => false, 79 95 } -
src/puppetcode/environments/gnuboat/modules/apt/manifests/ppa.pp
reb1ccd6 rbe0859f 1 1 # ppa.pp 2 2 define apt::ppa( 3 $ensure= 'present',4 $options= $::apt::ppa_options,5 $release = $::apt::xfacts['lsbdistcodename'],6 $package_name= $::apt::ppa_package,7 $package_manage= false,3 String $ensure = 'present', 4 Optional[String] $options = $::apt::ppa_options, 5 Optional[String] $release = $facts['lsbdistcodename'], 6 Optional[String] $package_name = $::apt::ppa_package, 7 Boolean $package_manage = false, 8 8 ) { 9 9 unless $release { … … 11 11 } 12 12 13 if $ ::apt::xfacts['lsbdistid'] == 'Debian' {13 if $facts['lsbdistid'] == 'Debian' { 14 14 fail('apt::ppa is not currently supported on Debian.') 15 15 } 16 16 17 $ubuntu_release_year = regsubst($::apt::xfacts['lsbdistrelease'], '\.\d+$', '', 'G') + 0 18 $ubuntu_release_month = regsubst($::apt::xfacts['lsbdistrelease'], '^\d+\.', '', 'G') + 0 19 20 if $ubuntu_release_year >= 15 and $ubuntu_release_month >= 10 { 21 $distid = downcase($::apt::xfacts['lsbdistid']) 17 if versioncmp($facts['lsbdistrelease'], '15.10') >= 0 { 18 $distid = downcase($facts['lsbdistid']) 22 19 $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2-${release}") 23 20 } else { … … 32 29 if $package_manage { 33 30 ensure_packages($package_name) 34 35 31 $_require = [File['sources.list.d'], Package[$package_name]] 36 32 } else { … … 52 48 environment => $_proxy_env, 53 49 command => "/usr/bin/add-apt-repository ${options} ${name}", 54 unless => "/usr/bin/test - s${::apt::sources_list_d}/${sources_list_d_filename}",50 unless => "/usr/bin/test -f ${::apt::sources_list_d}/${sources_list_d_filename}", 55 51 user => 'root', 56 52 logoutput => 'on_failure', -
src/puppetcode/environments/gnuboat/modules/apt/manifests/setting.pp
reb1ccd6 rbe0859f 1 1 define apt::setting ( 2 $priority= 50,3 $ensure= file,4 $source= undef,5 $content= undef,6 $notify_update= true,2 Variant[String, Integer, Array] $priority = 50, 3 Optional[Enum['file', 'present', 'absent']] $ensure = file, 4 Optional[String] $source = undef, 5 Optional[String] $content = undef, 6 Boolean $notify_update = true, 7 7 ) { 8 8 9 include 'apt::params'10 9 if $content and $source { 11 10 fail('apt::setting cannot have both content and source') … … 15 14 fail('apt::setting needs either of content or source') 16 15 } 17 18 validate_re($ensure, ['file', 'present', 'absent'])19 validate_bool($notify_update)20 16 21 17 $title_array = split($title, '-') … … 30 26 } 31 27 32 if $source {33 validate_string($source)34 }35 36 if $content {37 validate_string($content)38 }39 40 28 if ($setting_type == 'list') or ($setting_type == 'pref') { 41 29 $_priority = '' … … 44 32 } 45 33 46 $_path = $::apt:: params::config_files[$setting_type]['path']47 $_ext = $::apt:: params::config_files[$setting_type]['ext']34 $_path = $::apt::config_files[$setting_type]['path'] 35 $_ext = $::apt::config_files[$setting_type]['ext'] 48 36 49 37 if $notify_update { -
src/puppetcode/environments/gnuboat/modules/apt/manifests/source.pp
reb1ccd6 rbe0859f 2 2 # add an apt source 3 3 define apt::source( 4 $location = undef, 5 $comment = $name, 6 $ensure = present, 7 $release = undef, 8 $repos = 'main', 9 $include = {}, 10 $key = undef, 11 $pin = undef, 12 $architecture = undef, 13 $allow_unsigned = false, 14 $include_src = undef, 15 $include_deb = undef, 16 $required_packages = undef, 17 $key_server = undef, 18 $key_content = undef, 19 $key_source = undef, 20 $trusted_source = undef, 4 Optional[String] $location = undef, 5 String $comment = $name, 6 String $ensure = present, 7 Optional[String] $release = undef, 8 String $repos = 'main', 9 Optional[Variant[Hash]] $include = {}, 10 Optional[Variant[String, Hash]] $key = undef, 11 $pin = undef, 12 Optional[String] $architecture = undef, 13 Boolean $allow_unsigned = false, 14 Boolean $notify_update = true, 21 15 ) { 22 validate_string($architecture, $comment, $location, $repos)23 validate_bool($allow_unsigned)24 validate_hash($include)25 16 26 17 # This is needed for compat with 1.8.x … … 29 20 $_before = Apt::Setting["list-${title}"] 30 21 31 if $include_src != undef { 32 warning("\$include_src is deprecated and will be removed in the next major release, please use \$include => { 'src' => ${include_src} } instead") 33 } 34 35 if $include_deb != undef { 36 warning("\$include_deb is deprecated and will be removed in the next major release, please use \$include => { 'deb' => ${include_deb} } instead") 37 } 38 39 if $required_packages != undef { 40 warning('$required_packages is deprecated and will be removed in the next major release, please use package resources instead.') 41 exec { "Required packages: '${required_packages}' for ${name}": 42 command => "${::apt::params::provider} -y install ${required_packages}", 43 logoutput => 'on_failure', 44 refreshonly => true, 45 tries => 3, 46 try_sleep => 1, 47 before => $_before, 48 } 49 } 50 51 if $key_server != undef { 52 warning("\$key_server is deprecated and will be removed in the next major release, please use \$key => { 'server' => ${key_server} } instead.") 53 } 54 55 if $key_content != undef { 56 warning("\$key_content is deprecated and will be removed in the next major release, please use \$key => { 'content' => ${key_content} } instead.") 57 } 58 59 if $key_source != undef { 60 warning("\$key_source is deprecated and will be removed in the next major release, please use \$key => { 'source' => ${key_source} } instead.") 61 } 62 63 if $trusted_source != undef { 64 warning('$trusted_source is deprecated and will be removed in the next major release, please use $allow_unsigned instead.') 65 $_allow_unsigned = $trusted_source 66 } else { 67 $_allow_unsigned = $allow_unsigned 68 } 69 70 if ! $release { 71 $_release = $::apt::params::xfacts['lsbdistcodename'] 72 unless $_release { 22 if !$release { 23 if $facts['lsbdistcodename'] { 24 $_release = $facts['lsbdistcodename'] 25 } else { 73 26 fail('lsbdistcodename fact not available: release parameter required') 74 27 } … … 81 34 } 82 35 83 if $include_src != undef and $include_deb != undef { 84 $_deprecated_include = { 85 'src' => $include_src, 86 'deb' => $include_deb, 87 } 88 } elsif $include_src != undef { 89 $_deprecated_include = { 'src' => $include_src } 90 } elsif $include_deb != undef { 91 $_deprecated_include = { 'deb' => $include_deb } 92 } else { 93 $_deprecated_include = {} 94 } 95 96 $_include = merge($::apt::params::include_defaults, $_deprecated_include, $include) 97 98 $_deprecated_key = { 99 'key_server' => $key_server, 100 'key_content' => $key_content, 101 'key_source' => $key_source, 102 } 36 $includes = merge($::apt::include_defaults, $include) 103 37 104 38 if $key { … … 107 41 fail('key hash must contain at least an id entry') 108 42 } 109 $_key = merge($::apt:: params::source_key_defaults, $_deprecated_key, $key)43 $_key = merge($::apt::source_key_defaults, $key) 110 44 } else { 111 validate_ string($key)112 $_key = merge( { 'id' => $key }, $_deprecated_key)45 validate_legacy(String, 'validate_string', $key) 46 $_key = { 'id' => $key } 113 47 } 114 48 } 115 49 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 116 62 apt::setting { "list-${name}": 117 ensure => $ensure, 118 content => template('apt/_header.erb', 'apt/source.list.erb'), 63 ensure => $ensure, 64 content => "${header}${sourcelist}", 65 notify_update => $notify_update, 119 66 } 120 67 … … 123 70 $_pin = merge($pin, { 'ensure' => $ensure, 'before' => $_before }) 124 71 } elsif (is_numeric($pin) or is_string($pin)) { 125 $url_split = split($location, ' /')126 $host = $url_split[ 2]72 $url_split = split($location, '[:\/]+') 73 $host = $url_split[1] 127 74 $_pin = { 128 75 'ensure' => $ensure, … … 141 88 if is_hash($_key) { 142 89 apt::key { "Add key: ${$_key['id']} from Apt::Source ${title}": 143 ensure => present, 144 id => $_key['id'], 145 server => $_key['server'], 146 content => $_key['content'], 147 source => $_key['source'], 148 options => $_key['options'], 149 key_server => $_key['key_server'], 150 key_content => $_key['key_content'], 151 key_source => $_key['key_source'], 152 before => $_before, 90 ensure => present, 91 id => $_key['id'], 92 server => $_key['server'], 93 content => $_key['content'], 94 source => $_key['source'], 95 options => $_key['options'], 96 before => $_before, 153 97 } 154 98 } -
src/puppetcode/environments/gnuboat/modules/apt/manifests/update.pp
reb1ccd6 rbe0859f 14 14 $daily_threshold = (strftime('%s') - 86400) 15 15 if $::apt_update_last_success { 16 if $::apt_update_last_success < $daily_threshold {16 if $::apt_update_last_success + 0 < $daily_threshold { 17 17 $_kick_apt = true 18 18 } else { … … 29 29 $weekly_threshold = (strftime('%s') - 604800) 30 30 if $::apt_update_last_success { 31 if ( $::apt_update_last_success < $weekly_threshold ) {31 if ( $::apt_update_last_success + 0 < $weekly_threshold ) { 32 32 $_kick_apt = true 33 33 } else { -
src/puppetcode/environments/gnuboat/modules/apt/metadata.json
reb1ccd6 rbe0859f 1 1 { 2 2 "name": "puppetlabs-apt", 3 "version": " 2.2.2",3 "version": "4.1.0", 4 4 "author": "Puppet Labs", 5 5 "summary": "Provides an interface for managing Apt source, key, and definitions with Puppet", … … 9 9 "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", 10 10 "dependencies": [ 11 {"name":"puppetlabs/stdlib","version_requirement":">= 4. 5.0 < 5.0.0"}11 {"name":"puppetlabs/stdlib","version_requirement":">= 4.16.0 < 5.0.0"} 12 12 ], 13 "data_provider": null, 13 14 "operatingsystem_support": [ 14 15 { … … 25 26 "10.04", 26 27 "12.04", 27 "14.04" 28 "14.04", 29 "16.04" 28 30 ] 29 31 } … … 31 33 "requirements": [ 32 34 { 33 "name": "pe",34 "version_requirement": ">= 3.3.0 < 2015.4.0"35 },36 {37 35 "name": "puppet", 38 "version_requirement": ">= 3.0.0 < 5.0.0"36 "version_requirement": ">= 4.7.0 < 5.0.0" 39 37 } 40 38 ] -
src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/apt_key_provider_spec.rb
reb1ccd6 rbe0859f 1 1 require 'spec_helper_acceptance' 2 2 3 PUPPETLABS_GPG_KEY_SHORT_ID = ' 4BD6EC30'4 PUPPETLABS_GPG_KEY_LONG_ID = ' 1054B7A24BD6EC30'5 PUPPETLABS_GPG_KEY_FINGERPRINT = ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'3 PUPPETLABS_GPG_KEY_SHORT_ID = 'EF8D349F' 4 PUPPETLABS_GPG_KEY_LONG_ID = '7F438280EF8D349F' 5 PUPPETLABS_GPG_KEY_FINGERPRINT = '6F6B15509CF8E59E6E469F327F438280EF8D349F' 6 6 PUPPETLABS_APT_URL = 'apt.puppetlabs.com' 7 PUPPETLABS_GPG_KEY_FILE = ' pubkey.gpg'7 PUPPETLABS_GPG_KEY_FILE = 'DEB-GPG-KEY-puppet' 8 8 CENTOS_GPG_KEY_SHORT_ID = 'C105B9DE' 9 9 CENTOS_GPG_KEY_LONG_ID = '0946FCA2C105B9DE' … … 12 12 CENTOS_GPG_KEY_FILE = 'RPM-GPG-KEY-CentOS-6' 13 13 14 SHOULD_NEVER_EXIST_ID = ' 4BD6EC30'14 SHOULD_NEVER_EXIST_ID = 'EF8D349F' 15 15 16 16 KEY_CHECK_COMMAND = "apt-key adv --list-keys --with-colons --fingerprint | grep " 17 17 PUPPETLABS_KEY_CHECK_COMMAND = "#{KEY_CHECK_COMMAND} #{PUPPETLABS_GPG_KEY_FINGERPRINT}" 18 18 CENTOS_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/ 19 23 20 24 describe 'apt_key' do … … 30 34 describe 'default options' do 31 35 key_versions = { 32 '32bit key id' => '4BD6EC30',33 '64bit key id' => '1054B7A24BD6EC30',34 '160bit key fingerprint' => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',35 '32bit lowercase key id' => '4bd6ec30',36 '64bit lowercase key id' => '1054b7a24bd6ec30',37 '160bit lowercase key fingerprint' => '47b320eb4c7c375aa9dae1a01054b7a24bd6ec30',38 '0x formatted 32bit key id' => '0x4BD6EC30',39 '0x formatted 64bit key id' => '0x1054B7A24BD6EC30',40 '0x formatted 160bit key fingerprint' => '0x47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',41 '0x formatted 32bit lowercase key id' => '0x4bd6ec30',42 '0x formatted 64bit lowercase key id' => '0x1054b7a24bd6ec30',43 '0x formatted 160bit lowercase key fingerprint' => '0x47b320eb4c7c375aa9dae1a01054b7a24bd6ec30',36 '32bit key id' => "#{PUPPETLABS_GPG_KEY_SHORT_ID}", 37 '64bit key id' => "#{PUPPETLABS_GPG_KEY_LONG_ID}", 38 '160bit key fingerprint' => "#{PUPPETLABS_GPG_KEY_FINGERPRINT}", 39 '32bit lowercase key id' => "#{PUPPETLABS_GPG_KEY_SHORT_ID.downcase}", 40 '64bit lowercase key id' => "#{PUPPETLABS_GPG_KEY_LONG_ID.downcase}", 41 '160bit lowercase key fingerprint' => "#{PUPPETLABS_GPG_KEY_FINGERPRINT.downcase}", 42 '0x formatted 32bit key id' => "0x#{PUPPETLABS_GPG_KEY_SHORT_ID}", 43 '0x formatted 64bit key id' => "0x#{PUPPETLABS_GPG_KEY_LONG_ID}", 44 '0x formatted 160bit key fingerprint' => "0x#{PUPPETLABS_GPG_KEY_FINGERPRINT}", 45 '0x formatted 32bit lowercase key id' => "0x#{PUPPETLABS_GPG_KEY_SHORT_ID.downcase}", 46 '0x formatted 64bit lowercase key id' => "0x#{PUPPETLABS_GPG_KEY_LONG_ID.downcase}", 47 '0x formatted 160bit lowercase key fingerprint' => "0x#{PUPPETLABS_GPG_KEY_FINGERPRINT.downcase}", 44 48 } 45 49 … … 65 69 pp = <<-EOS 66 70 apt_key { 'puppetlabs': 67 id => ' 4B7A24BD6EC30',71 id => '8280EF8D349F', 68 72 } 69 73 EOS … … 86 90 EOS 87 91 88 # Install the key first 89 shell("apt-key adv --keyserver keyserver.ubuntu.com \ 92 # Install the key first (retry because key pool may timeout) 93 retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do 94 shell("apt-key adv --keyserver hkps.pool.sks-keyservers.net \ 90 95 --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}") 96 end 91 97 shell(CENTOS_KEY_CHECK_COMMAND) 92 98 93 99 # Time to remove it using Puppet 94 100 apply_manifest(pp, :catch_failures => true) 95 apply_manifest(pp, :catch_ failures => true)101 apply_manifest(pp, :catch_changes => true) 96 102 97 103 shell(CENTOS_KEY_CHECK_COMMAND, 98 104 :acceptable_exit_codes => [1]) 99 105 100 shell("apt-key adv --keyserver keyserver.ubuntu.com \ 101 --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}") 106 # Re-Install the key (retry because key pool may timeout) 107 retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do 108 shell("apt-key adv --keyserver hkps.pool.sks-keyservers.net \ 109 --recv-keys #{CENTOS_GPG_KEY_FINGERPRINT}") 110 end 102 111 end 103 112 end … … 112 121 EOS 113 122 114 # Install the key first 115 shell("apt-key adv --keyserver keyserver.ubuntu.com \ 116 --recv-keys #{PUPPETLABS_GPG_KEY_LONG_ID}") 123 # Install the key first (retry because key pool may timeout) 124 retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do 125 shell("apt-key adv --keyserver hkps.pool.sks-keyservers.net \ 126 --recv-keys #{PUPPETLABS_GPG_KEY_LONG_ID}") 127 end 128 117 129 shell(PUPPETLABS_KEY_CHECK_COMMAND) 118 130 119 131 # Time to remove it using Puppet 120 132 apply_manifest(pp, :catch_failures => true) 121 apply_manifest(pp, :catch_ failures => true)133 apply_manifest(pp, :catch_changes => true) 122 134 123 135 shell(PUPPETLABS_KEY_CHECK_COMMAND, … … 135 147 ensure => 'present', 136 148 content => "-----BEGIN PGP PUBLIC KEY BLOCK----- 137 Version: GnuPG v1.4.12 (GNU/Linux) 138 Comment: GPGTools - http://gpgtools.org 149 150 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 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 139 222 140 223 mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b … … 150 233 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 194 =a34C 195 -----END PGP PUBLIC KEY BLOCK-----", 235 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 463 FPfZDNCu/TXoqyJk7434jJrcHgPryzrHFBLfEmc= 464 =TREp 465 -----END PGP PUBLIC KEY BLOCK----- ", 196 466 } 197 467 EOS 198 468 199 469 apply_manifest(pp, :catch_failures => true) 200 apply_manifest(pp, :catch_failures => true) 201 shell(PUPPETLABS_KEY_CHECK_COMMAND) 202 end 203 end 204 205 context 'multiple keys' do 206 it 'runs without errors' do 207 pp = <<-EOS 208 apt_key { 'puppetlabs': 209 id => '#{PUPPETLABS_GPG_KEY_FINGERPRINT}', 210 ensure => 'present', 211 content => "-----BEGIN PGP PUBLIC KEY BLOCK----- 212 Version: GnuPG v1.4.12 (GNU/Linux) 213 Comment: GPGTools - http://gpgtools.org 214 215 mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b 216 fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg 217 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+ 218 S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY 219 GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH 220 Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v 221 VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0 222 Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI 223 wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN 224 NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl 225 f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB 226 tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL 227 ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn 228 AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob 229 pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF 230 eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+ 231 aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M 232 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ 233 VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU 234 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh 235 qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1 236 IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8 237 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp 238 HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN 239 MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+ 240 UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh 241 R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+ 242 N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc 243 kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e 244 lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT 245 DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb 246 kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf 247 DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei 248 BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z 249 XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2 250 +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU 251 fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH 252 dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4 253 qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2 254 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq 255 UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x 256 Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA 257 KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3 258 okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7 259 bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4 260 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX 261 vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0 262 jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y 263 ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD 264 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR 265 M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf 266 REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y 267 DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk 268 ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYWJAhwEEAEC 269 AAYFAlHk3M4ACgkQSjMLmtZI+uP5hA//UTZfD340ukip6jPlMzxwSD/QapwtO7D4 270 gsGTsXezDkO97D21d1pNaNT0RrXAMagwk1ElDxmn/YHUDfMovZa2bKagjWmV38xk 271 Ws+Prh1P44vUDG30CAU6KZ+mTGLUbolfOvDffCTm9Mn1i2kxFaJxbVhWR6zR28KZ 272 R28s1IBsrqeTCksYfdKdkuw1/j850hW8MM3hPBJ/48VLx5QEFfnlXwt1fp+LygAv 273 rIyJw7vJtsa9QjCIkQk2tcv77rhkiZ6ADthgVIx5j3yDWSm4nLqFpwbQTKrNRrCb 274 5XbL/oIMeHJuFICb2HckDS1KuKXHmqvDuLoRr0/wFEZMps5XQevomUa7JkMeS5j9 275 AubCG4g1zKEtPPaGDsfDKBljCHBKwUysQj5oGU5w8VvlOPnS62DBfsgU2y5ipmmI 276 TYkjSOL6LXwO6xG5/sxA8cyoJSmbN286imcY6AHloTiiu6/N7Us+CNrhw/V7HAun 277 56etWBn3bZWCRGGAPF3qJr4y2sUMY0E3Ha7OPEHIKfBb4MiJnpXntWT28nQfF3dl 278 TFTthAzwcnZchx2es4yrfDXn33Y4eisqxWCbTluErXUogUEKH1KohSatYMtxencv 279 7bUlzIr22zSUCYyVf9cyg50kBy+0J7seEpqG5K5R8z9s/63BT5Oghmi6bB2s5iK5 280 fBt3Tu1IYpyZAg0EURGeeQEQALoU2rlo+usvGKqmBKaEl8Cbx0UZY4tQa1OQSDCj 281 6QeCBc36rq2NCAFpjYg0nrxMN86e0aHYVVetT75rSX701jRJD/TRCPzr03QVwEtk 282 GpGIpBXtdx0962I0We5rSZL2TWKuPtGRKrbs6CSVlNynLprIEnN+2sJYd/1yEsrR 283 9wBtUfVOkq6o4hBWOj4oEqhqQv1MPv1RPqGEgJl19s4LS9277cMIwrj553nGzsy1 284 XwO6BQIP8IhJQZ+8Okw3UaJjLHkJExgo3UHMFdZhAOOYbrlxwq3lENmkdgjxCUBZ 285 iVNiEX9NLm8x1HWaW/nnBIHu6g7r+1Ff5qMSI2hBVan6om4gKHdI9wThG89V16Nq 286 3YztuK5L6Nh9a7BVQJos0r419NHGXPqXqN99jWRL+jAqwKozviUYijDx8k4xLnpQ 287 1dIbHfwE0MPuIkgHeQIoBMkxD1tiQC7ouqVRqU1gg9VKhOZf0opDnvqQ+cDMyfUC 288 hgrjjikSoCBIVCDvr1r7T/gUMDEXfnaMfAdEy1z9qnUzTRRzMbl4BN3Zn+4Htf+B 289 zpAln6H8h7sBb6CO1TX2Qh3JPTrV9zSSbbOW/kuySU+rkHBQPza5l+pnWD7eXaVj 290 7+WEx+TsYIP9Gpe/FOVp2ht93NgjNFAodPW+i5jm7MRk+vlzjidHJ69pEUoQQtuk 291 Td8LABEBAAG0V1B1cHBldCBMYWJzIE5pZ2h0bHkgQnVpbGQgS2V5IChQdXBwZXQg 292 TGFicyBOaWdodGx5IEJ1aWxkIEtleSkgPGRlbGl2ZXJ5QHB1cHBldGxhYnMuY29t 293 PokCPwQTAQIAKQUCURGzrQIbAwUJBaOagAcLCQgHAwIBBhUIAgkKCwQWAgMBAh4B 294 AheAAAoJELj5mcAHu2xX7UUQAKGDOQS20BRNEa3top+dQONWmC/j1ABDVTOkF7Zc 295 9JT5oEESzVof/yIWKAfCbYyH5l3yySZI3NOQt7CswIWDYe0JR/uBhyGoHkA1t52L 296 zP45UxI29K5XaeBm3qoQbV3W6GWScGkijfaJ2yz/dIHh0m3SkC8mUGBrIqqVwV38 297 JcsW1/CzTetZiWGlk8/nPeUg+snGwd22zUlZkTaVh3FbHrqh2xsMFdrphDOtSU5s 298 Jzebu5h6mp7cMZELaRNNmg3O7VeQMA1hwaq05jQuPisS/ktOqSgJXh8pOaUpDoV0 299 ta4JSwaqEkWsZHv3tmaXGy0Qzs9X9bOjRbIKgN2w9JY+z2OKJ5L4Yg5VMJPYMdKp 300 wGSQf70YaaT0d1N/84P8j7CRsDBnVME/TDuE2u1XM/9B7xmdcI28FxZrqQc06OGS 301 UvK9vSgTkTxXSsjobah8ssi4C4/zRgTZu94KOhSlH4YGrzLX7g25M708NxgXJiPZ 302 7K8Ceea28mHYf3f+JobEbpzPeewURAFCXHCm4cFU31FsiXQrNhGmUpRKVayiMMzN 303 JF8yjuHpwB2DjGdV3QR5C8Ms+RO86JnD/Yq9zeoF7T7jCAkQKuh76cQe60XllKhV 304 Dlh2rpKXAtLAbea9hcSraZkm3Lj+oKzXUSf3Ml9xp65yjUjm9O+a4AMQ1wFroGEP 305 QUEEiQEcBBABCgAGBQJT0XkMAAoJELrV8KOS6YVy7O8IAKJYT0Afd6Ufkx4cR0rj 306 soCoPpDDiyITmSdeLSzvl9rr1X39+PqR0dcncEhO1heCZo8sm/iMNsiV4UORv2Wh 307 lCriE2fDpu9ByX1rwuKl9nEu9xx2WTRWtdx4M4fB+ZXYiJbgb1vuM46mGp51NYRK 308 ByPIm1EAjOhsfXm14BZICOQO5WLy5Sv/oRVSEBiGXNXf1kweXSzrhRCNEWYfPhQJ 309 4pCsvNeiQuhqQIB+J9FbA48x47JikMM92w0aEa4aVVokNF2PBCp9/SdRAzlY7Ikx 310 aAdIzuyc0ANIZBPgYxIgdH/Fltwz6VW6iFNk3gS7jR6TFBjRQba73I53IBbiVIRq 311 dnWJAhwEEAECAAYFAlPRd2QACgkQRp6bNpsPDx1HiQ//TEOYPkp+iHT/wNcTUO4A 312 r00La6xl9bw3v5XlnW83YjrB0ieChbXcHpChNRk08vdRSgxyWCtbIwmMeOO8mDiv 313 aJbYrgngJY+FSMsAzhSyPauze0l4PV3dnLRMZmK5Nro4GNI4oiOGp0qXPcBjstlc 314 BnEa6XuLHDnRYFhkcVboZDu2o/tdz+OJD+CZjyeiIAtChMJ+ghlpfO3cOuK0wmTh 315 Jtn/eDAfjB34CZdkt1paKZap5bLZCF0QwP+DbJd189HZy/ot6w2jpNXFt1JFnoyn 316 7Nluo6MPNTZSG3pzh7fvzb924M1sm+CyLFzEV1rYi6ujyHOsW+KYc6fOUB5jk/BZ 317 QPaU6vG1JRDLHWPjbPf9Ax8uGQSrVXC3txiu2OLZcn4Ti54PoHed5m7Fxk9fnaiT 318 gNGL0ox/wmIPbIsdGrXuTHcdmPyuRM5btXFWCMbknTIbefEEOQdbPl+e5QgWR5cf 319 EVOvo6qTBstH7aHqiWMQpuvnU7l9xpfcJ40SawHxiY/UCKXhpf7SJXAvE8zkMIvi 320 PJaHKDy2FyCwtCHwG1wiQSqjnCJt5gmTGCXzO/yAGhcgUWbTpykIMij9IPboL7VL 321 er+I/3CikWeszcjBp5lJhg4k2OCBi5LOiI+8EUTlFcAqxbTFEyM+IQDOwnW8Gznf 322 nMb070gS9iBk0GTVC9iXHla0U1B1cHBldCBMYWJzIE5pZ2h0bHkgQnVpbGQgS2V5 323 IChQdXBwZXQgTGFicyBOaWdodGx5IEJ1aWxkIEtleSkgPGluZm9AcHVwcGV0bGFi 324 cy5jb20+iQI+BBMBAgAoBQJREZ55AhsDBQkFo5qABgsJCAcDAgYVCAIJCgsEFgID 325 AQIeAQIXgAAKCRC4+ZnAB7tsVyjmEACSw9ZLq1ehcq8/QemiB+i8W/yVYZAxphmq 326 w547JXOxk19V5joR5Wp0fwqIEvE1Thw0mAiMUDAgM4TpdZc8zOaILj2OH1gWsuyi 327 fbFTHExTZAuZ1Lx1Nc1AlUv5Q+bmrzjAhx13Nk3LE7yfe4DLZnSyF3cZxAcSXYSq 328 wSo1sBrWxf2bOYnuyJwLlz94eeEkNdSi0mfANqt+ihiiAeTe9OXf65iPFn8SYRqV 329 W0hUayVlOedoCl0kviVXHvIgHxgkfazeIPqncFgPiRyYGNCVhKjaFjpUm+RzBFOk 330 HQzzcyNovlnjHmhxKkN+L2f1JqmHmUQguTTpJfpRdwmnEkA1BYY6m0WQ5Owga1eE 331 WEeHh9AjtVrukJOOibvpoS/M5FdAgaUgGXPIOziURDKBjQ0zuYMtlXgEDzKt0ugp 332 7YO74EAv1JiyeZ0Mu+m6WnxRX0Sb/op0ef74xZYD4eKYixOxahQ7kxtO9qTy+pOs 333 c3/KSNGv+oQh/CgChBbN3oq1UBfL6gVioRIp2GmP6Jmfipfod+VGIVI8xyfD3h/Z 334 nKF7dEHHMsyB03Ap2ypCcy8OEVwCeAZ4eY+lKXNyBSnddXcMGuFTqgJ1IMvTm0T8 335 BfYn74A4fDqwNKKQGYjb67MZ+3N7YaWwCgWUvFpfd557fTQmZfV1arok2urvWIGa 336 x82lgKTA64kBHAQQAQoABgUCU9F5DwAKCRC61fCjkumFchUwB/wLfX/PA0LUbSen 337 es6ilcbHOZVZKyppMA5bIU6fG6SIS9FVauL0lgkEnJAhr5w3rXGd14LM33QkkPbs 338 /uNe2YQHzzrsffLhFyJkKJXH5rc6sSM7RYbAxtMNXKpkdMhPGmHgIgMzJo3ZuD8+ 339 ixsyR/8tGAMXbHwX5aAJDKYfg8X4kkPBxzysWJzN5/wFbYEK8FHiULkHNfJv480H 340 UBLNwczVeg9Etaje0tCQuGkD/CJHR50Kxuc/BiGYdYVjAnQVILXa2NcBizXtUU3f 341 N+6L+K2m9Fm3Dvhw0ZVEq7TxTMmHA23HGt8fMJ7zNCRO3krK7vtjUQxSXKOM7HF+ 342 D60QA/oGiQIcBBABAgAGBQJT0XdkAAoJEEaemzabDw8dtt0QAITarh4rsJWupVXD 343 BFHbxsUyT7AXspJ7kW3vxG3Y/gHSjleDX0VdblzUUBmD5y5JvR/DHrAgDd8XQN4E 344 4+hTOpZhzILZcoSWhiAW+VuL5b+R5NxSzIiHEt/qKgslvcx/sbQz8+Ro/zWHxhn9 345 1uFf5JOFw+5W2wBmC4OdQby7B8AiV58OBAGcVUs0+57oJRYIU0zTRAJKRstMlD7s 346 F3R1d6EyNUbGjnJhPcltk6RRsYuJJx8vJzyY4pEy5eZPNSPEpFBjWlWyRnKDbQ6/ 347 TbtSB7bojbtjQFhh905kvdKxzcBkFgYTyzqJffUwHqJti8QQMraGAtC79/D/0vmf 348 lIJtzTB+gA/NOhyriaSXoGzi0oA/ZKReU3uJd5Yl202s/hvG+xpBkh7ouaVa5zFX 349 cqfi6gmmpQzVo6snI7d+Wonyvg1lhqZ7TXvtUIilsmbc5zEedidaCei77buX/ZuV 350 8jo+32HtsSKTYYHVsJzY6YzEy1SVfrUY+EdXXWG7Y97JaXKJc8oCNT1YA8BG4c+M 351 1cMXO1LTiP56gyYnrH6/oTIFrBXMl3dO/gKpcwUmf8lScFXIfVn5Wm3D0n6cUBKT 352 aRmmpfu7UhzBMEA7ZrIGxNBuD8WwfVi8ZSwBbV92fHkukkfixkhmeUmCB9vyq31+ 353 UfTwFXkHDTMZ4jfctKuBU+3p5sEwuQINBFERnnkBEAC0XpaBe0L9yvF1oc7rDLEt 354 XMrjDWHL6qPEW8ei94D619n1eo1QbZA4zZSZFjmN1SWtxg+2VRJazIlaFNMTpp+q 355 7lpmHPwzGdFdZZPVvjwd7cIe5KrGjEiTD1zf7i5Ws5Xh9jTh6VzY8nseakhIGTOC 356 lWzxl/+X2cJlMAR4/nLJjiTi3VwI2JBT8w2H8j8EgfRpjf6P1FyLv0WWMODc/hgc 357 /o5koLb4WRsK2w5usP/a3RNeh6L6iqHiiAL1Y9+0GZXOrjtNpkzPRarIL3MiX29o 358 VKSFcjUREpsEZHBHLwuA3WIR6WBX49LhrA6uLgofYhALeky6/H3ZFEH9ZS3plmnX 359 /vow8YWmz0Lyzzf848qsg5E5cHg36m2CXSEUeZfH748H78R62uIf/shusffl9Op2 360 aZnQoPyeYIkA6N8m29CqIa/pzd68rLEQ+MNHHkp0KjQ0oKyrz9/YCXeQg3lIBXAv 361 +FIVK/04fMA3rr5tnynkeG9Ow6fGEtqzNjZhMZtx5BnkhdLTt6qu+wyaDw3q9X1/ 362 /j3lhplXteYzUkNUIinCHODGXaI55R/I4HNsbvtvy904g5sTHZX9QBn0x7QpVZaW 363 90jCgl6+NPH96g1cuHFuk+HED4H6XYFcdt1VRVb9YA7GgRXkSyfw6KdtGFT15e7o 364 7PcaD6NpqyBfbYfrNQmiOwARAQABiQIlBBgBAgAPBQJREZ55AhsMBQkFo5qAAAoJ 365 ELj5mcAHu2xXR8cP/Ai4PqUKBZdN6Jz628VQdiVX2EO7jhQ7KYdt9RWz87kfm0rC 366 LhdROCyeddgGsYbpdikC3Gzrk0JFIs/qAzpZOMIip0cXTxDEWWObuwShIac8hmZz 367 BE5SM7TcA9+/jmBwLajcreGgKs/MfDkkWkiBT/B+FyHkqS6O/rdBvYqFzLtvUigG 368 SRf1clP4QEGWcR6LLsJ1uiH+brK3G1GsILVpX5iQ0Y4wNv0xNRGZzAPVZ1/vgHCM 369 sAG7TZy26oOraigvnZeo1Q9r7pg+i6uSIu4ywfdNTOuoBK+VY+RKyAybBHIqH07w 370 p9TmYOY1x+wmIe0oSYcR47OcvZU57fdLsEB9djYvkGkkmbz0gwXQL0iEW3kX+05J 371 zrLzPsx6muR35SPNCvfR2T/0VCDwtNwwxACWuZI/tqsobU/+lA/MqRZ4kOD/Bx07 372 CpZfYIAi2STc0MIDvpyDnZLiYVMMkqV4+gn2ANtkF+GKbra3Aeof9b4KEVabSaQ5 373 5W70DJF0G5bmHBSdyqdYnKB/yRj1rH+dgRbiRMv7rBAx5Q8rbYiym8im+5XNUDy2 374 ZTQcCD53HcBLvKX6RJ4ByYawKaQqMa27WK/YWVmFXqVDVk12iKrQW6zktDdGInnD 375 +f0rRH7c/7F/QuBR6Y4Zkso0CuVMNsmxv0E+7Zk0z4dWalzQuXpN7OXcZ8Gp 376 =Gl+v 377 -----END PGP PUBLIC KEY BLOCK-----", 378 } 379 EOS 380 apply_manifest(pp, :catch_failures => true) 381 apply_manifest(pp, :catch_failures => true) 470 apply_manifest(pp, :catch_changes => true) 382 471 shell(PUPPETLABS_KEY_CHECK_COMMAND) 383 472 end … … 402 491 403 492 describe 'server =>' do 404 context 'pgp.mit.edu' do 405 it 'works' do 406 pp = <<-EOS 407 apt_key { 'puppetlabs': 408 id => '#{PUPPETLABS_GPG_KEY_LONG_ID}', 409 ensure => 'present', 410 server => 'pgp.mit.edu', 411 } 412 EOS 413 414 apply_manifest(pp, :catch_failures => true) 415 apply_manifest(pp, :catch_failures => true) 416 shell(PUPPETLABS_KEY_CHECK_COMMAND) 417 end 418 end 419 420 context 'hkp://pgp.mit.edu:80' do 493 context 'hkps.pool.sks-keyservers.net' do 494 it 'works' do 495 pp = <<-EOS 496 apt_key { 'puppetlabs': 497 id => '#{PUPPETLABS_GPG_KEY_LONG_ID}', 498 ensure => 'present', 499 server => 'hkps.pool.sks-keyservers.net', 500 } 501 EOS 502 503 #Apply the manifest (Retry if timeout error is received from key pool) 504 retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do 505 apply_manifest(pp, :catch_failures => true) 506 end 507 508 apply_manifest(pp, :catch_changes => true) 509 shell(PUPPETLABS_KEY_CHECK_COMMAND) 510 end 511 end 512 513 context 'hkp://hkps.pool.sks-keyservers.net:80' do 421 514 it 'works' do 422 515 pp = <<-EOS … … 424 517 id => '#{PUPPETLABS_GPG_KEY_FINGERPRINT}', 425 518 ensure => 'present', 426 server => 'hkp://pgp.mit.edu:80', 427 } 428 EOS 429 430 apply_manifest(pp, :catch_failures => true) 431 apply_manifest(pp, :catch_failures => true) 519 server => 'hkp://hkps.pool.sks-keyservers.net:80', 520 } 521 EOS 522 523 retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do 524 apply_manifest(pp, :catch_failures => true) 525 end 526 527 apply_manifest(pp, :catch_changes => true) 432 528 shell(PUPPETLABS_KEY_CHECK_COMMAND) 433 529 end … … 479 575 480 576 apply_manifest(pp, :catch_failures => true) 481 apply_manifest(pp, :catch_failures => true) 577 apply_manifest(pp, :catch_changes => true) 578 shell(PUPPETLABS_KEY_CHECK_COMMAND) 579 end 580 581 it 'works with userinfo' do 582 pp = <<-EOS 583 apt_key { 'puppetlabs': 584 id => '#{PUPPETLABS_GPG_KEY_LONG_ID}', 585 ensure => 'present', 586 source => 'http://dummyuser:dummypassword@#{PUPPETLABS_APT_URL}/#{PUPPETLABS_GPG_KEY_FILE}', 587 } 588 EOS 589 590 apply_manifest(pp, :catch_failures => true) 591 apply_manifest(pp, :catch_changes => true) 482 592 shell(PUPPETLABS_KEY_CHECK_COMMAND) 483 593 end … … 528 638 529 639 apply_manifest(pp, :catch_failures => true) 530 apply_manifest(pp, :catch_ failures => true)640 apply_manifest(pp, :catch_changes => true) 531 641 shell(CENTOS_KEY_CHECK_COMMAND) 532 642 end … … 572 682 573 683 apply_manifest(pp, :catch_failures => true) 574 apply_manifest(pp, :catch_failures => true) 684 apply_manifest(pp, :catch_changes => true) 685 shell(PUPPETLABS_KEY_CHECK_COMMAND) 686 end 687 688 it 'works with userinfo' do 689 pp = <<-EOS 690 apt_key { 'puppetlabs': 691 id => '#{PUPPETLABS_GPG_KEY_LONG_ID}', 692 ensure => 'present', 693 source => 'https://dummyuser:dummypassword@#{PUPPETLABS_APT_URL}/#{PUPPETLABS_GPG_KEY_FILE}', 694 } 695 EOS 696 697 apply_manifest(pp, :catch_failures => true) 698 apply_manifest(pp, :catch_changes => true) 575 699 shell(PUPPETLABS_KEY_CHECK_COMMAND) 576 700 end … … 618 742 pp = <<-EOS 619 743 apt_key { 'puppetlabs': 620 id => ' 4BD6EC30',744 id => 'EF8D349F', 621 745 ensure => 'present', 622 746 source => '/tmp/puppetlabs-pubkey.gpg', … … 625 749 626 750 apply_manifest(pp, :catch_failures => true) 627 apply_manifest(pp, :catch_ failures => true)751 apply_manifest(pp, :catch_changes => true) 628 752 shell(PUPPETLABS_KEY_CHECK_COMMAND) 629 753 end … … 682 806 683 807 apply_manifest(pp, :catch_failures => true) 684 apply_manifest(pp, :catch_failures => true) 685 shell(PUPPETLABS_KEY_CHECK_COMMAND) 686 end 687 688 it 'fails on invalid options' do 689 pp = <<-EOS 690 apt_key { 'puppetlabs': 691 id => '#{PUPPETLABS_GPG_KEY_LONG_ID}', 692 ensure => 'present', 693 options => 'this is totally bonkers', 694 } 695 EOS 696 697 shell("apt-key del #{PUPPETLABS_GPG_KEY_FINGERPRINT}", :acceptable_exit_codes => [0,1,2]) 698 apply_manifest(pp, :expect_failures => true) do |r| 699 expect(r.stderr).to match(/--keyserver-options this is totally/) 700 end 808 apply_manifest(pp, :catch_changes => true) 809 shell(PUPPETLABS_KEY_CHECK_COMMAND) 701 810 end 702 811 end … … 715 824 716 825 apply_manifest(pp, :catch_failures => true) 717 apply_manifest(pp, :catch_ failures => true)826 apply_manifest(pp, :catch_changes => true) 718 827 end 719 828 end … … 723 832 pp = <<-EOS 724 833 apt_key { 'puppetlabs': 725 id => ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6E666',834 id => '6F6B15509CF8E59E6E469F327F438280EF8D9999', 726 835 ensure => 'present', 727 836 source => 'https://#{PUPPETLABS_APT_URL}/#{PUPPETLABS_GPG_KEY_FILE}', -
src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/apt_spec.rb
reb1ccd6 rbe0859f 1 1 require 'spec_helper_acceptance' 2 3 MAX_TIMEOUT_RETRY = 3 4 TIMEOUT_RETRY_WAIT = 5 5 TIMEOUT_ERROR_MATCHER = /no valid OpenPGP data found/ 2 6 3 7 describe 'apt class' do … … 21 25 'repos' => 'main', 22 26 'key' => { 23 'id' => ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',24 'server' => ' pgp.mit.edu',27 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 28 'server' => 'hkps.pool.sks-keyservers.net', 25 29 }, 26 30 }, … … 30 34 update => { 31 35 'frequency' => 'always', 32 'timeout' => '400',33 'tries' => '3',36 'timeout' => 400, 37 'tries' => 3, 34 38 }, 35 39 purge => { … … 43 47 EOS 44 48 45 apply_manifest(pp, :catch_failures => true) 49 #Apply the manifest (Retry if timeout error is received from key pool) 50 retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do 51 apply_manifest(pp, :catch_failures => true) 52 end 53 46 54 apply_manifest(pp, :catch_failures => true) 47 55 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/class_spec.rb
reb1ccd6 rbe0859f 12 12 # Run it twice and test for idempotency 13 13 apply_manifest(pp, :catch_failures => true) 14 apply_manifest(pp, :catch_ failures => true)14 apply_manifest(pp, :catch_changes => true) 15 15 end 16 16 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/acceptance/nodesets/default.yml
reb1ccd6 rbe0859f 1 1 HOSTS: 2 ubuntu- server-12042-x64:2 ubuntu-1404-x64: 3 3 roles: 4 - master5 platform: ubuntu-server-12.04-amd646 box : ubuntu-server-12042-x64-vbox4210-nocm7 box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box8 hypervisor : vagrant4 - agent 5 - default 6 platform: ubuntu-14.04-amd64 7 hypervisor: vagrant 8 box: puppetlabs/ubuntu-14.04-64-nocm 9 9 CONFIG: 10 10 type: foss 11 vagrant_ssh_port_random: true -
src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_backports_spec.rb
reb1ccd6 rbe0859f 8 8 let(:facts) do 9 9 { 10 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 10 11 :lsbdistid => 'Debian', 11 12 :osfamily => 'Debian', … … 26 27 let(:facts) do 27 28 { 29 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0' }}, 28 30 :lsbdistid => 'Debian', 29 31 :osfamily => 'Debian', … … 44 46 let(:facts) do 45 47 { 48 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 46 49 :lsbdistid => 'Ubuntu', 47 50 :osfamily => 'Debian', 48 51 :lsbdistcodename => 'trusty', 52 :lsbdistrelease => '14.04', 49 53 :puppetversion => Puppet.version, 50 54 } … … 62 66 let(:facts) do 63 67 { 68 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 64 69 :lsbdistid => 'Ubuntu', 65 70 :osfamily => 'Debian', 66 71 :lsbdistcodename => 'trusty', 72 :lsbdistrelease => '14.04', 67 73 :puppetversion => Puppet.version, 68 74 } … … 89 95 let(:facts) do 90 96 { 97 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 91 98 :lsbdistid => 'Ubuntu', 92 99 :osfamily => 'Debian', 93 100 :lsbdistcodename => 'trusty', 101 :lsbdistrelease => '14.04', 94 102 :puppetversion => Puppet.version, 95 103 } … … 115 123 let(:facts) do 116 124 { 125 :os => { :family => 'Debian', :name => 'Linuxmint', :release => { :major => '17', :full => '17' }}, 117 126 :lsbdistid => 'linuxmint', 118 127 :osfamily => 'Debian', … … 199 208 let(:facts) do 200 209 { 210 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 201 211 :lsbdistid => 'Ubuntu', 202 212 :osfamily => 'Debian', 203 213 :lsbdistcodename => 'trusty', 214 :lsbdistrelease => '14.04', 204 215 :puppetversion => Puppet.version, 205 216 } … … 214 225 expect { 215 226 subject.call 216 }.to raise_error(Puppet::Error, / is not a string/)227 }.to raise_error(Puppet::Error, /expects a/) 217 228 end 218 229 end … … 226 237 expect { 227 238 subject.call 228 }.to raise_error(Puppet::Error, / is not a string/)239 }.to raise_error(Puppet::Error, /expects a/) 229 240 end 230 241 end … … 238 249 expect { 239 250 subject.call 240 }.to raise_error(Puppet::Error, / is not a string/)251 }.to raise_error(Puppet::Error, /expects a/) 241 252 end 242 253 end … … 250 261 expect { 251 262 subject.call 252 }.to raise_error(Puppet::Error, / is not a string/)263 }.to raise_error(Puppet::Error, /expects a/) 253 264 end 254 265 end … … 262 273 expect { 263 274 subject.call 264 }.to raise_error(Puppet::Error, / pin must be either a string, number or hash/)275 }.to raise_error(Puppet::Error, /expects a/) 265 276 end 266 277 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_spec.rb
reb1ccd6 rbe0859f 1 1 require 'spec_helper' 2 2 describe 'apt' do 3 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version} } 4 3 let(:facts) do 4 { 5 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 6 :lsbdistid => 'Debian', 7 :osfamily => 'Debian', 8 :lsbdistcodename => 'wheezy', 9 :puppetversion => Puppet.version, 10 } 11 end 5 12 context 'defaults' do 6 13 it { is_expected.to contain_file('sources.list').that_notifies('Class[Apt::Update]').only_with({ … … 138 145 context 'with sources defined on valid osfamily' do 139 146 let :facts do 140 { :osfamily => 'Debian', 141 :lsbdistcodename => 'precise', 142 :lsbdistid => 'Debian', 147 { :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04' }}, 148 :osfamily => 'Debian', 149 :lsbdistcodename => 'precise', 150 :lsbdistid => 'Ubuntu', 151 :lsbdistrelease => '12.04', 143 152 :puppetversion => Puppet.version, 144 153 } … … 156 165 'location' => 'http://apt.puppetlabs.com', 157 166 'repos' => 'main', 158 'key' => { 'id' => ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30', 'server' => 'pgp.mit.edu' },167 'key' => { 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 'server' => 'pgp.mit.edu' }, 159 168 } 160 169 } } } … … 178 187 end 179 188 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 180 217 context 'with keys defined on valid osfamily' do 181 218 let :facts do 182 { :osfamily => 'Debian', 219 { 220 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }}, 221 :osfamily => 'Debian', 183 222 :lsbdistcodename => 'precise', 184 223 :lsbdistid => 'Debian', … … 190 229 'server' => 'subkeys.pgp.net', 191 230 }, 192 ' 4BD6EC30' => {231 'EF8D349F' => { 193 232 'server' => 'pgp.mit.edu', 194 233 } … … 199 238 })} 200 239 201 it { is_expected.to contain_apt__key(' 4BD6EC30').with({240 it { is_expected.to contain_apt__key('EF8D349F').with({ 202 241 :server => 'pgp.mit.edu', 203 242 })} … … 206 245 context 'with ppas defined on valid osfamily' do 207 246 let :facts do 208 { :osfamily => 'Debian', 247 { 248 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }}, 249 :osfamily => 'Debian', 209 250 :lsbdistcodename => 'precise', 210 251 :lsbdistid => 'ubuntu', … … 224 265 context 'with settings defined on valid osfamily' do 225 266 let :facts do 226 { :osfamily => 'Debian', 267 { 268 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }}, 269 :osfamily => 'Debian', 227 270 :lsbdistcodename => 'precise', 228 271 :lsbdistid => 'Debian', … … 241 284 context 'with pins defined on valid osfamily' do 242 285 let :facts do 243 { :osfamily => 'Debian', 286 { 287 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '12', :full => '12.04.5' }}, 288 :osfamily => 'Debian', 244 289 :lsbdistcodename => 'precise', 245 290 :lsbdistid => 'Debian', … … 292 337 end 293 338 end 294 295 context 'with unsupported osfamily' do296 let :facts do297 { :osfamily => 'Darwin', :puppetversion => Puppet.version,}298 end299 300 it do301 expect {302 subject.call303 }.to raise_error(Puppet::Error, /This module only works on Debian or derivatives like Ubuntu/)304 end305 end306 339 end 307 340 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/classes/apt_update_spec.rb
reb1ccd6 rbe0859f 4 4 describe 'apt::update', :type => :class do 5 5 context "and apt::update['frequency']='always'" do 6 { 'a recent run' => Time.now.to_i, 'we are due for a run' => 1406660561,'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval| 6 { 7 'a recent run' => Time.now.to_i, 8 'we are due for a run' => 1406660561, 9 'the update-success-stamp file does not exist' => -1, 10 }.each_pair do |desc, factval| 7 11 context "and $::apt_update_last_success indicates #{desc}" do 8 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 9 let (:pre_condition) { "class{'::apt': update => {'frequency' => 'always' },}" } 12 let(:facts) { { 13 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 14 :lsbdistid => 'Debian', 15 :osfamily => 'Debian', 16 :apt_update_last_success => factval, 17 :lsbdistcodename => 'wheezy', 18 :puppetversion => Puppet.version, 19 } } 20 let (:pre_condition) { 21 "class{'::apt': update => {'frequency' => 'always' },}" 22 } 10 23 it 'should trigger an apt-get update run' do 11 24 #set the apt_update exec's refreshonly attribute to false … … 15 28 end 16 29 context 'when $::apt_update_last_success is nil' do 17 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 30 let(:facts) { { 31 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 32 :lsbdistid => 'Debian', 33 :osfamily => 'Debian', 34 :lsbdistcodename => 'wheezy', 35 :puppetversion => Puppet.version, 36 } } 18 37 let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'always' },}" } 19 38 it 'should trigger an apt-get update run' do … … 24 43 end 25 44 context "and apt::update['frequency']='reluctantly'" do 26 {'a recent run' => Time.now.to_i, 'we are due for a run' => 1406660561,'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval| 45 { 46 'a recent run' => Time.now.to_i, 47 'we are due for a run' => 1406660561, 48 'the update-success-stamp file does not exist' => -1, 49 }.each_pair do |desc, factval| 27 50 context "and $::apt_update_last_success indicates #{desc}" do 28 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version,} } 51 let(:facts) { { 52 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 53 :lsbdistid => 'Debian', 54 :osfamily => 'Debian', 55 :apt_update_last_success => factval, 56 :lsbdistcodename => 'wheezy', 57 :puppetversion => Puppet.version, 58 } } 29 59 let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" } 30 60 it 'should not trigger an apt-get update run' do … … 35 65 end 36 66 context 'when $::apt_update_last_success is nil' do 37 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 67 let(:facts) { { 68 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 69 :lsbdistid => 'Debian', 70 :osfamily => 'Debian', 71 :lsbdistcodename => 'wheezy', 72 :puppetversion => Puppet.version, 73 } } 38 74 let (:pre_condition) { "class{ '::apt': update => {'frequency' => 'reluctantly' },}" } 39 75 it 'should not trigger an apt-get update run' do … … 47 83 { 'we are due for a run' => 1406660561,'the update-success-stamp file does not exist' => -1 }.each_pair do |desc, factval| 48 84 context "and $::apt_update_last_success indicates #{desc}" do 49 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :apt_update_last_success => factval, :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 85 let(:facts) { { 86 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 87 :lsbdistid => 'Debian', 88 :osfamily => 'Debian', 89 :apt_update_last_success => factval, 90 :lsbdistcodename => 'wheezy', 91 :puppetversion => Puppet.version, 92 } } 50 93 let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" } 51 94 it 'should trigger an apt-get update run' do … … 56 99 end 57 100 context 'when the $::apt_update_last_success fact has a recent value' do 58 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :apt_update_last_success => Time.now.to_i, :puppetversion => Puppet.version, } } 101 let(:facts) { { 102 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 103 :lsbdistid => 'Debian', 104 :osfamily => 'Debian', 105 :lsbdistcodename => 'wheezy', 106 :apt_update_last_success => Time.now.to_i, 107 :puppetversion => Puppet.version, 108 } } 59 109 let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" } 60 110 it 'should not trigger an apt-get update run' do … … 64 114 end 65 115 context 'when $::apt_update_last_success is nil' do 66 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :apt_update_last_success => nil, :puppetversion => Puppet.version, } } 116 let(:facts) { { 117 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 118 :lsbdistid => 'Debian', 119 :osfamily => 'Debian', 120 :lsbdistcodename => 'wheezy', 121 :apt_update_last_success => nil, 122 :puppetversion => Puppet.version, 123 } } 67 124 let (:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" } 68 125 it 'should trigger an apt-get update run' do -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/conf_spec.rb
reb1ccd6 rbe0859f 4 4 'class { "apt": }' 5 5 end 6 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 6 let(:facts) { { 7 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 8 :lsbdistid => 'Debian', 9 :osfamily => 'Debian', 10 :lsbdistcodename => 'wheezy', 11 :puppetversion => Puppet.version, 12 } } 7 13 let :title do 8 14 'norecommends' -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/key_compat_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'apt::key', :type => :define do 4 let(:facts) { { :lsbdistid => 'Debian' } } 5 GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30' 4 let(:facts) { { 5 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 6 :lsbdistid => 'Debian', 7 :osfamily => 'Debian', 8 :puppetversion => Puppet.version, 9 } } 10 GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F' 6 11 7 12 let :title do … … 9 14 end 10 15 16 let :pre_condition do 17 'include apt' 18 end 19 11 20 describe 'normal operation' do 12 21 describe 'default options' do 13 it 'contains the apt_key' do14 shouldcontain_apt_key(title).with({22 it { 23 is_expected.to contain_apt_key(title).with({ 15 24 :id => title, 16 25 :ensure => 'present', 17 26 :source => nil, 18 :server => nil,27 :server => 'keyserver.ubuntu.com', 19 28 :content => nil, 20 :keyserver_options => nil, 21 }) 22 end 29 }) 30 } 23 31 it 'contains the apt_key present anchor' do 24 shouldcontain_anchor("apt_key #{title} present")32 is_expected.to contain_anchor("apt_key #{title} present") 25 33 end 26 34 end … … 32 40 33 41 let :params do { 34 : key=> GPG_KEY_ID,35 } end 36 37 it 'contains the apt_key' do 38 shouldcontain_apt_key(title).with({42 :id => GPG_KEY_ID, 43 } end 44 45 it 'contains the apt_key' do 46 is_expected.to contain_apt_key(title).with({ 39 47 :id => GPG_KEY_ID, 40 48 :ensure => 'present', 41 49 :source => nil, 42 :server => nil,50 :server => 'keyserver.ubuntu.com', 43 51 :content => nil, 44 :keyserver_options => nil,45 52 }) 46 53 end 47 54 it 'contains the apt_key present anchor' do 48 shouldcontain_anchor("apt_key #{GPG_KEY_ID} present")55 is_expected.to contain_anchor("apt_key #{GPG_KEY_ID} present") 49 56 end 50 57 end … … 56 63 57 64 it 'contains the apt_key' do 58 shouldcontain_apt_key(title).with({65 is_expected.to contain_apt_key(title).with({ 59 66 :id => title, 60 67 :ensure => 'absent', 61 68 :source => nil, 62 :server => nil,69 :server => 'keyserver.ubuntu.com', 63 70 :content => nil, 64 :keyserver_options => nil,65 71 }) 66 72 end 67 73 it 'contains the apt_key absent anchor' do 68 shouldcontain_anchor("apt_key #{title} absent")74 is_expected.to contain_anchor("apt_key #{title} absent") 69 75 end 70 76 end … … 72 78 describe 'set a bunch of things!' do 73 79 let :params do { 74 : key_content => 'GPG key content',75 : key_source => 'http://apt.puppetlabs.com/pubkey.gpg',76 : key_server => 'pgp.mit.edu',77 : key_options => 'debug',78 } end 79 80 it 'contains the apt_key' do 81 shouldcontain_apt_key(title).with({80 :content => 'GPG key content', 81 :source => 'http://apt.puppetlabs.com/pubkey.gpg', 82 :server => 'pgp.mit.edu', 83 :options => 'debug', 84 } end 85 86 it 'contains the apt_key' do 87 is_expected.to contain_apt_key(title).with({ 82 88 :id => title, 83 89 :ensure => 'present', 84 90 :source => 'http://apt.puppetlabs.com/pubkey.gpg', 85 91 :server => 'pgp.mit.edu', 86 :content => params[: key_content],92 :content => params[:content], 87 93 :options => 'debug', 88 94 }) 89 95 end 90 96 it 'contains the apt_key present anchor' do 91 shouldcontain_anchor("apt_key #{title} present")97 is_expected.to contain_anchor("apt_key #{title} present") 92 98 end 93 99 end … … 95 101 context "domain with dash" do 96 102 let(:params) do{ 97 : key_server => 'p-gp.m-it.edu',98 } end 99 it 'contains the apt_key' do 100 shouldcontain_apt_key(title).with({103 :server => 'p-gp.m-it.edu', 104 } end 105 it 'contains the apt_key' do 106 is_expected.to contain_apt_key(title).with({ 101 107 :id => title, 102 108 :server => 'p-gp.m-it.edu', … … 108 114 let :params do 109 115 { 110 : key_server => 'hkp://pgp.mit.edu',111 } 112 end 113 it 'contains the apt_key' do 114 shouldcontain_apt_key(title).with({116 :server => 'hkp://pgp.mit.edu', 117 } 118 end 119 it 'contains the apt_key' do 120 is_expected.to contain_apt_key(title).with({ 115 121 :id => title, 116 122 :server => 'hkp://pgp.mit.edu', … … 121 127 let :params do 122 128 { 123 : key_server => 'hkp://pgp.mit.edu:80',124 } 125 end 126 it 'contains the apt_key' do 127 shouldcontain_apt_key(title).with({129 :server => 'hkp://pgp.mit.edu:80', 130 } 131 end 132 it 'contains the apt_key' do 133 is_expected.to contain_apt_key(title).with({ 128 134 :id => title, 129 135 :server => 'hkp://pgp.mit.edu:80', … … 136 142 context "domain begin with dash" do 137 143 let(:params) do{ 138 : key_server => '-pgp.mit.edu',144 :server => '-pgp.mit.edu', 139 145 } end 140 146 it 'fails' do … … 145 151 context "domain begin with dot" do 146 152 let(:params) do{ 147 : key_server => '.pgp.mit.edu',153 :server => '.pgp.mit.edu', 148 154 } end 149 155 it 'fails' do … … 154 160 context "domain end with dot" do 155 161 let(:params) do{ 156 : key_server => "pgp.mit.edu.",162 :server => "pgp.mit.edu.", 157 163 } end 158 164 it 'fails' do … … 163 169 let :params do 164 170 { 165 : key_server => 'hkp://pgpiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.mit.edu'171 :server => 'hkp://pgpiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.mit.edu' 166 172 } 167 173 end … … 173 179 let :params do 174 180 { 175 : key_server => 'hkp://pgp.mit.edu:8008080'181 :server => 'hkp://pgp.mit.edu:8008080' 176 182 } 177 183 end … … 183 189 let :params do 184 190 { 185 : key_server => 'abc://pgp.mit.edu:80'191 :server => 'abc://pgp.mit.edu:80' 186 192 } 187 193 end … … 193 199 let :params do 194 200 { 195 : key_server => 'hkp://pgp.mit.edu:'201 :server => 'hkp://pgp.mit.edu:' 196 202 } 197 203 end … … 203 209 let :params do 204 210 { 205 : key_server => 'hkp://pgp.mit.edu.'211 :server => 'hkp://pgp.mit.edu.' 206 212 } 207 213 end … … 212 218 context "url begin with a dash" do 213 219 let(:params) do{ 214 : key_server => "hkp://-pgp.mit.edu",220 :server => "hkp://-pgp.mit.edu", 215 221 } end 216 222 it 'fails' do … … 229 235 context 'invalid source' do 230 236 let :params do { 231 : key_source => 'afp://puppetlabs.com/key.gpg',237 :source => 'afp://puppetlabs.com/key.gpg', 232 238 } end 233 239 it 'fails' do … … 238 244 context 'invalid content' do 239 245 let :params do { 240 : key_content => [],241 } end 242 it 'fails' do 243 expect { subject.call }.to raise_error(/ is not a string/)246 :content => [], 247 } end 248 it 'fails' do 249 expect { subject.call }.to raise_error(/expects a/) 244 250 end 245 251 end … … 247 253 context 'invalid server' do 248 254 let :params do { 249 : key_server => 'two bottles of rum',255 :server => 'two bottles of rum', 250 256 } end 251 257 it 'fails' do … … 256 262 context 'invalid keyserver_options' do 257 263 let :params do { 258 : key_options => {},259 } end 260 it 'fails' do 261 expect { subject.call }.to raise_error(/ is not a string/)264 :options => {}, 265 } end 266 it 'fails' do 267 expect { subject.call }.to raise_error(/expects a/) 262 268 end 263 269 end … … 270 276 end 271 277 it 'fails' do 272 expect { subject.call }.to raise_error(/ does not match/)278 expect { subject.call }.to raise_error(/Enum\['absent', 'present'\]/) 273 279 end 274 280 end … … 277 283 context 'two apt::key resources for same key, different titles' do 278 284 let :pre_condition do 279 " apt::key { 'duplicate': key=> '#{title}', }"280 end 281 282 it 'contains t wo apt::key resources' do283 shouldcontain_apt__key('duplicate').with({284 : key=> title,285 "#{super()}\napt::key { 'duplicate': id => '#{title}', }" 286 end 287 288 it 'contains the duplicate apt::key resource' do 289 is_expected.to contain_apt__key('duplicate').with({ 290 :id => title, 285 291 :ensure => 'present', 286 292 }) 287 should contain_apt__key(title).with({ 293 end 294 295 it 'contains the original apt::key resource' do 296 is_expected.to contain_apt__key(title).with({ 288 297 :id => title, 289 298 :ensure => 'present', … … 291 300 end 292 301 293 it 'contains only a single apt_key' do294 shouldcontain_apt_key('duplicate').with({302 it 'contains the native apt_key' do 303 is_expected.to contain_apt_key('duplicate').with({ 295 304 :id => title, 296 305 :ensure => 'present', 297 306 :source => nil, 298 :server => nil,307 :server => 'keyserver.ubuntu.com', 299 308 :content => nil, 300 309 :keyserver_options => nil, 301 310 }) 302 should_not contain_apt_key(title) 311 end 312 313 it 'does not contain the original apt_key' do 314 is_expected.not_to contain_apt_key(title) 303 315 end 304 316 end … … 306 318 context 'two apt::key resources, different ensure' do 307 319 let :pre_condition do 308 " apt::key { 'duplicate': key=> '#{title}', ensure => 'absent', }"320 "#{super()}\napt::key { 'duplicate': id => '#{title}', ensure => 'absent', }" 309 321 end 310 322 it 'informs the user of the impossibility' do -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/key_spec.rb
reb1ccd6 rbe0859f 6 6 end 7 7 8 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 9 10 GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30' 8 let(:facts) { { 9 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 10 :lsbdistid => 'Debian', 11 :osfamily => 'Debian', 12 :lsbdistcodename => 'wheezy', 13 :puppetversion => Puppet.version, 14 } } 15 16 GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F' 11 17 12 18 let :title do … … 246 252 } end 247 253 it 'fails' do 248 expect { subject.call }.to raise_error(/ is not a string/)254 expect { subject.call }.to raise_error(/expects a/) 249 255 end 250 256 end … … 264 270 } end 265 271 it 'fails' do 266 expect { subject.call }.to raise_error(/ is not a string/)272 expect { subject.call }.to raise_error(/expects a/) 267 273 end 268 274 end 269 275 270 276 context 'invalid ensure' do 271 let :params do 272 { 273 :ensure => 'foo', 274 } 275 end 276 it 'fails' do 277 expect { subject.call }.to raise_error(/does not match/) 277 %w(foo aabsent absenta apresent presenta).each do |param| 278 let :params do 279 { 280 :ensure => param, 281 } 282 end 283 it 'fails' do 284 expect { subject.call }.to raise_error(/for Enum\['absent', 'present'\], got/) 285 end 278 286 end 279 287 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/pin_spec.rb
reb1ccd6 rbe0859f 4 4 'class { "apt": }' 5 5 end 6 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 6 let(:facts) { { 7 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 8 :lsbdistid => 'Debian', 9 :osfamily => 'Debian', 10 :lsbdistcodename => 'wheezy', 11 :puppetversion => Puppet.version, 12 } } 7 13 let(:title) { 'my_pin' } 8 14 9 15 context 'defaults' do 10 16 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") }12 17 end 13 18 … … 16 21 { 17 22 'packages' => 'vim', 18 'version' => '1',23 'version' => "1", 19 24 } 20 25 end 21 26 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") }23 27 end 24 28 … … 31 35 end 32 36 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") }34 37 end 35 38 … … 82 85 expect { 83 86 subject.call 84 }.to raise_error(Puppet::Error, / Only integers are allowed/)87 }.to raise_error(Puppet::Error, /expects an Integer value, got String/) 85 88 end 86 89 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/ppa_spec.rb
reb1ccd6 rbe0859f 8 8 let :facts do 9 9 { 10 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }}, 10 11 :lsbdistrelease => '11.04', 11 12 :lsbdistcodename => 'natty', … … 22 23 :environment => [], 23 24 :command => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type', 24 :unless => '/usr/bin/test - s/etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list',25 :unless => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list', 25 26 :user => 'root', 26 27 :logoutput => 'on_failure', … … 32 33 let :facts do 33 34 { 35 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '15', :full => '15.10' }}, 34 36 :lsbdistrelease => '15.10', 35 37 :lsbdistcodename => 'wily', … … 45 47 :environment => [], 46 48 :command => '/usr/bin/add-apt-repository -y ppa:user/foo', 47 :unless => '/usr/bin/test - s/etc/apt/sources.list.d/user-ubuntu-foo-wily.list',49 :unless => '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-wily.list', 48 50 :user => 'root', 49 51 :logoutput => 'on_failure', … … 70 72 let :facts do 71 73 { 74 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }}, 72 75 :lsbdistrelease => '11.04', 73 76 :lsbdistcodename => 'natty', … … 84 87 'environment' => [], 85 88 'command' => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow', 86 'unless' => '/usr/bin/test - s/etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',89 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list', 87 90 'user' => 'root', 88 91 'logoutput' => 'on_failure', … … 105 108 let :facts do 106 109 { 110 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }}, 107 111 :lsbdistrelease => '11.04', 108 112 :lsbdistcodename => 'natty', … … 124 128 'environment' => [], 125 129 'command' => '/usr/bin/add-apt-repository -y ppa:user/bar', 126 'unless' => '/usr/bin/test - s/etc/apt/sources.list.d/user-bar-natty.list',130 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/user-bar-natty.list', 127 131 'user' => 'root', 128 132 'logoutput' => 'on_failure', … … 142 146 let :facts do 143 147 { 148 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '11', :full => '11.04' }}, 144 149 :lsbdistrelease => '11.04', 145 150 :lsbdistcodename => 'natty', … … 161 166 'environment' => [], 162 167 'command' => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow', 163 'unless' => '/usr/bin/test - s/etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',168 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list', 164 169 'user' => 'root', 165 170 'logoutput' => 'on_failure', … … 181 186 let :facts do 182 187 { 188 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 183 189 :lsbdistrelease => '14.04', 184 190 :lsbdistcodename => 'trusty', … … 202 208 :environment => [], 203 209 :command => '/usr/bin/add-apt-repository ppa:user/foo', 204 :unless => '/usr/bin/test - s/etc/apt/sources.list.d/user-foo-trusty.list',210 :unless => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list', 205 211 :user => 'root', 206 212 :logoutput => 'on_failure', … … 217 223 let :facts do 218 224 { 225 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 219 226 :lsbdistrelease => '14.04', 220 227 :lsbdistcodename => 'trusty', … … 236 243 :environment => ['http_proxy=http://localhost:8080'], 237 244 :command => '/usr/bin/add-apt-repository ppa:user/foo', 238 :unless => '/usr/bin/test - s/etc/apt/sources.list.d/user-foo-trusty.list',245 :unless => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list', 239 246 :user => 'root', 240 247 :logoutput => 'on_failure', … … 251 258 let :facts do 252 259 { 260 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 253 261 :lsbdistrelease => '14.04', 254 262 :lsbdistcodename => 'trusty', … … 270 278 :environment => ['http_proxy=http://localhost:8180'], 271 279 :command => '/usr/bin/add-apt-repository ppa:user/foo', 272 :unless => '/usr/bin/test - s/etc/apt/sources.list.d/user-foo-trusty.list',280 :unless => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list', 273 281 :user => 'root', 274 282 :logoutput => 'on_failure', … … 285 293 let :facts do 286 294 { 295 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 287 296 :lsbdistrelease => '14.04', 288 297 :lsbdistcodename => 'trusty', … … 304 313 :environment => ['http_proxy=http://localhost:8180', 'https_proxy=https://localhost:8180'], 305 314 :command => '/usr/bin/add-apt-repository ppa:user/foo', 306 :unless => '/usr/bin/test - s/etc/apt/sources.list.d/user-foo-trusty.list',315 :unless => '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list', 307 316 :user => 'root', 308 317 :logoutput => 'on_failure', … … 317 326 let :facts do 318 327 { 328 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 319 329 :lsbdistrelease => '14.04', 320 330 :lsbdistcodename => 'trusty', … … 341 351 let :facts do 342 352 { 353 :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, 343 354 :lsbdistrelease => '14.04', 344 355 :operatingsystem => 'Ubuntu', … … 360 371 let :facts do 361 372 { 373 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0.7' }}, 362 374 :lsbdistrelease => '6.0.7', 363 375 :lsbdistcodename => 'wheezy', -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/setting_spec.rb
reb1ccd6 rbe0859f 3 3 describe 'apt::setting' do 4 4 let(:pre_condition) { 'class { "apt": }' } 5 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 5 let :facts do 6 { 7 :os => { :distro => { :codename => 'wheezy' }, :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 8 :lsbdistrelease => '7.0', 9 :lsbdistcodename => 'wheezy', 10 :operatingsystem => 'Debian', 11 :osfamily => 'Debian', 12 :lsbdistid => 'Debian', 13 :puppetversion => Puppet.version, 14 } 15 end 6 16 let(:title) { 'conf-teddybear' } 7 17 … … 62 72 ' 63 73 end 64 let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } 74 let(:facts) { { 75 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 76 :lsbdistid => 'Debian', 77 :osfamily => 'Debian', 78 :lsbdistcodename => 'wheezy', 79 :puppetversion => Puppet.version, 80 } } 65 81 let(:title) { 'conf-teddybear' } 66 82 let(:default_params) { { :content => 'di' } } … … 83 99 let(:params) { default_params } 84 100 it do 85 expect { subject.call }.to raise_error(Puppet::Error, /must start with /)101 expect { subject.call }.to raise_error(Puppet::Error, /must start with either/) 86 102 end 87 103 end … … 90 106 let(:params) { default_params.merge({ :ensure => 'banana' }) } 91 107 it do 92 expect { subject.call }.to raise_error(Puppet::Error, / "banana" does not/)108 expect { subject.call }.to raise_error(Puppet::Error, /Enum\['absent', 'file', 'present'\]/) 93 109 end 94 110 end … … 96 112 context 'with priority=1.2' do 97 113 let(:params) { default_params.merge({ :priority => 1.2 }) } 98 it do 99 expect { subject.call }.to raise_error(Puppet::Error, /be an integer /) 114 if Puppet::Util::Package.versioncmp(Puppet.version, '4.0') >= 0 || ENV["FUTURE_PARSER"] == 'yes' 115 it { is_expected.to compile.and_raise_error(/expects a value of type/) } 116 else 117 it { is_expected.to compile.and_raise_error(/priority must be an integer or a zero-padded integer/) } 100 118 end 101 119 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/source_compat_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'apt::source', :type => :define do 4 GPG_KEY_ID = ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'4 GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F' 5 5 6 6 let :title do … … 11 11 let :facts do 12 12 { 13 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 13 14 :lsbdistid => 'Debian', 14 15 :lsbdistcodename => 'wheezy', 15 16 :osfamily => 'Debian', 17 :puppetversion => Puppet.version, 16 18 } 17 19 end … … 19 21 let :params do 20 22 { 21 'include_deb' => false, 22 'include_src' => true, 23 'include' => { 'deb' => false, 'src' => true }, 23 24 'location' => 'http://debian.mirror.iweb.ca/debian/', 24 25 } … … 32 33 let :facts do 33 34 { 35 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 34 36 :lsbdistid => 'Debian', 35 37 :lsbdistcodename => 'wheezy', 36 :osfamily => 'Debian' 38 :osfamily => 'Debian', 39 :puppetversion => Puppet.version, 37 40 } 38 41 end 39 42 let :params do 40 43 { 41 'comment' => 'foo', 42 'location' => 'http://debian.mirror.iweb.ca/debian/', 43 'release' => 'sid', 44 'repos' => 'testing', 45 'include_src' => false, 46 'required_packages' => 'vim', 47 'key' => GPG_KEY_ID, 48 'key_server' => 'pgp.mit.edu', 49 'key_content' => 'GPG key content', 50 'key_source' => 'http://apt.puppetlabs.com/pubkey.gpg', 51 'pin' => '10', 52 'architecture' => 'x86_64', 53 'trusted_source' => true, 44 'comment' => 'foo', 45 'location' => 'http://debian.mirror.iweb.ca/debian/', 46 'release' => 'sid', 47 'repos' => 'testing', 48 'include' => { 'src' => false }, 49 'key' => GPG_KEY_ID, 50 'pin' => '10', 51 'architecture' => 'x86_64', 52 'allow_unsigned' => true, 54 53 } 55 54 end … … 65 64 } 66 65 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 76 66 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({ 77 67 'ensure' => 'present', 78 68 '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',82 69 }) 83 70 } 84 71 end 85 72 86 context ' trusted_sourcetrue' do73 context 'allow_unsigned true' do 87 74 let :facts do 88 75 { 76 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 89 77 :lsbdistid => 'Debian', 90 78 :lsbdistcodename => 'wheezy', 91 :osfamily => 'Debian' 79 :osfamily => 'Debian', 80 :puppetversion => Puppet.version, 92 81 } 93 82 end 94 83 let :params do 95 84 { 96 'include _src' => false,85 'include' => {'src' => false}, 97 86 'location' => 'http://debian.mirror.iweb.ca/debian/', 98 ' trusted_source' => true,87 'allow_unsigned' => true, 99 88 } 100 89 end … … 106 95 let :facts do 107 96 { 97 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 108 98 :lsbdistid => 'Debian', 109 99 :lsbdistcodename => 'wheezy', 110 :osfamily => 'Debian' 100 :osfamily => 'Debian', 101 :puppetversion => Puppet.version, 111 102 } 112 103 end … … 125 116 let :facts do 126 117 { 118 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 127 119 :lsbdistid => 'Debian', 128 120 :lsbdistcodename => 'wheezy', 129 :osfamily => 'Debian' 121 :osfamily => 'Debian', 122 :puppetversion => Puppet.version, 130 123 } 131 124 end … … 146 139 let :facts do 147 140 { 141 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 148 142 :lsbdistid => 'Debian', 149 :osfamily => 'Debian' 143 :osfamily => 'Debian', 144 :puppetversion => Puppet.version, 150 145 } 151 146 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/defines/source_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'apt::source' do 4 GPG_KEY_ID = ' 47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'4 GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F' 5 5 6 6 let :pre_condition do … … 16 16 let :facts do 17 17 { 18 : lsbdistid => 'Debian',19 : lsbdistcodename => 'wheezy',20 : osfamily => 'Debian',18 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 19 :osfamily => 'Debian', 20 :lsbdistcodename => 'wheezy', 21 21 :puppetversion => Puppet.version, 22 22 } … … 31 31 let :facts do 32 32 { 33 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 33 34 :lsbdistid => 'Debian', 34 35 :lsbdistcodename => 'wheezy', … … 49 50 let :facts do 50 51 { 51 :lsbdistid => 'Debian', 52 :lsbdistcodename => 'wheezy', 53 :osfamily => 'Debian', 52 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 53 :lsbdistid => 'Debian', 54 :lsbdistcodename => 'wheezy', 55 :osfamily => 'Debian', 56 :operatingsystem => 'Debian', 57 :lsbdistrelease => '7.0', 54 58 :puppetversion => Puppet.version, 55 59 } … … 190 194 let :facts do 191 195 { 196 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 192 197 :lsbdistid => 'Debian', 193 198 :lsbdistcodename => 'wheezy', … … 212 217 let :facts do 213 218 { 219 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 214 220 :lsbdistid => 'Debian', 215 221 :lsbdistcodename => 'wheezy', … … 221 227 { 222 228 :location => 'hello.there', 223 :include => {'deb' => false, 'src' => true ,},229 :include => {'deb' => false, 'src' => true}, 224 230 :architecture => 'x86_64', 225 231 } … … 232 238 end 233 239 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 234 264 context 'include_src => true' do 235 265 let :facts do 236 266 { 267 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 237 268 :lsbdistid => 'Debian', 238 269 :lsbdistcodename => 'wheezy', … … 244 275 { 245 276 :location => 'hello.there', 246 :include _src => true,277 :include => {'src' => true}, 247 278 } 248 279 end … … 254 285 end 255 286 256 context 'include_deb => false' do 257 let :facts do 258 { 287 context 'include deb => false' do 288 let :facts do 289 { 290 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 259 291 :lsbdistid => 'debian', 260 292 :lsbdistcodename => 'wheezy', … … 265 297 let :params do 266 298 { 299 :include => { 'deb' => false }, 267 300 :location => 'hello.there', 268 :include_deb => false,269 301 } 270 302 end … … 277 309 end 278 310 279 context 'include_src => true and include_deb => false' do 280 let :facts do 281 { 311 context 'include src => true and include deb => false' do 312 let :facts do 313 { 314 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 282 315 :lsbdistid => 'debian', 283 316 :lsbdistcodename => 'wheezy', … … 288 321 let :params do 289 322 { 323 :include => { 'deb' => false, 'src' => true }, 290 324 :location => 'hello.there', 291 :include_deb => false,292 :include_src => true,293 325 } 294 326 end … … 301 333 end 302 334 303 context 'include precedence' do304 let :facts do305 {306 :lsbdistid => 'debian',307 :lsbdistcodename => 'wheezy',308 :osfamily => 'debian',309 :puppetversion => Puppet.version,310 }311 end312 let :params do313 {314 :location => 'hello.there',315 :include_deb => true,316 :include_src => false,317 :include => { 'deb' => false, 'src' => true },318 }319 end320 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 end327 328 335 context 'ensure => absent' do 329 336 let :facts do 330 337 { 338 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 331 339 :lsbdistid => 'Debian', 332 340 :lsbdistcodename => 'wheezy', … … 351 359 let :facts do 352 360 { 361 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 353 362 :lsbdistid => 'Debian', 354 363 :osfamily => 'Debian', … … 365 374 end 366 375 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 367 390 context 'invalid pin' do 368 391 let :facts do 369 392 { 393 :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, 370 394 :lsbdistid => 'Debian', 371 395 :lsbdistcodename => 'wheezy', … … 388 412 end 389 413 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 390 470 end 391 471 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/spec_helper_acceptance.rb
reb1ccd6 rbe0859f 1 1 require 'beaker-rspec' 2 2 require 'beaker/puppet_install_helper' 3 require 'beaker/module_install_helper' 3 4 4 5 run_puppet_install_helper 6 install_module_on(hosts) 7 install_module_dependencies_on(hosts) 5 8 6 9 UNSUPPORTED_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 7 36 8 37 RSpec.configure do |c| … … 12 41 # Readable test descriptions 13 42 c.formatter = :documentation 14 15 # Configure all nodes in nodeset16 c.before :suite do17 # Install module and dependencies18 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 end23 end24 43 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_has_updates_spec.rb
reb1ccd6 rbe0859f 12 12 end 13 13 14 describe 'on Debian based distro missing update-notifier-common' do14 describe 'on Debian based distro missing apt-get' do 15 15 before { 16 16 Facter.fact(:osfamily).expects(:value).at_least(1).returns 'Debian' 17 17 File.stubs(:executable?) # Stub all other calls 18 File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns false 19 } 20 it { is_expected.to be_nil } 21 end 22 23 describe 'on Debian based distro with broken packages' do 24 before { 25 Facter.fact(:osfamily).expects(:value).at_least(1).returns 'Debian' 26 File.stubs(:executable?) # Stub all other calls 27 Facter::Util::Resolution.stubs(:exec) # Catch all other calls 28 File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true 29 Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "E: Error: BrokenCount > 0" 30 } 31 it { is_expected.to be_nil } 32 end 33 34 describe 'on Debian based distro with unknown error with semicolons' do 35 before { 36 Facter.fact(:osfamily).expects(:value).at_least(1).returns 'Debian' 37 File.stubs(:executable?) # Stub all other calls 38 Facter::Util::Resolution.stubs(:exec) # Catch all other calls 39 File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true 40 Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "E: Unknown Error: 'This error contains something that could be parsed like 4;3' (10)" 18 File.expects(:executable?).with('/usr/bin/apt-get').returns false 41 19 } 42 20 it { is_expected.to be_nil } … … 48 26 File.stubs(:executable?) # Stub all other calls 49 27 Facter::Util::Resolution.stubs(:exec) # Catch all other calls 50 File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true 51 Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "4;3" 28 File.expects(:executable?).with('/usr/bin/apt-get').returns true 29 Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+ 30 "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 31 "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 32 "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+ 33 "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" 52 34 } 53 35 it { is_expected.to be true } -
src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_package_updates_spec.rb
reb1ccd6 rbe0859f 17 17 File.stubs(:executable?) # Stub all other calls 18 18 Facter::Util::Resolution.stubs(:exec) # Catch all other calls 19 File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true 20 Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "1;2" 21 Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check -p 2>&1').returns "puppet-common\nlinux-generic\nlinux-image-generic" 19 File.expects(:executable?).with('/usr/bin/apt-get').returns true 20 Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+ 21 "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 22 "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 23 "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+ 24 "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" 22 25 } 23 26 it { 24 27 if Facter.version < '2.0.0' 25 is_expected.to eq(' puppet-common,linux-generic,linux-image-generic')28 is_expected.to eq('tzdata,unhide.rb') 26 29 else 27 is_expected.to eq([' puppet-common', 'linux-generic', 'linux-image-generic'])30 is_expected.to eq(['tzdata','unhide.rb']) 28 31 end 29 32 } -
src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_security_updates_spec.rb
reb1ccd6 rbe0859f 17 17 File.stubs(:executable?) # Stub all other calls 18 18 Facter::Util::Resolution.stubs(:exec) # Catch all other calls 19 File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true 20 Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "14;7" 19 File.expects(:executable?).with('/usr/bin/apt-get').returns true 20 Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+ 21 "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 22 "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 23 "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+ 24 "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" 21 25 } 22 it { is_expected.to eq( 7) }26 it { is_expected.to eq(1) } 23 27 end 24 28 -
src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_update_last_success_spec.rb
reb1ccd6 rbe0859f 3 3 describe 'apt_update_last_success fact' do 4 4 subject { Facter.fact(:apt_update_last_success).value } 5 before(:each) { Facter.clear } 5 6 after(:each) { Facter.clear } 6 7 7 8 describe 'on Debian based distro which has not yet created the update-success-stamp file' do 8 before {9 it 'should have a value of -1' do 9 10 Facter.fact(:osfamily).stubs(:value).returns 'Debian' 10 File.stubs(:exists?).returns false 11 } 12 it 'should have a value of -1' do 11 File.expects(:exists?).with('/var/lib/apt/periodic/update-success-stamp').returns false 13 12 is_expected.to eq(-1) 14 13 end … … 16 15 17 16 describe 'on Debian based distro which has created the update-success-stamp' do 18 before {17 it 'should have the value of the mtime of the file' do 19 18 Facter.fact(:osfamily).stubs(:value).returns 'Debian' 20 19 File.stubs(:exists?).returns true 21 20 File.stubs(:mtime).returns 1407660561 22 }23 it 'should have the value of the mtime of the file' do24 21 is_expected.to eq(1407660561) 25 22 end -
src/puppetcode/environments/gnuboat/modules/apt/spec/unit/facter/apt_updates_spec.rb
reb1ccd6 rbe0859f 17 17 File.stubs(:executable?) # Stub all other calls 18 18 Facter::Util::Resolution.stubs(:exec) # Catch all other calls 19 File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true 20 Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "14;7" 19 File.expects(:executable?).with('/usr/bin/apt-get').returns true 20 Facter::Util::Resolution.expects(:exec).with('/usr/bin/apt-get -s upgrade 2>&1').returns ""+ 21 "Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 22 "Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n"+ 23 "Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"+ 24 "Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" 21 25 } 22 it { is_expected.to eq( 14) }26 it { is_expected.to eq(2) } 23 27 end 24 28 -
src/puppetcode/environments/gnuboat/modules/apt/spec/unit/puppet/type/apt_key_spec.rb
reb1ccd6 rbe0859f 5 5 context 'only namevar 32bit key id' do 6 6 let(:resource) { Puppet::Type.type(:apt_key).new( 7 :id => ' 4BD6EC30'7 :id => 'EF8D349F' 8 8 )} 9 9 it 'id is set' do 10 expect(resource[:id]).to eq ' 4BD6EC30'10 expect(resource[:id]).to eq 'EF8D349F' 11 11 end 12 12 13 13 it 'name is set to id' do 14 expect(resource[:name]).to eq ' 4BD6EC30'14 expect(resource[:name]).to eq 'EF8D349F' 15 15 end 16 16 … … 30 30 context 'with a lowercase 32bit key id' do 31 31 let(:resource) { Puppet::Type.type(:apt_key).new( 32 :id => ' 4bd6ec30'32 :id => 'ef8d349f' 33 33 )} 34 34 it 'id is set' do 35 expect(resource[:id]).to eq ' 4BD6EC30'35 expect(resource[:id]).to eq 'EF8D349F' 36 36 end 37 37 end … … 39 39 context 'with a 64bit key id' do 40 40 let(:resource) { Puppet::Type.type(:apt_key).new( 41 :id => 'FFFFFFFF 4BD6EC30'41 :id => 'FFFFFFFFEF8D349F' 42 42 )} 43 43 it 'id is set' do 44 expect(resource[:id]).to eq 'FFFFFFFF 4BD6EC30'44 expect(resource[:id]).to eq 'FFFFFFFFEF8D349F' 45 45 end 46 46 end … … 48 48 context 'with a 0x formatted key id' do 49 49 let(:resource) { Puppet::Type.type(:apt_key).new( 50 :id => '0x 4BD6EC30'50 :id => '0xEF8D349F' 51 51 )} 52 52 it 'id is set' do 53 expect(resource[:id]).to eq ' 4BD6EC30'53 expect(resource[:id]).to eq 'EF8D349F' 54 54 end 55 55 end … … 57 57 context 'with a 0x formatted lowercase key id' do 58 58 let(:resource) { Puppet::Type.type(:apt_key).new( 59 :id => '0x 4bd6ec30'59 :id => '0xef8d349f' 60 60 )} 61 61 it 'id is set' do 62 expect(resource[:id]).to eq ' 4BD6EC30'62 expect(resource[:id]).to eq 'EF8D349F' 63 63 end 64 64 end … … 66 66 context 'with a 0x formatted 64bit key id' do 67 67 let(:resource) { Puppet::Type.type(:apt_key).new( 68 :id => '0xFFFFFFFF 4BD6EC30'68 :id => '0xFFFFFFFFEF8D349F' 69 69 )} 70 70 it 'id is set' do 71 expect(resource[:id]).to eq 'FFFFFFFF 4BD6EC30'71 expect(resource[:id]).to eq 'FFFFFFFFEF8D349F' 72 72 end 73 73 end … … 75 75 context 'with source' do 76 76 let(:resource) { Puppet::Type.type(:apt_key).new( 77 :id => ' 4BD6EC30',77 :id => 'EF8D349F', 78 78 :source => 'http://apt.puppetlabs.com/pubkey.gpg' 79 79 )} … … 86 86 context 'with content' do 87 87 let(:resource) { Puppet::Type.type(:apt_key).new( 88 :id => ' 4BD6EC30',88 :id => 'EF8D349F', 89 89 :content => 'http://apt.puppetlabs.com/pubkey.gpg' 90 90 )} … … 97 97 context 'with keyserver' do 98 98 let(:resource) { Puppet::Type.type(:apt_key).new( 99 :id => ' 4BD6EC30',99 :id => 'EF8D349F', 100 100 :server => 'http://keyring.debian.org' 101 101 )} … … 109 109 it 'raises an error if content and source are set' do 110 110 expect { Puppet::Type.type(:apt_key).new( 111 :id => ' 4BD6EC30',111 :id => 'EF8D349F', 112 112 :source => 'http://apt.puppetlabs.com/pubkey.gpg', 113 113 :content => 'Completely invalid as a GPG key' … … 117 117 it 'raises an error if a weird length key is used' do 118 118 expect { Puppet::Type.type(:apt_key).new( 119 :id => 'F 4BD6EC30',119 :id => 'FEF8D349F', 120 120 :source => 'http://apt.puppetlabs.com/pubkey.gpg', 121 121 :content => 'Completely invalid as a GPG key' … … 125 125 it 'raises an error when an invalid URI scheme is used in source' do 126 126 expect { Puppet::Type.type(:apt_key).new( 127 :id => ' 4BD6EC30',127 :id => 'EF8D349F', 128 128 :source => 'hkp://pgp.mit.edu' 129 129 )}.to raise_error(/Valid values match/) … … 132 132 it 'allows the http URI scheme in source' do 133 133 expect { Puppet::Type.type(:apt_key).new( 134 :id => ' 4BD6EC30',134 :id => 'EF8D349F', 135 135 :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' 136 143 )}.to_not raise_error 137 144 end … … 139 146 it 'allows the https URI scheme in source' do 140 147 expect { Puppet::Type.type(:apt_key).new( 141 :id => ' 4BD6EC30',148 :id => 'EF8D349F', 142 149 :source => 'https://pgp.mit.edu' 143 150 )}.to_not raise_error … … 146 153 it 'allows the https URI with username and password' do 147 154 expect { Puppet::Type.type(:apt_key).new( 148 :id => ' 4BD6EC30',155 :id => 'EF8D349F', 149 156 :source => 'https://testme:Password2@pgp.mit.edu' 150 157 )}.to_not raise_error … … 153 160 it 'allows the ftp URI scheme in source' do 154 161 expect { Puppet::Type.type(:apt_key).new( 155 :id => ' 4BD6EC30',162 :id => 'EF8D349F', 156 163 :source => 'ftp://pgp.mit.edu' 157 164 )}.to_not raise_error … … 160 167 it 'allows an absolute path in source' do 161 168 expect { Puppet::Type.type(:apt_key).new( 162 :id => ' 4BD6EC30',169 :id => 'EF8D349F', 163 170 :source => '/path/to/a/file' 164 171 )}.to_not raise_error … … 167 174 it 'allows 5-digit ports' do 168 175 expect { Puppet::Type.type(:apt_key).new( 169 :id => ' 4BD6EC30',176 :id => 'EF8D349F', 170 177 :source => 'http://pgp.mit.edu:12345/key' 171 178 )}.to_not raise_error … … 174 181 it 'allows 5-digit ports when using key servers' do 175 182 expect { Puppet::Type.type(:apt_key).new( 176 :id => ' 4BD6EC30',183 :id => 'EF8D349F', 177 184 :server => 'http://pgp.mit.edu:12345' 178 185 )}.to_not raise_error -
src/puppetcode/environments/gnuboat/modules/stdlib/CHANGELOG.md
reb1ccd6 rbe0859f 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 1 145 ## Supported Release 4.12.0 2 146 ###Summary -
src/puppetcode/environments/gnuboat/modules/stdlib/CONTRIBUTING.md
reb1ccd6 rbe0859f 44 44 - Make sure you have a [GitHub account](https://github.com/join) 45 45 46 - [Create a ticket](https://tickets.puppet labs.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppetlabs.com/browse/) you are patching for.46 - [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for. 47 47 48 48 * Preferred method: … … 209 209 ==================== 210 210 211 * [Getting additional help](http://puppetlabs.com/community/get-help) 212 213 * [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests) 214 215 * [Patchwork](https://patchwork.puppetlabs.com) 211 * [Getting additional help](http://puppet.com/community/get-help) 212 213 * [Writing tests](https://docs.puppet.com/guides/module_guides/bgtm.html#step-three-module-testing) 216 214 217 215 * [General GitHub documentation](http://help.github.com/) 218 216 219 217 * [GitHub pull request documentation](http://help.github.com/send-pull-requests/) 220 -
src/puppetcode/environments/gnuboat/modules/stdlib/Gemfile
reb1ccd6 rbe0859f 3 3 source ENV['GEM_SOURCE'] || "https://rubygems.org" 4 4 5 def location_for(place, version = nil) 6 if place =~ /^(git[:@][^#]*)#(.*)/ 7 [version, { :git => $1, :branch => $2, :require => false}].compact 8 elsif place =~ /^file:\/\/(.*)/ 9 ['>= 0', { :path => File.expand_path($1), :require => false}] 5 # Determines what type of gem is requested based on place_or_version. 6 def gem_type(place_or_version) 7 if place_or_version =~ /^git:/ 8 :git 9 elsif place_or_version =~ /^file:/ 10 :file 10 11 else 11 [place, version, { :require => false}].compact12 :gem 12 13 end 13 14 end 14 15 15 group :development, :unit_tests do 16 gem 'json', :require => false 17 gem 'metadata-json-lint', :require => false 18 gem 'puppet_facts', :require => false 19 gem 'puppet-blacksmith', :require => false 20 gem 'puppetlabs_spec_helper', :require => false 21 gem 'rspec-puppet', '>= 2.3.2', :require => false 22 gem 'simplecov', :require => false 23 end 24 group :system_tests do 25 gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4') 26 gem 'beaker', *location_for(ENV['BEAKER_VERSION']) 27 gem 'serverspec', :require => false 28 gem 'beaker-puppet_install_helper', :require => false 29 gem 'master_manipulator', :require => false 30 gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION']) 16 # Find a location or specific version for a gem. place_or_version can be a 17 # version, which is most often used. It can also be git, which is specified as 18 # `git://somewhere.git#branch`. You can also use a file source location, which 19 # is specified as `file://some/location/on/disk`. 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 31 28 end 32 29 33 gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) 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 34 55 gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION']) 35 56 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'] 36 63 64 65 # Evaluate Gemfile.local if it exists 37 66 if File.exists? "#{__FILE__}.local" 38 67 eval(File.read("#{__FILE__}.local"), binding) 39 68 end 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
reb1ccd6 rbe0859f 1 require 'puppet _blacksmith/rake_tasks'1 require 'puppetlabs_spec_helper/rake_tasks' 2 2 require 'puppet-lint/tasks/puppet-lint' 3 require 'puppet labs_spec_helper/rake_tasks'3 require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? 4 4 5 5 PuppetLint.configuration.fail_on_warnings = true 6 6 PuppetLint.configuration.send('relative') 7 PuppetLint.configuration.send('disable_80chars')8 PuppetLint.configuration.send('disable_class_inherits_from_params_class')9 PuppetLint.configuration.send('disable_documentation')10 PuppetLint.configuration.send('disable_single_quote_string_with_variables')11 PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]12 7 13 8 desc 'Generate pooler nodesets' -
src/puppetcode/environments/gnuboat/modules/stdlib/checksums.json
reb1ccd6 rbe0859f 1 1 { 2 "CHANGELOG.md": " 62822f2fe9d7362a4b99156d01c846c4",3 "CONTRIBUTING.md": " ad65d271f183b5adb9fdd58207939f5f",4 "Gemfile": " a5493d10f1c1fec87972b13a9fe1afcf",2 "CHANGELOG.md": "b6fa51fd30594614b963fb98a6a0fffb", 3 "CONTRIBUTING.md": "77d0440d7cd4206497f99065c60bed46", 4 "Gemfile": "bedf635025b279d7c7732adcc8ae9a29", 5 5 "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57", 6 "MAINTAINERS.md": "b40ec4f2c16145af6f723c2c34bb2ff9", 6 7 "NOTICE": "b2e552587e5969886fdd60481e8b0351", 7 "README.m arkdown": "9ff8d7869c0139409311df63f3bb0361",8 "README.md": "ac4c03f7f00304de7ed5a9eb9c6b84b7", 8 9 "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165", 9 10 "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1", 10 11 "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9", 11 "Rakefile": "ab91824042ec3fd085a41cab7e0e90d4", 12 "examples/file_line.pp": "48f7f162127beffea8f8e3e58db2355a", 12 "Rakefile": "3851f083966b9bbd6d46e50dba5aa52a", 13 "appveyor.yml": "7e0ff52cc2abe3fa4f2d8d978bf18ad7", 14 "examples/file_line.pp": "d8126b139dd1dce21ff26910d1c5a245", 13 15 "examples/has_interface_with.pp": "d69d520cf3ff4d0b495480afaca359ef", 14 16 "examples/has_ip_address.pp": "32f42575e49aa66f0f2398a70ae2a9f4", … … 18 20 "lib/facter/package_provider.rb": "539766a71dfb2f65e94a7c91bf413fcf", 19 21 "lib/facter/pe_version.rb": "60d47406026c8201e51394227ddf780d", 20 "lib/facter/puppet_ vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d",22 "lib/facter/puppet_settings.rb": "9438c0839ae28dc52fffb8348ae5124f", 21 23 "lib/facter/root_home.rb": "35702ae0c7410ec4d2101113e2f697fa", 22 24 "lib/facter/service_provider.rb": "66cc42526eae631e306b397391f1f01c", 23 25 "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", 26 "lib/puppet/functions/deprecation.rb": "59b803eaa15b5a559040497bffc172ae", 24 27 "lib/puppet/functions/is_a.rb": "9dad7f8c9b75348cd97aca986ac0b29a", 25 "lib/puppet/functions/type_of.rb": "71e19f89e167c45ec691ea6c7d319625", 26 "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b", 28 "lib/puppet/functions/is_absolute_path.rb": "96b217f26d06dbac87a2c6a8cfd2d8c8", 29 "lib/puppet/functions/is_array.rb": "9292a646010d167417a1936b0b0c17b9", 30 "lib/puppet/functions/is_bool.rb": "73957f9efd75ed8a7ab867f9de6da117", 31 "lib/puppet/functions/is_float.rb": "af3bd6bb56878bac8cc4fe4f7564e4f9", 32 "lib/puppet/functions/is_ip_address.rb": "ee231c66c3e039778bf46702d89815a6", 33 "lib/puppet/functions/is_ipv4_address.rb": "900d33249906c4daa02aa79cac896548", 34 "lib/puppet/functions/is_ipv6_address.rb": "568fba9af6a83c8b536fafcda82eb448", 35 "lib/puppet/functions/is_numeric.rb": "33051800b886cc3b2119826b77c9821a", 36 "lib/puppet/functions/is_string.rb": "230e9eabc5c9e1d8d5fb7b3c6c12b300", 37 "lib/puppet/functions/length.rb": "03cf801867a919f801d290424fd2bb8d", 38 "lib/puppet/functions/type_of.rb": "bec00841aae556993c926ab298bc81cd", 39 "lib/puppet/functions/validate_absolute_path.rb": "54a610baa115c7505f1b35976b632a8e", 40 "lib/puppet/functions/validate_array.rb": "9052b0026da174636c276a2512cf5acc", 41 "lib/puppet/functions/validate_bool.rb": "fe979e402a5a3a19d013ce84b39ef06a", 42 "lib/puppet/functions/validate_hash.rb": "92ea8fc21bbbf6cc41f6bb9cfcaefce7", 43 "lib/puppet/functions/validate_integer.rb": "b0982b68a599262da2c6f2e032bc7713", 44 "lib/puppet/functions/validate_ip_address.rb": "65a12af9a2c2a9c70d820d04d19ec891", 45 "lib/puppet/functions/validate_ipv4_address.rb": "4a5039b99ac97cc0447faa343b9f7416", 46 "lib/puppet/functions/validate_ipv6_address.rb": "fbdf685432416505fed27d5647c26f9c", 47 "lib/puppet/functions/validate_legacy.rb": "d9f115f30c511cef536a821b94826094", 48 "lib/puppet/functions/validate_numeric.rb": "41b2cc7335395f617c2bfbeac8f579da", 49 "lib/puppet/functions/validate_re.rb": "42092f592ebf89b8a504b10c900230d8", 50 "lib/puppet/functions/validate_slength.rb": "3ae6fcc3f60032c923d06ab3e457b84e", 51 "lib/puppet/functions/validate_string.rb": "cc967a9d0ea156b2208d1760d7f6e1b2", 52 "lib/puppet/parser/functions/abs.rb": "a8e46ecf4fb378d314916599651cebe5", 27 53 "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75", 28 "lib/puppet/parser/functions/assert_private.rb": "1365284f9e474ecec24cfe43ee8e7cf4", 29 "lib/puppet/parser/functions/base64.rb": "ac8d0565df2931470447effa502c9ad3", 54 "lib/puppet/parser/functions/any2bool.rb": "8bbb74cb81ebdb164e1965415364080b", 55 "lib/puppet/parser/functions/assert_private.rb": "cb9cd79ed4e3d647a48467dfb6237d5c", 56 "lib/puppet/parser/functions/base64.rb": "0d121a32fbfe25b06a4e91b0259af91d", 30 57 "lib/puppet/parser/functions/basename.rb": "c61952b3f68fd86408c84fca2c3febb1", 31 "lib/puppet/parser/functions/bool2num.rb": " f953f5fc094c2ae3908a72d8840ba291",32 "lib/puppet/parser/functions/bool2str.rb": " 6334ac6d24a8aa49a2243fb425f47311",33 "lib/puppet/parser/functions/camelcase.rb": " 71c67b71eac4b7f46a0dd22cb915d2e6",34 "lib/puppet/parser/functions/capitalize.rb": " da131748a9d32da9eb0b6438e39377eb",35 "lib/puppet/parser/functions/ceiling.rb": " dfa9b1c75ce89344026b3b5aed2d190f",36 "lib/puppet/parser/functions/chomp.rb": " 2b7dc42f9967edd34cfa0ba9a97229ca",37 "lib/puppet/parser/functions/chop.rb": " 0ec76f54afd94201f35785dfeb2092b5",38 "lib/puppet/parser/functions/clamp.rb": " d19b8dfc573ed2eff7e3536ae1e5d596",39 "lib/puppet/parser/functions/concat.rb": " a1b0233e58f1f8095a74fe9300c74a9b",58 "lib/puppet/parser/functions/bool2num.rb": "01b070b02611fda7e1491de0a8cd89fc", 59 "lib/puppet/parser/functions/bool2str.rb": "c00885242abf381ba482644ded70b688", 60 "lib/puppet/parser/functions/camelcase.rb": "bd5da699dfe1ec27ffe91b06187c5900", 61 "lib/puppet/parser/functions/capitalize.rb": "c94c50b0f147a22861c3b93c724e4343", 62 "lib/puppet/parser/functions/ceiling.rb": "7de4a96c8bb645fd5ce5c38438667228", 63 "lib/puppet/parser/functions/chomp.rb": "35a16c85bc59dc285baae631da1ae771", 64 "lib/puppet/parser/functions/chop.rb": "3beb80906fa3c759945a2664fe510b20", 65 "lib/puppet/parser/functions/clamp.rb": "6920e6c11b575fc65dadb21220c01a7a", 66 "lib/puppet/parser/functions/concat.rb": "d10e5428917895d4bb90c638b148b7fa", 40 67 "lib/puppet/parser/functions/convert_base.rb": "c3b3e59a49318af98dcb88aed7156629", 41 "lib/puppet/parser/functions/count.rb": " 9eb74eccd93e2b3c87fd5ea14e329eba",68 "lib/puppet/parser/functions/count.rb": "325bbd89a29e6ed0f31e0462d0a0d301", 42 69 "lib/puppet/parser/functions/deep_merge.rb": "d83696855578fb81b64b9e92b9c7cc7c", 43 "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", 44 "lib/puppet/parser/functions/delete.rb": "cec92c5de6d748c8dc93ca7d25ac1c68", 45 "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", 46 "lib/puppet/parser/functions/delete_undef_values.rb": "b32d4a3925753b2eb2c318cbd7f14404", 47 "lib/puppet/parser/functions/delete_values.rb": "39b147f7d369bb5f809044b6341954a2", 48 "lib/puppet/parser/functions/difference.rb": "e31b95fbaf974cf853a510177368bfb9", 49 "lib/puppet/parser/functions/dig.rb": "54a993e69c2673d999876cb3349984b7", 70 "lib/puppet/parser/functions/defined_with_params.rb": "2d964410afbee415446c94d9692a2112", 71 "lib/puppet/parser/functions/delete.rb": "7af1540fee4285d93b6b28fb490db70a", 72 "lib/puppet/parser/functions/delete_at.rb": "a2cba60ac86a676d4ed1ff846a917014", 73 "lib/puppet/parser/functions/delete_regex.rb": "91cd012ef5a636ffe541814ed232b909", 74 "lib/puppet/parser/functions/delete_undef_values.rb": "52beef9ee37f84ed2278a69ec4383125", 75 "lib/puppet/parser/functions/delete_values.rb": "b410f5618b4a6158a921acb7b2dc628d", 76 "lib/puppet/parser/functions/deprecation.rb": "4323210434d36e37977251f906a232b8", 77 "lib/puppet/parser/functions/difference.rb": "467e44aeaebd0ee0a51c8b89e3769f1f", 78 "lib/puppet/parser/functions/dig.rb": "1a2a8918f646c13dcb9876a22f9295ab", 79 "lib/puppet/parser/functions/dig44.rb": "3078b97ee941c261944857373d400ed6", 50 80 "lib/puppet/parser/functions/dirname.rb": "8a5579f9a9a13fd737ba65eccf8e6d5a", 51 81 "lib/puppet/parser/functions/dos2unix.rb": "be8359a5106a7832be4180e8207dd586", 52 "lib/puppet/parser/functions/downcase.rb": " 73121616d73339cf8dd10e0de61a6c50",53 "lib/puppet/parser/functions/empty.rb": " b4ad0c3c00cbc56f745fbc05af1efa00",54 "lib/puppet/parser/functions/enclose_ipv6.rb": " 581bc163291824909d1700909db96512",55 "lib/puppet/parser/functions/ensure_packages.rb": " 81a8edbd7b6f85fc90e458568184c356",82 "lib/puppet/parser/functions/downcase.rb": "02376505a00accd0ce6b148f869c9c86", 83 "lib/puppet/parser/functions/empty.rb": "6d7d2dde2971f6a40fa913f0af1c610c", 84 "lib/puppet/parser/functions/enclose_ipv6.rb": "ec39936a9a51dc5cb8ada6eeb829b239", 85 "lib/puppet/parser/functions/ensure_packages.rb": "362fac217452d0eee783be7c7ab3a569", 56 86 "lib/puppet/parser/functions/ensure_resource.rb": "de703fe63392b939fc2b4392975263de", 57 "lib/puppet/parser/functions/ensure_resources.rb": " e9543e167972dd6a9a88aa5e02a9b4a5",58 "lib/puppet/parser/functions/flatten.rb": " 25777b76f9719162a8bab640e5595b7a",59 "lib/puppet/parser/functions/floor.rb": " 42cad4c689231a51526c55a6f0985d1f",87 "lib/puppet/parser/functions/ensure_resources.rb": "c92d8b69d6354eda24aa3a13d88177b2", 88 "lib/puppet/parser/functions/flatten.rb": "6a27f5b922a24fec6e823f6f51c98090", 89 "lib/puppet/parser/functions/floor.rb": "07ba3b1662a14c60fe908b51231355ee", 60 90 "lib/puppet/parser/functions/fqdn_rand_string.rb": "9ac5f18e563094aee62ef7586267025d", 61 "lib/puppet/parser/functions/fqdn_rotate.rb": "770d510a2e50d19b2dd42b6edef3fb1f", 91 "lib/puppet/parser/functions/fqdn_rotate.rb": "2483d17df4e6cb25d92b4e8520f30957", 92 "lib/puppet/parser/functions/fqdn_uuid.rb": "d357e8837ba2ed8196e926f3697be521", 62 93 "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", 63 "lib/puppet/parser/functions/getparam.rb": "4dd7a0e35f4a3780dcfc9b19b4e0006e", 64 "lib/puppet/parser/functions/getvar.rb": "344f1ce85dcb7512d37e8702ccbabb66", 65 "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", 66 "lib/puppet/parser/functions/has_interface_with.rb": "e135f09dbecc038c3aa9ae03127617ef", 67 "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325", 68 "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731", 94 "lib/puppet/parser/functions/getparam.rb": "440a9c381b9ad589504e2e9919e83c06", 95 "lib/puppet/parser/functions/getvar.rb": "0c8c5cef7e158e232a8cf6e42c10d0ff", 96 "lib/puppet/parser/functions/glob.rb": "c4106d2aff24f4b5a32b54bf4cd452a2", 97 "lib/puppet/parser/functions/grep.rb": "c2f2dbdf79d16584579c3a7bc7b5902f", 98 "lib/puppet/parser/functions/has_interface_with.rb": "db65f5aac94e8fe105c7ca0cd1f66403", 99 "lib/puppet/parser/functions/has_ip_address.rb": "6ce9e6cdfb499b6ce86bf531848a18be", 100 "lib/puppet/parser/functions/has_ip_network.rb": "3cc7b923fd3cde5062ed9d0eaaa8155f", 69 101 "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", 70 "lib/puppet/parser/functions/hash.rb": " 784f8d2d114eb4c9414ebd8a6868f82f",71 "lib/puppet/parser/functions/intersection.rb": " c8f4f8b861c9c297c87b08bdbfb94caa",72 "lib/puppet/parser/functions/is_absolute_path.rb": " 94ea1869c438d23f7f659c87ced8080a",73 "lib/puppet/parser/functions/is_array.rb": " 875ca4356cb0d7a10606fb146b4a3d11",74 "lib/puppet/parser/functions/is_bool.rb": " e693b7c4b5366cff1380b6e0c7dd7b11",75 "lib/puppet/parser/functions/is_domain_name.rb": " 6ca1f2708add756a6803b29d593d5830",76 "lib/puppet/parser/functions/is_email_address.rb": " 82573a431edf5a0bf9847393af27566a",77 "lib/puppet/parser/functions/is_float.rb": " 10e0d3ecf75fac15e415aee79acf70dc",78 "lib/puppet/parser/functions/is_function_available.rb": " 628428bbcd9313ce09783d9484330e09",79 "lib/puppet/parser/functions/is_hash.rb": " 8c7d9a05084dab0389d1b779c8a05b1a",80 "lib/puppet/parser/functions/is_integer.rb": " c665be82686aa4729959bb42c66a7510",81 "lib/puppet/parser/functions/is_ip_address.rb": " a714a736c1560e8739aaacd9030cca00",82 "lib/puppet/parser/functions/is_ipv4_address.rb": " 3df98fc55d9d59e0706ff83f607bb2a8",83 "lib/puppet/parser/functions/is_ipv6_address.rb": " 16e88af742f8ac93f1e8bb562eebc593",84 "lib/puppet/parser/functions/is_mac_address.rb": " 6dd3c96437d49e68630869b0b464e7f2",85 "lib/puppet/parser/functions/is_numeric.rb": " 93ddc9d4c0834a5e5e0562d7b3cdce91",86 "lib/puppet/parser/functions/is_string.rb": " 2bd9a652bbb2668323eee6c57729ff64",87 "lib/puppet/parser/functions/join.rb": " a285a05c015ae278608f6454aef211ea",88 "lib/puppet/parser/functions/join_keys_to_values.rb": " f29da49531228f6ca5b3aa0df00a14c2",89 "lib/puppet/parser/functions/keys.rb": " eb6ac815ea14fbf423580ed903ef7bad",102 "lib/puppet/parser/functions/hash.rb": "c1ebb21cc5b984153a87c252a9854db2", 103 "lib/puppet/parser/functions/intersection.rb": "87469eb81ab00bbacfd744165beeaeec", 104 "lib/puppet/parser/functions/is_absolute_path.rb": "1ce9a6d1cd0a79087d73cb879ed04542", 105 "lib/puppet/parser/functions/is_array.rb": "bbce6768b688bc0f36978ecb0f60f7f4", 106 "lib/puppet/parser/functions/is_bool.rb": "b8800ff7a11b4e8c03616041e218225f", 107 "lib/puppet/parser/functions/is_domain_name.rb": "5c6106c070945a605c5adbd1852f0691", 108 "lib/puppet/parser/functions/is_email_address.rb": "1eb786779743e93a7bb9fe8087b38b8d", 109 "lib/puppet/parser/functions/is_float.rb": "6257620b98c5099293be7aa4088b88ce", 110 "lib/puppet/parser/functions/is_function_available.rb": "f13934d6b41561ef54d88cf0da86231b", 111 "lib/puppet/parser/functions/is_hash.rb": "6f1ccf659c41cb5dab4db9fa89f0b364", 112 "lib/puppet/parser/functions/is_integer.rb": "a4ae475a5a799c0cc46519e86aed2973", 113 "lib/puppet/parser/functions/is_ip_address.rb": "2eabe60c213df2e642a03ebfd4852497", 114 "lib/puppet/parser/functions/is_ipv4_address.rb": "ab854b47367921f657410fbe79054f0b", 115 "lib/puppet/parser/functions/is_ipv6_address.rb": "2a2be7adbdd5ca23c3e21f00d7d8bac7", 116 "lib/puppet/parser/functions/is_mac_address.rb": "1af27510d3b9b936384192a4e1dfbf8c", 117 "lib/puppet/parser/functions/is_numeric.rb": "bfd99f39e2506953ad00178db6fa07ea", 118 "lib/puppet/parser/functions/is_string.rb": "c1405dd293e9e3c738b83c4ef5aab1ef", 119 "lib/puppet/parser/functions/join.rb": "2ed4f56d296a4535da142e01b11a126d", 120 "lib/puppet/parser/functions/join_keys_to_values.rb": "71ad24ac1809739713c461141aedd082", 121 "lib/puppet/parser/functions/keys.rb": "c10485a3d6c53b6d57a891b9852898de", 90 122 "lib/puppet/parser/functions/load_module_metadata.rb": "805c5476a6e7083d133e167129885924", 91 "lib/puppet/parser/functions/loadyaml.rb": "6da5dc9256c9e7a6549bb15c72cb9f9d", 92 "lib/puppet/parser/functions/lstrip.rb": "20a9b1fa077c16f34e0ef5448b895698", 93 "lib/puppet/parser/functions/max.rb": "f652fd0b46ef7d2fbdb42b141f8fdd1d", 94 "lib/puppet/parser/functions/member.rb": "2b5d7fb8f87f1c7d195933c57ca32e91", 123 "lib/puppet/parser/functions/loadjson.rb": "ffecf61ba2ec8011915d37009b1a273e", 124 "lib/puppet/parser/functions/loadyaml.rb": "668265f14327cba1d1400f2078b7b26b", 125 "lib/puppet/parser/functions/lstrip.rb": "e9cbd5c2233233940e7344478362fb9f", 126 "lib/puppet/parser/functions/max.rb": "529eb6ac3d88c03caa788167594bd487", 127 "lib/puppet/parser/functions/member.rb": "03d618926bbb9efd117950e6078c3878", 95 128 "lib/puppet/parser/functions/merge.rb": "f3dcc5c83440cdda2036cce69b61a14b", 96 "lib/puppet/parser/functions/min.rb": " 0d2a1b7e735ab251c5469e735fa3f4c6",97 "lib/puppet/parser/functions/num2bool.rb": " 605c12fa518c87ed2c66ae153e0686ce",129 "lib/puppet/parser/functions/min.rb": "8d829c8a55c9330ab02f962926221d4f", 130 "lib/puppet/parser/functions/num2bool.rb": "ddb603cf74f92e16a00f1447a4403429", 98 131 "lib/puppet/parser/functions/parsejson.rb": "15165fd3807d9f3d657697fa854d643d", 99 132 "lib/puppet/parser/functions/parseyaml.rb": "db54578d9d798ced75952217cf11b737", 100 133 "lib/puppet/parser/functions/pick.rb": "bf01f13bbfe2318e7f6a302ac7c4433f", 101 134 "lib/puppet/parser/functions/pick_default.rb": "ad3ea60262de408767786d37a54d45dc", 102 "lib/puppet/parser/functions/prefix.rb": "e 377fd64bd63dde6c9660aa75aca4942",135 "lib/puppet/parser/functions/prefix.rb": "ece9341c5b232a25c58545718a54e92f", 103 136 "lib/puppet/parser/functions/private.rb": "1500a21d5cf19961c5b1d476df892d92", 104 "lib/puppet/parser/functions/pw_hash.rb": "d82221f667050026cd6d155432a31802", 105 "lib/puppet/parser/functions/range.rb": "76f693d1dd50ffee409e58ff6d9a58bb", 137 "lib/puppet/parser/functions/pry.rb": "79a48e45196e4bbf0a3e658781513cf4", 138 "lib/puppet/parser/functions/pw_hash.rb": "3d540eb4c483cc9c111794ac2d24a4a7", 139 "lib/puppet/parser/functions/range.rb": "ab19430b6b9737cf56263eb65d80cba1", 140 "lib/puppet/parser/functions/regexpescape.rb": "6378fdd413237a37c322859877147a50", 106 141 "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9", 107 "lib/puppet/parser/functions/reverse.rb": " b234b54b8cd62b2d67ccd70489ffdccf",108 "lib/puppet/parser/functions/rstrip.rb": " b4e4ada41f7c1d2fcad073ce6344980f",142 "lib/puppet/parser/functions/reverse.rb": "209e7ef512963251571c515e2d0aee10", 143 "lib/puppet/parser/functions/rstrip.rb": "f3226709247741825f07d9ec20bd3887", 109 144 "lib/puppet/parser/functions/seeded_rand.rb": "2ad22e7613d894ae779c0c5b0e65dade", 110 "lib/puppet/parser/functions/shuffle.rb": "d50f72b0aeb921e64d2482f62488e2f3", 111 "lib/puppet/parser/functions/size.rb": "ab3b5b8cf2369d76969a7cb2564e018f", 112 "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", 113 "lib/puppet/parser/functions/squeeze.rb": "541f85b4203b55c9931d3d6ecd5c75f8", 114 "lib/puppet/parser/functions/str2bool.rb": "e380cfbc3395404ac8232ff960b22bca", 115 "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", 116 "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", 117 "lib/puppet/parser/functions/strip.rb": "85d70ab95492e3e4ca5f0b5ec3f284a9", 118 "lib/puppet/parser/functions/suffix.rb": "082519722ed6f237dd3a9a7e316ab2e4", 119 "lib/puppet/parser/functions/swapcase.rb": "b17a9f3cb0271451d309e4b4f52dd651", 120 "lib/puppet/parser/functions/time.rb": "8cb0b8320c60b4a21725634154a9f1db", 121 "lib/puppet/parser/functions/to_bytes.rb": "65437027687b6172173b3a211a799e37", 145 "lib/puppet/parser/functions/shell_escape.rb": "13662933244e1af42ddca71ced4ac9e5", 146 "lib/puppet/parser/functions/shell_join.rb": "b99a23d5e62e2e1b98accde5c22e45c9", 147 "lib/puppet/parser/functions/shell_split.rb": "5317d71f3a7e293624b57aaca23f57d5", 148 "lib/puppet/parser/functions/shuffle.rb": "6c0555524ebc9ed5dd8295b836fb7163", 149 "lib/puppet/parser/functions/size.rb": "c171d46b87e377ebcc710ad5a5925a2b", 150 "lib/puppet/parser/functions/sort.rb": "0b7d1411decc4a92450828809fad0779", 151 "lib/puppet/parser/functions/squeeze.rb": "403ea46228a8e45e89c91168ed301fb6", 152 "lib/puppet/parser/functions/str2bool.rb": "ff82f179970a9429614bd37fa7a1ae2a", 153 "lib/puppet/parser/functions/str2saltedsha512.rb": "457ab12e4329494ae6276cfa4f20eb23", 154 "lib/puppet/parser/functions/strftime.rb": "8f15e2e3732b6d1d357a1fa1826800d4", 155 "lib/puppet/parser/functions/strip.rb": "da0ce253cb63a4863f15f9d145217db5", 156 "lib/puppet/parser/functions/suffix.rb": "1ce493098f17ea47e9435f994adbc6cd", 157 "lib/puppet/parser/functions/swapcase.rb": "48cad9bf415b5d79584c8e17ab7a06cc", 158 "lib/puppet/parser/functions/time.rb": "cd96d1f039f8875af083091e3637190b", 159 "lib/puppet/parser/functions/to_bytes.rb": "45248fd0bba8cfb24eac830fc0add17a", 122 160 "lib/puppet/parser/functions/try_get_value.rb": "09cd079ec5f0e5e2ac862c9ebe0f54fe", 123 161 "lib/puppet/parser/functions/type.rb": "4709f7ab8a8aad62d77a3c5d91a3aa08", 124 "lib/puppet/parser/functions/type3x.rb": " f9bf4de8341afb0c677c26b40ec8a2b2",125 "lib/puppet/parser/functions/union.rb": " 3cf57ea53f2522f586264feb67293cd6",126 "lib/puppet/parser/functions/unique.rb": " c1bb4a8aeebd09ba3e4c8bc3702cfd60",162 "lib/puppet/parser/functions/type3x.rb": "5d0391205bd1cfe8de985a44e8c3e8a9", 163 "lib/puppet/parser/functions/union.rb": "c02fca3fe102875ba020072b7edee532", 164 "lib/puppet/parser/functions/unique.rb": "0f79a96896149f7034cd85e31eed1e54", 127 165 "lib/puppet/parser/functions/unix2dos.rb": "b1f5087fcaca69d9395094204cce887a", 128 "lib/puppet/parser/functions/upcase.rb": " 8decededec9eb33e58f961eb86f0888f",129 "lib/puppet/parser/functions/uriescape.rb": " d912ba09ba3f58c70988e662e05ffbe8",130 "lib/puppet/parser/functions/validate_absolute_path.rb": " 51c81d562fcc6c2df49ce5cfefd721ff",131 "lib/puppet/parser/functions/validate_array.rb": " 72b29289b8af1cfc3662ef9be78911b8",166 "lib/puppet/parser/functions/upcase.rb": "e875fc4f03adec1ff3b42d22f177441e", 167 "lib/puppet/parser/functions/uriescape.rb": "ba78def2cd0e60bdc4412df6c7b891ec", 168 "lib/puppet/parser/functions/validate_absolute_path.rb": "c4b12e101055380386a235cd2c92ad10", 169 "lib/puppet/parser/functions/validate_array.rb": "bee8327014714d4cd8dbb5c46611f594", 132 170 "lib/puppet/parser/functions/validate_augeas.rb": "61e828e7759ba3e1e563e1fdd68aa80f", 133 "lib/puppet/parser/functions/validate_bool.rb": " a712634a000024398b3c6cd4ecc46463",171 "lib/puppet/parser/functions/validate_bool.rb": "971700229c4b581f67f6fadc9019eb2c", 134 172 "lib/puppet/parser/functions/validate_cmd.rb": "7df12370db442eddddcf4dd7a5364b5e", 135 "lib/puppet/parser/functions/validate_email_address.rb": " e74fe9695ae0219d95f1595978267e48",136 "lib/puppet/parser/functions/validate_hash.rb": " e9cfaca68751524efe16ecf2f958a9a0",137 "lib/puppet/parser/functions/validate_integer.rb": " 438c7fdd25f7f6a208ac48c9b75a390f",138 "lib/puppet/parser/functions/validate_ip_address.rb": " 8d1f23b4fb623e9ce2a6bfa59c6c1266",139 "lib/puppet/parser/functions/validate_ipv4_address.rb": " ea5a7e87f51fc5a961cdc7369b3c9d00",140 "lib/puppet/parser/functions/validate_ipv6_address.rb": "4 699238e4cad60e7e1428905523eaeb7",141 "lib/puppet/parser/functions/validate_numeric.rb": " 60b0c6d5b8b170ea77498a8580bd3158",142 "lib/puppet/parser/functions/validate_re.rb": " 53613813ba02914f2692f0edd7e12fab",143 "lib/puppet/parser/functions/validate_slength.rb": " 5f0db124caae4866f474a60c589ba632",144 "lib/puppet/parser/functions/validate_string.rb": " cf6a20877a27b1073d63fdd522af50bb",173 "lib/puppet/parser/functions/validate_email_address.rb": "a72656cbfeda622cdd5cfdafdf464095", 174 "lib/puppet/parser/functions/validate_hash.rb": "c2ae6299148ea200f8dfcf9204875182", 175 "lib/puppet/parser/functions/validate_integer.rb": "65aa35f7450794aaadb6ad2c2e114df7", 176 "lib/puppet/parser/functions/validate_ip_address.rb": "b23c3d5ce6839e32d0186411147a6a44", 177 "lib/puppet/parser/functions/validate_ipv4_address.rb": "593e8f832469cb6a48c5f16ee66c3b2d", 178 "lib/puppet/parser/functions/validate_ipv6_address.rb": "48d3733012818993eae662839183d139", 179 "lib/puppet/parser/functions/validate_numeric.rb": "0e36d370262b8bdef2f88f0a3cb5b30e", 180 "lib/puppet/parser/functions/validate_re.rb": "d5963c404e3ac1670553f306221c2655", 181 "lib/puppet/parser/functions/validate_slength.rb": "6cbcfe15378ca4a780bac786223aacac", 182 "lib/puppet/parser/functions/validate_string.rb": "8afa7b0dcfe17bfbbb5704ad54664cc2", 145 183 "lib/puppet/parser/functions/validate_x509_rsa_key_pair.rb": "f17427dfc42128dc1df0ab04f37942e5", 146 "lib/puppet/parser/functions/values.rb": " 066a6e4170e5034edb9a80463dff2bb5",147 "lib/puppet/parser/functions/values_at.rb": " 325a899e0201e8df5bd483fec6f12d76",148 "lib/puppet/parser/functions/zip.rb": " a89d5e802bc1e63e52020c2ddbaaca2c",149 "lib/puppet/provider/file_line/ruby.rb": " 0b7ed2917e70902b5c40362370edcbb0",184 "lib/puppet/parser/functions/values.rb": "c35978761496406cc3dafdccaa014236", 185 "lib/puppet/parser/functions/values_at.rb": "f7e6ad2a1126acd4fb5f7fcf9bfc2e2b", 186 "lib/puppet/parser/functions/zip.rb": "133f3d4c54640844e656e2e6e790318e", 187 "lib/puppet/provider/file_line/ruby.rb": "97dee0cadfaf112550e8424e143acc55", 150 188 "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c", 151 "lib/puppet/type/file_line.rb": "21214f23b82b909dba6d7a57dd6464b6", 189 "lib/puppet/type/file_line.rb": "d65885f7f0afe49ee199d6bf873a5daf", 190 "locales/config.yaml": "574ee65e2a2a9d2f67edbc58735f50d4", 191 "locales/ja/puppetlabs-stdlib.po": "805e5d893d2025ad57da8ec0614a6753", 192 "locales/puppetlabs-stdlib.pot": "23c892ac0683aef4b09aabe0037750ae", 152 193 "manifests/init.pp": "9560a09f657d7eebbfdb920cefcc1d4f", 153 194 "manifests/stages.pp": "72eb4fa624474faf23b39e57cf1590bd", 154 "metadata.json": "cab692227f5bbcc300d1512b4c8600dd", 155 "spec/acceptance/abs_spec.rb": "538db8d037db814b455a6d741e91bb8d", 156 "spec/acceptance/anchor_spec.rb": "3a366ecab2fda6c20acd70eeb57c5080", 157 "spec/acceptance/any2array_spec.rb": "de86ead0205acbb3eca3a8a4792bdac8", 158 "spec/acceptance/base64_spec.rb": "1684d5dd176dd5bbd4c3c6b1e64fbcea", 159 "spec/acceptance/bool2num_spec.rb": "bf53ceac40d0a67551c618b11809f3f8", 195 "metadata.json": "72d1000d449f8b37a4da8167a51edc05", 196 "readmes/README_ja_JP.md": "173d377936c83b2cd622bb471d154a02", 197 "spec/acceptance/abs_spec.rb": "5b60756b2b4da28314025f51989592d7", 198 "spec/acceptance/anchor_spec.rb": "0fdbe266d8b7c3dc172e338b978109ba", 199 "spec/acceptance/any2array_spec.rb": "444cfd34154539d896e5ef1488386372", 200 "spec/acceptance/base64_spec.rb": "6a1dd4144ba354f9bed14eb70f7d2cba", 201 "spec/acceptance/bool2num_spec.rb": "edc9cb8b89b95410326475d27ce74bd5", 160 202 "spec/acceptance/build_csv.rb": "f28ef587de764ade1513091c4906412c", 161 "spec/acceptance/capitalize_spec.rb": "e77ea2c37144a75a67969c0d0839adfd", 162 "spec/acceptance/ceiling_spec.rb": "b2718dc74a39399e342ef96fe0d00fdc", 163 "spec/acceptance/chomp_spec.rb": "fb0862a6b7eeb3c290e280788e705061", 164 "spec/acceptance/chop_spec.rb": "4e7ab2d3a441b88b667a0d8ea5b174c1", 165 "spec/acceptance/clamp_spec.rb": "7513fd2a6701206b4673f40728eae835", 166 "spec/acceptance/concat_spec.rb": "73ce39ffec7184d8ed5f0b5656ed9557", 167 "spec/acceptance/count_spec.rb": "d82cfcad2461b16872455d6347a8b114", 168 "spec/acceptance/deep_merge_spec.rb": "c335a947f1666e185e0210e661f1c78a", 169 "spec/acceptance/defined_with_params_spec.rb": "f27c54ade9872c63c69316f62b03c119", 170 "spec/acceptance/delete_at_spec.rb": "9c028b703ee0286565c9877757678f3f", 171 "spec/acceptance/delete_spec.rb": "31e6dfcb9cc7c16b20d47c00e6a85a1d", 172 "spec/acceptance/delete_undef_values_spec.rb": "6e6a66aee0c383c843b5f92ef8c8410c", 173 "spec/acceptance/delete_values_spec.rb": "22c9b4914d4cbc0153aa3862cb4fb50e", 174 "spec/acceptance/difference_spec.rb": "289f4f1788feaacb304ffd54971c7e7e", 175 "spec/acceptance/dirname_spec.rb": "84db53878c4400a6c684c924cff05cfc", 176 "spec/acceptance/downcase_spec.rb": "0f094849b94a94df491ee01186473104", 177 "spec/acceptance/empty_spec.rb": "e5094267eb1eae007addc5e76b6d43d1", 203 "spec/acceptance/capitalize_spec.rb": "4bb6471ec3a8a07260da8e249fae6ccd", 204 "spec/acceptance/ceiling_spec.rb": "46489eef94aa21bb1560383bb17d7d02", 205 "spec/acceptance/chomp_spec.rb": "8372fe8a875b1a599a89df1191f43bc0", 206 "spec/acceptance/chop_spec.rb": "d73d1c7c6a44df65677362bd2899bbc1", 207 "spec/acceptance/clamp_spec.rb": "8afaae07bf89e0af35474da489fd590f", 208 "spec/acceptance/concat_spec.rb": "bad5f40e0a501b436ec4264cd278290b", 209 "spec/acceptance/count_spec.rb": "f8abd435b077edd06ad76a96a2e610c0", 210 "spec/acceptance/deep_merge_spec.rb": "5f16342cb8c1b52d6a08717a2ef87117", 211 "spec/acceptance/defined_with_params_spec.rb": "8b47a7255b9d662009217f3cfd17ca03", 212 "spec/acceptance/delete_at_spec.rb": "b0c853ffe5fc121e051233d62f6e72b3", 213 "spec/acceptance/delete_spec.rb": "6ccb838a13037a56d1413aecb4fdac00", 214 "spec/acceptance/delete_undef_values_spec.rb": "7d849a978d3ecdaaf5e922acc6038ad8", 215 "spec/acceptance/delete_values_spec.rb": "b9f3dbffbb89fec32c6a5b2bd3b20901", 216 "spec/acceptance/deprecation_spec.rb": "cadc56a94cbc2f13965d698f581f582d", 217 "spec/acceptance/difference_spec.rb": "2f4e8ddd760f2d4dc9a4fb7b653e982f", 218 "spec/acceptance/dirname_spec.rb": "76e6b66474f070d8a89f3fe5bd187e85", 219 "spec/acceptance/downcase_spec.rb": "53f0f5b1867e0fd87ba59833c18b5ca2", 220 "spec/acceptance/empty_spec.rb": "be8a610f87790a321dbd4cc0542e2885", 178 221 "spec/acceptance/ensure_resource_spec.rb": "c0193d79f1db1985d313bedb93a4c7ae", 179 "spec/acceptance/flatten_spec.rb": "83fb08cc168a105c1d5d0df66b1d9e84", 180 "spec/acceptance/floor_spec.rb": "d7267b2914b1da6406224abb7489ca86", 181 "spec/acceptance/fqdn_rand_string_spec.rb": "45982bd0062e3ffe2dbdd5ef0359d869", 182 "spec/acceptance/fqdn_rotate_spec.rb": "b00226e2ae28acf4ffea8a96b6e64f01", 183 "spec/acceptance/get_module_path_spec.rb": "2658cdcd1abd4b7d20f53c4aced3c72a", 184 "spec/acceptance/getparam_spec.rb": "4d32dc5a0ee34d045242c36d77a3b482", 185 "spec/acceptance/getvar_spec.rb": "ba2f081a88be97c0e7004a6296294f23", 186 "spec/acceptance/grep_spec.rb": "98818b8b0557b80d6ff519f70ea7617c", 187 "spec/acceptance/has_interface_with_spec.rb": "30e27096050c43b7efdb5e6c0d54f53b", 188 "spec/acceptance/has_ip_address_spec.rb": "2812117ec4b88556039e8488d53c0cb0", 189 "spec/acceptance/has_ip_network_spec.rb": "ca75b43ff1256ead9052f2db7620db99", 190 "spec/acceptance/has_key_spec.rb": "6509a26a0886f7d591eaa926b2f92407", 191 "spec/acceptance/hash_spec.rb": "1c626457ba056bdd3936e28aa5bf503e", 192 "spec/acceptance/intersection_spec.rb": "40f586af7f95408a5d4a2882a4aa98f1", 193 "spec/acceptance/is_a_spec.rb": "03e612e76d9004ec625d9e30bb17af04", 194 "spec/acceptance/is_array_spec.rb": "c2ff70ce59b90b50a5aed67abaa5399d", 195 "spec/acceptance/is_bool_spec.rb": "c001fdecff6b0a3c9dc78774987a0b15", 196 "spec/acceptance/is_domain_name_spec.rb": "63e84285c26d8717fd5d4dda01e3f432", 197 "spec/acceptance/is_float_spec.rb": "2f0164b4d732166aa46055a2cf7b4ea9", 198 "spec/acceptance/is_function_available_spec.rb": "7745eba89f8719c9ca7ebf04d5b005f7", 199 "spec/acceptance/is_hash_spec.rb": "cff723cd8fddac45033af5dc8406d4e4", 200 "spec/acceptance/is_integer_spec.rb": "c09201d17d3914bba197872897fa3413", 201 "spec/acceptance/is_ip_address_spec.rb": "aa14cf9abf404c3fe1e761ea957871fe", 202 "spec/acceptance/is_ipv4_address_spec.rb": "b787114912487987801bc68d7cb15142", 203 "spec/acceptance/is_ipv6_address_spec.rb": "c99785448a72f9a2cfa7cd52a392b5e7", 204 "spec/acceptance/is_mac_address_spec.rb": "30ff4c6a63be58daa3568305617ca2a7", 205 "spec/acceptance/is_numeric_spec.rb": "fb9829c7a1a8d4a58836df6ff4c3386d", 206 "spec/acceptance/is_string_spec.rb": "df3022de123b72f0022728eb2d8ce857", 207 "spec/acceptance/join_keys_to_values_spec.rb": "8aa128bbaeea65aab8d92badee3ca2b5", 208 "spec/acceptance/join_spec.rb": "c6378ed481265152bba9871fc5501ee6", 209 "spec/acceptance/keys_spec.rb": "20486e3ebee53e50dc9de3b78b9d6ae6", 210 "spec/acceptance/loadyaml_spec.rb": "bd440cb6779026bd07d83f1aceb2781b", 211 "spec/acceptance/lstrip_spec.rb": "e29ab4039b65660ec2bd76a298adcae0", 212 "spec/acceptance/max_spec.rb": "209cda4b83d677743afb1a8870330618", 213 "spec/acceptance/member_spec.rb": "d6088a4fa6321791a3067d9b9cf8914a", 214 "spec/acceptance/merge_spec.rb": "5f168188fa0d6b31ba5b3dac49fb609c", 215 "spec/acceptance/min_spec.rb": "152a7db28434a0d0378561d4f64cddcc", 216 "spec/acceptance/nodesets/centos-59-x64.yml": "57eb3e471b9042a8ea40978c467f8151", 217 "spec/acceptance/nodesets/centos-6-vcloud.yml": "bdf9ce9d3b0f0b4995666ae9d64d878d", 218 "spec/acceptance/nodesets/centos-64-x64-pe.yml": "ec075d95760df3d4702abea1ce0a829b", 219 "spec/acceptance/nodesets/centos-64-x64.yml": "092dd2c588a9f87fa1fb12997c0723ef", 220 "spec/acceptance/nodesets/centos-65-x64.yml": "3e5c36e6aa5a690229e720f4048bb8af", 221 "spec/acceptance/nodesets/default.yml": "3e5c36e6aa5a690229e720f4048bb8af", 222 "spec/acceptance/nodesets/fedora-18-x64.yml": "80e41b1ee16ea489f53164bfdae58855", 223 "spec/acceptance/nodesets/sles-11-x64.yml": "44e4c6c15c018333bfa9840a5e702f66", 224 "spec/acceptance/nodesets/ubuntu-server-10044-x64.yml": "75e86400b7889888dc0781c0ae1a1297", 225 "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "d30d73e34cd50b043c7d14e305955269", 226 "spec/acceptance/nodesets/ubuntu-server-1404-x64.yml": "5f0aed10098ac5b78e4217bb27c7aaf0", 227 "spec/acceptance/nodesets/windows-2003-i386.yml": "b518fc01fab99ee6a9afccec5bc0c1c4", 228 "spec/acceptance/nodesets/windows-2003-x86_64.yml": "5c783eaa8ea4734edc836e89e923dfa1", 229 "spec/acceptance/nodesets/windows-2008-x86_64.yml": "3082234eafcfaf7a9579d9ebdb8bc409", 230 "spec/acceptance/nodesets/windows-2008r2-x86_64.yml": "dfeff32a4cc3fffa872c8281d990a840", 231 "spec/acceptance/nodesets/windows-2012-x86_64.yml": "8bed73362ee1f43d21ea1903a729f955", 232 "spec/acceptance/nodesets/windows-2012r2-x86_64.yml": "3f4f6112d24db02989b8ab79d3a1256f", 233 "spec/acceptance/num2bool_spec.rb": "e4a00b913b08c68a689837e9f9336cb2", 234 "spec/acceptance/parsejson_spec.rb": "5753b9dd66e4fd464c132b39487b922c", 235 "spec/acceptance/parseyaml_spec.rb": "991f6f7b729812535155643c11846bcb", 236 "spec/acceptance/pick_default_spec.rb": "1bc2562380ef6f6cded5ec90a03922be", 237 "spec/acceptance/pick_spec.rb": "272c54c8f9398f499768331bdb4276ee", 238 "spec/acceptance/prefix_spec.rb": "da620568c6771e7d492ec1ff697c531c", 239 "spec/acceptance/pw_hash_spec.rb": "721fe0da04d798a353799fd651bcd0fc", 240 "spec/acceptance/range_spec.rb": "65e5b98ceca257658604d988fbec7d03", 241 "spec/acceptance/reject_spec.rb": "b5185f1a6071c9bdc7aca92e6f899c3e", 242 "spec/acceptance/reverse_spec.rb": "7bdee543e82532e97bbf7a067140031c", 243 "spec/acceptance/rstrip_spec.rb": "28a64ceb7cb5ae8a93d31f49816190ab", 244 "spec/acceptance/shuffle_spec.rb": "8a8652e57d56f2b4946cdf4d20052b7a", 245 "spec/acceptance/size_spec.rb": "ae17d8a55921a0570972200c7c9327e1", 246 "spec/acceptance/sort_spec.rb": "d44b1b8c090f0f00a2f38515fda431ea", 247 "spec/acceptance/squeeze_spec.rb": "adcd65fa4e72203b97f1f14c8835c2cd", 248 "spec/acceptance/str2bool_spec.rb": "55ad165ceef6b9ba32bf20ca3b53b44c", 249 "spec/acceptance/str2saltedsha512_spec.rb": "b684c4214d06ae3d5bae055262a5ccaa", 250 "spec/acceptance/strftime_spec.rb": "0f4eadbd74445b35de4a42c9790fbcc1", 251 "spec/acceptance/strip_spec.rb": "6767da5bc735beb5362aeee6ff692c9e", 252 "spec/acceptance/suffix_spec.rb": "07dfc7eed48b75fcc1b93d0308243eda", 253 "spec/acceptance/swapcase_spec.rb": "5c3c1bc19a09fed6e01881f79b0b4ea5", 254 "spec/acceptance/time_spec.rb": "044b2f634a1fa6ecc735998d68a93b73", 255 "spec/acceptance/to_bytes_spec.rb": "f9df1f234b9409f5eaf56ef24e651c36", 256 "spec/acceptance/try_get_value_spec.rb": "db7c47f372f9d9725987ebe13e6039eb", 257 "spec/acceptance/type_spec.rb": "4297e038a8ff7e6ecb859b8b68c7b3a6", 258 "spec/acceptance/union_spec.rb": "f24e166bc838c9c8cbd75ad3f8f9d15b", 259 "spec/acceptance/unique_spec.rb": "9b00b21cefde3b5391f50eeb9cd2493b", 260 "spec/acceptance/unsupported_spec.rb": "09b9265ecb05252cd5e5a18327c7ae97", 261 "spec/acceptance/upcase_spec.rb": "ffd1d6f9e6ec24131fb78983c53a75f9", 262 "spec/acceptance/uriescape_spec.rb": "13daa387714cbfc63b587aaa8dbf7fcd", 263 "spec/acceptance/validate_absolute_path_spec.rb": "8b9ebfae80329231d84fcab606a3eeaf", 264 "spec/acceptance/validate_array_spec.rb": "382641719e754622ffae562d10e38bf7", 265 "spec/acceptance/validate_augeas_spec.rb": "c26b8ca2184a9dd87033a0c6f0553093", 266 "spec/acceptance/validate_bool_spec.rb": "08bc139459204cf0a35098a5bc30ab95", 267 "spec/acceptance/validate_cmd_spec.rb": "e9260c49d880e4de54f77bf4fd70cff4", 268 "spec/acceptance/validate_hash_spec.rb": "70ceacc18a0dee97b26ab2e50f925706", 269 "spec/acceptance/validate_ipv4_address_spec.rb": "dc901bbd05c3764a93cb49154cea6e4b", 270 "spec/acceptance/validate_ipv6_address_spec.rb": "c0872c56230ac2800cd5723eaa5bc53a", 271 "spec/acceptance/validate_re_spec.rb": "b289909078d6ae0d015419f518566698", 272 "spec/acceptance/validate_slength_spec.rb": "f0a05c1c2b895b096cb7326df4821594", 273 "spec/acceptance/validate_string_spec.rb": "6c9ced99fb1e263e66e25427d24f8f7b", 274 "spec/acceptance/values_at_spec.rb": "669b26c4d47742051472003518c3aa61", 275 "spec/acceptance/values_spec.rb": "9681223bb1bd755c28946ef0bcd6ece9", 276 "spec/acceptance/zip_spec.rb": "86d1b555745ee873da68c71f1e46ed21", 222 "spec/acceptance/flatten_spec.rb": "3ab1f9c9e761e5d758eeee7a2e32f295", 223 "spec/acceptance/floor_spec.rb": "4a20f6fc7142ef9357c8d18a408b5e52", 224 "spec/acceptance/fqdn_rand_string_spec.rb": "7744b45e282013c5fe637dbaf42f85b9", 225 "spec/acceptance/fqdn_rotate_spec.rb": "366816bb1d3102f64025d61e22eec79c", 226 "spec/acceptance/get_module_path_spec.rb": "d5d2258b2345359d1e51a638b97523cb", 227 "spec/acceptance/getparam_spec.rb": "d4037f1f546cf7a3e7dcabe787e637b5", 228 "spec/acceptance/getvar_spec.rb": "8451bced69bfd5599a552ddf49976d98", 229 "spec/acceptance/grep_spec.rb": "5e6650532658915d1004a6e6c0f1229d", 230 "spec/acceptance/has_interface_with_spec.rb": "e028fc7fc1023293ba32c48c9f46752a", 231 "spec/acceptance/has_ip_address_spec.rb": "f3443be46277f6084ca8e531562d8ac7", 232 "spec/acceptance/has_ip_network_spec.rb": "fa7a38450bef7e4408deb6b978d5a42f", 233 "spec/acceptance/has_key_spec.rb": "68e42fb69d15f27916e7943ab727afc6", 234 "spec/acceptance/hash_spec.rb": "1e8ff803d76d8f9e506c8a366a93ad90", 235 "spec/acceptance/intersection_spec.rb": "755c135f67811666b3c5152c5c5349c2", 236 "spec/acceptance/is_a_spec.rb": "4cdd8df78a6285de21d634c032e5a7c9", 237 "spec/acceptance/is_array_spec.rb": "1de1fb0b55759d4012033ae3ce0723c2", 238 "spec/acceptance/is_bool_spec.rb": "9984cd966d81c217f8ff4e252a4a66d1", 239 "spec/acceptance/is_domain_name_spec.rb": "948dc0c7372027e8f2bb9db85b8d66b2", 240 "spec/acceptance/is_float_spec.rb": "731d9b71e7b4ee5055339d08b2b5f707", 241 "spec/acceptance/is_function_available_spec.rb": "413964bfe8e18c34d8809590afcc4118", 242 "spec/acceptance/is_hash_spec.rb": "9095a364cba82a95a1edd0f92d2218c7", 243 "spec/acceptance/is_integer_spec.rb": "bc4e7192073531638be9f8a4d391a827", 244 "spec/acceptance/is_ip_address_spec.rb": "c2ee8738d62b4c9d42b3ef1a1b8573fc", 245 "spec/acceptance/is_ipv4_address_spec.rb": "09f6f3ad6a1c0a9e5dcfaab34a081ffc", 246 "spec/acceptance/is_ipv6_address_spec.rb": "d19a98176b2b7367e740d338df08c2ae", 247 "spec/acceptance/is_mac_address_spec.rb": "b53f033cc4943a19f597895df0b5210a", 248 "spec/acceptance/is_numeric_spec.rb": "95ecae5adde23e6b61cd090704c4572d", 249 "spec/acceptance/is_string_spec.rb": "d9ad89b30aff62aea4fb805c991c6abf", 250 "spec/acceptance/join_keys_to_values_spec.rb": "908f62013e1d797ddc0ba68c0fb7913b", 251 "spec/acceptance/join_spec.rb": "5609c646859140109af4ae1c63cc69d2", 252 "spec/acceptance/keys_spec.rb": "15edb2f0a5630dfadd9bd6c038e5cf95", 253 "spec/acceptance/loadjson_spec.rb": "7bf8eb220ed02b77e9956dade1acfcb3", 254 "spec/acceptance/loadyaml_spec.rb": "3810faad7411bc1d9c9274671bb68a9a", 255 "spec/acceptance/lstrip_spec.rb": "27a6e2c9e2afc5b3e0e98301798a80ad", 256 "spec/acceptance/max_spec.rb": "c39a2006dacdbd24a8acc5dc25f1a9f3", 257 "spec/acceptance/member_spec.rb": "10b9635c1daf636d66aabea6ff796e6a", 258 "spec/acceptance/merge_spec.rb": "a1502ebd4d069c5f818f7fd8da79e02d", 259 "spec/acceptance/min_spec.rb": "a6e73a33255bc202de93fd8fe679c510", 260 "spec/acceptance/nodesets/centos-7-x64.yml": "a713f3abd3657f0ae2878829badd23cd", 261 "spec/acceptance/nodesets/debian-8-x64.yml": "d2d2977900989f30086ad251a14a1f39", 262 "spec/acceptance/nodesets/default.yml": "b42da5a1ea0c964567ba7495574b8808", 263 "spec/acceptance/nodesets/docker/centos-7.yml": "8a3892807bdd62306ae4774f41ba11ae", 264 "spec/acceptance/nodesets/docker/debian-8.yml": "ac8e871d1068c96de5e85a89daaec6df", 265 "spec/acceptance/nodesets/docker/ubuntu-14.04.yml": "dc42ee922a96908d85b8f0f08203ce58", 266 "spec/acceptance/num2bool_spec.rb": "33ab633c5a6aa1e5e9c0cac9ec23c0d5", 267 "spec/acceptance/parsejson_spec.rb": "56353143de570034f59a87244bb9ff7b", 268 "spec/acceptance/parseyaml_spec.rb": "a564b2217350398d8a3f1b212d0c2ada", 269 "spec/acceptance/pick_default_spec.rb": "bc3512e0cc3bc34da5f44ae18573af5d", 270 "spec/acceptance/pick_spec.rb": "661747652e50bb522ad0c627fb8c3c58", 271 "spec/acceptance/prefix_spec.rb": "2b9df68e18e16144caa4440fd6acaa01", 272 "spec/acceptance/pw_hash_spec.rb": "979f0d209f1ef227a31d27a452fc2ed3", 273 "spec/acceptance/range_spec.rb": "f913a26f4bbe8b9432b6cb80a3b6d1ed", 274 "spec/acceptance/reject_spec.rb": "c63eb909288cf2210f72d3afa1e07b32", 275 "spec/acceptance/reverse_spec.rb": "eca705328f8e246a648e3f62434e662a", 276 "spec/acceptance/rstrip_spec.rb": "bad1e42f66d07b5d09ca1133b392bf6a", 277 "spec/acceptance/shuffle_spec.rb": "adc420bc01d83dde117b04baa4a5e2d8", 278 "spec/acceptance/size_spec.rb": "d923ec158f5c2275b9823dd118edd953", 279 "spec/acceptance/sort_spec.rb": "3ac4acd4233fbe624d926604d58acea6", 280 "spec/acceptance/squeeze_spec.rb": "2270c35766a5162cd732f0f761f0dc34", 281 "spec/acceptance/str2bool_spec.rb": "73ca9cbf9079ef52de10f90cb871e80c", 282 "spec/acceptance/str2saltedsha512_spec.rb": "1e89299c3802ba386589a5133a07dccc", 283 "spec/acceptance/strftime_spec.rb": "6cdfc95c02af2419eb14d173a23df678", 284 "spec/acceptance/strip_spec.rb": "711b6b73fce659ab83956c4454500e55", 285 "spec/acceptance/suffix_spec.rb": "c2ca0539e9e7b71f36ff470d3c18b303", 286 "spec/acceptance/swapcase_spec.rb": "30290d4378f19fa8bac4bc3347a36298", 287 "spec/acceptance/time_spec.rb": "74b6d4f21d46ca612a98efed9c48944c", 288 "spec/acceptance/to_bytes_spec.rb": "ff7d57f85cf1e211b0998235636edfd9", 289 "spec/acceptance/try_get_value_spec.rb": "8b62b969ece6f02c65f0cf3d365324b1", 290 "spec/acceptance/type_spec.rb": "909aa4d0c2463b04a3d3ff72cb0d4b42", 291 "spec/acceptance/union_spec.rb": "41b8705ac890ddd915a5f6c8b33620cd", 292 "spec/acceptance/unique_spec.rb": "0108f76cc12ecb0551a37a002a9bda85", 293 "spec/acceptance/upcase_spec.rb": "30721f352edd513a0cc36c94aa0fe760", 294 "spec/acceptance/uriescape_spec.rb": "69857543c97c35b23094cc6da0828055", 295 "spec/acceptance/validate_absolute_path_spec.rb": "b7f57e45a4d4d2a187bf9db99c481f98", 296 "spec/acceptance/validate_array_spec.rb": "ec0db1f08eb8d64fec1025b65b544365", 297 "spec/acceptance/validate_augeas_spec.rb": "744354dd9726be3624db10935ae2b13f", 298 "spec/acceptance/validate_bool_spec.rb": "950632bafc509e1965cd6a57646d87f6", 299 "spec/acceptance/validate_cmd_spec.rb": "1605939801210b1a53dc8873492551e0", 300 "spec/acceptance/validate_hash_spec.rb": "b79b1ef06301e1b97863281e3c419b0e", 301 "spec/acceptance/validate_ipv4_address_spec.rb": "547520f1ad1d55c52a257f4fb85ecc33", 302 "spec/acceptance/validate_ipv6_address_spec.rb": "feedad9317be19409e351011c7b852b9", 303 "spec/acceptance/validate_re_spec.rb": "bcc18798eccca866883b965baefc3cc9", 304 "spec/acceptance/validate_slength_spec.rb": "29311e9e910bba57a86be9a4893b43e5", 305 "spec/acceptance/validate_string_spec.rb": "cd36b419ebb8630618ec795781081101", 306 "spec/acceptance/values_at_spec.rb": "17e39ac5e094fb05522cb363e12186ab", 307 "spec/acceptance/values_spec.rb": "25d5abaffd9a108a52cdb156b5120e85", 308 "spec/acceptance/zip_spec.rb": "30ac38a83f8e92d642a20b53c5b66292", 309 "spec/aliases/absolute_path_spec.rb": "4326af270230f6d1aef6b1c68a31c53b", 310 "spec/aliases/absolutepath_spec.rb": "ab9a78b2aa5f6eb102ee648c5f88da61", 311 "spec/aliases/array_spec.rb": "09c3559333ec646387e4141ed37d671e", 312 "spec/aliases/bool_spec.rb": "c3f734df3cd334860bba95386b8e8ba6", 313 "spec/aliases/float_spec.rb": "dda76444d67dcf4e9ab4bf8d1a668b23", 314 "spec/aliases/hash_spec.rb": "8b0753fbb41a41655235f999a8cd8a17", 315 "spec/aliases/httpsurl_spec.rb": "49fa0c1da3f055228aaa7ab12471f126", 316 "spec/aliases/httpurl_spec.rb": "fe92b61091197895e9e0070adcaec1e9", 317 "spec/aliases/integer_spec.rb": "3d5c27c864e2385251f1c16a46ef717d", 318 "spec/aliases/ip_address.rb": "297c6577c0763f5121f9ca9c19718dfe", 319 "spec/aliases/ipv4_spec.rb": "8f3be58256671754f32287609c7a64ba", 320 "spec/aliases/ipv6_spec.rb": "68bc3bdf8f2dbb049f8f8daf93d78e82", 321 "spec/aliases/numeric_spec.rb": "a0031bb0085673ec7cc28d9c9b5a72e4", 322 "spec/aliases/string_spec.rb": "8953daa594d54b8efc91fecf73629608", 323 "spec/aliases/unixpath_spec.rb": "1fac6f23e14c3589d26284a081c25c77", 324 "spec/aliases/windowspath_spec.rb": "4a3aec398b2c6ae86cb6d68ac5e8ab06", 325 "spec/fixtures/dscacheutil/root": "e1a7622f55f3d1be258c9a5b16b474be", 326 "spec/fixtures/lsuser/root": "2ed657fa157372a81634539bb1a56be8", 327 "spec/fixtures/test/manifests/absolute_path.pp": "79e9da69f05adc0e1ed41c20bf14e95f", 328 "spec/fixtures/test/manifests/absolutepath.pp": "8561fa141028cd38d0b8409cd69a1372", 329 "spec/fixtures/test/manifests/array.pp": "0e1d4146a9b2dd56063b2cab6f3d7571", 330 "spec/fixtures/test/manifests/bool.pp": "cf75826f36025bd73ff7f479acf7196d", 331 "spec/fixtures/test/manifests/deftype.pp": "b9dbd15e3f4a2dd53aac7f26322abf0c", 332 "spec/fixtures/test/manifests/ensure_resources.pp": "3265ae7af9382cfe7d9a13527265dcc9", 333 "spec/fixtures/test/manifests/float.pp": "132f9a63e60bba2fba68be83208c2e28", 334 "spec/fixtures/test/manifests/hash.pp": "84d647482ef0c7dc35348c13fb0ca23e", 335 "spec/fixtures/test/manifests/httpsurl.pp": "9047fc382d215ae55c065b0798a82a2d", 336 "spec/fixtures/test/manifests/httpurl.pp": "7165bf5607a4808f3da3f9baca911240", 337 "spec/fixtures/test/manifests/integer.pp": "3cb3807714ddcde25cd8eeca61581e3b", 338 "spec/fixtures/test/manifests/ip_address.pp": "78deea27fe1ff9e85c360eced4d2c256", 339 "spec/fixtures/test/manifests/ipv4.pp": "b4f0dfe6ae06d4f8b284d24e55f6a6a2", 340 "spec/fixtures/test/manifests/ipv6.pp": "4764f683b6013556e20d8669b21b5bdc", 341 "spec/fixtures/test/manifests/numeric.pp": "bffd26d7c0bb53628369f42c14b342cb", 342 "spec/fixtures/test/manifests/string.pp": "27b69c1eb36250bfbd474a0ef9ba847b", 343 "spec/fixtures/test/manifests/unixpath.pp": "fd062024efdf731e19026901d3fcc075", 344 "spec/fixtures/test/manifests/windowspath.pp": "7f942ec8f883a3ac0fcaf960ea24b7d8", 277 345 "spec/functions/abs_spec.rb": "7c0ebbd787b788d32b9bb21fe9061a2f", 278 "spec/functions/any2array_spec.rb": "c5990164adbaaf4f6536df4022309176", 279 "spec/functions/assert_private_spec.rb": "3bf58bd53467248cc221b9f846b13d98", 346 "spec/functions/any2array_spec.rb": "22b7ce032a34d02b6858360025eb7644", 347 "spec/functions/any2bool_spec.rb": "d090dde9be26601a38980e8f77fa5970", 348 "spec/functions/assert_private_spec.rb": "a7e79ac7a1b28610a0e57e38e913c9fa", 280 349 "spec/functions/base64_spec.rb": "fa279d9a4f3060ee3f467e35b050d528", 281 "spec/functions/basename_spec.rb": " 84a6567266725376d7ab518ab7dc5fe8",350 "spec/functions/basename_spec.rb": "4aec9efc4fc6ed35de82d93b34dc0fab", 282 351 "spec/functions/bool2num_spec.rb": "6609136ff067b90d41cf27bf8838c3ea", 283 352 "spec/functions/bool2str_spec.rb": "52560617234393f960aedb496b49a628", … … 285 354 "spec/functions/capitalize_spec.rb": "31a8d497b274653d5ede70a0187d4053", 286 355 "spec/functions/ceiling_spec.rb": "47bd74569f8979d9195df06a863de93b", 287 "spec/functions/chomp_spec.rb": " 6749a0b358b34e73843e1a284cead44a",288 "spec/functions/chop_spec.rb": " 6e33e61f50459191387c87e474d3d127",356 "spec/functions/chomp_spec.rb": "8be3a83a34945dcaa6e8e193cf2751e4", 357 "spec/functions/chop_spec.rb": "8e1f661e93dd87b8bbeebe293fe16612", 289 358 "spec/functions/clamp_spec.rb": "65dab1e9aceb2cb4e41ef9c0c65a7ba3", 290 "spec/functions/concat_spec.rb": " d217a63169e819e1ae2445083c248aa6",359 "spec/functions/concat_spec.rb": "4161a254ff4c21497e61a62ce84dafe8", 291 360 "spec/functions/convert_base_spec.rb": "f031e84b18cb010bc6233be3e4bcff83", 292 "spec/functions/count_spec.rb": "d91a084665ecd902586d26c99d45beed", 293 "spec/functions/deep_merge_spec.rb": "d70a71c7e9363c75224fffd40fc5efdd", 294 "spec/functions/defined_with_params_spec.rb": "9185955113fd14a7b2fbaa0228669d00", 295 "spec/functions/delete_at_spec.rb": "a5443ac5879992af9c4470e59f0355cf", 296 "spec/functions/delete_spec.rb": "2352787d3a93bf863bd6db186d4bcf4f", 297 "spec/functions/delete_undef_values_spec.rb": "6bee6b89a507130a009a9e8b5ef3e130", 298 "spec/functions/delete_values_spec.rb": "0d2d17c0cacd7f3871ea7ab2f5b96d93", 299 "spec/functions/difference_spec.rb": "2caaab5edb42ddc426e65348b12ebcc3", 300 "spec/functions/dig_spec.rb": "60ef76a16c557e7580cd8747c3476f1e", 301 "spec/functions/dirname_spec.rb": "5c905655d551b1956b6c9eda4ee96569", 302 "spec/functions/dos2unix_spec.rb": "95c13597be9e67e79e69ed0e6c3d325a", 361 "spec/functions/count_spec.rb": "14ab4e4b10fe33d69d0662357cd4bf8b", 362 "spec/functions/deep_merge_spec.rb": "5a4e826aaa0a0c0e4247b72e03bdfbd1", 363 "spec/functions/defined_with_params_spec.rb": "c592e82de04ab45222b36478ee7040e6", 364 "spec/functions/delete_at_spec.rb": "188a3143799bd5cf121982883c7dc1c8", 365 "spec/functions/delete_regex_spec.rb": "c049a3926aded4b6a804f1c824c57d2f", 366 "spec/functions/delete_spec.rb": "d7c589404fdc3a6b65da7ecf1f7e0b02", 367 "spec/functions/delete_undef_values_spec.rb": "a2c138145333e1873ee4bf23d091f86a", 368 "spec/functions/delete_values_spec.rb": "e20b68a589002f1e2b52873d3dbcfb49", 369 "spec/functions/deprecation_spec.rb": "f5d7355b687eaaa15c20fdb214671c2a", 370 "spec/functions/difference_spec.rb": "66ba399c0bace1a131ecdb365e0afd4e", 371 "spec/functions/dig44_spec.rb": "89631bb7282f7d3c9b75d79f48446c65", 372 "spec/functions/dig_spec.rb": "61708160da38852c3c78bc8563e0fcb2", 373 "spec/functions/dirname_spec.rb": "e80baeab6a166284f5069263fb5e37b7", 374 "spec/functions/dos2unix_spec.rb": "d0cfe5fe19d2bf33320e6f47789826c6", 303 375 "spec/functions/downcase_spec.rb": "e2c24d41c6fb840f7b66c5205c942780", 304 376 "spec/functions/empty_spec.rb": "e6d06c193869ce8c97d3e67d5c5c5b4f", 305 "spec/functions/ensure_packages_spec.rb": " 76e89bf81ae98e52d2a07263c0e8d4f4",306 "spec/functions/ensure_resource_spec.rb": " 57634d7b6f86ac77dc47fb5da36410c2",307 "spec/functions/flatten_spec.rb": " 6fb563c36daf40599a414c1f3af8dc0b",377 "spec/functions/ensure_packages_spec.rb": "cb741ab1e99e7ad9057eea258730cd19", 378 "spec/functions/ensure_resource_spec.rb": "e1ebbf9475781d86b58541a5846eda0b", 379 "spec/functions/flatten_spec.rb": "5d59251fa8da0e4c8a376a513a25bc7a", 308 380 "spec/functions/floor_spec.rb": "7d110b1f994432e1c6c7c004a3dedbe4", 309 "spec/functions/fqdn_rand_string_spec.rb": "2edaae1764df4d751684d8ceda7b9cda", 310 "spec/functions/fqdn_rotate_spec.rb": "e9b1ce122788f18611cf64696d666328", 381 "spec/functions/fqdn_rand_string_spec.rb": "950a33e5ad8056fbfe564ec7e3b9a583", 382 "spec/functions/fqdn_rotate_spec.rb": "83f00ce0c48dec632e1aaa8192bb51cf", 383 "spec/functions/fqdn_uuid_spec.rb": "1b2980fcbecc4b51bdc6de01e9b001b7", 311 384 "spec/functions/get_module_path_spec.rb": "ef22bd80ce5dedb069830d5aa10572c1", 312 "spec/functions/getparam_spec.rb": "dbbdde0a72653feb479e9fb971b94ec7", 313 "spec/functions/getvar_spec.rb": "18a9340442dd59cea8a6c98e95d38f4d", 314 "spec/functions/grep_spec.rb": "b9d0722e7708351b0114c46d4272f760", 385 "spec/functions/getparam_spec.rb": "359d7c9349ec0e5666bb38e2d9224621", 386 "spec/functions/getvar_spec.rb": "3c7884e012bdb596df3d0640533dab96", 387 "spec/functions/glob_spec.rb": "98e054f995a0d38002d9373b5e6acbc0", 388 "spec/functions/grep_spec.rb": "0e917284860c5f96fdf56301012ba199", 315 389 "spec/functions/has_interface_with_spec.rb": "473c000e461c3497f8461eb17cf73430", 316 390 "spec/functions/has_ip_address_spec.rb": "7b36b993ea32757e74be9909906bd165", 317 "spec/functions/has_ip_network_spec.rb": " 23021acd604dc4ca3a1fef62e8863d8e",318 "spec/functions/has_key_spec.rb": " 6bc81bc7d179d4b680e7065a60b76562",319 "spec/functions/hash_spec.rb": " 4519b75eeb8eb0bba80b4594c297cf5e",320 "spec/functions/intersection_spec.rb": " fcd475963335b3efee99c3ddd0ddd969",321 "spec/functions/is_a_spec.rb": " 51b1f473786fbd1d723febf20281de23",322 "spec/functions/is_array_spec.rb": " 7ea00635b395f231fce6467c95410b05",323 "spec/functions/is_bool_spec.rb": " 9173b8fd7cb5aea4504f0fa860d883c9",391 "spec/functions/has_ip_network_spec.rb": "7086a27623ba91c5ff069397a32172c4", 392 "spec/functions/has_key_spec.rb": "eaa046db8632d6f76893e4b9df7b3e31", 393 "spec/functions/hash_spec.rb": "53a059e13781fac6b4f8eb660655d58f", 394 "spec/functions/intersection_spec.rb": "e906cb8ceb39b644b4b338adcd4dda26", 395 "spec/functions/is_a_spec.rb": "7d6322426d629e5302c52455d9c4cd55", 396 "spec/functions/is_array_spec.rb": "26d7eab025f333d2c4a8baf89ef4e36e", 397 "spec/functions/is_bool_spec.rb": "40569a4cdb50af0cc21ad749ac18e6ef", 324 398 "spec/functions/is_domain_name_spec.rb": "4ea3825d5b77a5d75eab8228dcc738f9", 325 399 "spec/functions/is_email_address_spec.rb": "699c4573dfd00db8993a18afc0eaf875", 326 "spec/functions/is_float_spec.rb": " 42b7f071e02af58e3154643b84445af1",400 "spec/functions/is_float_spec.rb": "8aedd9e622cd1b861d99523532dc4fc1", 327 401 "spec/functions/is_function_available.rb": "f8ab234d536532c3629ff6a5068e7877", 328 402 "spec/functions/is_hash_spec.rb": "11563529f0f1f821769edb3131277100", 329 "spec/functions/is_integer_spec.rb": "799bef092df12fa590e71473db957d11", 330 "spec/functions/is_ip_address_spec.rb": "195e89d0c32eae24e4a51d12b8c59009", 331 "spec/functions/is_mac_address_spec.rb": "748b7e3dffae6d4097da9cc29a37e94d", 332 "spec/functions/is_numeric_spec.rb": "d131e94cf670075e8c46576b5109c2b6", 333 "spec/functions/is_string_spec.rb": "f41f332f93fc05b57ee9611cdbe73c11", 334 "spec/functions/join_keys_to_values_spec.rb": "b95f8f32888a96c4239c87cf9785d288", 335 "spec/functions/join_spec.rb": "2181956bf08efe90f932a17e5138a25c", 336 "spec/functions/keys_spec.rb": "8a6772daf2ae821e98d392f5266fdf67", 337 "spec/functions/load_module_metadata_spec.rb": "bcc48736e28992853c4f6b16d397daed", 338 "spec/functions/loadyaml_spec.rb": "f4f50af8016ffd187a0358b78634a259", 339 "spec/functions/lstrip_spec.rb": "58644ca945b38ec8b3d8729423aacf69", 403 "spec/functions/is_integer_spec.rb": "21a139f9a87b1561bfec60de26c435a2", 404 "spec/functions/is_ip_address_spec.rb": "04a15328803bb47ae431eff63aa555df", 405 "spec/functions/is_ipv4_address_spec.rb": "339b8c79925bb70c0de19468d58ab64a", 406 "spec/functions/is_ipv6_address_spec.rb": "9743a0f2bfda70ace128d2f476a208b9", 407 "spec/functions/is_mac_address_spec.rb": "532b8c4c63b37849e7fb9122d163ae3a", 408 "spec/functions/is_numeric_spec.rb": "cb846f44e8f6d79161686d7b3729967c", 409 "spec/functions/is_string_spec.rb": "56f34694781dfcf774e43bca06057fec", 410 "spec/functions/join_keys_to_values_spec.rb": "f99dff6550fdb7c245ed4dcaca0a16a3", 411 "spec/functions/join_spec.rb": "e190fbce526b3f4f7bb8aac029338ece", 412 "spec/functions/keys_spec.rb": "fba0bfa928b5684d5c918d6c06edd06d", 413 "spec/functions/length.rb": "c07a267ccccc4b4edbbfad155dc21475", 414 "spec/functions/load_module_metadata_spec.rb": "431fbe84d627a5c4398f432caaec96f8", 415 "spec/functions/loadjson_spec.rb": "76cbe175c90a596892b799d8e4d599e5", 416 "spec/functions/loadyaml_spec.rb": "60e283bc07adc67bc2c934424bf01b8d", 417 "spec/functions/lstrip_spec.rb": "892229ce8657490c72fc860fb0dda1b6", 340 418 "spec/functions/max_spec.rb": "47de8d59070d8d51b2184731f5d1aa43", 341 "spec/functions/member_spec.rb": " 02891f40caaca15a5aba43443c7d2ccb",419 "spec/functions/member_spec.rb": "6a988e6368c1ce090b47fe41efbc041c", 342 420 "spec/functions/merge_spec.rb": "56297527d192640bbe82c7ccf1e39815", 343 421 "spec/functions/min_spec.rb": "8b38e2a989912406cd2c57dcd3a460c4", 344 422 "spec/functions/num2bool_spec.rb": "7c4fd30e41a11b1bd0d9e5233340f16b", 345 "spec/functions/parsejson_spec.rb": " 656300186e986725982595c262f7eccd",346 "spec/functions/parseyaml_spec.rb": " 67b3be346368a2070535585a51bcd7c2",347 "spec/functions/pick_default_spec.rb": " bef7bb2f755e665775aa0085c6897fb2",348 "spec/functions/pick_spec.rb": " 8fe02695ea909e993119254accc61f1a",349 "spec/functions/prefix_spec.rb": " 95956321291a0f6d1e2f45572569fe3b",423 "spec/functions/parsejson_spec.rb": "958db1dde2f2244f458c399e0c3231e0", 424 "spec/functions/parseyaml_spec.rb": "19a2add90ca08d5a17c4e3aff89fe3c0", 425 "spec/functions/pick_default_spec.rb": "ab9ef2e9111cfd2709313e0e3c3befa2", 426 "spec/functions/pick_spec.rb": "786044a71e3bd673212949c12f37b10f", 427 "spec/functions/prefix_spec.rb": "2402d2ad5108050bb5c20b3ea58b64be", 350 428 "spec/functions/private_spec.rb": "f404771c4590a0cd7ce61ddff8f3eb7b", 351 429 "spec/functions/pw_hash_spec.rb": "640609cc73b4c8bbcdfc88c3e9797664", 352 "spec/functions/range_spec.rb": "e73c3bb7f2c25540780c3bad19b30994", 353 "spec/functions/reject_spec.rb": "e0eb0546885dd0aef023dfa4694155db", 354 "spec/functions/reverse_spec.rb": "cb48f198c2a9efe224a00d67e68d978f", 355 "spec/functions/rstrip_spec.rb": "f0391a775d335e2a5c9335d50c657f4b", 356 "spec/functions/seeded_rand_spec.rb": "d7d80c3458706e83a8087e17c8a7b6ab", 357 "spec/functions/shuffle_spec.rb": "6ab6083720cfd4dfa99556e5ef81f576", 358 "spec/functions/size_spec.rb": "51495c464a203d9e1919008209f05cd5", 430 "spec/functions/range_spec.rb": "d3af56cc8a137059423f8738e343ccff", 431 "spec/functions/regexpescape_spec.rb": "ce027e1b99674f39de8ddffcfed8396e", 432 "spec/functions/reject_spec.rb": "8ecbca64a9817ebef76be96dcf6cdeeb", 433 "spec/functions/reverse_spec.rb": "e40754fd34e96ac206308958504ae315", 434 "spec/functions/rstrip_spec.rb": "748f4587c12b5a590b985f111e282a8d", 435 "spec/functions/seeded_rand_spec.rb": "eb56445d10962d81ed935b53826da349", 436 "spec/functions/shell_escape_spec.rb": "bf108573c041f0c228f6d47d367d0aa3", 437 "spec/functions/shell_join_spec.rb": "92f31bd98d6e8e30e5f758f50bcb8a75", 438 "spec/functions/shell_split_spec.rb": "430f58733cc7855e56bfc918971b3fc1", 439 "spec/functions/shuffle_spec.rb": "be5d43184f2ca42db4f452085a4730fd", 440 "spec/functions/size_spec.rb": "f5e35878331bb12d9639522e38cc81c8", 359 441 "spec/functions/sort_spec.rb": "d9533dd37c6263b92895f7eba8485248", 360 "spec/functions/squeeze_spec.rb": " 549af334b7f9dd5f06d6b45c3e3e8303",442 "spec/functions/squeeze_spec.rb": "ffcf3b44cbdd45e14eb1173d2b7d1d99", 361 443 "spec/functions/str2bool_spec.rb": "607b25fb0badd0da5acb86c63437c8be", 362 444 "spec/functions/str2saltedsha512_spec.rb": "07586b0026757cd39229c12c7221808b", 363 445 "spec/functions/strftime_spec.rb": "f1a34fc930940213abfba3095d5d8065", 364 "spec/functions/strip_spec.rb": "0 cb8537f2e7df14f42247349ab3161a6",365 "spec/functions/suffix_spec.rb": " 65172f6879c902802230f718ea9df7da",446 "spec/functions/strip_spec.rb": "023132b8bd0820da254f74c6fe31bb80", 447 "spec/functions/suffix_spec.rb": "dfe26a61bf0185291b6ae868e9d0de20", 366 448 "spec/functions/swapcase_spec.rb": "90bace1b004aa63d46eb6481c6dce2b1", 367 449 "spec/functions/time_spec.rb": "6dc8f5b42cf89345d2de424bfe19be90", … … 371 453 "spec/functions/type_of_spec.rb": "83755d9390b9c00e086a007edff7fd9b", 372 454 "spec/functions/type_spec.rb": "7a61b4af7d3d83be590d783a7e5e80f8", 373 "spec/functions/union_spec.rb": " 089b03e9a6ef25cdcf68157bb986d8a8",374 "spec/functions/unique_spec.rb": " b793c531b4d227ae55d05a187b706fb8",455 "spec/functions/union_spec.rb": "a290a38e443b856a476d14d4b1dc72fb", 456 "spec/functions/unique_spec.rb": "97fbcc73a0e0d82e23c723837627c712", 375 457 "spec/functions/unix2dos_spec.rb": "628c8a0c608d1fa0dd09bd1b5af97c1f", 376 458 "spec/functions/upcase_spec.rb": "4f0461a20c03d618f0c18da39bebcf65", 377 459 "spec/functions/uriescape_spec.rb": "1458afbe7e7e11dcaad8d295a7f2be59", 378 "spec/functions/validate_absolute_path_spec.rb": " 26e00ce6122016b9b53797806e681682",379 "spec/functions/validate_array_spec.rb": " df0bcf372b3efdd1f4de16b508987616",460 "spec/functions/validate_absolute_path_spec.rb": "5adbf0a0ac8b23e86195deaf3e4bd371", 461 "spec/functions/validate_array_spec.rb": "3aa76f3731754c637acc94b59c79efb0", 380 462 "spec/functions/validate_augeas_spec.rb": "d598e89a23912be9f24d39b809f30b47", 381 "spec/functions/validate_bool_spec.rb": " 93cfbecbe8cc4707ada13f48f5c8c8a6",382 "spec/functions/validate_cmd_spec.rb": " 05eb581532fc689ff91212413b2e678d",463 "spec/functions/validate_bool_spec.rb": "d1b43cd294d0588ac6d67d5d3c77a42a", 464 "spec/functions/validate_cmd_spec.rb": "34a4e623ab0ce7d4c218a837f896c1ea", 383 465 "spec/functions/validate_email_address_spec.rb": "1296f9934d102258091379ee07f9a2a8", 384 "spec/functions/validate_hash_spec.rb": "56f4b7e42a4d3f62172982fa639f5cc3", 385 "spec/functions/validate_integer_spec.rb": "0a2677479c8bf0257bdd54c3d0db1f81", 386 "spec/functions/validate_ip_address_spec.rb": "e4ba65ff0c87b28b29f05e1637b7e700", 387 "spec/functions/validate_ipv4_address_spec.rb": "dc1af709faa724ccc51d9c5aba1d6356", 388 "spec/functions/validate_ipv6_address_spec.rb": "5f27c395b286385c489df5ee119580bc", 389 "spec/functions/validate_numeric_spec.rb": "dd5fcc7421002c85252d0a9421a5a99b", 390 "spec/functions/validate_re_spec.rb": "430e57fd80d3f29f4ba8be62c5463e62", 391 "spec/functions/validate_slength_spec.rb": "92252419e0d311a7bd6b426edb3c1040", 392 "spec/functions/validate_string_spec.rb": "779473e87660081e610c397f0157331a", 466 "spec/functions/validate_hash_spec.rb": "0b3ac3f7262f13ef14e3df937c8d104c", 467 "spec/functions/validate_integer_spec.rb": "ec55ab34e3ec4f09722349cd6aac77a6", 468 "spec/functions/validate_ip_address_spec.rb": "ba8c92e30f1af9e6839a2901e002c3f3", 469 "spec/functions/validate_ipv4_address_spec.rb": "d5d956651629f95ea531ac03b71e247b", 470 "spec/functions/validate_ipv6_address_spec.rb": "7ee0d6097666558d8627de424c26ef75", 471 "spec/functions/validate_legacy_spec.rb": "a1a3af70e71d0a6b848d75c518949b3b", 472 "spec/functions/validate_numeric_spec.rb": "c2f01b9c9aeae75683563ef7d3951bbb", 473 "spec/functions/validate_re_spec.rb": "27bcf99cd815b755548cd3979753b2f3", 474 "spec/functions/validate_slength_spec.rb": "c292023b2e61298499ff1f791fc03005", 475 "spec/functions/validate_string_spec.rb": "bc6735359ada0b3ccf69f515231e3808", 393 476 "spec/functions/validate_x509_rsa_key_pair_spec.rb": "24810bdb8ac473ae1168f1b2c5708170", 394 "spec/functions/values_at_spec.rb": " c318f66de43f8e6095d28f733f55ec5d",395 "spec/functions/values_spec.rb": " 5550da71a69514f8be87a12b575d5228",396 "spec/functions/zip_spec.rb": " 4c991f26985096b3e8b336cef528aa00",477 "spec/functions/values_at_spec.rb": "866ba43a4b606f6e9e72ac91c07408bd", 478 "spec/functions/values_spec.rb": "6b8f39665cb8fdb03658d838e50b55b0", 479 "spec/functions/zip_spec.rb": "986defd43a001ff28fe7c90b0366812e", 397 480 "spec/monkey_patches/alias_should_to_must.rb": "b19ee31563afb91a72f9869f9d7362ff", 398 481 "spec/monkey_patches/publicize_methods.rb": "c690e444b77c871375d321e413e28ca1", 399 482 "spec/spec_helper.rb": "b2db3bc02b4ac2fd5142a6621c641b07", 400 "spec/spec_helper_acceptance.rb": "4da340042246df9b9e3dc221a5807528", 401 "spec/spec_helper_local.rb": "845be3a017611728b73e73af427f7431", 483 "spec/spec_helper_acceptance.rb": "cd589056b52031da19d9c31ed86ea922", 484 "spec/spec_helper_local.rb": "1e3ad3c06a11cbcb813dc1d31973cbda", 485 "spec/support/shared_data.rb": "9758f8ba2958965d287387a2513dac73", 486 "spec/unit/ensure_resources_spec.rb": "30cad259a3cc6c73f90209804183c818", 402 487 "spec/unit/facter/facter_dot_d_spec.rb": "420339a544851f2c7ee6fa4c651bdce8", 403 488 "spec/unit/facter/package_provider_spec.rb": "3a6ba799822fbcabc9adab5880260b7a", … … 408 493 "spec/unit/puppet/parser/functions/enclose_ipv6_spec.rb": "0145a78254ea716e5e7600d9464318a8", 409 494 "spec/unit/puppet/parser/functions/is_absolute_path_spec.rb": "52f8d3b9011fb1fd8a2a429fe8b2ae08", 410 "spec/unit/puppet/provider/file_line/ruby_spec.rb": " e70f3093b17aeccef198b52901ab2f94",495 "spec/unit/puppet/provider/file_line/ruby_spec.rb": "d269e18953fc297786a8393b20842abc", 411 496 "spec/unit/puppet/type/anchor_spec.rb": "06a669dffa44d716bf19b4e7f5f1d75d", 412 "spec/unit/puppet/type/file_line_spec.rb": "af824724caf0071d84464042490a6f88" 497 "spec/unit/puppet/type/file_line_spec.rb": "83e11166de4abe69cdf0dc7450e79778", 498 "types/absolutepath.pp": "3ae6f48dd95835df87c5dacea13c88d2", 499 "types/compat/absolute_path.pp": "6d0e102d1098d85d97c8f13051cb2c10", 500 "types/compat/array.pp": "43c41022dd743d55c8e9e82ce3ed741c", 501 "types/compat/bool.pp": "6e0cd7b2a7e1b9efaa0e273937211e58", 502 "types/compat/float.pp": "fd134a0e0e1abd420cec2107780a7afa", 503 "types/compat/hash.pp": "3535d98f0f3eaec44d443190f258e9ba", 504 "types/compat/integer.pp": "e85a20e42b3afaf5ec0718a8d9f9c5e3", 505 "types/compat/ip_address.pp": "d42c7435de30a469a71b69c45d642da7", 506 "types/compat/ipv4.pp": "c84eb3764f45b256a09be68afe61b749", 507 "types/compat/ipv6.pp": "d3c0fada5425d576aeca14ddbee78653", 508 "types/compat/numeric.pp": "f864539d78e95dabf0bab361b4ccc042", 509 "types/compat/re.pp": "70b05d4697e61f9af0c212ba063f395d", 510 "types/compat/string.pp": "b9a179664c85e121aa0277021627d126", 511 "types/httpsurl.pp": "108225d0273e17d541b239882287ed15", 512 "types/httpurl.pp": "4ba64825b11af75997c59b5acf07c62d", 513 "types/unixpath.pp": "5fc80523e7f474dd84056c44fafd9544", 514 "types/windowspath.pp": "4c1eda331ecb43de98c29ed22d0ad448" 413 515 } -
src/puppetcode/environments/gnuboat/modules/stdlib/examples/file_line.pp
reb1ccd6 rbe0859f 3 3 file { '/tmp/dansfile': 4 4 ensure => file, 5 } ->6 file_line { 'dans_line':5 } 6 -> file_line { 'dans_line': 7 7 line => 'dan is awesome', 8 8 path => '/tmp/dansfile', -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/functions/type_of.rb
reb1ccd6 rbe0859f 11 11 # See the `assert_type()` function for flexible ways to assert the type of a value. 12 12 # 13 # The built-in type() function in puppet is generally preferred over this function 14 # this function is provided for backwards compatibility. 13 15 Puppet::Functions.create_function(:type_of) do 14 16 def type_of(value) -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/abs.rb
reb1ccd6 rbe0859f 10 10 ) do |arguments| 11 11 12 raise(Puppet::ParseError, "abs(): Wrong number of arguments " + 13 "given (#{arguments.size} for 1)") if arguments.size < 1 12 raise(Puppet::ParseError, "abs(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 14 13 15 14 value = arguments[0] … … 22 21 value = value.to_i 23 22 else 24 raise(Puppet::ParseError, 'abs(): Requires float or ' + 25 'integer to work with') 23 raise(Puppet::ParseError, 'abs(): Requires float or integer to work with') 26 24 end 27 25 end -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/assert_private.rb
reb1ccd6 rbe0859f 10 10 ) do |args| 11 11 12 raise(Puppet::ParseError, "assert_private(): Wrong number of arguments "+ 13 "given (#{args.size}}) for 0 or 1)") if args.size > 1 12 raise(Puppet::ParseError, "assert_private(): Wrong number of arguments given (#{args.size}}) for 0 or 1)") if args.size > 1 14 13 15 14 scope = self -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/base64.rb
reb1ccd6 rbe0859f 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 1 4 module Puppet::Parser::Functions 2 5 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/bool2num.rb
reb1ccd6 rbe0859f 12 12 ) do |arguments| 13 13 14 raise(Puppet::ParseError, "bool2num(): Wrong number of arguments " + 15 "given (#{arguments.size} for 1)") if arguments.size < 1 14 raise(Puppet::ParseError, "bool2num(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 16 15 17 16 value = function_str2bool([arguments[0]]) -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/bool2str.rb
reb1ccd6 rbe0859f 21 21 22 22 unless arguments.size == 1 or arguments.size == 3 23 raise(Puppet::ParseError, "bool2str(): Wrong number of arguments " + 24 "given (#{arguments.size} for 3)") 23 raise(Puppet::ParseError, "bool2str(): Wrong number of arguments given (#{arguments.size} for 3)") 25 24 end 26 25 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/camelcase.rb
reb1ccd6 rbe0859f 1 1 # 2 2 # 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. 3 4 # 4 5 … … 9 10 ) do |arguments| 10 11 11 raise(Puppet::ParseError, "camelcase(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 12 raise(Puppet::ParseError, "camelcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 13 14 14 value = arguments[0] … … 16 16 17 17 unless [Array, String].include?(klass) 18 raise(Puppet::ParseError, 'camelcase(): Requires either ' + 19 'array or string to work with') 18 raise(Puppet::ParseError, 'camelcase(): Requires either array or string to work with') 20 19 end 21 20 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/capitalize.rb
reb1ccd6 rbe0859f 1 1 # 2 2 # 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. 3 4 # 4 5 … … 10 11 ) do |arguments| 11 12 12 raise(Puppet::ParseError, "capitalize(): Wrong number of arguments " + 13 "given (#{arguments.size} for 1)") if arguments.size < 1 13 raise(Puppet::ParseError, "capitalize(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 14 14 15 15 value = arguments[0] 16 16 17 17 unless value.is_a?(Array) || value.is_a?(String) 18 raise(Puppet::ParseError, 'capitalize(): Requires either ' + 19 'array or string to work with') 18 raise(Puppet::ParseError, 'capitalize(): Requires either array or string to work with') 20 19 end 21 20 … … 30 29 end 31 30 end 32 33 # vim: set ts=2 sw=2 et : -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ceiling.rb
reb1ccd6 rbe0859f 6 6 ) do |arguments| 7 7 8 raise(Puppet::ParseError, "ceiling(): Wrong number of arguments " + 9 "given (#{arguments.size} for 1)") if arguments.size != 1 8 raise(Puppet::ParseError, "ceiling(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 10 9 11 10 begin 12 11 arg = Float(arguments[0]) 13 12 rescue TypeError, ArgumentError => e 14 raise(Puppet::ParseError, "ceiling(): Wrong argument type " + 15 "given (#{arguments[0]} for Numeric)") 13 raise(Puppet::ParseError, "ceiling(): Wrong argument type given (#{arguments[0]} for Numeric)") 16 14 end 17 15 18 raise(Puppet::ParseError, "ceiling(): Wrong argument type " + 19 "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false 16 raise(Puppet::ParseError, "ceiling(): Wrong argument type given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false 20 17 21 18 arg.ceil -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/chomp.rb
reb1ccd6 rbe0859f 11 11 ) do |arguments| 12 12 13 raise(Puppet::ParseError, "chomp(): Wrong number of arguments " + 14 "given (#{arguments.size} for 1)") if arguments.size < 1 13 raise(Puppet::ParseError, "chomp(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 15 14 16 15 value = arguments[0] 17 16 18 17 unless value.is_a?(Array) || value.is_a?(String) 19 raise(Puppet::ParseError, 'chomp(): Requires either ' + 20 'array or string to work with') 18 raise(Puppet::ParseError, 'chomp(): Requires either array or string to work with') 21 19 end 22 20 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/chop.rb
reb1ccd6 rbe0859f 13 13 ) do |arguments| 14 14 15 raise(Puppet::ParseError, "chop(): Wrong number of arguments " + 16 "given (#{arguments.size} for 1)") if arguments.size < 1 15 raise(Puppet::ParseError, "chop(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 17 16 18 17 value = arguments[0] 19 18 20 19 unless value.is_a?(Array) || value.is_a?(String) 21 raise(Puppet::ParseError, 'chop(): Requires either an ' + 22 'array or string to work with') 20 raise(Puppet::ParseError, 'chop(): Requires either an array or string to work with') 23 21 end 24 22 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/clamp.rb
reb1ccd6 rbe0859f 11 11 args.flatten! 12 12 13 raise(Puppet::ParseError, 'clamp(): Wrong number of arguments, ' + 14 'need three to clamp') if args.size != 3 13 raise(Puppet::ParseError, 'clamp(): Wrong number of arguments, need three to clamp') if args.size != 3 15 14 16 15 # check values out -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/concat.rb
reb1ccd6 rbe0859f 18 18 19 19 # Check that more than 2 arguments have been given ... 20 raise(Puppet::ParseError, "concat(): Wrong number of arguments " + 21 "given (#{arguments.size} for < 2)") if arguments.size < 2 20 raise(Puppet::ParseError, "concat(): Wrong number of arguments given (#{arguments.size} for < 2)") if arguments.size < 2 22 21 23 22 a = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/count.rb
reb1ccd6 rbe0859f 8 8 9 9 if (args.size > 2) then 10 raise(ArgumentError, "count(): Wrong number of arguments "+ 11 "given #{args.size} for 1 or 2.") 10 raise(ArgumentError, "count(): Wrong number of arguments given #{args.size} for 1 or 2.") 12 11 end 13 12 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb
reb1ccd6 rbe0859f 25 25 end 26 26 ret = false 27 if resource = findresource(reference.to_s) 27 28 if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0 29 # Workaround for PE-20308 30 if reference.is_a?(String) 31 type_name, title = Puppet::Resource.type_and_title(reference, nil) 32 type = Puppet::Pops::Evaluator::Runtime3ResourceSupport.find_resource_type_or_class(find_global_scope, type_name.downcase) 33 elsif reference.is_a?(Puppet::Resource) 34 type = reference.resource_type 35 title = reference.title 36 else 37 raise(ArgumentError, "Reference is not understood: '#{reference.class}'") 38 end 39 #end workaround 40 else 41 type = reference.to_s 42 title = nil 43 end 44 45 if resource = findresource(type, title) 28 46 matches = params.collect do |key, value| 29 resource[key] == value 47 # eql? avoids bugs caused by monkeypatching in puppet 48 resource_is_undef = resource[key].eql?(:undef) || resource[key].nil? 49 value_is_undef = value.eql?(:undef) || value.nil? 50 (resource_is_undef && value_is_undef) || (resource[key] == value) 30 51 end 31 52 ret = params.empty? || !matches.include?(false) -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete.rb
reb1ccd6 rbe0859f 2 2 # delete.rb 3 3 # 4 5 # TODO(Krzysztof Wilczynski): We need to add support for regular expression ...6 4 7 5 module Puppet::Parser::Functions … … 26 24 ) do |arguments| 27 25 28 if (arguments.size != 2) then 29 raise(Puppet::ParseError, "delete(): Wrong number of arguments "+ 30 "given #{arguments.size} for 2.") 31 end 26 raise(Puppet::ParseError, "delete(): Wrong number of arguments given #{arguments.size} for 2") unless arguments.size == 2 32 27 33 28 collection = arguments[0].dup … … 39 34 collection.gsub! item, '' 40 35 else 41 raise(TypeError, "delete(): First argument must be an Array, " + 42 "String, or Hash. Given an argument of class #{collection.class}.") 36 raise(TypeError, "delete(): First argument must be an Array, String, or Hash. Given an argument of class #{collection.class}.") 43 37 end 44 38 end -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete_at.rb
reb1ccd6 rbe0859f 15 15 ) do |arguments| 16 16 17 raise(Puppet::ParseError, "delete_at(): Wrong number of arguments " + 18 "given (#{arguments.size} for 2)") if arguments.size < 2 17 raise(Puppet::ParseError, "delete_at(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2 19 18 20 19 array = arguments[0] … … 27 26 28 27 if index.is_a?(String) and not index.match(/^\d+$/) 29 raise(Puppet::ParseError, 'delete_at(): You must provide ' + 30 'non-negative numeric index') 28 raise(Puppet::ParseError, 'delete_at(): You must provide non-negative numeric index') 31 29 end 32 30 … … 37 35 38 36 if index > result.size - 1 # First element is at index 0 is it not? 39 raise(Puppet::ParseError, 'delete_at(): Given index ' + 40 'exceeds size of array given') 37 raise(Puppet::ParseError, 'delete_at(): Given index exceeds size of array given') 41 38 end 42 39 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb
reb1ccd6 rbe0859f 16 16 ) do |args| 17 17 18 raise(Puppet::ParseError, 19 "delete_undef_values(): Wrong number of arguments given " + 20 "(#{args.size})") if args.size < 1 18 raise(Puppet::ParseError, "delete_undef_values(): Wrong number of arguments given (#{args.size})") if args.size < 1 21 19 22 20 unless args[0].is_a? Array or args[0].is_a? Hash 23 raise(Puppet::ParseError, 24 "delete_undef_values(): expected an array or hash, got #{args[0]} type #{args[0].class} ") 21 raise(Puppet::ParseError, "delete_undef_values(): expected an array or hash, got #{args[0]} type #{args[0].class} ") 25 22 end 26 23 result = args[0].dup -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/delete_values.rb
reb1ccd6 rbe0859f 12 12 ) do |arguments| 13 13 14 raise(Puppet::ParseError, 15 "delete_values(): Wrong number of arguments given " + 16 "(#{arguments.size} of 2)") if arguments.size != 2 14 raise(Puppet::ParseError, "delete_values(): Wrong number of arguments given (#{arguments.size} of 2)") if arguments.size != 2 17 15 18 16 hash, item = arguments 19 17 20 18 if not hash.is_a?(Hash) 21 raise(TypeError, "delete_values(): First argument must be a Hash. " + \ 22 "Given an argument of class #{hash.class}.") 19 raise(TypeError, "delete_values(): First argument must be a Hash. Given an argument of class #{hash.class}.") 23 20 end 24 21 hash.dup.delete_if { |key, val| item == val } -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/difference.rb
reb1ccd6 rbe0859f 18 18 19 19 # Two arguments are required 20 raise(Puppet::ParseError, "difference(): Wrong number of arguments " + 21 "given (#{arguments.size} for 2)") if arguments.size != 2 20 raise(Puppet::ParseError, "difference(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size != 2 22 21 23 22 first = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/dig.rb
reb1ccd6 rbe0859f 5 5 module Puppet::Parser::Functions 6 6 newfunction(:dig, :type => :rvalue, :doc => <<-EOS 7 Looks up into a complex structure of arrays and hashes and returns nil 8 or the default value if nothing was found. 9 10 Path is an array of keys to be looked up in data argument. The function 11 will go down the structure and try to extract the required value. 12 13 $data = { 14 'a' => { 15 'b' => [ 16 'b1', 17 'b2', 18 'b3' ]}} 19 20 $value = dig($data, ['a', 'b', '2'], 'not_found') 21 => $value = 'b3' 22 23 a -> first hash key 24 b -> second hash key 25 2 -> array index starting with 0 26 27 not_found -> (optional) will be returned if there is no value or the path 28 did not match. Defaults to nil. 29 30 In addition to the required "path" argument, "dig" accepts default 31 argument. It will be returned if no value was found or a path component is 32 missing. And the fourth argument can set a variable path separator. 7 DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version. 33 8 EOS 34 ) do |arguments| 35 # Two arguments are required 36 raise(Puppet::ParseError, "dig(): Wrong number of arguments " + 37 "given (#{arguments.size} for at least 2)") if arguments.size < 2 38 39 data, path, default = *arguments 40 41 if !(data.is_a?(Hash) || data.is_a?(Array)) 42 raise(Puppet::ParseError, "dig(): first argument must be a hash or an array, " << 43 "given #{data.class.name}") 9 ) do |arguments| 10 warning("dig() DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version.") 11 if ! Puppet::Parser::Functions.autoloader.loaded?(:dig44) 12 Puppet::Parser::Functions.autoloader.load(:dig44) 44 13 end 45 46 unless path.is_a? Array 47 raise(Puppet::ParseError, "dig(): second argument must be an array, " << 48 "given #{path.class.name}") 49 end 50 51 value = path.reduce(data) { |h, k| (h.is_a?(Hash) || h.is_a?(Array)) ? h[k] : break } 52 value.nil? ? default : value 14 function_dig44(arguments) 53 15 end 54 16 end -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/downcase.rb
reb1ccd6 rbe0859f 1 1 # 2 2 # 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. 3 4 # 4 5 … … 9 10 ) do |arguments| 10 11 11 raise(Puppet::ParseError, "downcase(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 12 raise(Puppet::ParseError, "downcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 13 14 14 value = arguments[0] 15 15 16 16 unless value.is_a?(Array) || value.is_a?(String) 17 raise(Puppet::ParseError, 'downcase(): Requires either ' + 18 'array or string to work with') 17 raise(Puppet::ParseError, 'downcase(): Requires either array or string to work with') 19 18 end 20 19 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/empty.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "empty(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 raise(Puppet::ParseError, "empty(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 12 14 13 value = arguments[0] 15 14 16 15 unless value.is_a?(Array) || value.is_a?(Hash) || value.is_a?(String) || value.is_a?(Numeric) 17 raise(Puppet::ParseError, 'empty(): Requires either ' + 18 'array, hash, string or integer to work with') 16 raise(Puppet::ParseError, 'empty(): Requires either array, hash, string or integer to work with') 19 17 end 20 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/enclose_ipv6.rb
reb1ccd6 rbe0859f 17 17 18 18 if (arguments.size != 1) then 19 raise(Puppet::ParseError, "enclose_ipv6(): Wrong number of arguments "+ 20 "given #{arguments.size} for 1") 19 raise(Puppet::ParseError, "enclose_ipv6(): Wrong number of arguments given #{arguments.size} for 1") 21 20 end 22 21 unless arguments[0].is_a?(String) or arguments[0].is_a?(Array) then 23 raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument type "+ 24 "given #{arguments[0].class} expected String or Array") 22 raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument type given #{arguments[0].class} expected String or Array") 25 23 end 26 24 … … 33 31 ip = IPAddr.new(val) 34 32 rescue *rescuable_exceptions 35 raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument "+ 36 "given #{val} is not an ip address.") 33 raise(Puppet::ParseError, "enclose_ipv6(): Wrong argument given #{val} is not an ip address.") 37 34 end 38 35 val = "[#{ip.to_s}]" if ip.ipv6? -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb
reb1ccd6 rbe0859f 12 12 13 13 if arguments.size > 2 or arguments.size == 0 14 raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments " + 15 "given (#{arguments.size} for 1 or 2)") 16 elsif arguments.size == 2 and !arguments[1].is_a?(Hash) 14 raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments given (#{arguments.size} for 1 or 2)") 15 elsif arguments.size == 2 and !arguments[1].is_a?(Hash) 17 16 raise(Puppet::ParseError, 'ensure_packages(): Requires second argument to be a Hash') 18 17 end … … 26 25 27 26 Puppet::Parser::Functions.function(:ensure_resources) 28 function_ensure_resources(['package', Hash(arguments[0]), defaults ])27 function_ensure_resources(['package', arguments[0].dup, defaults ]) 29 28 else 30 29 packages = Array(arguments[0]) … … 38 37 Puppet::Parser::Functions.function(:ensure_resource) 39 38 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}]") 40 41 function_ensure_resource(['package', package_name, defaults ]) 42 end 41 43 } 42 44 end -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/ensure_resources.rb
reb1ccd6 rbe0859f 37 37 38 38 if title.is_a?(Hash) 39 resource_hash = Hash(title)39 resource_hash = title.dup 40 40 resources = resource_hash.keys 41 41 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/flatten.rb
reb1ccd6 rbe0859f 16 16 ) do |arguments| 17 17 18 raise(Puppet::ParseError, "flatten(): Wrong number of arguments " + 19 "given (#{arguments.size} for 1)") if arguments.size != 1 18 raise(Puppet::ParseError, "flatten(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 20 19 21 20 array = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/floor.rb
reb1ccd6 rbe0859f 6 6 ) do |arguments| 7 7 8 raise(Puppet::ParseError, "floor(): Wrong number of arguments " + 9 "given (#{arguments.size} for 1)") if arguments.size != 1 8 raise(Puppet::ParseError, "floor(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 10 9 11 10 begin 12 11 arg = Float(arguments[0]) 13 12 rescue TypeError, ArgumentError => e 14 raise(Puppet::ParseError, "floor(): Wrong argument type " + 15 "given (#{arguments[0]} for Numeric)") 13 raise(Puppet::ParseError, "floor(): Wrong argument type given (#{arguments[0]} for Numeric)") 16 14 end 17 15 18 raise(Puppet::ParseError, "floor(): Wrong argument type " + 19 "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false 16 raise(Puppet::ParseError, "floor(): Wrong argument type given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false 20 17 21 18 arg.floor -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb
reb1ccd6 rbe0859f 16 16 a SEED can be useful if you need more than one unrelated rotation.") do |args| 17 17 18 raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments " + 19 "given (#{args.size} for 1)") if args.size < 1 18 raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments given (#{args.size} for 1)") if args.size < 1 20 19 21 20 value = args.shift … … 23 22 24 23 unless value.is_a?(Array) || value.is_a?(String) 25 raise(Puppet::ParseError, 'fqdn_rotate(): Requires either ' + 26 'array or string to work with') 24 raise(Puppet::ParseError, 'fqdn_rotate(): Requires either array or string to work with') 27 25 end 28 26 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/getparam.rb
reb1ccd6 rbe0859f 29 29 30 30 if resource = findresource(reference.to_s) 31 return resource[param] if resource[param]31 return resource[param] unless resource[param].nil? 32 32 end 33 33 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/getvar.rb
reb1ccd6 rbe0859f 21 21 22 22 begin 23 result = nil 23 24 catch(:undefined_variable) do 24 self.lookupvar("#{args[0]}")25 result = self.lookupvar("#{args[0]}") 25 26 end 27 28 # avoid relying on incosistent behaviour around ruby return values from catch 29 result 26 30 rescue Puppet::ParseError # Eat the exception if strict_variables = true is set 27 31 end -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/grep.rb
reb1ccd6 rbe0859f 19 19 20 20 if (arguments.size != 2) then 21 raise(Puppet::ParseError, "grep(): Wrong number of arguments "+ 22 "given #{arguments.size} for 2") 21 raise(Puppet::ParseError, "grep(): Wrong number of arguments given #{arguments.size} for 2") 23 22 end 24 23 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb
reb1ccd6 rbe0859f 20 20 ) do |args| 21 21 22 raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments " + 23 "given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2 22 raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2 24 23 25 24 interfaces = lookupvar('interfaces') -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb
reb1ccd6 rbe0859f 12 12 ) do |args| 13 13 14 raise(Puppet::ParseError, "has_ip_address(): Wrong number of arguments " + 15 "given (#{args.size} for 1)") if args.size != 1 14 raise(Puppet::ParseError, "has_ip_address(): Wrong number of arguments given (#{args.size} for 1)") if args.size != 1 16 15 17 16 Puppet::Parser::Functions.autoloader.load(:has_interface_with) \ -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb
reb1ccd6 rbe0859f 12 12 ) do |args| 13 13 14 raise(Puppet::ParseError, "has_ip_network(): Wrong number of arguments " + 15 "given (#{args.size} for 1)") if args.size != 1 14 raise(Puppet::ParseError, "has_ip_network(): Wrong number of arguments given (#{args.size} for 1)") if args.size != 1 16 15 17 16 Puppet::Parser::Functions.autoloader.load(:has_interface_with) \ -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/hash.rb
reb1ccd6 rbe0859f 15 15 ) do |arguments| 16 16 17 raise(Puppet::ParseError, "hash(): Wrong number of arguments " + 18 "given (#{arguments.size} for 1)") if arguments.size < 1 17 raise(Puppet::ParseError, "hash(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 19 18 20 19 array = arguments[0] … … 31 30 result = Hash[*array] 32 31 rescue StandardError 33 raise(Puppet::ParseError, 'hash(): Unable to compute ' + 34 'hash from array given') 32 raise(Puppet::ParseError, 'hash(): Unable to compute hash from array given') 35 33 end 36 34 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/intersection.rb
reb1ccd6 rbe0859f 16 16 17 17 # Two arguments are required 18 raise(Puppet::ParseError, "intersection(): Wrong number of arguments " + 19 "given (#{arguments.size} for 2)") if arguments.size != 2 18 raise(Puppet::ParseError, "intersection(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size != 2 20 19 21 20 first = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_absolute_path.rb
reb1ccd6 rbe0859f 24 24 25 25 ENDHEREDOC 26 26 function_deprecation([:is_absolute_path, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_path. There is further documentation for validate_legacy function in the README.']) 27 27 require 'puppet/util' 28 28 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_array.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "is_array(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 function_deprecation([:is_array, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.']) 12 13 raise(Puppet::ParseError, "is_array(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 14 14 15 type = arguments[0] … … 19 20 end 20 21 end 21 22 # vim: set ts=2 sw=2 et : -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_bool.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "is_bool(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size != 1 11 function_deprecation([:is_bool, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.']) 12 13 raise(Puppet::ParseError, "is_bool(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 13 14 14 15 type = arguments[0] … … 19 20 end 20 21 end 21 22 # vim: set ts=2 sw=2 et : -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
reb1ccd6 rbe0859f 10 10 11 11 if (arguments.size != 1) then 12 raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments "+ 13 "given #{arguments.size} for 1") 12 raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments given #{arguments.size} for 1") 14 13 end 15 14 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_email_address.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 if arguments.size != 1 11 raise(Puppet::ParseError, 'is_email_address(): Wrong number of arguments '\ 12 "given #{arguments.size} for 1") 11 raise(Puppet::ParseError, "is_email_address(): Wrong number of arguments given #{arguments.size} for 1") 13 12 end 14 13 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_float.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 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 11 13 if (arguments.size != 1) then 12 raise(Puppet::ParseError, "is_float(): Wrong number of arguments "+ 13 "given #{arguments.size} for 1") 14 raise(Puppet::ParseError, "is_float(): Wrong number of arguments given #{arguments.size} for 1") 14 15 end 15 16 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb
reb1ccd6 rbe0859f 12 12 13 13 if (arguments.size != 1) then 14 raise(Puppet::ParseError, "is_function_available?(): Wrong number of arguments "+ 15 "given #{arguments.size} for 1") 14 raise(Puppet::ParseError, "is_function_available?(): Wrong number of arguments given #{arguments.size} for 1") 16 15 end 17 16 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_hash.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "is_hash(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size != 1 11 raise(Puppet::ParseError, "is_hash(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 13 12 14 13 type = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_integer.rb
reb1ccd6 rbe0859f 14 14 ) do |arguments| 15 15 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 16 18 if (arguments.size != 1) then 17 raise(Puppet::ParseError, "is_integer(): Wrong number of arguments "+ 18 "given #{arguments.size} for 1") 19 raise(Puppet::ParseError, "is_integer(): Wrong number of arguments given #{arguments.size} for 1") 19 20 end 20 21 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb
reb1ccd6 rbe0859f 11 11 require 'ipaddr' 12 12 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 13 15 if (arguments.size != 1) then 14 raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments "+ 15 "given #{arguments.size} for 1") 16 raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments given #{arguments.size} for 1") 16 17 end 17 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ipv4_address.rb
reb1ccd6 rbe0859f 11 11 require 'ipaddr' 12 12 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 13 15 if (arguments.size != 1) then 14 raise(Puppet::ParseError, "is_ipv4_address(): Wrong number of arguments "+ 15 "given #{arguments.size} for 1") 16 raise(Puppet::ParseError, "is_ipv4_address(): Wrong number of arguments given #{arguments.size} for 1") 16 17 end 17 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_ipv6_address.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 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 11 13 require 'ipaddr' 12 14 13 15 if (arguments.size != 1) then 14 raise(Puppet::ParseError, "is_ipv6_address(): Wrong number of arguments "+ 15 "given #{arguments.size} for 1") 16 raise(Puppet::ParseError, "is_ipv6_address(): Wrong number of arguments given #{arguments.size} for 1") 16 17 end 17 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb
reb1ccd6 rbe0859f 10 10 11 11 if (arguments.size != 1) then 12 raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments "+ 13 "given #{arguments.size} for 1") 12 raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments given #{arguments.size} for 1") 14 13 end 15 14 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb
reb1ccd6 rbe0859f 25 25 ) do |arguments| 26 26 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 27 29 if (arguments.size != 1) then 28 raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments "+ 29 "given #{arguments.size} for 1") 30 raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments given #{arguments.size} for 1") 30 31 end 31 32 … … 72 73 end 73 74 end 74 75 # vim: set ts=2 sw=2 et : -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/is_string.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "is_string(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 function_deprecation([:is_string, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README.']) 12 13 raise(Puppet::ParseError, "is_string(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 14 14 15 type = arguments[0] 15 16 16 result = type.is_a?(String) 17 # when called through the v4 API shim, undef gets translated to nil 18 result = type.is_a?(String) || type.nil? 17 19 18 20 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
reb1ccd6 rbe0859f 16 16 17 17 # Technically we support two arguments but only first is mandatory ... 18 raise(Puppet::ParseError, "join(): Wrong number of arguments " + 19 "given (#{arguments.size} for 1)") if arguments.size < 1 18 raise(Puppet::ParseError, "join(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 20 19 21 20 array = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb
reb1ccd6 rbe0859f 6 6 newfunction(:join_keys_to_values, :type => :rvalue, :doc => <<-EOS 7 7 This function joins each key of a hash to that key's corresponding value with a 8 separator. Keys and values are cast to strings. The return value is an array in 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 9 10 which each element is one joined key/value pair. 10 11 … … 14 15 15 16 Would 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"] 16 21 EOS 17 22 ) do |arguments| … … 19 24 # Validate the number of arguments. 20 25 if arguments.size != 2 21 raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two " + 22 "arguments, but #{arguments.size} given.") 26 raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two arguments, but #{arguments.size} given.") 23 27 end 24 28 … … 26 30 hash = arguments[0] 27 31 if not hash.is_a?(Hash) 28 raise(TypeError, "join_keys_to_values(): The first argument must be a " + 29 "hash, but a #{hash.class} was given.") 32 raise(TypeError, "join_keys_to_values(): The first argument must be a hash, but a #{hash.class} was given.") 30 33 end 31 34 … … 33 36 separator = arguments[1] 34 37 if not separator.is_a?(String) 35 raise(TypeError, "join_keys_to_values(): The second argument must be a " + 36 "string, but a #{separator.class} was given.") 38 raise(TypeError, "join_keys_to_values(): The second argument must be a string, but a #{separator.class} was given.") 37 39 end 38 40 39 41 # Join the keys to their values. 40 42 hash.map do |k,v| 41 String(k) + separator + String(v) 42 end 43 if v.is_a?(Array) 44 v.map { |va| String(k) + separator + String(va) } 45 else 46 String(k) + separator + String(v) 47 end 48 end.flatten 43 49 44 50 end -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/keys.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "keys(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 raise(Puppet::ParseError, "keys(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 12 14 13 hash = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb
reb1ccd6 rbe0859f 1 1 module 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. 2 7 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. 8 For example: 6 9 7 For example: 10 $myhash = loadyaml('/etc/puppet/data/myhash.yaml') 11 $myhash = loadyaml('no-file.yaml', {'default' => 'value'}) 12 ENDHEREDOC 8 13 9 $myhash = loadyaml('/etc/puppet/data/myhash.yaml')10 ENDHEREDOC14 raise ArgumentError, 'Wrong number of arguments. 1 or 2 arguments should be provided.' unless args.length >= 1 15 require 'yaml' 11 16 12 unless args.length == 1 13 raise Puppet::ParseError, ("loadyaml(): wrong number of arguments (#{args.length}; must be 1)") 14 end 15 16 if File.exists?(args[0]) then 17 YAML.load_file(args[0]) 17 if File.exists?(args[0]) 18 begin 19 YAML::load_file(args[0]) || args[1] 20 rescue Exception => e 21 if args[1] 22 args[1] 23 else 24 raise e 25 end 26 end 18 27 else 19 warning("Can't load " + args[0] + ".File does not exist!")20 nil28 warning("Can't load '#{args[0]}' File does not exist!") 29 args[1] 21 30 end 22 31 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/lstrip.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "lstrip(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 raise(Puppet::ParseError, "lstrip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 12 14 13 value = arguments[0] 15 14 16 15 unless value.is_a?(Array) || value.is_a?(String) 17 raise(Puppet::ParseError, 'lstrip(): Requires either ' + 18 'array or string to work with') 16 raise(Puppet::ParseError, 'lstrip(): Requires either array or string to work with') 19 17 end 20 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/max.rb
reb1ccd6 rbe0859f 6 6 ) do |args| 7 7 8 raise(Puppet::ParseError, "max(): Wrong number of arguments " + 9 "need at least one") if args.size == 0 8 raise(Puppet::ParseError, "max(): Wrong number of arguments need at least one") if args.size == 0 10 9 11 10 # Sometimes we get numbers as numerics and sometimes as strings. -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/member.rb
reb1ccd6 rbe0859f 31 31 ) do |arguments| 32 32 33 raise(Puppet::ParseError, "member(): Wrong number of arguments " + 34 "given (#{arguments.size} for 2)") if arguments.size < 2 33 raise(Puppet::ParseError, "member(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2 35 34 36 35 array = arguments[0] … … 51 50 52 51 53 raise(Puppet::ParseError, 'member(): You must provide item ' + 54 'to search for within array given') if item.respond_to?('empty?') && item.empty? 52 raise(Puppet::ParseError, 'member(): You must provide item to search for within array given') if item.respond_to?('empty?') && item.empty? 55 53 56 54 result = (item - array).empty? -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/min.rb
reb1ccd6 rbe0859f 6 6 ) do |args| 7 7 8 raise(Puppet::ParseError, "min(): Wrong number of arguments " + 9 "need at least one") if args.size == 0 8 raise(Puppet::ParseError, "min(): Wrong number of arguments need at least one") if args.size == 0 10 9 11 10 # Sometimes we get numbers as numerics and sometimes as strings. -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/num2bool.rb
reb1ccd6 rbe0859f 11 11 ) do |arguments| 12 12 13 raise(Puppet::ParseError, "num2bool(): Wrong number of arguments " + 14 "given (#{arguments.size} for 1)") if arguments.size != 1 13 raise(Puppet::ParseError, "num2bool(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 15 14 16 15 number = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/prefix.rb
reb1ccd6 rbe0859f 16 16 17 17 # Technically we support two arguments but only first is mandatory ... 18 raise(Puppet::ParseError, "prefix(): Wrong number of arguments " + 19 "given (#{arguments.size} for 1)") if arguments.size < 1 18 raise(Puppet::ParseError, "prefix(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 20 19 21 20 enumerable = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/pw_hash.rb
reb1ccd6 rbe0859f 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 1 4 Puppet::Parser::Functions::newfunction( 2 5 :pw_hash, -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/range.rb
reb1ccd6 rbe0859f 26 26 27 27 range("host01", "host10") 28 29 28 Will return: ["host01", "host02", ..., "host09", "host10"] 29 NB Be explicit in including trailing zeros. Otherwise the underlying ruby function will fail. 30 30 31 31 Passing a third argument will cause the generated range to step by that … … 38 38 ) do |arguments| 39 39 40 raise(Puppet::ParseError, 'range(): Wrong number of ' + 41 'arguments given (0 for 1)') if arguments.size == 0 40 raise(Puppet::ParseError, 'range(): Wrong number of arguments given (0 for 1)') if arguments.size == 0 42 41 43 42 if arguments.size > 1 … … 58 57 step = 1 59 58 elsif value.match(/^.+$/) 60 raise(Puppet::ParseError, "range(): Unable to compute range " + 61 "from the value: #{value}") 59 raise(Puppet::ParseError, "range(): Unable to compute range from the value: #{value}") 62 60 else 63 61 raise(Puppet::ParseError, "range(): Unknown range format: #{value}") -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/reverse.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "reverse(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 raise(Puppet::ParseError, "reverse(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 12 14 13 value = arguments[0] 15 14 16 15 unless value.is_a?(Array) || value.is_a?(String) 17 raise(Puppet::ParseError, 'reverse(): Requires either ' + 18 'array or string to work with') 16 raise(Puppet::ParseError, 'reverse(): Requires either array or string to work with') 19 17 end 20 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/rstrip.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "rstrip(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 raise(Puppet::ParseError, "rstrip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 12 14 13 value = arguments[0] 15 14 16 15 unless value.is_a?(Array) || value.is_a?(String) 17 raise(Puppet::ParseError, 'rstrip(): Requires either ' + 18 'array or string to work with') 16 raise(Puppet::ParseError, 'rstrip(): Requires either array or string to work with') 19 17 end 20 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/shuffle.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "shuffle(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 raise(Puppet::ParseError, "shuffle(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 12 14 13 value = arguments[0] 15 14 16 15 unless value.is_a?(Array) || value.is_a?(String) 17 raise(Puppet::ParseError, 'shuffle(): Requires either ' + 18 'array or string to work with') 16 raise(Puppet::ParseError, 'shuffle(): Requires either array or string to work with') 19 17 end 20 18 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/size.rb
reb1ccd6 rbe0859f 9 9 ) do |arguments| 10 10 11 raise(Puppet::ParseError, "size(): Wrong number of arguments " + 12 "given (#{arguments.size} for 1)") if arguments.size < 1 11 raise(Puppet::ParseError, "size(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 13 12 14 13 item = arguments[0] 14 15 function_deprecation([:size, 'This method is going to be deprecated, please use the stdlib length function.']) 15 16 16 17 if item.is_a?(String) … … 27 28 Float(item) 28 29 29 raise(Puppet::ParseError, 'size(): Requires either ' + 30 'string, array or hash to work with') 30 raise(Puppet::ParseError, 'size(): Requires either string, array or hash to work with') 31 31 32 32 rescue ArgumentError -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/sort.rb
reb1ccd6 rbe0859f 1 1 # 2 # sort.rb 2 # sort.rb 3 # Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085. 3 4 # 4 5 … … 10 11 11 12 if (arguments.size != 1) then 12 raise(Puppet::ParseError, "sort(): Wrong number of arguments "+ 13 "given #{arguments.size} for 1") 13 raise(Puppet::ParseError, "sort(): Wrong number of arguments given #{arguments.size} for 1") 14 14 end 15 15 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/squeeze.rb
reb1ccd6 rbe0859f 10 10 11 11 if ((arguments.size != 2) and (arguments.size != 1)) then 12 raise(Puppet::ParseError, "squeeze(): Wrong number of arguments "+ 13 "given #{arguments.size} for 2 or 1") 12 raise(Puppet::ParseError, "squeeze(): Wrong number of arguments given #{arguments.size} for 2 or 1") 14 13 end 15 14 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/str2bool.rb
reb1ccd6 rbe0859f 11 11 ) do |arguments| 12 12 13 raise(Puppet::ParseError, "str2bool(): Wrong number of arguments " + 14 "given (#{arguments.size} for 1)") if arguments.size < 1 13 raise(Puppet::ParseError, "str2bool(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 15 14 16 15 string = arguments[0] … … 22 21 23 22 unless string.is_a?(String) 24 raise(Puppet::ParseError, 'str2bool(): Requires either ' + 25 'string to work with') 23 raise(Puppet::ParseError, 'str2bool(): Requires string to work with') 26 24 end 27 25 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb
reb1ccd6 rbe0859f 1 1 # 2 # str2saltedsha512.rb 2 # str2saltedsha512.rb 3 # Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085. 3 4 # 4 5 … … 13 14 require 'digest/sha2' 14 15 15 raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments " + 16 "passed (#{arguments.size} but we require 1)") if arguments.size != 1 16 raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments passed (#{arguments.size} but we require 1)") if arguments.size != 1 17 17 18 18 password = arguments[0] 19 19 20 20 unless password.is_a?(String) 21 raise(Puppet::ParseError, 'str2saltedsha512(): Requires a ' + 22 "String argument, you passed: #{password.class}") 21 raise(Puppet::ParseError, "str2saltedsha512(): Requires a String argument, you passed: #{password.class}") 23 22 end 24 23 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/strftime.rb
reb1ccd6 rbe0859f 1 1 # 2 # strftime.rb 2 # strftime.rb 3 # Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085. 3 4 # 4 5 … … 72 73 73 74 # Technically we support two arguments but only first is mandatory ... 74 raise(Puppet::ParseError, "strftime(): Wrong number of arguments " + 75 "given (#{arguments.size} for 1)") if arguments.size < 1 75 raise(Puppet::ParseError, "strftime(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 76 76 77 77 format = arguments[0] 78 78 79 raise(Puppet::ParseError, 'strftime(): You must provide ' + 80 'format for evaluation') if format.empty? 79 raise(Puppet::ParseError, 'strftime(): You must provide format for evaluation') if format.empty? 81 80 82 81 # The Time Zone argument is optional ... -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/strip.rb
reb1ccd6 rbe0859f 16 16 ) do |arguments| 17 17 18 raise(Puppet::ParseError, "strip(): Wrong number of arguments " + 19 "given (#{arguments.size} for 1)") if arguments.size < 1 18 raise(Puppet::ParseError, "strip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 20 19 21 20 value = arguments[0] 22 21 23 22 unless value.is_a?(Array) || value.is_a?(String) 24 raise(Puppet::ParseError, 'strip(): Requires either ' + 25 'array or string to work with') 23 raise(Puppet::ParseError, 'strip(): Requires either array or string to work with') 26 24 end 27 25 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/suffix.rb
reb1ccd6 rbe0859f 17 17 18 18 # Technically we support two arguments but only first is mandatory ... 19 raise(Puppet::ParseError, "suffix(): Wrong number of arguments " + 20 "given (#{arguments.size} for 1)") if arguments.size < 1 19 raise(Puppet::ParseError, "suffix(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 21 20 22 21 enumerable = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/swapcase.rb
reb1ccd6 rbe0859f 1 1 # 2 2 # 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. 3 4 # 4 5 … … 15 16 ) do |arguments| 16 17 17 raise(Puppet::ParseError, "swapcase(): Wrong number of arguments " + 18 "given (#{arguments.size} for 1)") if arguments.size < 1 18 raise(Puppet::ParseError, "swapcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 19 19 20 20 value = arguments[0] 21 21 22 22 unless value.is_a?(Array) || value.is_a?(String) 23 raise(Puppet::ParseError, 'swapcase(): Requires either ' + 24 'array or string to work with') 23 raise(Puppet::ParseError, 'swapcase(): Requires either array or string to work with') 25 24 end 26 25 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/time.rb
reb1ccd6 rbe0859f 19 19 20 20 if (arguments.size != 0) and (arguments.size != 1) then 21 raise(Puppet::ParseError, "time(): Wrong number of arguments "+ 22 "given #{arguments.size} for 0 or 1") 21 raise(Puppet::ParseError, "time(): Wrong number of arguments given #{arguments.size} for 0 or 1") 23 22 end 24 23 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb
reb1ccd6 rbe0859f 8 8 ) do |arguments| 9 9 10 raise(Puppet::ParseError, "to_bytes(): Wrong number of arguments " + 11 "given (#{arguments.size} for 1)") if arguments.size != 1 10 raise(Puppet::ParseError, "to_bytes(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 12 11 13 12 arg = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/type3x.rb
reb1ccd6 rbe0859f 17 17 EOS 18 18 ) do |args| 19 raise(Puppet::ParseError, "type3x(): Wrong number of arguments " + 20 "given (#{args.size} for 1)") if args.size < 1 19 raise(Puppet::ParseError, "type3x(): Wrong number of arguments given (#{args.size} for 1)") if args.size < 1 21 20 22 21 value = args[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/union.rb
reb1ccd6 rbe0859f 16 16 17 17 # Check that 2 or more arguments have been given ... 18 raise(Puppet::ParseError, "union(): Wrong number of arguments " + 19 "given (#{arguments.size} for < 2)") if arguments.size < 2 18 raise(Puppet::ParseError, "union(): Wrong number of arguments given (#{arguments.size} for < 2)") if arguments.size < 2 20 19 21 20 arguments.each do |argument| -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/unique.rb
reb1ccd6 rbe0859f 25 25 ) do |arguments| 26 26 27 raise(Puppet::ParseError, "unique(): Wrong number of arguments " + 28 "given (#{arguments.size} for 1)") if arguments.size < 1 27 raise(Puppet::ParseError, "unique(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 29 28 30 29 value = arguments[0] 31 30 32 31 unless value.is_a?(Array) || value.is_a?(String) 33 raise(Puppet::ParseError, 'unique(): Requires either ' + 34 'array or string to work with') 32 raise(Puppet::ParseError, 'unique(): Requires either array or string to work with') 35 33 end 36 34 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/upcase.rb
reb1ccd6 rbe0859f 1 1 # 2 # upcase.rb 2 # upcase.rb 3 # Please note: This function is an implementation of a Ruby class and as such may not be entirely UTF8 compatible. To ensure compatibility please use this function with Ruby 2.4.0 or greater - https://bugs.ruby-lang.org/issues/10085. 3 4 # 4 5 … … 17 18 ) do |arguments| 18 19 19 raise(Puppet::ParseError, "upcase(): Wrong number of arguments " + 20 "given (#{arguments.size} for 1)") if arguments.size != 1 20 raise(Puppet::ParseError, "upcase(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1 21 21 22 22 value = arguments[0] 23 23 24 24 unless value.is_a?(Array) || value.is_a?(Hash) || value.respond_to?(:upcase) 25 raise(Puppet::ParseError, 'upcase(): Requires an ' + 26 'array, hash or object that responds to upcase in order to work') 25 raise(Puppet::ParseError, 'upcase(): Requires an array, hash or object that responds to upcase in order to work') 27 26 end 28 27 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/uriescape.rb
reb1ccd6 rbe0859f 1 1 # 2 2 # 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. 3 4 # 4 5 require 'uri' … … 11 12 ) do |arguments| 12 13 13 raise(Puppet::ParseError, "uriescape(): Wrong number of arguments " + 14 "given (#{arguments.size} for 1)") if arguments.size < 1 14 raise(Puppet::ParseError, "uriescape(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 15 15 16 16 value = arguments[0] 17 17 18 18 unless value.is_a?(Array) || value.is_a?(String) 19 raise(Puppet::ParseError, 'uriescape(): Requires either ' + 20 'array or string to work with') 19 raise(Puppet::ParseError, 'uriescape(): Requires either array or string to work with') 21 20 end 22 21 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb
reb1ccd6 rbe0859f 27 27 ENDHEREDOC 28 28 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 29 32 require 'puppet/util' 30 33 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_array.rb
reb1ccd6 rbe0859f 19 19 ENDHEREDOC 20 20 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 21 23 unless args.length > 0 then 22 24 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
reb1ccd6 rbe0859f 20 20 ENDHEREDOC 21 21 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 22 25 unless args.length > 0 then 23 26 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
reb1ccd6 rbe0859f 1 1 module Puppet::Parser::Functions 2 newfunction(:validate_email_address, doc:<<-ENDHEREDOC2 newfunction(:validate_email_address, :doc => <<-ENDHEREDOC 3 3 Validate that all values passed are valid email addresses. 4 4 Fail compilation if any value fails this check. -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb
reb1ccd6 rbe0859f 19 19 ENDHEREDOC 20 20 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 21 23 unless args.length > 0 then 22 24 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
reb1ccd6 rbe0859f 3 3 newfunction(:validate_integer, :doc => <<-'ENDHEREDOC') do |args| 4 4 Validate that the first argument is an integer (or an array of integers). Abort catalog compilation if any of the checks fail. 5 5 6 6 The second argument is optional and passes a maximum. (All elements of) the first argument has to be less or equal to this max. 7 7 … … 53 53 54 54 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.']) 55 57 56 58 # 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
reb1ccd6 rbe0859f 9 9 validate_ip_address($my_ip) 10 10 validate_ip_address("8.8.8.8", "172.16.0.1", $my_ip) 11 11 12 12 $my_ip = "3ffe:505:2" 13 13 validate_ip_address(1) 14 14 validate_ip_address($my_ip) 15 15 validate_ip_address("fe80::baf6:b1ff:fe19:7507", $my_ip) 16 16 17 17 The following values will fail, causing compilation to abort: 18 18 $some_array = [ 1, true, false, "garbage string", "3ffe:505:2" ] … … 23 23 require "ipaddr" 24 24 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.']) 25 27 26 28 if defined?(IPAddr::InvalidAddressError) -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb
reb1ccd6 rbe0859f 18 18 ENDHEREDOC 19 19 ) 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.']) 20 22 21 23 require "ipaddr" -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb
reb1ccd6 rbe0859f 19 19 ENDHEREDOC 20 20 ) 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.']) 21 23 22 24 require "ipaddr" -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/validate_numeric.rb
reb1ccd6 rbe0859f 3 3 newfunction(:validate_numeric, :doc => <<-'ENDHEREDOC') do |args| 4 4 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 6 6 The second argument is optional and passes a maximum. (All elements of) the first argument has to be less or equal to this max. 7 7 … … 15 15 16 16 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.']) 17 19 18 20 # 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
reb1ccd6 rbe0859f 30 30 31 31 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 32 35 if (args.length < 2) or (args.length > 3) then 33 36 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
reb1ccd6 rbe0859f 21 21 22 22 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.']) 23 25 24 26 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
reb1ccd6 rbe0859f 14 14 validate_string(true) 15 15 validate_string([ 'some', 'array' ]) 16 16 17 17 Note: validate_string(undef) will not fail in this version of the 18 18 functions API (incl. current and future parser). Instead, use: 19 19 20 20 if $var == undef { 21 21 fail('...') 22 22 } 23 23 24 24 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.']) 25 27 26 28 unless args.length > 0 then … … 29 31 30 32 args.each do |arg| 31 unless arg.is_a?(String) 33 # when called through the v4 API shim, undef gets translated to nil 34 unless arg.is_a?(String) || arg.nil? 32 35 raise Puppet::ParseError, ("#{arg.inspect} is not a string. It looks to be a #{arg.class}") 33 36 end -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/values.rb
reb1ccd6 rbe0859f 22 22 ) do |arguments| 23 23 24 raise(Puppet::ParseError, "values(): Wrong number of arguments " + 25 "given (#{arguments.size} for 1)") if arguments.size < 1 24 raise(Puppet::ParseError, "values(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 26 25 27 26 hash = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/values_at.rb
reb1ccd6 rbe0859f 30 30 ) do |arguments| 31 31 32 raise(Puppet::ParseError, "values_at(): Wrong number of " + 33 "arguments given (#{arguments.size} for 2)") if arguments.size < 2 32 raise(Puppet::ParseError, "values_at(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2 34 33 35 34 array = arguments.shift … … 42 41 43 42 if not indices or indices.empty? 44 raise(Puppet::ParseError, 'values_at(): You must provide ' + 45 'at least one positive index to collect') 43 raise(Puppet::ParseError, 'values_at(): You must provide at least one positive index to collect') 46 44 end 47 45 … … 58 56 59 57 if start > stop 60 raise(Puppet::ParseError, 'values_at(): Stop index in ' + 61 'given indices range is smaller than the start index') 58 raise(Puppet::ParseError, 'values_at(): Stop index in given indices range is smaller than the start index') 62 59 elsif stop > array.size - 1 # First element is at index 0 is it not? 63 raise(Puppet::ParseError, 'values_at(): Stop index in ' + 64 'given indices range exceeds array size') 60 raise(Puppet::ParseError, 'values_at(): Stop index in given indices range exceeds array size') 65 61 end 66 62 … … 74 70 # Only positive numbers allowed in this case ... 75 71 if not i.match(/^\d+$/) 76 raise(Puppet::ParseError, 'values_at(): Unknown format ' + 77 'of given index') 72 raise(Puppet::ParseError, 'values_at(): Unknown format of given index') 78 73 end 79 74 … … 82 77 83 78 if i > array.size - 1 # Same story. First element is at index 0 ... 84 raise(Puppet::ParseError, 'values_at(): Given index ' + 85 'exceeds array size') 79 raise(Puppet::ParseError, 'values_at(): Given index exceeds array size') 86 80 end 87 81 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/parser/functions/zip.rb
reb1ccd6 rbe0859f 18 18 19 19 # Technically we support three arguments but only first is mandatory ... 20 raise(Puppet::ParseError, "zip(): Wrong number of arguments " + 21 "given (#{arguments.size} for 2)") if arguments.size < 2 20 raise(Puppet::ParseError, "zip(): Wrong number of arguments given (#{arguments.size} for 2)") if arguments.size < 2 22 21 23 22 a = arguments[0] -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/provider/file_line/ruby.rb
reb1ccd6 rbe0859f 5 5 else 6 6 lines.find do |line| 7 line.chomp == resource[:line].chomp 7 if resource[:ensure].to_s == 'absent' and resource[:match_for_absence].to_s == 'true' 8 line.chomp =~ Regexp.new(resource[:match]) 9 else 10 line.chomp == resource[:line].chomp 11 end 8 12 end 9 13 end … … 37 41 # small-ish config files that can fit into memory without 38 42 # too much trouble. 39 @lines ||= File.readlines(resource[:path]) 43 begin 44 @lines ||= File.readlines(resource[:path], :encoding => resource[:encoding]) 45 rescue TypeError => e 46 # Ruby 1.8 doesn't support open_args 47 @lines ||= File.readlines(resource[:path]) 48 end 40 49 end 41 50 -
src/puppetcode/environments/gnuboat/modules/stdlib/lib/puppet/type/file_line.rb
reb1ccd6 rbe0859f 49 49 error will be raised unless the `multiple => true` parameter is set. 50 50 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 51 67 **Autorequires:** If Puppet is managing the file that will contain the line 52 68 being managed, the file_line resource will autorequire that file. … … 72 88 desc 'An optional value to determine if match should be applied when ensure => absent.' + 73 89 ' If set to true and match is set, the line that matches match will be deleted.' + 74 ' If set to false (the default), match is ignored when ensure => absent.' 90 ' If set to false (the default), match is ignored when ensure => absent.' + 91 ' When `ensure => present`, match_for_absence is ignored.' 75 92 newvalues(true, false) 76 93 defaultto false … … 84 101 85 102 newparam(:after) do 86 desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)' 103 desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)' + 104 ' This is also takes a regex.' 87 105 end 88 106 … … 94 112 desc 'The file Puppet will ensure contains the line specified by the line parameter.' 95 113 validate do |value| 96 unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/))97 raise (Puppet::Error, "File paths must be fully qualified, not '#{value}'")114 unless Puppet::Util.absolute_path?(value) 115 raise Puppet::Error, "File paths must be fully qualified, not '#{value}'" 98 116 end 99 117 end … … 104 122 newvalues(true, false) 105 123 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' 106 129 end 107 130 -
src/puppetcode/environments/gnuboat/modules/stdlib/metadata.json
reb1ccd6 rbe0859f 1 1 { 2 2 "name": "puppetlabs-stdlib", 3 "version": "4.1 2.0",3 "version": "4.17.1", 4 4 "author": "puppetlabs", 5 5 "summary": "Standard library of resources for Puppet modules.", … … 70 70 "10.04", 71 71 "12.04", 72 "14.04" 72 "14.04", 73 "16.04" 73 74 ] 74 75 }, … … 77 78 "operatingsystemrelease": [ 78 79 "10", 79 "11", 80 "12" 80 "11" 81 81 ] 82 82 }, … … 105 105 "requirements": [ 106 106 { 107 "name": "pe",108 "version_requirement": ">= 3.0.0 < 2015.4.0"109 },110 {111 107 "name": "puppet", 112 "version_requirement": ">= 2.7.20 <5.0.0"108 "version_requirement": ">= 4.7.0 < 5.0.0" 113 109 } 114 110 ], -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/abs_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'abs function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'abs function' do 5 5 describe 'success' do 6 6 it 'should accept a string' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/anchor_spec.rb
reb1ccd6 rbe0859f 1 1 require 'spec_helper_acceptance' 2 2 3 describe 'anchor type' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do3 describe 'anchor type' do 4 4 describe 'success' do 5 5 it 'should effect proper chaining of resources' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/any2array_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'any2array function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'any2array function' do 5 5 describe 'success' do 6 6 it 'should create an empty array' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/base64_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'base64 function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'base64 function' do 5 5 describe 'success' do 6 6 it 'should encode then decode a string' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/bool2num_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'bool2num function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'bool2num function' do 5 5 describe 'success' do 6 6 ['false', 'f', '0', 'n', 'no'].each do |bool| -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/capitalize_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'capitalize function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'capitalize function' do 5 5 describe 'success' do 6 6 it 'should capitalize the first letter of a string' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/ceiling_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'ceiling function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'ceiling function' do 5 5 describe 'success' do 6 6 it 'ceilings floats' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/chomp_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'chomp function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'chomp function' do 5 5 describe 'success' do 6 6 it 'should eat the newline' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/chop_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'chop function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'chop function' do 5 5 describe 'success' do 6 6 it 'should eat the last character' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/clamp_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'clamp function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'clamp function' do 5 5 describe 'success' do 6 6 it 'clamps list of values' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/concat_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'concat function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'concat function' do 5 5 describe 'success' do 6 6 it 'should concat one array to another' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/count_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'count function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'count function' do 5 5 describe 'success' do 6 6 it 'should count elements in an array' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/deep_merge_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'deep_merge function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'deep_merge function' do 5 5 describe 'success' do 6 6 it 'should deep merge two hashes' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/defined_with_params_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'defined_with_params function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'defined_with_params function' do 5 5 describe 'success' do 6 6 it 'should successfully notify' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_at_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'delete_at function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'delete_at function' do 5 5 describe 'success' do 6 6 it 'should delete elements of the array' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'delete function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'delete function' do 5 5 describe 'success' do 6 6 it 'should delete elements of the array' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'delete_undef_values function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'delete_undef_values function' do 5 5 describe 'success' do 6 6 it 'should delete elements of the array' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/delete_values_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'delete_values function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'delete_values function' do 5 5 describe 'success' do 6 6 it 'should delete elements of the hash' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/difference_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'difference function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'difference function' do 5 5 describe 'success' do 6 6 it 'returns non-duplicates in the first array' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/dirname_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'dirname function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'dirname function' do 5 5 describe 'success' do 6 6 context 'absolute path' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/downcase_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'downcase function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'downcase function' do 5 5 describe 'success' do 6 6 it 'returns the downcase' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/empty_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'empty function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'empty function' do 5 5 describe 'success' do 6 6 it 'recognizes empty strings' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/flatten_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'flatten function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'flatten function' do 5 5 describe 'success' do 6 6 it 'flattens arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/floor_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'floor function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'floor function' do 5 5 describe 'success' do 6 6 it 'floors floats' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/fqdn_rand_string_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'fqdn_rand_string function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'fqdn_rand_string function' do 5 5 describe 'success' do 6 6 include_context "with faked facts" -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'fqdn_rotate function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'fqdn_rotate function' do 5 5 describe 'success' do 6 6 include_context "with faked facts" -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/get_module_path_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'get_module_path function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'get_module_path function' do 5 5 describe 'success' do 6 6 it 'get_module_paths dne' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/getparam_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'getparam function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'getparam function' do 5 5 describe 'success' do 6 6 it 'getparam a notify' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/getvar_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'getvar function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'getvar function' do 5 5 describe 'success' do 6 6 it 'getvars from classes' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/grep_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'grep function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'grep function' do 5 5 describe 'success' do 6 6 it 'greps arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_interface_with_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'has_interface_with function', :unless => (( UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do4 describe 'has_interface_with function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do 5 5 describe 'success' do 6 6 it 'has_interface_with existing ipaddress' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_ip_address_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'has_ip_address function', :unless => (( UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do4 describe 'has_ip_address function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do 5 5 describe 'success' do 6 6 it 'has_ip_address existing ipaddress' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_ip_network_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'has_ip_network function', :unless => (( UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do4 describe 'has_ip_network function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do 5 5 describe 'success' do 6 6 it 'has_ip_network existing ipaddress' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/has_key_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'has_key function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'has_key function' do 5 5 describe 'success' do 6 6 it 'has_keys in hashes' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/hash_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'hash function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'hash function' do 5 5 describe 'success' do 6 6 it 'hashs arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/intersection_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'intersection function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'intersection function' do 5 5 describe 'success' do 6 6 it 'intersections arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_a_spec.rb
reb1ccd6 rbe0859f 3 3 4 4 if get_puppet_version =~ /^4/ 5 describe 'is_a function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do5 describe 'is_a function' do 6 6 it 'should match a string' do 7 7 pp = <<-EOS -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_array_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_array function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_array function' do 5 5 describe 'success' do 6 6 it 'is_arrays arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_bool_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_bool function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_bool function' do 5 5 describe 'success' do 6 6 it 'is_bools arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_domain_name_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_domain_name function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_domain_name function' do 5 5 describe 'success' do 6 6 it 'is_domain_names arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_float_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_float function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_float function' do 5 5 describe 'success' do 6 6 it 'is_floats arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_function_available_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_function_available function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_function_available function' do 5 5 describe 'success' do 6 6 it 'is_function_availables arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_hash_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_hash function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_hash function' do 5 5 describe 'success' do 6 6 it 'is_hashs arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_integer_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_integer function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_integer function' do 5 5 describe 'success' do 6 6 it 'is_integers arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ip_address_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_ip_address function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_ip_address function' do 5 5 describe 'success' do 6 6 it 'is_ip_addresss ipv4' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ipv4_address_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_ipv4_address function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_ipv4_address function' do 5 5 describe 'success' do 6 6 it 'is_ipv4_addresss' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_ipv6_address_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_ipv6_address function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_ipv6_address function' do 5 5 describe 'success' do 6 6 it 'is_ipv6_addresss' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_mac_address_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_mac_address function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_mac_address function' do 5 5 describe 'success' do 6 6 it 'is_mac_addresss a mac' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_numeric_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_numeric function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_numeric function' do 5 5 describe 'success' do 6 6 it 'is_numerics arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/is_string_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'is_string function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'is_string function' do 5 5 describe 'success' do 6 6 it 'is_strings arrays' do … … 96 96 end 97 97 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 98 109 end 99 110 describe 'failure' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'join_keys_to_values function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'join_keys_to_values function' do 5 5 describe 'success' do 6 6 it 'join_keys_to_valuess hashes' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/join_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'join function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'join function' do 5 5 describe 'success' do 6 6 it 'joins arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/keys_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'keys function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'keys function' do 5 5 describe 'success' do 6 6 it 'keyss hashes' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/loadyaml_spec.rb
reb1ccd6 rbe0859f 4 4 tmpdir = default.tmpdir('stdlib') 5 5 6 describe 'loadyaml function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do6 describe 'loadyaml function' do 7 7 describe 'success' do 8 8 it 'loadyamls array of values' do … … 27 27 end 28 28 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 29 52 end 30 53 describe 'failure' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/lstrip_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'lstrip function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'lstrip function' do 5 5 describe 'success' do 6 6 it 'lstrips arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/max_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'max function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'max function' do 5 5 describe 'success' do 6 6 it 'maxs arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/member_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'member function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'member function' do 5 5 shared_examples 'item found' do 6 6 it 'should output correctly' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/merge_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'merge function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'merge function' do 5 5 describe 'success' do 6 6 it 'should merge two hashes' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/min_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'min function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'min function' do 5 5 describe 'success' do 6 6 it 'mins arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/nodesets/default.yml
reb1ccd6 rbe0859f 1 1 HOSTS: 2 centos-65-x64:2 ubuntu-1404-x64: 3 3 roles: 4 - master5 platform: el-6-x86_646 box : centos-65-x64-vbox436-nocm7 box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box8 hypervisor : vagrant4 - agent 5 - default 6 platform: ubuntu-14.04-amd64 7 hypervisor: vagrant 8 box: puppetlabs/ubuntu-14.04-64-nocm 9 9 CONFIG: 10 10 type: foss -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/num2bool_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'num2bool function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'num2bool function' do 5 5 describe 'success' do 6 6 it 'bools positive numbers and numeric strings as true' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/parsejson_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'parsejson function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'parsejson function' do 5 5 describe 'success' do 6 6 it 'parses valid json' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/parseyaml_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'parseyaml function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'parseyaml function' do 5 5 describe 'success' do 6 6 it 'parses valid yaml' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pick_default_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'pick_default function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'pick_default function' do 5 5 describe 'success' do 6 6 it 'pick_defaults a default value' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pick_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'pick function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'pick function' do 5 5 describe 'success' do 6 6 it 'picks a default value' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/prefix_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'prefix function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'prefix function' do 5 5 describe 'success' do 6 6 it 'prefixes array of values' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/pw_hash_spec.rb
reb1ccd6 rbe0859f 3 3 4 4 # Windows and OS X do not have useful implementations of crypt(3) 5 describe 'pw_hash function', :unless => ( UNSUPPORTED_PLATFORMS +['windows', 'Darwin', 'SLES']).include?(fact('operatingsystem')) do5 describe 'pw_hash function', :unless => (['windows', 'Darwin', 'SLES']).include?(fact('operatingsystem')) do 6 6 describe 'success' do 7 7 it 'hashes passwords' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/range_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'range function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'range function' do 5 5 describe 'success' do 6 6 it 'ranges letters' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/reject_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'reject function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'reject function' do 5 5 describe 'success' do 6 6 it 'rejects array of values' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/reverse_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'reverse function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'reverse function' do 5 5 describe 'success' do 6 6 it 'reverses strings' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/rstrip_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'rstrip function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'rstrip function' do 5 5 describe 'success' do 6 6 it 'rstrips arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/shuffle_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'shuffle function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'shuffle function' do 5 5 describe 'success' do 6 6 it 'shuffles arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/size_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'size function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'size function' do 5 5 describe 'success' do 6 6 it 'single string size' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/sort_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'sort function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'sort function' do 5 5 describe 'success' do 6 6 it 'sorts arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/squeeze_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'squeeze function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'squeeze function' do 5 5 describe 'success' do 6 6 it 'squeezes arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/str2bool_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'str2bool function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'str2bool function' do 5 5 describe 'success' do 6 6 it 'works with "y"' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'str2saltedsha512 function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'str2saltedsha512 function' do 5 5 describe 'success' do 6 6 it 'works with "y"' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/strftime_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'strftime function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'strftime function' do 5 5 describe 'success' do 6 6 it 'gives the Century' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/strip_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'strip function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'strip function' do 5 5 describe 'success' do 6 6 it 'strips arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/suffix_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'suffix function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'suffix function' do 5 5 describe 'success' do 6 6 it 'suffixes array of values' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/swapcase_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'swapcase function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'swapcase function' do 5 5 describe 'success' do 6 6 it 'works with strings' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/time_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'time function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'time function' do 5 5 describe 'success' do 6 6 it 'gives the time' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/to_bytes_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'to_bytes function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'to_bytes function' do 5 5 describe 'success' do 6 6 it 'converts kB to B' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/try_get_value_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'try_get_value function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'try_get_value function' do 5 5 describe 'success' do 6 6 it 'gets a value' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/type_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'type function' , :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || is_future_parser_enabled?)do4 describe 'type function' do 5 5 describe 'success' do 6 6 it 'types arrays' do … … 9 9 # Anagram: Large picture halls, I bet 10 10 $o = type($a) 11 notice(inline_template('type is <%= @o. inspect%>'))11 notice(inline_template('type is <%= @o.to_s %>')) 12 12 EOS 13 13 14 14 apply_manifest(pp, :catch_failures => true) do |r| 15 expect(r.stdout).to match(/type is "array"/)15 expect(r.stdout).to match(/type is Tuple\[String.*, String.*, String.*, String.*\]/) 16 16 end 17 17 end … … 20 20 $a = "blowzy night-frumps vex'd jack q" 21 21 $o = type($a) 22 notice(inline_template('type is <%= @o. inspect%>'))22 notice(inline_template('type is <%= @o.to_s %>')) 23 23 EOS 24 24 25 25 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/) 27 27 end 28 28 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/union_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'union function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'union function' do 5 5 describe 'success' do 6 6 it 'unions arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/unique_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'unique function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'unique function' do 5 5 describe 'success' do 6 6 it 'uniques arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/upcase_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'upcase function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'upcase function' do 5 5 describe 'success' do 6 6 it 'upcases arrays' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/uriescape_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'uriescape function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'uriescape function' do 5 5 describe 'success' do 6 6 it 'uriescape strings' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_absolute_path function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_absolute_path function' do 5 5 describe 'success' do 6 6 %w{ -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_array_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_array function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_array function' do 5 5 describe 'success' do 6 6 it 'validates a single argument' do … … 21 21 apply_manifest(pp, :catch_failures => true) 22 22 end 23 it 'validates a non-array' do24 {25 %{validate_array({'a' => 'hash' })} => "Hash",26 %{validate_array('string')} => "String",27 %{validate_array(false)} => "FalseClass",28 %{validate_array(undef)} => "String"29 }.each do |pp,type|30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/ a #{type}/)23 [ 24 %{validate_array({'a' => 'hash' })}, 25 %{validate_array('string')}, 26 %{validate_array(false)}, 27 %{validate_array(undef)} 28 ].each do |pp| 29 it "rejects #{pp.inspect}" do 30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not an Array\. It looks to be a/) 31 31 end 32 32 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_augeas_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_augeas function', :unless => ( (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows')) do4 describe 'validate_augeas function', :unless => (fact('osfamily') == 'windows') do 5 5 describe 'prep' do 6 6 it 'installs augeas for tests' -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_bool_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_bool function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_bool function' do 5 5 describe 'success' do 6 6 it 'validates a single argument' do … … 21 21 apply_manifest(pp, :catch_failures => true) 22 22 end 23 it 'validates a non-bool' do24 {25 %{validate_bool('true')} => "String",26 %{validate_bool('false')} => "String",27 %{validate_bool([true])} => "Array",28 %{validate_bool(undef)} => "String",29 }.each do |pp,type|30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/ a #{type}/)23 [ 24 %{validate_bool('true')}, 25 %{validate_bool('false')}, 26 %{validate_bool([true])}, 27 %{validate_bool(undef)} 28 ].each do |pp| 29 it "rejects #{pp.inspect}" do 30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not a boolean\. It looks to be a/) 31 31 end 32 32 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_cmd_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_cmd function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_cmd function' do 5 5 describe 'success' do 6 6 it 'validates a true command' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_hash_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_hash function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_hash function' do 5 5 describe 'success' do 6 6 it 'validates a single argument' do … … 21 21 apply_manifest(pp, :catch_failures => true) 22 22 end 23 it 'validates a non-hash' do24 {25 %{validate_hash('{ "not" => "hash" }')} => "String",26 %{validate_hash('string')} => "String",27 %{validate_hash(["array"])} => "Array",28 %{validate_hash(undef)} => "String",29 }.each do |pp,type|30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/ a #{type}/)23 [ 24 %{validate_hash('{ "not" => "hash" }')}, 25 %{validate_hash('string')}, 26 %{validate_hash(["array"])}, 27 %{validate_hash(undef)} 28 ].each do |pp| 29 it "rejects #{pp.inspect}" do 30 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(//) 31 31 end 32 32 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_ipv4_address function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_ipv4_address function' do 5 5 describe 'success' do 6 6 it 'validates a single argument' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_ipv6_address function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_ipv6_address function' do 5 5 describe 'success' do 6 6 it 'validates a single argument' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_re_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_re function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_re function' do 5 5 describe 'success' do 6 6 it 'validates a string' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_slength_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_slength function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_slength function' do 5 5 describe 'success' do 6 6 it 'validates a single string max' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/validate_string_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'validate_string function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'validate_string function' do 5 5 describe 'success' do 6 6 it 'validates a single argument' do … … 21 21 apply_manifest(pp, :catch_failures => true) 22 22 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 23 30 it 'validates a non-string' do 24 31 { -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/values_at_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'values_at function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'values_at function' do 5 5 describe 'success' do 6 6 it 'returns a specific value' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/values_spec.rb
reb1ccd6 rbe0859f 2 2 require 'spec_helper_acceptance' 3 3 4 describe 'values function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'values function' do 5 5 describe 'success' do 6 6 it 'returns an array of values' do … … 14 14 notice(inline_template('<%= @output.sort.inspect %>')) 15 15 EOS 16 if is_future_parser_enabled? 17 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 2, 3\]/) 18 else 19 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "2", "3"\]/) 20 end 21 16 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 2, 3\]/) 22 17 end 23 18 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/acceptance/zip_spec.rb
reb1ccd6 rbe0859f 1 1 #! /usr/bin/env ruby -S rspec 2 2 require 'spec_helper_acceptance' 3 require 'puppet'4 3 5 describe 'zip function' , :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))do4 describe 'zip function' do 6 5 describe 'success' do 7 6 it 'zips two arrays of numbers together' do … … 12 11 notice(inline_template('<%= @output.inspect %>')) 13 12 EOS 14 if is_future_parser_enabled? 15 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\], \[3, 7\], \[4, 8\]\]/) 16 else 17 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\], \["3", "7"\], \["4", "8"\]\]/) 18 end 13 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\], \[3, 7\], \[4, 8\]\]/) 19 14 end 20 15 it 'zips two arrays of numbers & bools together' do … … 25 20 notice(inline_template('<%= @output.inspect %>')) 26 21 EOS 27 if is_future_parser_enabled? 28 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, true\], \[2, true\], \["three", false\], \[4, false\]\]/) 29 else 30 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", true\], \["2", true\], \["three", false\], \["4", false\]\]/) 31 end 22 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, true\], \[2, true\], \["three", false\], \[4, false\]\]/) 32 23 end 33 24 it 'zips two arrays of numbers together and flattens them' do … … 42 33 notice(inline_template('<%= @output.inspect %>')) 43 34 EOS 44 if is_future_parser_enabled? 45 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 5, 2, 6, 3, 7, 4, 8\]/) 46 else 47 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "5", "2", "6", "3", "7", "4", "8"\]/) 48 end 35 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[1, 5, 2, 6, 3, 7, 4, 8\]/) 49 36 end 50 37 it 'handles unmatched length' do … … 56 43 notice(inline_template('<%= @output.inspect %>')) 57 44 EOS 58 if is_future_parser_enabled? 59 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\]\]/) 60 else 61 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\]\]/) 62 end 45 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\[1, 5\], \[2, 6\]\]/) 63 46 end 64 47 end … … 70 53 notice(inline_template('<%= @output.inspect %>')) 71 54 EOS 72 73 55 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/) 74 56 end … … 80 62 notice(inline_template('<%= @output.inspect %>')) 81 63 EOS 82 83 64 expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires array/) 84 65 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/any2array_spec.rb
reb1ccd6 rbe0859f 13 13 it { is_expected.to run.with_params({ 'key' => 'value' }).and_return(['key', 'value']) } 14 14 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(['€', '万', 'Ö', '♥', '割']) } 15 21 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/assert_private_spec.rb
reb1ccd6 rbe0859f 6 6 scope.expects(:lookupvar).with('module_name').returns('foo') 7 7 scope.expects(:lookupvar).with('caller_module_name').returns('foo') 8 expect {9 subject.call []10 }.not_to raise_error11 end12 end13 8 14 context "with an explicit failure message" do 15 it "prints the failure message on error" do 16 scope.expects(:lookupvar).with('module_name').returns('foo') 17 scope.expects(:lookupvar).with('caller_module_name').returns('bar') 18 expect { 19 subject.call ['failure message!'] 20 }.to raise_error Puppet::ParseError, /failure message!/ 9 is_expected.to run.with_params() 21 10 end 22 11 end 23 12 24 13 context "when called from private class" do 25 it "should fail with a class error message"do14 before :each do 26 15 scope.expects(:lookupvar).with('module_name').returns('foo') 27 16 scope.expects(:lookupvar).with('caller_module_name').returns('bar') 17 end 18 19 it "should fail with a class error message" do 28 20 scope.source.expects(:name).returns('foo::baz') 29 21 scope.source.expects(:type).returns('hostclass') 30 expect { 31 subject.call [] 32 }.to raise_error Puppet::ParseError, /Class foo::baz is private/ 22 23 is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /Class foo::baz is private/) 24 end 25 26 context "with an explicit failure message" do 27 it { is_expected.to run.with_params('failure message!').and_raise_error(Puppet::ParseError, /failure message!/) } 33 28 end 34 29 end … … 40 35 scope.source.expects(:name).returns('foo::baz') 41 36 scope.source.expects(:type).returns('definition') 42 expect { 43 subject.call [] 44 }.to raise_error Puppet::ParseError, /Definition foo::baz is private/ 37 38 is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /Definition foo::baz is private/) 45 39 end 46 40 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/basename_spec.rb
reb1ccd6 rbe0859f 12 12 it { is_expected.to run.with_params('relative_path/to/a/file.ext', '.ext').and_return('file') } 13 13 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 14 19 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chomp_spec.rb
reb1ccd6 rbe0859f 18 18 it { is_expected.to run.with_params(AlsoString.new("one\n\n")).and_return("one\n") } 19 19 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 20 25 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/chop_spec.rb
reb1ccd6 rbe0859f 18 18 it { is_expected.to run.with_params(AlsoString.new("one\n\n")).and_return("one\n") } 19 19 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 20 25 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/concat_spec.rb
reb1ccd6 rbe0859f 12 12 it { is_expected.to run.with_params(['1','2'],['3','4'],['5','6']).and_return(['1','2','3','4','5','6']) } 13 13 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 14 16 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 15 19 16 20 it "should leave the original array intact" do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/count_spec.rb
reb1ccd6 rbe0859f 16 16 it { is_expected.to run.with_params(["one", "", "two"]).and_return(2) } 17 17 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) } 18 23 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/deep_merge_spec.rb
reb1ccd6 rbe0859f 53 53 expect(argument2).to eq(original2) 54 54 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 55 59 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/defined_with_params_spec.rb
reb1ccd6 rbe0859f 12 12 it { is_expected.to run.with_params('User[bob]', {}).and_return(false) } 13 13 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 14 19 end 15 20 … … 24 29 it { is_expected.to run.with_params('User[dan]', {'ensure' => 'absent', 'managehome' => false}).and_return(false) } 25 30 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 26 68 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_at_spec.rb
reb1ccd6 rbe0859f 19 19 it { is_expected.to run.with_params([0, 1, 2], -1).and_return([0, 1]) } 20 20 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 21 23 22 24 it "should leave the original array intact" do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_spec.rb
reb1ccd6 rbe0859f 5 5 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) } 6 6 it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError) } 7 it { is_expected.to run.with_params([], 'two') } 7 8 it { is_expected.to run.with_params([], 'two', 'three').and_raise_error(Puppet::ParseError) } 8 9 it { is_expected.to run.with_params(1, 'two').and_raise_error(TypeError) } … … 13 14 it { is_expected.to run.with_params(['two'], 'two').and_return([]) } 14 15 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']) } 15 17 it { is_expected.to run.with_params(['one', 'two', 'three'], 'four').and_return(['one', 'two', 'three']) } 16 18 it { is_expected.to run.with_params(['one', 'two', 'three'], 'e').and_return(['one', 'two', 'three']) } … … 18 20 it { is_expected.to run.with_params(['two', 'one', 'two', 'three', 'two'], 'two').and_return(['one', 'three']) } 19 21 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(['ŧңŗё℮']) } 20 23 end 21 24 … … 29 32 it { is_expected.to run.with_params('foobarbabarz', 'bar').and_return('foobaz') } 30 33 it { is_expected.to run.with_params('foobarbabarz', ['foo', 'bar']).and_return('baz') } 31 # this is so sick 34 it { is_expected.to run.with_params('ƒōōβậяβậβậяź', ['ƒōō', 'βậя']).and_return('βậź') } 35 32 36 it { is_expected.to run.with_params('barfoobar', ['barbar', 'foo']).and_return('barbar') } 33 37 it { is_expected.to run.with_params('barfoobar', ['foo', 'barbar']).and_return('') } … … 45 49 .with_params({'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'}, ['key1', 'key2']) \ 46 50 .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'}) 47 55 } 48 56 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_undef_values_spec.rb
reb1ccd6 rbe0859f 17 17 it { is_expected.to run.with_params([undef_value]).and_return([]) } 18 18 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(['ớņέ','ŧשּׁō','ŧħґëə']) } 19 20 end 20 21 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/delete_values_spec.rb
reb1ccd6 rbe0859f 20 20 } 21 21 it { is_expected.to run \ 22 .with_params({'key1' => 'value1', 'key2' => 'value to delete'}, 'value to delete') \ 22 .with_params({'ҝếỵ1 ' => 'νâĺūẹ1', 'ҝếỵ2' => 'value to delete'}, 'value to delete') \ 23 .and_return({'ҝếỵ1 ' => 'νâĺūẹ1'}) 24 } 25 it { is_expected.to run \ 26 .with_params({'key1' => 'value1', 'key2' => 'νǎŀữ℮ ťớ đêłểťė'}, 'νǎŀữ℮ ťớ đêłểťė') \ 23 27 .and_return({'key1' => 'value1'}) 24 28 } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/difference_spec.rb
reb1ccd6 rbe0859f 13 13 it { is_expected.to run.with_params([], ['one']).and_return([]) } 14 14 it { is_expected.to run.with_params(['one'], ['one']).and_return([]) } 15 it { is_expected.to run.with_params(['ớņέ'], ['']).and_return(['ớņέ']) } 15 16 it { is_expected.to run.with_params(['one'], []).and_return(['one']) } 16 17 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]) } 17 19 it { is_expected.to run.with_params(['one', 'two', 'two', 'three'], ['two', 'three']).and_return(['one']) } 18 20 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
reb1ccd6 rbe0859f 2 2 3 3 describe '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) }7 4 8 it { is_expected.to run.with_params({}, []).and_return({}) } 9 it { is_expected.to run.with_params({"a" => "b"}, ["a"]).and_return("b") } 10 it { is_expected.to run.with_params({"a" => {"b" => "c"}}, ["a", "b"]).and_return("c") } 11 it { is_expected.to run.with_params({}, ["a", "b"], "d").and_return("d") } 12 it { is_expected.to run.with_params({"a" => false}, ["a"]).and_return(false) } 5 it "should exist" do 6 expect(Puppet::Parser::Functions.function("dig")).to eq("function_dig") 7 end 8 9 it "should give a deprecation warning when called" do 10 scope.expects(:warning).with("dig() DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version.") 11 scope.function_dig([{}, []]) 12 end 13 13 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dirname_spec.rb
reb1ccd6 rbe0859f 11 11 it { is_expected.to run.with_params('/path/to/a/file.ext').and_return('/path/to/a') } 12 12 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 13 18 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dos2unix_spec.rb
reb1ccd6 rbe0859f 30 30 end 31 31 32 context ' Converting from unix to unix format' do33 sample_text = "Hello\nWorld\n"34 desired_output = "Hello\nWorld\n"32 context 'Internationalization (i18N) values' do 33 sample_text_utf8 = "Ħ℮ļłǿ\r\nשׁөŕłđ\r\n" 34 desired_output_utf8 = "Ħ℮ļłǿ\nשׁөŕłđ\n" 35 35 36 it 'should output unix format' do 37 should run.with_params(sample_text).and_return(desired_output) 36 sample_text_doublebyte = "こんにちは\r\n世界\r\n" 37 desired_output_doublebyte = "こんにちは\n世界\n" 38 39 it 'should output uft8 string' do 40 should run.with_params(sample_text_utf8).and_return(desired_output_utf8) 41 end 42 43 it 'should output double byte string' do 44 should run.with_params(sample_text_doublebyte).and_return(desired_output_doublebyte) 38 45 end 39 46 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_packages_spec.rb
reb1ccd6 rbe0859f 34 34 end 35 35 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 36 59 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/ensure_resource_spec.rb
reb1ccd6 rbe0859f 5 5 it { is_expected.to run.with_params().and_raise_error(ArgumentError, /Must specify a type/) } 6 6 it { is_expected.to run.with_params('type').and_raise_error(ArgumentError, /Must specify a title/) } 7 it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) } 7 if Puppet::Util::Package.versioncmp(Puppet.version, '4.6.0') >= 0 8 it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(ArgumentError) } 9 else 10 it { is_expected.to run.with_params('type', 'title', {}, 'extras').and_raise_error(Puppet::ParseError) } 11 end 12 8 13 it { 9 14 pending("should not accept numbers as arguments") 10 15 is_expected.to run.with_params(1,2,3).and_raise_error(Puppet::ParseError) 11 16 } 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 12 74 13 75 context 'given a catalog with "user { username1: ensure => present }"' do … … 27 89 it { expect(lambda { catalogue }).to contain_user('username1').with_ensure('present') } 28 90 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') } 29 98 end 30 99 … … 53 122 end 54 123 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 55 135 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/flatten_spec.rb
reb1ccd6 rbe0859f 12 12 it { is_expected.to run.with_params(["a","b","c","d","e","f","g"]).and_return(["a","b","c","d","e","f","g"]) } 13 13 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(["ã","β","ĉ","đ","ẽ","ƒ","ġ"]) } 14 15 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/fqdn_rand_string_spec.rb
reb1ccd6 rbe0859f 21 21 it { is_expected.to run.with_params(100, 'a').and_return(/\Aa{100}\z/) } 22 22 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/) } 23 24 24 25 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
reb1ccd6 rbe0859f 8 8 it { is_expected.to run.with_params('').and_return('') } 9 9 it { is_expected.to run.with_params('a').and_return('a') } 10 it { is_expected.to run.with_params('ã').and_return('ã') } 10 11 11 12 it { is_expected.to run.with_params([]).and_return([]) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getparam_spec.rb
reb1ccd6 rbe0859f 23 23 it { is_expected.to run.with_params('User[two]', 'ensure').and_return('') } 24 24 it { is_expected.to run.with_params('User[one]', 'shell').and_return('/bin/sh') } 25 it { 26 pending("both rspec-puppet as well as the function do the wrong thing here.") 27 is_expected.to run.with_params('User[one]', 'managehome').and_return(false) 28 } 25 it { is_expected.to run.with_params('User[one]', 'managehome').and_return(false) } 26 end 27 28 describe 'when compared against a user resource with UTF8 and double byte params' do 29 let(:pre_condition) { 'user { ["三", "ƒốưř"]: ensure => present }' } 30 31 it { is_expected.to run.with_params('User[三]', 'ensure').and_return('present') } 32 it { is_expected.to run.with_params('User[ƒốưř]', 'ensure').and_return('present') } 33 29 34 end 30 35 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/getvar_spec.rb
reb1ccd6 rbe0859f 6 6 it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 7 7 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) } 8 10 9 11 context 'given variables in namespaces' do … … 19 21 it { is_expected.to run.with_params('::site::data::bar').and_return(nil) } 20 22 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 21 37 end 38 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/grep_spec.rb
reb1ccd6 rbe0859f 17 17 it { is_expected.to run.with_params(['one', 'two', 'three'], 'two').and_return(['two']) } 18 18 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(['ţשּׂỡ', 'ţһŗəè']) } 19 20 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_ip_network_spec.rb
reb1ccd6 rbe0859f 10 10 { 11 11 :interfaces => 'eth0,lo', 12 :network => :undefined,13 12 :network_lo => '127.0.0.0', 14 13 :network_eth0 => '10.0.0.0', -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/has_key_spec.rb
reb1ccd6 rbe0859f 13 13 it { is_expected.to run.with_params({}, "key").and_return(false) } 14 14 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 15 20 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/hash_spec.rb
reb1ccd6 rbe0859f 11 11 it { is_expected.to run.with_params([]).and_return({}) } 12 12 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' }) } 13 14 it { is_expected.to run.with_params(['key1', 'value1', 'key2', 'value2']).and_return({ 'key1' => 'value1', 'key2' => 'value2' }) } 14 15 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/intersection_spec.rb
reb1ccd6 rbe0859f 15 15 it { is_expected.to run.with_params(['one'], ['one']).and_return(['one']) } 16 16 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(['ŧשợ', 'ţђŕẽё']) } 17 18 it { is_expected.to run.with_params(['one', 'two', 'two', 'three'], ['two', 'three']).and_return(['two', 'three']) } 18 19 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
reb1ccd6 rbe0859f 22 22 is_expected.to run.with_params(5, String).and_return(false) 23 23 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 24 29 end 25 30 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_array_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'is_array' do 4 4 5 it { is_expected.not_to eq(nil) } 5 6 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } … … 17 18 it { is_expected.to run.with_params(1).and_return(false) } 18 19 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 19 36 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_bool_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'is_bool' do 4 4 5 it { is_expected.not_to eq(nil) } 5 6 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } … … 13 14 it { is_expected.to run.with_params('true').and_return(false) } 14 15 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 15 32 end 33 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_float_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'is_float' do 4 4 5 it { is_expected.not_to eq(nil) } 6 5 7 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 6 8 it { is_expected.to run.with_params(0.1, 0.2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } … … 20 22 it { is_expected.to run.with_params(1).and_return(false) } 21 23 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 22 42 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_integer_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'is_integer' do 4 4 5 it { is_expected.not_to eq(nil) } 6 5 7 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 6 8 it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } … … 10 12 it { is_expected.to run.with_params(-3).and_return(true) } 11 13 it { is_expected.to run.with_params('-3').and_return(true) } 12 14 13 15 it { is_expected.to run.with_params(3.7).and_return(false) } 14 16 it { is_expected.to run.with_params('3.7').and_return(false) } … … 23 25 it { is_expected.to run.with_params(false).and_return(false) } 24 26 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 25 45 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_ip_address_spec.rb
reb1ccd6 rbe0859f 21 21 it { is_expected.to run.with_params({}).and_return(false) } 22 22 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 23 40 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_mac_address_spec.rb
reb1ccd6 rbe0859f 10 10 it { is_expected.to run.with_params('').and_return(false) } 11 11 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 12 18 it { 13 19 pending "should properly typecheck its arguments" -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_numeric_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'is_numeric' do 4 4 5 it { is_expected.not_to eq(nil) } 6 5 7 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 6 8 it { is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } … … 26 28 it { is_expected.to run.with_params('0001234').and_return(false) } 27 29 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 28 48 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_string_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'is_string' do 4 4 5 it { is_expected.not_to eq(nil) } 5 6 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } … … 26 27 it { is_expected.to run.with_params('one').and_return(true) } 27 28 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 28 47 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_keys_to_values_spec.rb
reb1ccd6 rbe0859f 12 12 it { is_expected.to run.with_params({ 'key' => 'value' }, '').and_return(['keyvalue']) } 13 13 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 14 20 it { is_expected.to run.with_params({ 'key' => nil }, ':').and_return(['key:']) } 15 21 it 'should run join_keys_to_values(<hash with multiple keys>, ":") and return the proper array' do … … 17 23 expect(result.sort).to eq(['key1:value1', 'key2:value2'].sort) 18 24 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 19 29 end 30 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/join_spec.rb
reb1ccd6 rbe0859f 17 17 it { is_expected.to run.with_params(['one', 'two', 'three']).and_return('onetwothree') } 18 18 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('ōŋể:ŧשợ:ţђŕẽё') } 19 20 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/keys_spec.rb
reb1ccd6 rbe0859f 17 17 expect(result).to match_array(['key1', 'key2']) 18 18 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 19 24 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/load_module_metadata_spec.rb
reb1ccd6 rbe0859f 6 6 it { is_expected.to run.with_params("one", "two", "three").and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 7 7 8 it "should json parse the file" do 9 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/') 10 allow(File).to receive(:exists?).with(/metadata.json/).and_return(true) 11 allow(File).to receive(:read).with(/metadata.json/).and_return('{"name": "spencer-science"}') 8 describe "when calling with valid arguments" do 9 before :each do 10 allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/, {:encoding=>"utf-8"}).and_return('{"name": "puppetlabs-stdlib"}') 11 allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/).and_return('{"name": "puppetlabs-stdlib"}') 12 end 12 13 13 result = subject.call(['science']) 14 expect(result['name']).to eq('spencer-science') 15 end 14 context "when calling with valid utf8 and double byte character arguments" do 15 before :each do 16 allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/, {:encoding=>"utf-8"}).and_return('{"ĭďèʼnţĩƒіểя": "ċơņťęאּť ỡƒ ţħíš - 17 この文字"}') 18 allow(File).to receive(:read).with(/\/(stdlib|test)\/metadata.json/).and_return('{"ĭďèʼnţĩƒіểя": "ċơņťęאּť ỡƒ ţħíš - 19 この文字"}') 20 end 16 21 17 it "should fail by default if there is no metadata.json" do 18 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/') 19 allow(File).to receive(:exists?).with(/metadata.json/).and_return(false) 20 expect {subject.call(['science'])}.to raise_error(Puppet::ParseError) 21 end 22 it "should json parse the file" do 23 if Puppet::Util::Platform.windows? 24 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/') 25 allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(true) 26 allow(File).to receive(:read).with('C:/path/to/module/metadata.json').and_return('{"name": "spencer-science"}') 27 else 28 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/') 29 allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(true) 30 allow(File).to receive(:read).with('/path/to/module/metadata.json').and_return('{"name": "spencer-science"}') 31 end 22 32 23 it "should return nil if user allows empty metadata.json" do 24 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/') 25 allow(File).to receive(:exists?).with(/metadata.json/).and_return(false) 26 result = subject.call(['science', true]) 27 expect(result).to eq({}) 33 result = subject.call(['science']) 34 expect(result['name']).to eq('spencer-science') 35 end 36 37 it "should fail by default if there is no metadata.json" do 38 if Puppet::Util::Platform.windows? 39 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/') 40 allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(false) 41 else 42 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/') 43 allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false) 44 end 45 expect {subject.call(['science'])}.to raise_error(Puppet::ParseError) 46 end 47 48 it "should return nil if user allows empty metadata.json" do 49 if Puppet::Util::Platform.windows? 50 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('C:/path/to/module/') 51 allow(File).to receive(:exists?).with('C:/path/to/module/metadata.json').and_return(false) 52 else 53 allow(scope).to receive(:function_get_module_path).with(['science']).and_return('/path/to/module/') 54 allow(File).to receive(:exists?).with('/path/to/module/metadata.json').and_return(false) 55 end 56 result = subject.call(['science', true]) 57 expect(result).to eq({}) 58 end 59 end 28 60 end 29 61 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/loadyaml_spec.rb
reb1ccd6 rbe0859f 3 3 describe 'loadyaml' do 4 4 it { is_expected.not_to eq(nil) } 5 it { is_expected.to run.with_params().and_raise_error( Puppet::ParseError, /wrong number of arguments/i) }6 it { is_expected.to run.with_params('', '').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 5 it { is_expected.to run.with_params().and_raise_error(ArgumentError, /wrong number of arguments/i) } 6 7 7 context 'when a non-existing file is specified' do 8 8 let(:filename) { '/tmp/doesnotexist' } … … 11 11 YAML.expects(:load_file).never 12 12 } 13 it { is_expected.to run.with_params(filename).and_return(nil) } 13 it { is_expected.to run.with_params(filename, {'default' => 'value'}).and_return({'default' => 'value'}) } 14 it { is_expected.to run.with_params(filename, {'đẽƒằưļŧ' => '٧ẵłựέ'}).and_return({'đẽƒằưļŧ' => '٧ẵłựέ'}) } 15 it { is_expected.to run.with_params(filename, {'デフォルト' => '値'}).and_return({'デフォルト' => '値'}) } 14 16 end 17 15 18 context 'when an existing file is specified' do 16 19 let(:filename) { '/tmp/doesexist' } 17 let(:data) { { 'key' => 'value' } }20 let(:data) { { 'key' => 'value', 'ķęŷ' => 'νậŀųề', 'キー' => '値'} } 18 21 before { 19 22 File.expects(:exists?).with(filename).returns(true).once … … 22 25 it { is_expected.to run.with_params(filename).and_return(data) } 23 26 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 24 36 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/lstrip_spec.rb
reb1ccd6 rbe0859f 23 23 it { is_expected.to run.with_params(' one ').and_return('one ') } 24 24 it { is_expected.to run.with_params(' one ').and_return('one ') } 25 it { is_expected.to run.with_params(' ǿňè ').and_return('ǿňè ') } 25 26 it { is_expected.to run.with_params("\tone ").and_return('one ') } 26 27 it { is_expected.to run.with_params("\t one ").and_return('one ') } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/member_spec.rb
reb1ccd6 rbe0859f 18 18 it { is_expected.to run.with_params(['one'], ['one']).and_return(true) } 19 19 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) } 20 21 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) } 21 23 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parsejson_spec.rb
reb1ccd6 rbe0859f 13 13 context 'with correct JSON data' do 14 14 15 it 'should be able to parse aJSON data with a Hash' do15 it 'should be able to parse JSON data with a Hash' do 16 16 is_expected.to run.with_params('{"a":"1","b":"2"}'). 17 17 and_return({'a'=>'1', 'b'=>'2'}) 18 18 end 19 19 20 it 'should be able to parse aJSON data with an Array' do20 it 'should be able to parse JSON data with an Array' do 21 21 is_expected.to run.with_params('["a","b","c"]'). 22 22 and_return(['a', 'b', 'c']) … … 30 30 end 31 31 32 it 'should be able to parse aJSON data with a mixed structure' do32 it 'should be able to parse JSON data with a mixed structure' do 33 33 is_expected.to run.with_params('{"a":"1","b":2,"c":{"d":[true,false]}}'). 34 34 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({'×' =>'これ', 'ý' => '記号', 'です' => { '©' => ['Á', 'ß'] } }) 35 40 end 36 41 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/parseyaml_spec.rb
reb1ccd6 rbe0859f 19 19 end 20 20 21 it 'should be able to parse aYAML data with a Hash' do21 it 'should be able to parse YAML data with a Hash' do 22 22 is_expected.to run.with_params("---\na: '1'\nb: '2'\n"). 23 23 and_return({'a' => '1', 'b' => '2'}) 24 24 end 25 25 26 it 'should be able to parse aYAML data with an Array' do26 it 'should be able to parse YAML data with an Array' do 27 27 is_expected.to run.with_params("---\n- a\n- b\n- c\n"). 28 28 and_return(['a', 'b', 'c']) 29 29 end 30 30 31 it 'should be able to parse aYAML data with a mixed structure' do31 it 'should be able to parse YAML data with a mixed structure' do 32 32 is_expected.to run.with_params("---\na: '1'\nb: 2\nc:\n d:\n - :a\n - true\n - false\n"). 33 33 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"=>"×", "これ"=>"記号", "です"=>{"©"=>["Á", "ß"]} }) 34 39 end 35 40 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/pick_default_spec.rb
reb1ccd6 rbe0859f 6 6 7 7 it { is_expected.to run.with_params('one', 'two').and_return('one') } 8 it { is_expected.to run.with_params('ớņệ', 'ťωơ').and_return('ớņệ') } 8 9 it { is_expected.to run.with_params('', 'two').and_return('two') } 9 10 it { is_expected.to run.with_params(:undef, 'two').and_return('two') } … … 14 15 describe "when providing #{value.inspect} as default" do 15 16 it { is_expected.to run.with_params('one', value).and_return('one') } 17 it { is_expected.to run.with_params('ớņệ', value).and_return('ớņệ') } 16 18 it { is_expected.to run.with_params([], value).and_return([]) } 17 19 it { is_expected.to run.with_params({}, value).and_return({}) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/pick_spec.rb
reb1ccd6 rbe0859f 10 10 it { is_expected.to run.with_params(:undefined, 'two').and_return('two') } 11 11 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 12 17 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/prefix_spec.rb
reb1ccd6 rbe0859f 12 12 it { is_expected.to run.with_params([]).and_return([]) } 13 13 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']) } 14 15 it { is_expected.to run.with_params([], '').and_return([]) } 15 16 it { is_expected.to run.with_params([''], '').and_return(['']) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/range_spec.rb
reb1ccd6 rbe0859f 80 80 end 81 81 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 82 90 context 'with dash-range syntax' do 83 91 it { is_expected.to run.with_params('4-1').and_return([]) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reject_spec.rb
reb1ccd6 rbe0859f 17 17 it { is_expected.to run.with_params(['one', 'two', 'three'], 'two').and_return(['one', 'three']) } 18 18 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ệ']) } 19 20 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/reverse_spec.rb
reb1ccd6 rbe0859f 16 16 it { is_expected.to run.with_params(['one', 'two', 'three']).and_return(['three', 'two', 'one']) } 17 17 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(['ƒŏůŗ', 'ŧңяəė', 'ťŵọ', 'ổňë']) } 18 19 19 20 it { is_expected.to run.with_params('').and_return('') } … … 21 22 it { is_expected.to run.with_params('abc').and_return('cba') } 22 23 it { is_expected.to run.with_params('abcd').and_return('dcba') } 24 it { is_expected.to run.with_params('āβćđ').and_return('đćβā') } 23 25 24 26 context 'when using a class extending String' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/rstrip_spec.rb
reb1ccd6 rbe0859f 23 23 it { is_expected.to run.with_params(' one ').and_return(' one') } 24 24 it { is_expected.to run.with_params(' one ').and_return(' one') } 25 it { is_expected.to run.with_params(' ǿňè ').and_return(' ǿňè') } 25 26 it { is_expected.to run.with_params("\tone ").and_return("\tone") } 26 27 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
reb1ccd6 rbe0859f 51 51 scope.function_seeded_rand([max, seed]) 52 52 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 53 58 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/shuffle_spec.rb
reb1ccd6 rbe0859f 27 27 it { is_expected.to run.with_params('abcd').and_return('dcba') } 28 28 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 29 34 context 'when using a class extending String' do 30 35 it { is_expected.to run.with_params(AlsoString.new('asdfghjkl')).and_return('lkhdsfajg') } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/size_spec.rb
reb1ccd6 rbe0859f 20 20 it { is_expected.to run.with_params({'1' => '2'}).and_return(1) } 21 21 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) } 22 23 23 24 it { is_expected.to run.with_params('').and_return(0) } … … 25 26 it { is_expected.to run.with_params('abc').and_return(3) } 26 27 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) } 27 30 28 31 context 'when using a class extending String' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/squeeze_spec.rb
reb1ccd6 rbe0859f 15 15 it { is_expected.to run.with_params('aaaaaaaaa', 'a').and_return('a') } 16 16 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('ậậậậậậậậậậậậậậậậậ語語語語©') } 17 23 end 18 24 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/strip_spec.rb
reb1ccd6 rbe0859f 31 31 it { is_expected.to run.with_params("\t one \t").and_return('one') } 32 32 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('ỏŋέ') } 33 34 it { is_expected.to run.with_params(AlsoString.new(' one ')).and_return('one') } 34 35 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/suffix_spec.rb
reb1ccd6 rbe0859f 16 16 it { is_expected.to run.with_params(['one'], 'post').and_return(['onepost']) } 17 17 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 18 20 it { 19 21 is_expected.to run.with_params({}).and_return({}) -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/union_spec.rb
reb1ccd6 rbe0859f 21 21 it { is_expected.to run.with_params(['one', 'two'], ['two', 'three'], ['one', 'three']).and_return(['one', 'two', 'three']) } 22 22 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(['ốńə', 'ţשׂợ', 'ŧĥяếệ', 'ƒởųŗ']) } 23 24 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 24 25 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/unique_spec.rb
reb1ccd6 rbe0859f 18 18 it { is_expected.to run.with_params(['a']).and_return(['a']) } 19 19 it { is_expected.to run.with_params(['a', 'b', 'a']).and_return(['a', 'b']) } 20 it { is_expected.to run.with_params(['ã', 'ъ', 'ã']).and_return(['ã', 'ъ']) } 20 21 end 21 22 … … 24 25 it { is_expected.to run.with_params('a').and_return('a') } 25 26 it { is_expected.to run.with_params('aaba').and_return('ab') } 27 it { is_expected.to run.with_params('ããъã').and_return('ãъ') } 26 28 end 27 29 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_absolute_path_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe '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 4 15 describe 'signature validation' do 5 16 it { is_expected.not_to eq(nil) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_array_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'validate_array' do 4 4 5 describe 'signature validation' do 6 after(:all) do 7 ENV.delete('STDLIB_LOG_DEPRECATIONS') 8 end 5 9 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 6 16 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 7 17 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_bool_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe '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 4 15 describe 'signature validation' do 5 16 it { is_expected.not_to eq(nil) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_cmd_spec.rb
reb1ccd6 rbe0859f 1 1 require 'spec_helper' 2 2 3 describe 'validate_cmd' do3 describe 'validate_cmd', :unless => Puppet::Util::Platform.windows? do 4 4 let(:touch) { File.exists?('/usr/bin/touch') ? '/usr/bin/touch' : '/bin/touch' } 5 5 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_hash_spec.rb
reb1ccd6 rbe0859f 5 5 it { is_expected.not_to eq(nil) } 6 6 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 7 19 8 20 describe 'valid inputs' do -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_integer_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe '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 4 15 describe 'signature validation' do 5 16 it { is_expected.not_to eq(nil) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ip_address_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'validate_ip_address' do 4 4 5 describe 'signature validation' do 5 6 it { is_expected.not_to eq(nil) } … … 20 21 it { is_expected.to run.with_params('::1/64') } 21 22 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 22 41 context 'with netmasks' do 23 42 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
reb1ccd6 rbe0859f 2 2 3 3 describe 'validate_ipv4_address' do 4 4 5 describe 'signature validation' do 5 6 it { is_expected.not_to eq(nil) } 6 7 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 8 end 7 9 8 describe 'valid inputs' do 9 it { is_expected.to run.with_params('0.0.0.0') } 10 it { is_expected.to run.with_params('8.8.8.8') } 11 it { is_expected.to run.with_params('127.0.0.1') } 12 it { is_expected.to run.with_params('10.10.10.10') } 13 it { is_expected.to run.with_params('194.232.104.150') } 14 it { is_expected.to run.with_params('244.24.24.24') } 15 it { is_expected.to run.with_params('255.255.255.255') } 16 it { is_expected.to run.with_params('1.2.3.4', '5.6.7.8') } 17 context 'with netmasks' do 18 it { is_expected.to run.with_params('8.8.8.8/0') } 19 it { is_expected.to run.with_params('8.8.8.8/16') } 20 it { is_expected.to run.with_params('8.8.8.8/32') } 21 it { is_expected.to run.with_params('8.8.8.8/255.255.0.0') } 22 end 10 context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do 11 after(:all) do 12 ENV.delete('STDLIB_LOG_DEPRECATIONS') 23 13 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 24 26 25 describe 'invalid inputs' do 26 it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /is not a string/) } 27 it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /is not a string/) } 28 it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /is not a string/) } 29 it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) } 30 it { is_expected.to run.with_params('0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) } 31 it { is_expected.to run.with_params('0.0.0.256').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) } 32 it { is_expected.to run.with_params('0.0.0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) } 33 it { is_expected.to run.with_params('affe::beef').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) } 34 it { is_expected.to run.with_params('1.2.3.4', {}).and_raise_error(Puppet::ParseError, /is not a string/) } 35 it { is_expected.to run.with_params('1.2.3.4', 1).and_raise_error(Puppet::ParseError, /is not a string/) } 36 it { is_expected.to run.with_params('1.2.3.4', true).and_raise_error(Puppet::ParseError, /is not a string/) } 37 it { is_expected.to run.with_params('1.2.3.4', 'one').and_raise_error(Puppet::ParseError, /is not a valid IPv4/) } 27 SharedData::IPV4_PATTERNS.each do |value| 28 it { is_expected.to run.with_params(value) } 29 end 30 31 SharedData::IPV4_NEGATIVE_PATTERNS.each do |value| 32 it { is_expected.to run.with_params(value).and_raise_error(Puppet::ParseError, /is not a valid IPv4/) } 33 end 34 35 describe 'invalid inputs' do 36 [ {}, [], 1, true ].each do |invalid| 37 it { is_expected.to run.with_params(invalid).and_raise_error(Puppet::ParseError, /is not a string/) } 38 it { is_expected.to run.with_params(SharedData::IPV4_PATTERNS.first, invalid).and_raise_error(Puppet::ParseError, /is not a string/) } 38 39 end 39 40 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe 'validate_ipv6_address' do 4 4 5 describe 'signature validation' do 5 6 it { is_expected.not_to eq(nil) } 6 7 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } 8 end 7 9 8 describe 'valid inputs' do 9 it { is_expected.to run.with_params('3ffe:0505:0002::') } 10 it { is_expected.to run.with_params('3ffe:0505:0002::', '3ffe:0505:0002::2') } 11 it { is_expected.to run.with_params('::1/64') } 12 it { is_expected.to run.with_params('fe80::a00:27ff:fe94:44d6/64') } 10 context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do 11 after(:all) do 12 ENV.delete('STDLIB_LOG_DEPRECATIONS') 13 13 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 14 26 15 describe 'invalid inputs' do 16 it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /is not a string/) } 17 it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /is not a string/) } 18 it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 19 it { is_expected.to run.with_params('0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 20 it { is_expected.to run.with_params('0.0.0.256').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 21 it { is_expected.to run.with_params('0.0.0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 22 it { is_expected.to run.with_params('affe:beef').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 23 it { is_expected.to run.with_params('::1', {}).and_raise_error(Puppet::ParseError, /is not a string/) } 24 it { is_expected.to run.with_params('::1', true).and_raise_error(Puppet::ParseError, /is not a string/) } 25 it { is_expected.to run.with_params('::1', 'one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 26 context 'unless running on ruby 1.8.7', :if => RUBY_VERSION != '1.8.7' do 27 it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /is not a string/) } 28 it { is_expected.to run.with_params('::1', 1).and_raise_error(Puppet::ParseError, /is not a string/) } 29 end 27 describe 'valid inputs' do 28 it { is_expected.to run.with_params('3ffe:0505:0002::') } 29 it { is_expected.to run.with_params('3ffe:0505:0002::', '3ffe:0505:0002::2') } 30 it { is_expected.to run.with_params('::1/64') } 31 it { is_expected.to run.with_params('fe80::a00:27ff:fe94:44d6/64') } 32 it { is_expected.to run.with_params('fe80:0000:0000:0000:0204:61ff:fe9d:f156') } 33 it { is_expected.to run.with_params('fe80:0:0:0:204:61ff:fe9d:f156') } 34 it { is_expected.to run.with_params('fe80::204:61ff:fe9d:f156') } 35 it { is_expected.to run.with_params('fe80:0:0:0:0204:61ff:254.157.241.86') } 36 it { is_expected.to run.with_params('::1') } 37 it { is_expected.to run.with_params('fe80::') } 38 it { is_expected.to run.with_params('2001::') } 39 end 40 41 describe 'invalid inputs' do 42 it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /is not a string/) } 43 it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /is not a string/) } 44 it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 45 it { is_expected.to run.with_params('0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 46 it { is_expected.to run.with_params('0.0.0.256').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 47 it { is_expected.to run.with_params('0.0.0.0.0').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 48 it { is_expected.to run.with_params('::ffff:2.3.4').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 49 it { is_expected.to run.with_params('::ffff:257.1.2.3').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 50 it { is_expected.to run.with_params('::ffff:12345678901234567890.1.26').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 51 it { is_expected.to run.with_params('affe:beef').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 52 it { is_expected.to run.with_params('::1', {}).and_raise_error(Puppet::ParseError, /is not a string/) } 53 it { is_expected.to run.with_params('::1', true).and_raise_error(Puppet::ParseError, /is not a string/) } 54 it { is_expected.to run.with_params('::1', 'one').and_raise_error(Puppet::ParseError, /is not a valid IPv6/) } 55 context 'unless running on ruby 1.8.7', :if => RUBY_VERSION != '1.8.7' do 56 it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /is not a string/) } 57 it { is_expected.to run.with_params('::1', 1).and_raise_error(Puppet::ParseError, /is not a string/) } 30 58 end 31 59 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_numeric_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe '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 4 15 describe 'signature validation' do 5 16 it { is_expected.not_to eq(nil) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_re_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe '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 4 15 describe 'signature validation' do 5 16 it { is_expected.not_to eq(nil) } … … 18 29 19 30 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 }36 31 it { is_expected.to run.with_params('', []).and_raise_error(Puppet::ParseError, /does not match/) } 37 32 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
reb1ccd6 rbe0859f 2 2 3 3 describe '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 4 15 describe 'signature validation' do 5 16 it { is_expected.not_to eq(nil) } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/validate_string_spec.rb
reb1ccd6 rbe0859f 2 2 3 3 describe '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 4 15 describe 'signature validation' do 5 16 it { is_expected.not_to eq(nil) } … … 8 19 describe 'valid inputs' do 9 20 it { is_expected.to run.with_params('') } 21 it { is_expected.to run.with_params(nil) } 10 22 it { is_expected.to run.with_params('one') } 11 23 it { is_expected.to run.with_params('one', 'two') } -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/values_at_spec.rb
reb1ccd6 rbe0859f 31 31 end 32 32 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 33 38 context 'when requesting multiple items' do 34 39 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
reb1ccd6 rbe0859f 17 17 expect(result).to match_array(['value1', 'value2', 'value2']) 18 18 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 19 24 end -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/zip_spec.rb
reb1ccd6 rbe0859f 13 13 it { is_expected.to run.with_params([1,2,3], [4,5,6], false).and_return([[1,4], [2,5], [3,6]]) } 14 14 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 15 20 end 21 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper_acceptance.rb
reb1ccd6 rbe0859f 1 1 #! /usr/bin/env ruby -S rspec 2 require 'puppet' 2 3 require 'beaker-rspec' 3 4 require 'beaker/puppet_install_helper' 4 5 UNSUPPORTED_PLATFORMS = [] 5 require 'beaker/module_install_helper' 6 6 7 7 run_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) 8 11 9 12 RSpec.configure do |c| 10 # Project root11 proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))12 13 13 # Readable test descriptions 14 14 c.formatter = :documentation … … 16 16 # Configure all nodes in nodeset 17 17 c.before :suite do 18 if ENV['FUTURE_PARSER'] == 'yes'19 default[:default_apply_opts] ||= {}20 default[:default_apply_opts].merge!({:parser => 'future'})21 end22 23 copy_root_module_to(default, :source => proj_root, :module_name => 'stdlib')24 18 end 25 end26 27 def is_future_parser_enabled?28 if default[:type] == 'aio'29 return true30 elsif default[:default_apply_opts]31 return default[:default_apply_opts][:parser] == 'future'32 end33 return false34 19 end 35 20 -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/spec_helper_local.rb
reb1ccd6 rbe0859f 1 # automatically load any shared examples or contexts 2 Dir["./spec/support/**/*.rb"].sort.each { |f| require f } 1 3 2 4 # 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
reb1ccd6 rbe0859f 364 364 end 365 365 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 366 373 it 'should remove one line if it matches' do 367 374 File.open(@tmpfile, 'w') do |fh| -
src/puppetcode/environments/gnuboat/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb
reb1ccd6 rbe0859f 3 3 require 'tempfile' 4 4 describe 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 5 19 let :file_line do 6 Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => '/tmp/path')20 Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => tmp_path) 7 21 end 8 22 it 'should accept a line and path' do 9 23 file_line[:line] = 'my_line' 10 24 expect(file_line[:line]).to eq('my_line') 11 file_line[:path] = '/my/path'12 expect(file_line[:path]).to eq( '/my/path')25 file_line[:path] = my_path 26 expect(file_line[:path]).to eq(my_path) 13 27 end 14 28 it 'should accept a match regex' do … … 20 34 Puppet::Type.type(:file_line).new( 21 35 :name => 'foo', 22 :path => '/my/path',36 :path => my_path, 23 37 :line => 'foo=bar', 24 38 :match => '^bar=blah$' … … 29 43 Puppet::Type.type(:file_line).new( 30 44 :name => 'foo', 31 :path => '/my/path',45 :path => my_path, 32 46 :line => 'foo=bar', 33 47 :match => '^\s*foo=.*$' 34 48 )}.not_to raise_error 35 49 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 36 68 it 'should accept posix filenames' do 37 file_line[:path] = '/tmp/path'38 expect(file_line[:path]).to eq( '/tmp/path')69 file_line[:path] = tmp_path 70 expect(file_line[:path]).to eq(tmp_path) 39 71 end 40 72 it 'should not accept unqualified path' do … … 42 74 end 43 75 it 'should require that a line is specified' do 44 expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => '/tmp/file') }.to raise_error(Puppet::Error, /line is a required attribute/)76 expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path) }.to raise_error(Puppet::Error, /line is a required attribute/) 45 77 end 46 78 it 'should not require that a line is specified when matching for absence' do 47 expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => '/tmp/file', :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error79 expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error 48 80 end 49 81 it 'should require that a file is specified' do … … 56 88 expect(file_line[:replace]).to eq :true 57 89 end 58 90 it 'should default to encoding => UTF-8' do 91 expect(file_line[:encoding]).to eq 'UTF-8' 92 end 93 it 'should accept encoding => iso-8859-1' do 94 expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :ensure => :present, :encoding => 'iso-8859-1', :line => 'bar') }.not_to raise_error 95 end 59 96 it "should autorequire the file it manages" do 60 97 catalog = Puppet::Resource::Catalog.new 61 file = Puppet::Type.type(:file).new(:name => "/tmp/path")98 file = Puppet::Type.type(:file).new(:name => tmp_path) 62 99 catalog.add_resource file 63 100 catalog.add_resource file_line 64 101 65 102 relationship = file_line.autorequire.find do |rel| 66 (rel.source.to_s == "File[ /tmp/path]") and (rel.target.to_s == file_line.to_s)103 (rel.source.to_s == "File[#{tmp_path}]") and (rel.target.to_s == file_line.to_s) 67 104 end 68 105 expect(relationship).to be_a Puppet::Relationship
Note:
See TracChangeset
for help on using the changeset viewer.
