puppet-retrospec 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +121 -0
- data/README.md +3 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/retrospec-puppet.rb +3 -0
- data/lib/retrospec/{conditional.rb → plugins/v1/plugin/conditional.rb} +1 -1
- data/lib/retrospec/plugins/v1/plugin/helpers.rb +32 -0
- data/lib/retrospec/plugins/v1/plugin/puppet.rb +248 -0
- data/lib/retrospec/{puppet_module.rb → plugins/v1/plugin/puppet_module.rb} +0 -0
- data/lib/retrospec/{resource.rb → plugins/v1/plugin/resource.rb} +1 -1
- data/lib/retrospec/{spec_object.rb → plugins/v1/plugin/spec_object.rb} +17 -18
- data/lib/retrospec/plugins/v1/plugin/template_helpers.rb +72 -0
- data/lib/retrospec/{templates → plugins/v1/plugin/templates}/clone-hook +1 -1
- data/lib/retrospec/{type_code.rb → plugins/v1/plugin/type_code.rb} +2 -2
- data/lib/retrospec/{variable_store.rb → plugins/v1/plugin/variable_store.rb} +1 -1
- data/lib/retrospec/plugins/v1/plugin/version.rb +5 -0
- data/puppet-retrospec.gemspec +529 -18
- data/spec/fixtures/modules/concat/CHANGELOG.md +257 -0
- data/spec/fixtures/modules/concat/CONTRIBUTING.md +220 -0
- data/spec/fixtures/modules/concat/Gemfile +50 -0
- data/spec/fixtures/modules/concat/LICENSE +14 -0
- data/spec/fixtures/modules/concat/README.md +283 -0
- data/spec/fixtures/modules/concat/Rakefile +10 -0
- data/spec/fixtures/modules/concat/checksums.json +54 -0
- data/spec/fixtures/modules/concat/files/concatfragments.rb +153 -0
- data/spec/fixtures/modules/concat/lib/facter/concat_basedir.rb +11 -0
- data/spec/fixtures/modules/concat/lib/puppet/parser/functions/concat_getparam.rb +35 -0
- data/spec/fixtures/modules/concat/lib/puppet/parser/functions/concat_is_bool.rb +22 -0
- data/spec/fixtures/modules/concat/manifests/fragment.pp +133 -0
- data/spec/fixtures/modules/concat/manifests/init.pp +268 -0
- data/spec/fixtures/modules/concat/manifests/setup.pp +64 -0
- data/spec/fixtures/modules/concat/metadata.json +110 -0
- data/spec/fixtures/modules/concat/spec/acceptance/backup_spec.rb +115 -0
- data/spec/fixtures/modules/concat/spec/acceptance/concat_spec.rb +217 -0
- data/spec/fixtures/modules/concat/spec/acceptance/deprecation_warnings_spec.rb +238 -0
- data/spec/fixtures/modules/concat/spec/acceptance/empty_spec.rb +23 -0
- data/spec/fixtures/modules/concat/spec/acceptance/fragment_source_spec.rb +157 -0
- data/spec/fixtures/modules/concat/spec/acceptance/fragments_are_always_replaced_spec.rb +139 -0
- data/spec/fixtures/modules/concat/spec/acceptance/newline_spec.rb +67 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml +19 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml +12 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/centos-65-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml +11 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/default.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +10 -0
- data/spec/fixtures/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +11 -0
- data/spec/fixtures/modules/concat/spec/acceptance/order_spec.rb +123 -0
- data/spec/fixtures/modules/concat/spec/acceptance/quoted_paths_spec.rb +42 -0
- data/spec/fixtures/modules/concat/spec/acceptance/replace_spec.rb +262 -0
- data/spec/fixtures/modules/concat/spec/acceptance/specinfra_stubs.rb +19 -0
- data/spec/fixtures/modules/concat/spec/acceptance/symbolic_name_spec.rb +35 -0
- data/spec/fixtures/modules/concat/spec/acceptance/validation_spec.rb +35 -0
- data/spec/fixtures/modules/concat/spec/acceptance/warn_spec.rb +104 -0
- data/spec/fixtures/modules/concat/spec/spec.opts +6 -0
- data/spec/fixtures/modules/concat/spec/spec_helper.rb +1 -0
- data/spec/fixtures/modules/concat/spec/spec_helper_acceptance.rb +61 -0
- data/spec/fixtures/modules/concat/spec/unit/classes/concat_setup_spec.rb +98 -0
- data/spec/fixtures/modules/concat/spec/unit/defines/concat_fragment_spec.rb +330 -0
- data/spec/fixtures/modules/concat/spec/unit/defines/concat_spec.rb +415 -0
- data/spec/fixtures/modules/concat/spec/unit/facts/concat_basedir_spec.rb +18 -0
- data/spec/fixtures/modules/concat/tests/fragment.pp +19 -0
- data/spec/fixtures/modules/concat/tests/init.pp +7 -0
- data/spec/fixtures/modules/staging/Gemfile +7 -0
- data/spec/fixtures/modules/staging/LICENSE +11 -0
- data/spec/fixtures/modules/staging/README.md +70 -0
- data/spec/fixtures/modules/staging/Rakefile +1 -0
- data/spec/fixtures/modules/staging/Vagrantfile +29 -0
- data/spec/fixtures/modules/staging/checksums.json +37 -0
- data/spec/fixtures/modules/staging/docs/deploy.html +113 -0
- data/spec/fixtures/modules/staging/docs/extract.html +176 -0
- data/spec/fixtures/modules/staging/docs/file.html +178 -0
- data/spec/fixtures/modules/staging/docs/init.html +87 -0
- data/spec/fixtures/modules/staging/files/sample +1 -0
- data/spec/fixtures/modules/staging/files/sample.tar.bz2 +0 -0
- data/spec/fixtures/modules/staging/files/sample.tar.gz +0 -0
- data/spec/fixtures/modules/staging/lib/facter/staging_http_get.rb +29 -0
- data/spec/fixtures/modules/staging/lib/facter/staging_windir.rb +11 -0
- data/spec/fixtures/modules/staging/lib/puppet/parser/functions/scope_defaults.rb +17 -0
- data/spec/fixtures/modules/staging/lib/puppet/parser/functions/staging_parse.rb +36 -0
- data/spec/fixtures/modules/staging/manifests/.init.pp.swp +0 -0
- data/spec/fixtures/modules/staging/manifests/deploy.pp +42 -0
- data/spec/fixtures/modules/staging/manifests/extract.pp +109 -0
- data/spec/fixtures/modules/staging/manifests/file.pp +125 -0
- data/spec/fixtures/modules/staging/manifests/init.pp +31 -0
- data/spec/fixtures/modules/staging/manifests/params.pp +33 -0
- data/spec/fixtures/modules/staging/metadata.json +106 -0
- data/spec/fixtures/modules/staging/spec/defines/staging_deploy_spec.rb +27 -0
- data/spec/fixtures/modules/staging/spec/defines/staging_extract_spec.rb +104 -0
- data/spec/fixtures/modules/staging/spec/defines/staging_file_spec.rb +163 -0
- data/spec/fixtures/modules/staging/spec/fixtures/hiera.yaml +7 -0
- data/spec/fixtures/modules/staging/spec/spec_helper.rb +29 -0
- data/spec/fixtures/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb +45 -0
- data/spec/fixtures/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb +51 -0
- data/spec/fixtures/modules/staging/tests/deploy.pp +4 -0
- data/spec/fixtures/modules/staging/tests/extract.pp +25 -0
- data/spec/fixtures/modules/staging/tests/file.pp +17 -0
- data/spec/fixtures/modules/staging/tests/init.pp +1 -0
- data/spec/fixtures/modules/staging/tests/scope_defaults.pp +7 -0
- data/spec/fixtures/modules/staging/tests/staging_parse.pp +12 -0
- data/spec/fixtures/modules/stdlib/CHANGELOG.md +515 -0
- data/spec/fixtures/modules/stdlib/CONTRIBUTING.md +220 -0
- data/spec/fixtures/modules/stdlib/Gemfile +51 -0
- data/spec/fixtures/modules/stdlib/LICENSE +19 -0
- data/spec/fixtures/modules/stdlib/README.markdown +1042 -0
- data/spec/fixtures/modules/stdlib/README_DEVELOPER.markdown +35 -0
- data/spec/fixtures/modules/stdlib/README_SPECS.markdown +7 -0
- data/spec/fixtures/modules/stdlib/RELEASE_PROCESS.markdown +24 -0
- data/spec/fixtures/modules/stdlib/Rakefile +18 -0
- data/spec/fixtures/modules/stdlib/checksums.json +381 -0
- data/spec/fixtures/modules/stdlib/lib/facter/facter_dot_d.rb +202 -0
- data/spec/fixtures/modules/stdlib/lib/facter/pe_version.rb +53 -0
- data/spec/fixtures/modules/stdlib/lib/facter/puppet_vardir.rb +26 -0
- data/spec/fixtures/modules/stdlib/lib/facter/root_home.rb +32 -0
- data/spec/fixtures/modules/stdlib/lib/facter/util/puppet_settings.rb +21 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/functions/type_of.rb +17 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/abs.rb +36 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/any2array.rb +33 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/assert_private.rb +29 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/base64.rb +37 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/basename.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/bool2num.rb +26 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/bool2str.rb +27 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/camelcase.rb +33 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/capitalize.rb +33 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/ceiling.rb +25 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/chomp.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/chop.rb +36 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/concat.rb +41 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/count.rb +22 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb +44 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb +35 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/delete.rb +49 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/delete_at.rb +49 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/delete_values.rb +26 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/difference.rb +36 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/dirname.rb +21 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/downcase.rb +32 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/empty.rb +27 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb +35 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb +46 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/flatten.rb +33 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/floor.rb +25 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/fqdn_rand_string.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb +57 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb +17 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/getparam.rb +35 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/getvar.rb +29 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/grep.rb +33 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb +68 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb +25 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb +25 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/has_key.rb +28 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/hash.rb +41 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/intersection.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_array.rb +22 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_bool.rb +22 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb +54 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_float.rb +30 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb +26 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_hash.rb +22 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_integer.rb +45 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb +32 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb +27 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb +75 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_string.rb +26 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/join.rb +41 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb +47 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/keys.rb +26 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb +20 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/lstrip.rb +32 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/max.rb +21 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/member.rb +62 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/merge.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/min.rb +21 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/num2bool.rb +43 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/parsejson.rb +24 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb +24 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/pick.rb +29 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/pick_default.rb +35 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/prefix.rb +52 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/private.rb +17 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/pw_hash.rb +56 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/range.rb +88 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/reject.rb +31 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/reverse.rb +27 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/rstrip.rb +31 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/shuffle.rb +45 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/size.rb +48 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/sort.rb +27 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/squeeze.rb +36 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/str2bool.rb +46 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb +32 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/strftime.rb +107 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/strip.rb +38 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/suffix.rb +45 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/swapcase.rb +38 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/time.rb +49 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb +31 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/type.rb +19 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/type3x.rb +51 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/union.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/unique.rb +50 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/upcase.rb +45 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/uriescape.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb +69 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_array.rb +33 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb +83 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb +34 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb +63 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb +33 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_integer.rb +131 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb +48 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb +49 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_numeric.rb +93 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_re.rb +40 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb +71 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb +38 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/values.rb +39 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/values_at.rb +99 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/parser/functions/zip.rb +39 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/provider/file_line/ruby.rb +97 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/type/anchor.rb +46 -0
- data/spec/fixtures/modules/stdlib/lib/puppet/type/file_line.rb +91 -0
- data/spec/fixtures/modules/stdlib/manifests/init.pp +20 -0
- data/spec/fixtures/modules/stdlib/manifests/stages.pp +43 -0
- data/spec/fixtures/modules/stdlib/metadata.json +113 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/abs_spec.rb +30 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/any2array_spec.rb +49 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/base64_spec.rb +18 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/bool2num_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/build_csv.rb +83 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/capitalize_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/ceiling_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/chomp_spec.rb +21 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/chop_spec.rb +45 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/concat_spec.rb +40 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/count_spec.rb +30 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/deep_merge_spec.rb +20 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/defined_with_params_spec.rb +22 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/delete_at_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/delete_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/delete_values_spec.rb +25 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/difference_spec.rb +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/dirname_spec.rb +42 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/downcase_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/empty_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/ensure_packages_spec.rb +22 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/ensure_resource_spec.rb +22 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/flatten_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/floor_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/fqdn_rand_string_spec.rb +60 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb +47 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/get_module_path_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/getparam_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/getvar_spec.rb +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/grep_spec.rb +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/has_interface_with_spec.rb +54 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/has_ip_address_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/has_ip_network_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/has_key_spec.rb +41 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/hash_spec.rb +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/intersection_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_array_spec.rb +67 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_bool_spec.rb +81 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_domain_name_spec.rb +83 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_float_spec.rb +86 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_function_available_spec.rb +58 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_hash_spec.rb +63 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_integer_spec.rb +95 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_ip_address_spec.rb +80 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_mac_address_spec.rb +38 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_numeric_spec.rb +95 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/is_string_spec.rb +102 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/join_spec.rb +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/keys_spec.rb +23 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/loadyaml_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/lstrip_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/max_spec.rb +20 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/member_spec.rb +54 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/merge_spec.rb +23 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/min_spec.rb +20 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/centos-59-x64.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml +15 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml +12 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/centos-65-x64.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/default.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +10 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +11 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/windows-2003-i386.yml +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/windows-2003-x86_64.yml +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/windows-2008-x86_64.yml +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/windows-2008r2-x86_64.yml +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/windows-2012-x86_64.yml +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/nodesets/windows-2012r2-x86_64.yml +26 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/num2bool_spec.rb +76 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/parsejson_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/parseyaml_spec.rb +35 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/pick_default_spec.rb +54 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/pick_spec.rb +44 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/prefix_spec.rb +42 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/pw_hash_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/range_spec.rb +36 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/reject_spec.rb +42 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/reverse_spec.rb +23 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/rstrip_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/shuffle_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/size_spec.rb +55 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/sort_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/squeeze_spec.rb +47 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/str2bool_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb +22 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/strftime_spec.rb +22 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/strip_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/suffix_spec.rb +42 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/swapcase_spec.rb +22 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/time_spec.rb +36 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/to_bytes_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/type_spec.rb +37 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/union_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/unique_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/unsupported_spec.rb +11 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/upcase_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/uriescape_spec.rb +23 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_array_spec.rb +37 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_augeas_spec.rb +63 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_bool_spec.rb +37 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_cmd_spec.rb +52 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_hash_spec.rb +37 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_re_spec.rb +47 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_slength_spec.rb +72 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/validate_string_spec.rb +36 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/values_at_spec.rb +73 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/values_spec.rb +35 -0
- data/spec/fixtures/modules/stdlib/spec/acceptance/zip_spec.rb +86 -0
- data/spec/fixtures/modules/stdlib/spec/classes/anchor_spec.rb +30 -0
- data/spec/fixtures/modules/stdlib/spec/functions/abs_spec.rb +25 -0
- data/spec/fixtures/modules/stdlib/spec/functions/any2array_spec.rb +55 -0
- data/spec/fixtures/modules/stdlib/spec/functions/assert_private_spec.rb +55 -0
- data/spec/fixtures/modules/stdlib/spec/functions/base64_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/functions/bool2num_spec.rb +38 -0
- data/spec/fixtures/modules/stdlib/spec/functions/capitalize_spec.rb +28 -0
- data/spec/fixtures/modules/stdlib/spec/functions/ceiling_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/functions/chomp_spec.rb +28 -0
- data/spec/fixtures/modules/stdlib/spec/functions/chop_spec.rb +28 -0
- data/spec/fixtures/modules/stdlib/spec/functions/concat_spec.rb +50 -0
- data/spec/fixtures/modules/stdlib/spec/functions/count_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/functions/deep_merge_spec.rb +105 -0
- data/spec/fixtures/modules/stdlib/spec/functions/defined_with_params_spec.rb +37 -0
- data/spec/fixtures/modules/stdlib/spec/functions/delete_at_spec.rb +25 -0
- data/spec/fixtures/modules/stdlib/spec/functions/delete_spec.rb +61 -0
- data/spec/fixtures/modules/stdlib/spec/functions/delete_undef_values_spec.rb +41 -0
- data/spec/fixtures/modules/stdlib/spec/functions/delete_values_spec.rb +36 -0
- data/spec/fixtures/modules/stdlib/spec/functions/difference_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/functions/dirname_spec.rb +38 -0
- data/spec/fixtures/modules/stdlib/spec/functions/downcase_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/functions/empty_spec.rb +32 -0
- data/spec/fixtures/modules/stdlib/spec/functions/ensure_packages_spec.rb +81 -0
- data/spec/fixtures/modules/stdlib/spec/functions/ensure_resource_spec.rb +113 -0
- data/spec/fixtures/modules/stdlib/spec/functions/flatten_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/functions/floor_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/functions/fqdn_rand_string_spec.rb +91 -0
- data/spec/fixtures/modules/stdlib/spec/functions/fqdn_rotate_spec.rb +60 -0
- data/spec/fixtures/modules/stdlib/spec/functions/get_module_path_spec.rb +46 -0
- data/spec/fixtures/modules/stdlib/spec/functions/getparam_spec.rb +76 -0
- data/spec/fixtures/modules/stdlib/spec/functions/getvar_spec.rb +37 -0
- data/spec/fixtures/modules/stdlib/spec/functions/grep_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/functions/has_interface_with_spec.rb +64 -0
- data/spec/fixtures/modules/stdlib/spec/functions/has_ip_address_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/functions/has_ip_network_spec.rb +36 -0
- data/spec/fixtures/modules/stdlib/spec/functions/has_key_spec.rb +42 -0
- data/spec/fixtures/modules/stdlib/spec/functions/hash_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/functions/intersection_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_array_spec.rb +29 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_bool_spec.rb +44 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_domain_name_spec.rb +81 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_float_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_function_available.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_hash_spec.rb +29 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_integer_spec.rb +69 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_ip_address_spec.rb +39 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_mac_address_spec.rb +29 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_numeric_spec.rb +119 -0
- data/spec/fixtures/modules/stdlib/spec/functions/is_string_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/functions/join_keys_to_values_spec.rb +40 -0
- data/spec/fixtures/modules/stdlib/spec/functions/join_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/functions/keys_spec.rb +21 -0
- data/spec/fixtures/modules/stdlib/spec/functions/loadyaml_spec.rb +25 -0
- data/spec/fixtures/modules/stdlib/spec/functions/lstrip_spec.rb +28 -0
- data/spec/fixtures/modules/stdlib/spec/functions/max_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/functions/member_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/functions/merge_spec.rb +52 -0
- data/spec/fixtures/modules/stdlib/spec/functions/min_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/functions/num2bool_spec.rb +67 -0
- data/spec/fixtures/modules/stdlib/spec/functions/parsejson_spec.rb +22 -0
- data/spec/fixtures/modules/stdlib/spec/functions/parseyaml_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/functions/pick_default_spec.rb +58 -0
- data/spec/fixtures/modules/stdlib/spec/functions/pick_spec.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/functions/prefix_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/functions/private_spec.rb +60 -0
- data/spec/fixtures/modules/stdlib/spec/functions/pw_hash_spec.rb +96 -0
- data/spec/fixtures/modules/stdlib/spec/functions/range_spec.rb +86 -0
- data/spec/fixtures/modules/stdlib/spec/functions/reject_spec.rb +20 -0
- data/spec/fixtures/modules/stdlib/spec/functions/reverse_spec.rb +28 -0
- data/spec/fixtures/modules/stdlib/spec/functions/rstrip_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/functions/shuffle_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/functions/size_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/functions/sort_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/functions/squeeze_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/functions/str2bool_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/functions/str2saltedsha512_spec.rb +45 -0
- data/spec/fixtures/modules/stdlib/spec/functions/strftime_spec.rb +29 -0
- data/spec/fixtures/modules/stdlib/spec/functions/strip_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/functions/suffix_spec.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/functions/swapcase_spec.rb +28 -0
- data/spec/fixtures/modules/stdlib/spec/functions/time_spec.rb +29 -0
- data/spec/fixtures/modules/stdlib/spec/functions/to_bytes_spec.rb +83 -0
- data/spec/fixtures/modules/stdlib/spec/functions/type3x_spec.rb +43 -0
- data/spec/fixtures/modules/stdlib/spec/functions/type_spec.rb +44 -0
- data/spec/fixtures/modules/stdlib/spec/functions/union_spec.rb +19 -0
- data/spec/fixtures/modules/stdlib/spec/functions/unique_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/functions/upcase_spec.rb +58 -0
- data/spec/fixtures/modules/stdlib/spec/functions/uriescape_spec.rb +40 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_absolute_path_spec.rb +104 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_array_spec.rb +38 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_augeas_spec.rb +103 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_bool_spec.rb +51 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_cmd_spec.rb +85 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_hash_spec.rb +43 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_integer_spec.rb +219 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb +64 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb +67 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_numeric_spec.rb +217 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_re_spec.rb +77 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_slength_spec.rb +67 -0
- data/spec/fixtures/modules/stdlib/spec/functions/validate_string_spec.rb +60 -0
- data/spec/fixtures/modules/stdlib/spec/functions/values_at_spec.rb +38 -0
- data/spec/fixtures/modules/stdlib/spec/functions/values_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/functions/zip_spec.rb +31 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/compiler.rb +47 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/database.rb +30 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/files.rb +61 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/fixtures.rb +29 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/matchers.rb +121 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/modules.rb +27 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/pops.rb +17 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/scope.rb +15 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/settings.rb +16 -0
- data/spec/fixtures/modules/stdlib/spec/lib/puppet_spec/verbose.rb +10 -0
- data/spec/fixtures/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb +9 -0
- data/spec/fixtures/modules/stdlib/spec/monkey_patches/publicize_methods.rb +11 -0
- data/spec/fixtures/modules/stdlib/spec/spec.opts +6 -0
- data/spec/fixtures/modules/stdlib/spec/spec_helper.rb +34 -0
- data/spec/fixtures/modules/stdlib/spec/spec_helper_acceptance.rb +50 -0
- data/spec/fixtures/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb +32 -0
- data/spec/fixtures/modules/stdlib/spec/unit/facter/pe_version_spec.rb +76 -0
- data/spec/fixtures/modules/stdlib/spec/unit/facter/root_home_spec.rb +52 -0
- data/spec/fixtures/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb +36 -0
- data/spec/fixtures/modules/stdlib/spec/unit/puppet/functions/type_of_spec.rb +33 -0
- data/spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/basename_spec.rb +46 -0
- data/spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/bool2str_spec.rb +46 -0
- data/spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/camelcase_spec.rb +24 -0
- data/spec/fixtures/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb +277 -0
- data/spec/fixtures/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb +11 -0
- data/spec/fixtures/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb +70 -0
- data/spec/fixtures/modules/stdlib/tests/file_line.pp +9 -0
- data/spec/fixtures/modules/stdlib/tests/has_interface_with.pp +10 -0
- data/spec/fixtures/modules/stdlib/tests/has_ip_address.pp +3 -0
- data/spec/fixtures/modules/stdlib/tests/has_ip_network.pp +4 -0
- data/spec/fixtures/modules/stdlib/tests/init.pp +1 -0
- data/spec/fixtures/modules/tomcat/.gitignore +8 -0
- data/spec/fixtures/modules/tomcat/.puppet-lint.rc +8 -0
- data/spec/fixtures/modules/tomcat/.travis.yml +14 -0
- data/spec/fixtures/modules/tomcat/CHANGELOG.md +94 -0
- data/spec/fixtures/modules/tomcat/CONTRIBUTING.md +220 -0
- data/spec/fixtures/modules/tomcat/LICENSE +15 -0
- data/spec/fixtures/modules/tomcat/README.markdown +75 -0
- data/spec/fixtures/modules/tomcat/README.md +812 -0
- data/spec/fixtures/modules/tomcat/Vagrantfile +95 -0
- data/spec/fixtures/modules/tomcat/checksums.json +67 -0
- data/spec/fixtures/modules/tomcat/examples/default_install_from_package.pp +13 -0
- data/spec/fixtures/modules/tomcat/examples/default_install_from_source.pp +9 -0
- data/spec/fixtures/modules/tomcat/examples/instance_with_context.pp +20 -0
- data/spec/fixtures/modules/tomcat/examples/instance_with_listener.pp +18 -0
- data/spec/fixtures/modules/tomcat/examples/instance_with_realm.pp +20 -0
- data/spec/fixtures/modules/tomcat/examples/instance_with_role_and_user.pp +23 -0
- data/spec/fixtures/modules/tomcat/examples/jsvc_install_from_source.pp +37 -0
- data/spec/fixtures/modules/tomcat/examples/multiple_instances.pp +38 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server.pp +78 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/connector.pp +95 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/context.pp +102 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/engine.pp +109 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/host.pp +79 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/listener.pp +98 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/realm.pp +104 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/service.pp +54 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/tomcat_users.pp +97 -0
- data/spec/fixtures/modules/tomcat/manifests/config/server/valve.pp +77 -0
- data/spec/fixtures/modules/tomcat/manifests/init.pp +71 -0
- data/spec/fixtures/modules/tomcat/manifests/instance.pp +88 -0
- data/spec/fixtures/modules/tomcat/manifests/instance/package.pp +26 -0
- data/spec/fixtures/modules/tomcat/manifests/instance/source.pp +46 -0
- data/spec/fixtures/modules/tomcat/manifests/params.pp +13 -0
- data/spec/fixtures/modules/tomcat/manifests/service.pp +160 -0
- data/spec/fixtures/modules/tomcat/manifests/setenv/entry.pp +52 -0
- data/spec/fixtures/modules/tomcat/manifests/war.pp +80 -0
- data/spec/fixtures/modules/tomcat/metadata.json +74 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/plugin_spec.rb +21 -0
- data/spec/unit/puppet-retrospec_spec.rb +36 -29
- data/spec/unit/resource_spec.rb +0 -1
- data/spec/unit/type_code_spec.rb +0 -1
- metadata +540 -18
- data/bin/retrospec +0 -29
- data/lib/retrospec.rb +0 -205
- data/lib/retrospec/exceptions.rb +0 -4
- data/lib/retrospec/helpers.rb +0 -157
- data/lib/retrospec/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ee18423b45926dd5af55e9ae5ab06ad259d391a
|
4
|
+
data.tar.gz: 8fdb6a385bebe775d225e7a7481babb93285a5ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d726ea817412307e481be8394b37d7c4904b010a37068ba824337a9715b67679c8da15f3805d8abdb88386328e664d4563c9c577272a5f946dc0eca8f5dfab85
|
7
|
+
data.tar.gz: 695e39765fa941e955d36acda5cb4882a0aa7c61b228bdc3c740e92a4876f1326cc7357bfe22b5b141df142eddd2bcf98712cd2737656f578f53e2a32029529f
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -6,9 +6,10 @@ source "http://rubygems.org"
|
|
6
6
|
#gem 'hiera', '~> 1.0'
|
7
7
|
|
8
8
|
gem 'trollop'
|
9
|
+
gem 'retrospec', "~> 0.3"
|
9
10
|
# Include everything needed to run rake, tests, features, etc.
|
10
11
|
group :development do
|
11
|
-
gem "rspec", "~> 2
|
12
|
+
gem "rspec", "~> 3.2"
|
12
13
|
gem 'puppet', '3.7.3', :path => 'vendor/gems/puppet-3.7.3'
|
13
14
|
#gem 'facter', '< 3', '> 1.6'
|
14
15
|
#gem 'hiera', '~> 1.0'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
PATH
|
2
|
+
remote: vendor/gems/puppet-3.7.3
|
3
|
+
specs:
|
4
|
+
puppet (3.7.3)
|
5
|
+
facter (> 1.6, < 3)
|
6
|
+
hiera (~> 1.0)
|
7
|
+
json_pure
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
CFPropertyList (2.2.8)
|
13
|
+
addressable (2.3.8)
|
14
|
+
binding_of_caller (0.7.2)
|
15
|
+
debug_inspector (>= 0.0.1)
|
16
|
+
builder (3.2.2)
|
17
|
+
coderay (1.1.0)
|
18
|
+
coolline (0.5.0)
|
19
|
+
unicode_utils (~> 1.4)
|
20
|
+
debug_inspector (0.0.2)
|
21
|
+
descendants_tracker (0.0.4)
|
22
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
23
|
+
diff-lcs (1.2.5)
|
24
|
+
facter (2.4.4)
|
25
|
+
CFPropertyList (~> 2.2.6)
|
26
|
+
fakefs (0.6.7)
|
27
|
+
faraday (0.9.1)
|
28
|
+
multipart-post (>= 1.2, < 3)
|
29
|
+
git (1.2.9.1)
|
30
|
+
github_api (0.12.4)
|
31
|
+
addressable (~> 2.3)
|
32
|
+
descendants_tracker (~> 0.0.4)
|
33
|
+
faraday (~> 0.8, < 0.10)
|
34
|
+
hashie (>= 3.4)
|
35
|
+
multi_json (>= 1.7.5, < 2.0)
|
36
|
+
nokogiri (~> 1.6.6)
|
37
|
+
oauth2
|
38
|
+
hashie (3.4.2)
|
39
|
+
hiera (1.3.4)
|
40
|
+
json_pure
|
41
|
+
highline (1.7.7)
|
42
|
+
interception (0.5)
|
43
|
+
jeweler (2.0.1)
|
44
|
+
builder
|
45
|
+
bundler (>= 1.0)
|
46
|
+
git (>= 1.2.5)
|
47
|
+
github_api
|
48
|
+
highline (>= 1.6.15)
|
49
|
+
nokogiri (>= 1.5.10)
|
50
|
+
rake
|
51
|
+
rdoc
|
52
|
+
json (1.8.3)
|
53
|
+
json_pure (1.8.2)
|
54
|
+
jwt (1.5.1)
|
55
|
+
method_source (0.8.2)
|
56
|
+
mini_portile (0.6.2)
|
57
|
+
multi_json (1.11.2)
|
58
|
+
multi_xml (0.5.5)
|
59
|
+
multipart-post (2.0.0)
|
60
|
+
nokogiri (1.6.6.2)
|
61
|
+
mini_portile (~> 0.6.0)
|
62
|
+
oauth2 (1.0.0)
|
63
|
+
faraday (>= 0.8, < 0.10)
|
64
|
+
jwt (~> 1.0)
|
65
|
+
multi_json (~> 1.3)
|
66
|
+
multi_xml (~> 0.5)
|
67
|
+
rack (~> 1.2)
|
68
|
+
pry (0.10.2)
|
69
|
+
coderay (~> 1.1.0)
|
70
|
+
method_source (~> 0.8.1)
|
71
|
+
slop (~> 3.4)
|
72
|
+
pry-coolline (0.2.5)
|
73
|
+
coolline (~> 0.5)
|
74
|
+
pry-rescue (1.4.2)
|
75
|
+
interception (>= 0.5)
|
76
|
+
pry
|
77
|
+
pry-stack_explorer (0.4.9.2)
|
78
|
+
binding_of_caller (>= 0.7)
|
79
|
+
pry (>= 0.9.11)
|
80
|
+
rack (1.6.4)
|
81
|
+
rake (10.4.2)
|
82
|
+
rdoc (3.12.2)
|
83
|
+
json (~> 1.4)
|
84
|
+
retrospec (0.3.0)
|
85
|
+
trollop
|
86
|
+
rspec (3.3.0)
|
87
|
+
rspec-core (~> 3.3.0)
|
88
|
+
rspec-expectations (~> 3.3.0)
|
89
|
+
rspec-mocks (~> 3.3.0)
|
90
|
+
rspec-core (3.3.2)
|
91
|
+
rspec-support (~> 3.3.0)
|
92
|
+
rspec-expectations (3.3.1)
|
93
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
94
|
+
rspec-support (~> 3.3.0)
|
95
|
+
rspec-mocks (3.3.2)
|
96
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
+
rspec-support (~> 3.3.0)
|
98
|
+
rspec-support (3.3.0)
|
99
|
+
slop (3.6.0)
|
100
|
+
thread_safe (0.3.5)
|
101
|
+
trollop (2.1.2)
|
102
|
+
unicode_utils (1.4.0)
|
103
|
+
yard (0.8.7.6)
|
104
|
+
|
105
|
+
PLATFORMS
|
106
|
+
ruby
|
107
|
+
|
108
|
+
DEPENDENCIES
|
109
|
+
bundler (~> 1.0)
|
110
|
+
fakefs
|
111
|
+
jeweler
|
112
|
+
pry
|
113
|
+
pry-coolline
|
114
|
+
pry-rescue
|
115
|
+
pry-stack_explorer
|
116
|
+
puppet (= 3.7.3)!
|
117
|
+
rdoc (~> 3.12)
|
118
|
+
retrospec (~> 0.3)
|
119
|
+
rspec (~> 3.2)
|
120
|
+
trollop
|
121
|
+
yard (~> 0.7)
|
data/README.md
CHANGED
@@ -67,6 +67,9 @@ Generates puppet rspec test code based on the classes and defines inside the man
|
|
67
67
|
retrospec -m ~/projects/puppet_modules/apache
|
68
68
|
```
|
69
69
|
|
70
|
+
plugins::puppet::templates::url: https://github.com/nwops/retrospec-templates
|
71
|
+
plugins::puppet::templates::ref: master
|
72
|
+
|
70
73
|
Example
|
71
74
|
======================
|
72
75
|
|
data/Rakefile
CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
|
|
15
15
|
Jeweler::Tasks.new do |gem|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
17
|
gem.name = "puppet-retrospec"
|
18
|
-
gem.homepage = "http://github.com/
|
18
|
+
gem.homepage = "http://github.com/nwops/puppet-retrospec"
|
19
19
|
gem.license = "MIT"
|
20
20
|
gem.summary = %Q{Generates puppet rspec test code based on the classes and defines inside the manifests directory. Aims to reduce some of the boilerplate coding with default test patterns.}
|
21
21
|
gem.description = %Q{Retrofits and generates valid puppet rspec test code to existing modules}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
class Helpers
|
4
|
+
|
5
|
+
def self.get_module_name
|
6
|
+
module_name = nil
|
7
|
+
Dir["manifests/*.pp"].entries.each do |manifest|
|
8
|
+
module_name = get_module_name_from_file(manifest)
|
9
|
+
break unless module_name.nil?
|
10
|
+
end
|
11
|
+
module_name
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.get_module_name_from_file(file)
|
15
|
+
p = Puppet::Parser::Lexer.new
|
16
|
+
module_name = nil
|
17
|
+
p.string = File.read(file)
|
18
|
+
tokens = p.fullscan
|
19
|
+
|
20
|
+
i = tokens.index { |token| [:CLASS, :DEFINE].include? token.first }
|
21
|
+
unless i.nil?
|
22
|
+
module_name = tokens[i + 1].last[:value].split('::').first
|
23
|
+
end
|
24
|
+
|
25
|
+
module_name
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.is_module_dir?(dir)
|
29
|
+
Dir[File.join(dir,"*")].entries.include? "manifests"
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,248 @@
|
|
1
|
+
require 'retrospec/plugins/v1/module_helpers'
|
2
|
+
require 'retrospec/plugins/v1'
|
3
|
+
require_relative 'spec_object'
|
4
|
+
require 'erb'
|
5
|
+
require_relative 'template_helpers'
|
6
|
+
require 'fileutils'
|
7
|
+
require_relative 'resource'
|
8
|
+
require_relative 'conditional'
|
9
|
+
require_relative 'variable_store'
|
10
|
+
require_relative 'puppet_module'
|
11
|
+
require 'retrospec/exceptions'
|
12
|
+
require_relative 'version'
|
13
|
+
require 'find'
|
14
|
+
require 'puppet'
|
15
|
+
|
16
|
+
module Retrospec
|
17
|
+
module Plugins
|
18
|
+
module V1
|
19
|
+
class Puppet < Retrospec::Plugins::V1::Plugin
|
20
|
+
include Retrospec::Puppet::TemplateHelpers
|
21
|
+
attr_reader :template_dir, :context, :manifest_dir, :manifest_files
|
22
|
+
|
23
|
+
def initialize(supplied_module_path=nil,config={})
|
24
|
+
super
|
25
|
+
@manifest_dir = File.join(supplied_module_path,'manifests')
|
26
|
+
Utilities::PuppetModule.instance.future_parser = config_data[:enable_future_parser]
|
27
|
+
# user supplied a template path or user wants to use local templates
|
28
|
+
@template_dir = setup_user_template_dir(config_data[:template_dir], config_data[:scm_url], config_data[:ref])
|
29
|
+
# validation also occurs when setting the module path
|
30
|
+
Utilities::PuppetModule.instance.module_path = module_path
|
31
|
+
Utilities::PuppetModule.create_tmp_module_path # this is required to finish initialization
|
32
|
+
@context = ::Puppet::SpecObject.new(module_path, Utilities::PuppetModule.instance, config_data)
|
33
|
+
end
|
34
|
+
|
35
|
+
# used to display subcommand options to the cli
|
36
|
+
# the global options are passed in for your usage
|
37
|
+
# http://trollop.rubyforge.org
|
38
|
+
# all options here are available in the config passed into the initialize code
|
39
|
+
def self.cli_options(global_opts)
|
40
|
+
template_dir = global_opts['plugins::puppet::template_dir'] || File.expand_path('~/.retrospec/repos/retrospec-puppet-templates')
|
41
|
+
scm_url = ENV['RETROSPEC_PUPPET_SCM_URL'] || global_opts['plugins::puppet::templates::url']
|
42
|
+
scm_branch = ENV['RETROSPEC_PUPPET_SCM_BRANCH'] || global_opts['plugins::puppet::templates::ref'] || 'master'
|
43
|
+
future_parser = global_opts['plugins::puppet::enable_future_parser']
|
44
|
+
beaker_tests = global_opts['plugins::puppet::enable_beaker_tests']
|
45
|
+
Trollop::options do
|
46
|
+
version "#{Retrospec::Puppet::VERSION} (c) Corey Osman"
|
47
|
+
banner <<-EOS
|
48
|
+
Generates puppet rspec test code based on the classes and defines inside the manifests directory.
|
49
|
+
|
50
|
+
EOS
|
51
|
+
opt :template_dir, "Path to templates directory (only for overriding Retrospec templates)", :type => :string,
|
52
|
+
:required => false, :default => template_dir
|
53
|
+
opt :scm_url, "SCM url for retrospec templates", :type => :string, :required => false,
|
54
|
+
:default => scm_url
|
55
|
+
opt :branch, "Branch you want to use for the retrospec template repo", :type => :string, :required => false,
|
56
|
+
:default => scm_branch
|
57
|
+
opt :enable_beaker_tests, "Enable the creation of beaker tests", :require => false, :type => :boolean, :default => beaker_tests
|
58
|
+
opt :enable_future_parser, "Enables the future parser only during validation", :default => future_parser, :require => false, :type => :boolean
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# this is the main method the starts all the magic
|
63
|
+
def run
|
64
|
+
run_pre_hook
|
65
|
+
create_files
|
66
|
+
run_post_hook
|
67
|
+
end
|
68
|
+
|
69
|
+
# the template directory located inside the retrospec gem
|
70
|
+
def template_dir
|
71
|
+
@template_dir ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
72
|
+
end
|
73
|
+
|
74
|
+
# runs a user defined hook called pre-hook
|
75
|
+
def run_pre_hook
|
76
|
+
hook_file = File.join(template_dir,'pre-hook')
|
77
|
+
if File.exists?(hook_file)
|
78
|
+
output = `#{hook_file} #{module_path}`
|
79
|
+
if $?.success?
|
80
|
+
puts "Successfully ran hook: #{hook_file}".info
|
81
|
+
puts output.info
|
82
|
+
else
|
83
|
+
puts "Error running hook: #{hook_file}".fatal
|
84
|
+
puts output.fatal
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# runs a user defined hook called post-hook
|
90
|
+
def run_post_hook
|
91
|
+
hook_file = File.join(template_dir,'post-hook')
|
92
|
+
if File.exists?(hook_file)
|
93
|
+
output = `#{hook_file} #{module_path}`
|
94
|
+
if $?.success?
|
95
|
+
puts "Successfully ran hook: #{hook_file}".info
|
96
|
+
puts output.info
|
97
|
+
else
|
98
|
+
puts "Error running hook: #{hook_file}".fatal
|
99
|
+
puts output.fatal
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# this is the method that performs all the magic and creates all the files
|
105
|
+
def create_files
|
106
|
+
types = context.types
|
107
|
+
safe_create_module_files
|
108
|
+
# a Type is nothing more than a defined type or puppet class
|
109
|
+
# we could have named this manifest but there could be multiple types
|
110
|
+
# in a manifest.
|
111
|
+
types.each do |type|
|
112
|
+
safe_create_resource_spec_files(type)
|
113
|
+
if context.enable_beaker_tests?
|
114
|
+
safe_create_acceptance_tests(type)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
Utilities::PuppetModule.clean_tmp_modules_dir
|
118
|
+
true
|
119
|
+
end
|
120
|
+
|
121
|
+
# creates any file that is contained in the templates/modules_files directory structure
|
122
|
+
# loops through the directory looking for erb files or other files.
|
123
|
+
# strips the erb extension and renders the template to the current module path
|
124
|
+
# filenames must named how they would appear in the normal module path. The directory
|
125
|
+
# structure where the file is contained
|
126
|
+
def safe_create_module_files
|
127
|
+
templates = Find.find(File.join(template_dir,'module_files')).find_all {|f| !File.directory?(f)}.sort
|
128
|
+
templates.each do |template|
|
129
|
+
# need to remove the erb extension and rework the destination path
|
130
|
+
if template =~ /nodesets|spec_helper_acceptance/ and !context.enable_beaker_tests?
|
131
|
+
next
|
132
|
+
else
|
133
|
+
dest = template.gsub(File.join(template_dir,'module_files'), module_path).gsub('.erb', '')
|
134
|
+
if File.symlink?(template)
|
135
|
+
safe_create_symlink(template, dest)
|
136
|
+
elsif File.directory?(template)
|
137
|
+
safe_mkdir(dest)
|
138
|
+
else
|
139
|
+
safe_create_template_file(dest, template, context)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Creates an associated spec file for each type and even creates the subfolders for nested classes one::two::three
|
146
|
+
def safe_create_resource_spec_files(type,template=File.join(template_dir,'resource_spec_file.erb'))
|
147
|
+
context.parameters = type.arguments
|
148
|
+
context.type = type
|
149
|
+
VariableStore.populate(type)
|
150
|
+
context.resources = Resource.all(type)
|
151
|
+
# pass the type to the variable store and it will discover all the variables and try to resolve them.
|
152
|
+
# this does not get deep nested conditional blocks
|
153
|
+
context.resources += Conditional.all(type)
|
154
|
+
dest = File.join(module_path,generate_file_path(type, false))
|
155
|
+
safe_create_template_file(dest, template, context)
|
156
|
+
dest
|
157
|
+
end
|
158
|
+
|
159
|
+
def safe_create_acceptance_tests(type,template=File.join(template_dir,'acceptance_spec_test.erb'))
|
160
|
+
@parameters = type.arguments
|
161
|
+
@type = type
|
162
|
+
dest = File.join(module_path,generate_file_path(type, true))
|
163
|
+
safe_create_template_file(dest, template, context)
|
164
|
+
dest
|
165
|
+
end
|
166
|
+
|
167
|
+
# generates a file path for spec tests based on the resource name. An added option
|
168
|
+
# is to generate directory names for each parent resource as a default option
|
169
|
+
# at this time acceptance tests follow this same test directory layout until best
|
170
|
+
# practices are formed.
|
171
|
+
def generate_file_path(type, is_acceptance_test)
|
172
|
+
classes_dir = 'classes'
|
173
|
+
defines_dir = 'defines'
|
174
|
+
hosts_dir = 'hosts'
|
175
|
+
acceptance_dir = 'acceptance'
|
176
|
+
case type.type
|
177
|
+
when :hostclass
|
178
|
+
type_dir_name = classes_dir
|
179
|
+
when :definition
|
180
|
+
type_dir_name = defines_dir
|
181
|
+
when :node
|
182
|
+
type_dir_name = hosts_dir
|
183
|
+
else
|
184
|
+
raise "#{type.type} retrospec does not support this resource type yet"
|
185
|
+
end
|
186
|
+
if is_acceptance_test
|
187
|
+
type_dir_name = File.join('spec',acceptance_dir, type_dir_name)
|
188
|
+
else
|
189
|
+
type_dir_name = File.join('spec', type_dir_name)
|
190
|
+
end
|
191
|
+
file_name = generate_file_name(type.name)
|
192
|
+
tokens = type.name.split('::')
|
193
|
+
# if there are only two tokens ie. tomcat::params we dont need to create a subdirectory
|
194
|
+
if tokens.count > 2
|
195
|
+
# this is a deep level resource ie. tomcat::config::server::connector
|
196
|
+
# however we don't need the tomcat directory so we can just remove it
|
197
|
+
# this should leave us with config/server/connector_spec.rb
|
198
|
+
tokens.delete_at(0)
|
199
|
+
# remove the last token since its the class name
|
200
|
+
tokens.pop
|
201
|
+
# so lets make a directory structure out of it
|
202
|
+
dir_name = File.join(tokens) # config/server
|
203
|
+
dir_name = File.join(type_dir_name,dir_name, file_name) # spec/classes/tomcat/config/server
|
204
|
+
else
|
205
|
+
dir_name = File.join(type_dir_name,file_name)
|
206
|
+
end
|
207
|
+
dir_name
|
208
|
+
end
|
209
|
+
|
210
|
+
# returns the filename of the type
|
211
|
+
def generate_file_name(type_name)
|
212
|
+
tokens = type_name.split('::')
|
213
|
+
file_name = tokens.pop
|
214
|
+
"#{file_name}_spec.rb"
|
215
|
+
end
|
216
|
+
|
217
|
+
def description
|
218
|
+
'Generates puppet rspec test code based on the classes and defines inside the manifests directory'
|
219
|
+
end
|
220
|
+
|
221
|
+
def manifest_files
|
222
|
+
@manifest_files ||= Dir.glob("#{manifest_dir}/**/*.pp")
|
223
|
+
end
|
224
|
+
|
225
|
+
def files
|
226
|
+
@files ||= manifest_files
|
227
|
+
end
|
228
|
+
|
229
|
+
# the main file type that is used to help discover what the module is
|
230
|
+
def self.file_type
|
231
|
+
'.pp'
|
232
|
+
end
|
233
|
+
|
234
|
+
# # validates module directory fits the description of this plugin
|
235
|
+
# def self.validate_type(dir)
|
236
|
+
# if ! File.exist?(manifest_dir)
|
237
|
+
# message = "No manifest directory in #{manifest_dir}, cannot validate this is a module".fatal
|
238
|
+
# raise TypeValidationException message
|
239
|
+
# else
|
240
|
+
# manifest_files ||= Dir.glob("#{manifest_dir}/**/*.pp")
|
241
|
+
# warn "No puppet manifest files found at #{manifest_dir}".warning if manifest_files.length < 1
|
242
|
+
# end
|
243
|
+
# true
|
244
|
+
# end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|