puppet-retrospec 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.gitlab-ci.yml +8 -8
- data/.overcommit.yml +4 -4
- data/.rubocop_todo.yml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +5 -10
- data/README.md +7 -69
- data/lib/retrospec-puppet.rb +3 -1
- data/lib/retrospec/plugins/v1/plugin/generators/serializers/rspec_dumper.rb +86 -36
- data/lib/retrospec/plugins/v1/plugin/generators/task_generator.rb +17 -19
- data/lib/retrospec/plugins/v1/plugin/helpers.rb +6 -0
- data/lib/retrospec/plugins/v1/plugin/puppet.rb +86 -16
- data/lib/retrospec/plugins/v1/plugin/spec_object.rb +34 -16
- data/lib/retrospec/plugins/v1/plugin/template_helpers.rb +12 -6
- data/lib/retrospec/plugins/v1/plugin/version.rb +1 -1
- data/puppet-retrospec.gemspec +1 -1
- data/spec/fixtures/fixture_modules/one_resource_module/manifests/array_param.pp +15 -0
- data/spec/fixtures/parameters.txt +9 -9
- data/spec/integration/retrospec_spec.rb +26 -6
- data/spec/unit/generators/acceptance_generator_spec.rb +3 -2
- data/spec/unit/generators/definition_generator_spec.rb +3 -3
- data/spec/unit/generators/hostclass_generator_spec.rb +9 -1
- data/spec/unit/generators/provider_generator_spec.rb +3 -3
- data/spec/unit/generators/resource_base_generator_spec.rb +1 -0
- data/spec/unit/generators/serializers/rspec_dumper_spec.rb +2 -2
- data/spec/unit/generators/task_generator_spec.rb +46 -0
- data/vendor/pup410/lib/hiera/puppet_function.rb +81 -0
- data/vendor/pup410/lib/hiera/scope.rb +61 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/hiera_puppet.rb +0 -0
- data/vendor/pup410/lib/puppet.rb +353 -0
- data/vendor/pup410/lib/puppet/agent.rb +102 -0
- data/vendor/pup410/lib/puppet/application.rb +478 -0
- data/vendor/pup410/lib/puppet/application_support.rb +57 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/bindings.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/coercion.rb +0 -0
- data/vendor/pup410/lib/puppet/compilable_resource_type.rb +15 -0
- data/vendor/pup410/lib/puppet/configurer.rb +446 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/configurer/downloader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/configurer/downloader_factory.rb +0 -0
- data/vendor/pup410/lib/puppet/configurer/fact_handler.rb +37 -0
- data/vendor/pup410/lib/puppet/configurer/plugin_handler.rb +25 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/any.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/exists.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/false.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/feature.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/true.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/variable.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine_collection.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confiner.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/context.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/context/trusted_information.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/daemon.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/data_binding.rb +0 -0
- data/vendor/pup410/lib/puppet/data_providers.rb +34 -0
- data/vendor/pup410/lib/puppet/data_providers/data_adapter.rb +37 -0
- data/vendor/pup410/lib/puppet/data_providers/data_function_support.rb +32 -0
- data/vendor/pup410/lib/puppet/data_providers/function_env_data_provider.rb +26 -0
- data/vendor/pup410/lib/puppet/data_providers/function_module_data_provider.rb +24 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_config.rb +151 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_env_data_provider.rb +25 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_interpolate.rb +21 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_module_data_provider.rb +30 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_support.rb +42 -0
- data/vendor/pup410/lib/puppet/data_providers/json_data_provider_factory.rb +38 -0
- data/vendor/pup410/lib/puppet/data_providers/yaml_data_provider_factory.rb +40 -0
- data/vendor/pup410/lib/puppet/defaults.rb +2011 -0
- data/vendor/pup410/lib/puppet/environments.rb +492 -0
- data/vendor/pup410/lib/puppet/error.rb +100 -0
- data/vendor/pup410/lib/puppet/etc.rb +161 -0
- data/vendor/pup410/lib/puppet/external/dot.rb +326 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/grammar.ry +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/makefile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/common.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/pure.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/pure/generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/pure/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/version.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face.rb +0 -0
- data/vendor/pup410/lib/puppet/face/ca.rb +259 -0
- data/vendor/pup410/lib/puppet/face/catalog.rb +130 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/catalog/select.rb +0 -0
- data/vendor/pup410/lib/puppet/face/certificate.rb +165 -0
- data/vendor/pup410/lib/puppet/face/certificate_request.rb +56 -0
- data/vendor/pup410/lib/puppet/face/certificate_revocation_list.rb +56 -0
- data/vendor/pup410/lib/puppet/face/config.rb +119 -0
- data/vendor/pup410/lib/puppet/face/epp.rb +527 -0
- data/vendor/pup410/lib/puppet/face/facts.rb +38 -0
- data/vendor/pup410/lib/puppet/face/file.rb +50 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/file/download.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/file/store.rb +0 -0
- data/vendor/pup410/lib/puppet/face/generate.rb +64 -0
- data/vendor/pup410/lib/puppet/face/help.rb +201 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/help/action.erb +0 -0
- data/vendor/pup410/lib/puppet/face/help/face.erb +114 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/help/global.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/help/man.erb +0 -0
- data/vendor/pup410/lib/puppet/face/key.rb +16 -0
- data/vendor/pup410/lib/puppet/face/man.rb +101 -0
- data/vendor/pup410/lib/puppet/face/module.rb +19 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/build.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/changes.rb +0 -0
- data/vendor/pup410/lib/puppet/face/module/generate.rb +251 -0
- data/vendor/pup410/lib/puppet/face/module/install.rb +145 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/list.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/search.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/uninstall.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/upgrade.rb +0 -0
- data/vendor/pup410/lib/puppet/face/node.rb +42 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/node/clean.rb +0 -0
- data/vendor/pup410/lib/puppet/face/parser.rb +161 -0
- data/vendor/pup410/lib/puppet/face/plugin.rb +58 -0
- data/vendor/pup410/lib/puppet/face/report.rb +54 -0
- data/vendor/pup410/lib/puppet/face/resource.rb +53 -0
- data/vendor/pup410/lib/puppet/face/resource_type.rb +84 -0
- data/vendor/pup410/lib/puppet/face/status.rb +50 -0
- data/vendor/pup410/lib/puppet/feature/base.rb +94 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/cfacter.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/cfpropertylist.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/eventlog.rb +0 -0
- data/vendor/pup410/lib/puppet/feature/external_facts.rb +5 -0
- data/vendor/pup410/lib/puppet/feature/hiera_eyaml.rb +3 -0
- data/vendor/pup410/lib/puppet/feature/hocon.rb +3 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/libuser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/pe_license.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/rack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/selinux.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/ssh.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/telnet.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/zlib.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_bucket.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_bucket/dipper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_bucket/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/configuration.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/configuration/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/content.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/fileset.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/http_metadata.rb +0 -0
- data/vendor/pup410/lib/puppet/file_serving/metadata.rb +163 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/modules.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/pluginfacts.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/plugins.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/terminus_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/terminus_selector.rb +0 -0
- data/vendor/pup410/lib/puppet/file_system.rb +404 -0
- data/vendor/pup410/lib/puppet/file_system/file_impl.rb +154 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_system/memory_file.rb +0 -0
- data/vendor/pup410/lib/puppet/file_system/memory_impl.rb +86 -0
- data/vendor/pup410/lib/puppet/file_system/path_pattern.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_system/posix.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_system/uniquefile.rb +0 -0
- data/vendor/pup410/lib/puppet/file_system/windows.rb +130 -0
- data/vendor/pup410/lib/puppet/forge.rb +228 -0
- data/vendor/pup410/lib/puppet/forge/cache.rb +60 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/forge/errors.rb +0 -0
- data/vendor/pup410/lib/puppet/forge/repository.rb +155 -0
- data/vendor/pup410/lib/puppet/functions.rb +774 -0
- data/vendor/pup410/lib/puppet/functions/alert.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/assert_type.rb +93 -0
- data/vendor/pup410/lib/puppet/functions/binary_file.rb +19 -0
- data/vendor/pup410/lib/puppet/functions/break.rb +22 -0
- data/vendor/pup410/lib/puppet/functions/contain.rb +33 -0
- data/vendor/pup410/lib/puppet/functions/crit.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/debug.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/defined.rb +160 -0
- data/vendor/pup410/lib/puppet/functions/dig.rb +23 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/each.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/emerg.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/epp.rb +48 -0
- data/vendor/pup410/lib/puppet/functions/err.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/eyaml_lookup_key.rb +94 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/filter.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/find_file.rb +31 -0
- data/vendor/pup410/lib/puppet/functions/hiera.rb +88 -0
- data/vendor/pup410/lib/puppet/functions/hiera_array.rb +81 -0
- data/vendor/pup410/lib/puppet/functions/hiera_hash.rb +92 -0
- data/vendor/pup410/lib/puppet/functions/hiera_include.rb +104 -0
- data/vendor/pup410/lib/puppet/functions/hocon_data.rb +41 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/import.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/include.rb +21 -0
- data/vendor/pup410/lib/puppet/functions/info.rb +14 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/inline_epp.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/json_data.rb +33 -0
- data/vendor/pup410/lib/puppet/functions/lest.rb +17 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/lookup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/map.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/match.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/new.rb +31 -0
- data/vendor/pup410/lib/puppet/functions/next.rb +23 -0
- data/vendor/pup410/lib/puppet/functions/notice.rb +14 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/reduce.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/regsubst.rb +76 -0
- data/vendor/pup410/lib/puppet/functions/require.rb +37 -0
- data/vendor/pup410/lib/puppet/functions/return.rb +22 -0
- data/vendor/pup410/lib/puppet/functions/reverse_each.rb +25 -0
- data/vendor/pup410/lib/puppet/functions/scanf.rb +44 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/slice.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/split.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/step.rb +26 -0
- data/vendor/pup410/lib/puppet/functions/strftime.rb +35 -0
- data/vendor/pup410/lib/puppet/functions/then.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/type.rb +31 -0
- data/vendor/pup410/lib/puppet/functions/unwrap.rb +40 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/versioncmp.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/warning.rb +14 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/with.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/yaml_data.rb +42 -0
- data/vendor/pup410/lib/puppet/generate/models/type/property.rb +70 -0
- data/vendor/pup410/lib/puppet/generate/models/type/type.rb +62 -0
- data/vendor/pup410/lib/puppet/generate/templates/type/pcore.erb +42 -0
- data/vendor/pup410/lib/puppet/generate/type.rb +239 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/key.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/prioritizer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/random_prioritizer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/rb_tree_map.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/relationship_graph.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/sequential_prioritizer.rb +0 -0
- data/vendor/pup410/lib/puppet/graph/simple_graph.rb +560 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/title_hash_prioritizer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/catalog/compiler.rb +370 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/json.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/rest.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/catalog/static_compiler.rb +232 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/disabled_ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/disabled_ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_status.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_status/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_status/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/code.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/data_binding/hiera.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/data_binding/none.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/direct_file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/envelope.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/errors.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/exec.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/face.rb +153 -0
- data/vendor/pup410/lib/puppet/indirector/facts/facter.rb +90 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/network_device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/yaml.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/file_bucket_file/file.rb +254 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_bucket_file/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_bucket_file/selector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/selector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/selector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/generic_http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/hiera.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/indirection.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/json.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/key/ca.rb +16 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/key/disabled_ca.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/key/file.rb +50 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/key/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/exec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/plain.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/write_only_yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/none.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/plain.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/processor.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/yaml.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/request.rb +282 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource/ral.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource/validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource_type.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource_type/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource_type/rest.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/rest.rb +330 -0
- data/vendor/pup410/lib/puppet/indirector/ssl_file.rb +201 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/status.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/status/local.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/status/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/terminus.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/info_service.rb +0 -0
- data/vendor/pup410/lib/puppet/info_service/class_information_service.rb +111 -0
- data/vendor/pup410/lib/puppet/interface.rb +240 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/action.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/action_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/action_manager.rb +0 -0
- data/vendor/pup410/lib/puppet/interface/documentation.rb +342 -0
- data/vendor/pup410/lib/puppet/interface/face_collection.rb +125 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/option.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/option_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/option_manager.rb +0 -0
- data/vendor/pup410/lib/puppet/loaders.rb +25 -0
- data/vendor/pup410/lib/puppet/metatype/manager.rb +195 -0
- data/vendor/pup410/lib/puppet/module.rb +410 -0
- data/vendor/pup410/lib/puppet/module_tool.rb +192 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/application.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/applications/builder.rb +149 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/checksummer.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/applications/installer.rb +351 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/searcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/uninstaller.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/unpacker.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/applications/upgrader.rb +277 -0
- data/vendor/pup410/lib/puppet/module_tool/checksums.rb +49 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/contents_description.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/dependency.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/base.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/errors/installer.rb +95 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/shared.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/uninstaller.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/upgrader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/install_directory.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/installed_modules.rb +96 -0
- data/vendor/pup410/lib/puppet/module_tool/local_tarball.rb +90 -0
- data/vendor/pup410/lib/puppet/module_tool/metadata.rb +221 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/shared_behaviors.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/Gemfile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/README.md.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/Rakefile +0 -0
- data/vendor/pup410/lib/puppet/module_tool/skeleton/templates/generator/examples/init.pp.erb +12 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/metadata.json.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/spec/classes/init_spec.rb.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/tar.rb +17 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/tar/gnu.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/tar/mini.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/auth_config_parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/authconfig.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/authorization.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/authstore.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/client_request.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/format.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/format_handler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/format_support.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/formats.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/ca/v1.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/api/indirected_routes.rb +239 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/indirection_type.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/api/master/v3.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master/v3/authorization.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master/v3/environment.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master/v3/environments.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/compression.rb +117 -0
- data/vendor/pup410/lib/puppet/network/http/connection.rb +235 -0
- data/vendor/pup410/lib/puppet/network/http/error.rb +69 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/factory.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/handler.rb +179 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/issues.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/memory_response.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/nocache_pool.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/pool.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/rack.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/rack/rest.rb +162 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/request.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/response.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/route.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/session.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/site.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/webrick.rb +125 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/webrick/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http_pool.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/rest_controller.rb +0 -0
- data/vendor/pup410/lib/puppet/network/rights.rb +209 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/node.rb +0 -0
- data/vendor/pup410/lib/puppet/node/environment.rb +555 -0
- data/vendor/pup410/lib/puppet/node/facts.rb +133 -0
- data/vendor/pup410/lib/puppet/parameter.rb +592 -0
- data/vendor/pup410/lib/puppet/parameter/boolean.rb +15 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parameter/package_options.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parameter/path.rb +0 -0
- data/vendor/pup410/lib/puppet/parameter/value.rb +91 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parameter/value_collection.rb +0 -0
- data/vendor/pup410/lib/puppet/parser.rb +19 -0
- data/vendor/pup410/lib/puppet/parser/ast.rb +65 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/block_expression.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/branch.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/hostclass.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/ast/leaf.rb +75 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/node.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/ast/pops_bridge.rb +317 -0
- data/vendor/pup410/lib/puppet/parser/ast/resource.rb +66 -0
- data/vendor/pup410/lib/puppet/parser/ast/resource_instance.rb +10 -0
- data/vendor/pup410/lib/puppet/parser/ast/resourceparam.rb +31 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/top_level_construct.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/compiler.rb +901 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/compiler/catalog_validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/compiler/catalog_validator/env_relationship_validator.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +60 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/compiler/catalog_validator/site_validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/e4_parser_adapter.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/environment_compiler.rb +201 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/files.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions.rb +278 -0
- data/vendor/pup410/lib/puppet/parser/functions/assert_type.rb +60 -0
- data/vendor/pup410/lib/puppet/parser/functions/binary_file.rb +24 -0
- data/vendor/pup410/lib/puppet/parser/functions/break.rb +39 -0
- data/vendor/pup410/lib/puppet/parser/functions/contain.rb +30 -0
- data/vendor/pup410/lib/puppet/parser/functions/create_resources.rb +106 -0
- data/vendor/pup410/lib/puppet/parser/functions/defined.rb +107 -0
- data/vendor/pup410/lib/puppet/parser/functions/dig.rb +29 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/digest.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/each.rb +104 -0
- data/vendor/pup410/lib/puppet/parser/functions/epp.rb +39 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/fail.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/file.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/filter.rb +78 -0
- data/vendor/pup410/lib/puppet/parser/functions/find_file.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/fqdn_rand.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/generate.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera.rb +103 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera_array.rb +92 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera_hash.rb +102 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera_include.rb +102 -0
- data/vendor/pup410/lib/puppet/parser/functions/include.rb +33 -0
- data/vendor/pup410/lib/puppet/parser/functions/inline_epp.rb +51 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/inline_template.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/lest.rb +49 -0
- data/vendor/pup410/lib/puppet/parser/functions/lookup.rb +132 -0
- data/vendor/pup410/lib/puppet/parser/functions/map.rb +76 -0
- data/vendor/pup410/lib/puppet/parser/functions/match.rb +43 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/md5.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/new.rb +939 -0
- data/vendor/pup410/lib/puppet/parser/functions/next.rb +38 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/realize.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/reduce.rb +106 -0
- data/vendor/pup410/lib/puppet/parser/functions/regsubst.rb +62 -0
- data/vendor/pup410/lib/puppet/parser/functions/require.rb +40 -0
- data/vendor/pup410/lib/puppet/parser/functions/return.rb +71 -0
- data/vendor/pup410/lib/puppet/parser/functions/reverse_each.rb +83 -0
- data/vendor/pup410/lib/puppet/parser/functions/scanf.rb +38 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/sha1.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/shellquote.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/slice.rb +39 -0
- data/vendor/pup410/lib/puppet/parser/functions/split.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/sprintf.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/step.rb +84 -0
- data/vendor/pup410/lib/puppet/parser/functions/strftime.rb +185 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/tag.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/tagged.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/template.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/then.rb +73 -0
- data/vendor/pup410/lib/puppet/parser/functions/type.rb +53 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/versioncmp.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/with.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/parser_factory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/relationship.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/resource.rb +388 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/resource/param.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/scope.rb +1138 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/templatewrapper.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/type_loader.rb +149 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/yaml_trimmer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/plugins.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/plugins/binding_schemes.rb +0 -0
- data/vendor/pup410/lib/puppet/plugins/configuration.rb +77 -0
- data/vendor/pup410/lib/puppet/plugins/data_providers.rb +45 -0
- data/vendor/pup410/lib/puppet/plugins/data_providers/data_provider.rb +406 -0
- data/vendor/pup410/lib/puppet/plugins/data_providers/registry.rb +51 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/plugins/syntax_checkers.rb +0 -0
- data/vendor/pup410/lib/puppet/pops.rb +150 -0
- data/vendor/pup410/lib/puppet/pops/adaptable.rb +201 -0
- data/vendor/pup410/lib/puppet/pops/adapters.rb +198 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/binder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/binder_issues.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_checker.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_composer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_factory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_label_provider.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_loader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_model.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_model_dumper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_model_meta.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_validator_factory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/binder_config.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/binder_config_checker.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/diagnostic_producer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/issues.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/injector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/injector_entry.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/key_factory.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/binder/producers.rb +831 -0
- data/vendor/pup410/lib/puppet/pops/binder/scheme_handler/confdir_scheme.rb +34 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/scheme_handler/module_scheme.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/scheme_handler/symbolic_scheme.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/system_bindings.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/containment.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/access_operator.rb +707 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/callable_signature.rb +107 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/closure.rb +365 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/collector_transformer.rb +238 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +29 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/collectors/exported_collector.rb +69 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/collectors/fixed_set_collector.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/compare_operator.rb +252 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/epp_evaluator.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/evaluator_impl.rb +1247 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/external_syntax_support.rb +52 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb +84 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/literal_evaluator.rb +87 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/puppet_proc.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/relationship_operator.rb +168 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/runtime3_converter.rb +184 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/runtime3_resource_support.rb +117 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/runtime3_support.rb +554 -0
- data/vendor/pup410/lib/puppet/pops/functions/dispatch.rb +105 -0
- data/vendor/pup410/lib/puppet/pops/functions/dispatcher.rb +71 -0
- data/vendor/pup410/lib/puppet/pops/functions/function.rb +135 -0
- data/vendor/pup410/lib/puppet/pops/issue_reporter.rb +115 -0
- data/vendor/pup410/lib/puppet/pops/issues.rb +834 -0
- data/vendor/pup410/lib/puppet/pops/label_provider.rb +90 -0
- data/vendor/pup410/lib/puppet/pops/loader/base_loader.rb +156 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/dependency_loader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/gem_support.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loader/loader.rb +190 -0
- data/vendor/pup410/lib/puppet/pops/loader/loader_paths.rb +225 -0
- data/vendor/pup410/lib/puppet/pops/loader/module_loaders.rb +300 -0
- data/vendor/pup410/lib/puppet/pops/loader/null_loader.rb +60 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/predefined_loader.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loader/puppet_function_instantiator.rb +84 -0
- data/vendor/pup410/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +80 -0
- data/vendor/pup410/lib/puppet/pops/loader/ruby_function_instantiator.rb +46 -0
- data/vendor/pup410/lib/puppet/pops/loader/runtime3_type_loader.rb +96 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/simple_environment_loader.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loader/static_loader.rb +180 -0
- data/vendor/pup410/lib/puppet/pops/loader/type_definition_instantiator.rb +93 -0
- data/vendor/pup410/lib/puppet/pops/loader/typed_name.rb +49 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/uri_helper.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loaders.rb +410 -0
- data/vendor/pup410/lib/puppet/pops/lookup.rb +94 -0
- data/vendor/pup410/lib/puppet/pops/lookup/configured_data_provider.rb +93 -0
- data/vendor/pup410/lib/puppet/pops/lookup/context.rb +200 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_adapter.rb +27 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_dig_function_provider.rb +145 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_hash_function_provider.rb +126 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_provider.rb +107 -0
- data/vendor/pup410/lib/puppet/pops/lookup/environment_data_provider.rb +35 -0
- data/vendor/pup410/lib/puppet/pops/lookup/explainer.rb +594 -0
- data/vendor/pup410/lib/puppet/pops/lookup/function_provider.rb +110 -0
- data/vendor/pup410/lib/puppet/pops/lookup/global_data_provider.rb +75 -0
- data/vendor/pup410/lib/puppet/pops/lookup/hiera_config.rb +784 -0
- data/vendor/pup410/lib/puppet/pops/lookup/interpolation.rb +153 -0
- data/vendor/pup410/lib/puppet/pops/lookup/invocation.rb +261 -0
- data/vendor/pup410/lib/puppet/pops/lookup/location_resolver.rb +99 -0
- data/vendor/pup410/lib/puppet/pops/lookup/lookup_adapter.rb +515 -0
- data/vendor/pup410/lib/puppet/pops/lookup/lookup_key.rb +99 -0
- data/vendor/pup410/lib/puppet/pops/lookup/lookup_key_function_provider.rb +92 -0
- data/vendor/pup410/lib/puppet/pops/lookup/module_data_provider.rb +89 -0
- data/vendor/pup410/lib/puppet/pops/lookup/sub_lookup.rb +91 -0
- data/vendor/pup410/lib/puppet/pops/merge_strategy.rb +419 -0
- data/vendor/pup410/lib/puppet/pops/migration/migration_checker.rb +58 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/model/ast_transformer.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/model/factory.rb +1151 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/model/model.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/model/model_label_provider.rb +130 -0
- data/vendor/pup410/lib/puppet/pops/model/model_meta.rb +629 -0
- data/vendor/pup410/lib/puppet/pops/model/model_tree_dumper.rb +451 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/model/tree_dumper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/code_merger.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/parser/egrammar.ra +876 -0
- data/vendor/pup410/lib/puppet/pops/parser/eparser.rb +3243 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/epp_parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/epp_support.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/parser/evaluating_parser.rb +165 -0
- data/vendor/pup410/lib/puppet/pops/parser/heredoc_support.rb +143 -0
- data/vendor/pup410/lib/puppet/pops/parser/interpolation_support.rb +244 -0
- data/vendor/pup410/lib/puppet/pops/parser/lexer2.rb +798 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/lexer_support.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/locatable.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/parser/locator.rb +321 -0
- data/vendor/pup410/lib/puppet/pops/parser/parser_support.rb +251 -0
- data/vendor/pup410/lib/puppet/pops/parser/slurp_support.rb +120 -0
- data/vendor/pup410/lib/puppet/pops/patterns.rb +60 -0
- data/vendor/pup410/lib/puppet/pops/pcore.rb +96 -0
- data/vendor/pup410/lib/puppet/pops/puppet_stack.rb +43 -0
- data/vendor/pup410/lib/puppet/pops/resource/param.rb +55 -0
- data/vendor/pup410/lib/puppet/pops/resource/resource_type_impl.rb +314 -0
- data/vendor/pup410/lib/puppet/pops/resource/resource_type_set.pcore +22 -0
- data/vendor/pup410/lib/puppet/pops/semantic_error.rb +29 -0
- data/vendor/pup410/lib/puppet/pops/serialization.rb +17 -0
- data/vendor/pup410/lib/puppet/pops/serialization/abstract_reader.rb +176 -0
- data/vendor/pup410/lib/puppet/pops/serialization/abstract_writer.rb +207 -0
- data/vendor/pup410/lib/puppet/pops/serialization/deserializer.rb +80 -0
- data/vendor/pup410/lib/puppet/pops/serialization/extension.rb +157 -0
- data/vendor/pup410/lib/puppet/pops/serialization/instance_reader.rb +19 -0
- data/vendor/pup410/lib/puppet/pops/serialization/instance_writer.rb +14 -0
- data/vendor/pup410/lib/puppet/pops/serialization/json.rb +297 -0
- data/vendor/pup410/lib/puppet/pops/serialization/object.rb +71 -0
- data/vendor/pup410/lib/puppet/pops/serialization/rgen.rb +152 -0
- data/vendor/pup410/lib/puppet/pops/serialization/serializer.rb +125 -0
- data/vendor/pup410/lib/puppet/pops/serialization/time_factory.rb +67 -0
- data/vendor/pup410/lib/puppet/pops/time/timespan.rb +718 -0
- data/vendor/pup410/lib/puppet/pops/time/timestamp.rb +148 -0
- data/vendor/pup410/lib/puppet/pops/types/annotatable.rb +36 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/class_loader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/enumeration.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/implementation_registry.rb +141 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/iterable.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/p_binary_type.rb +220 -0
- data/vendor/pup410/lib/puppet/pops/types/p_meta_type.rb +83 -0
- data/vendor/pup410/lib/puppet/pops/types/p_object_type.rb +886 -0
- data/vendor/pup410/lib/puppet/pops/types/p_runtime_type.rb +115 -0
- data/vendor/pup410/lib/puppet/pops/types/p_sem_ver_range_type.rb +187 -0
- data/vendor/pup410/lib/puppet/pops/types/p_sem_ver_type.rb +141 -0
- data/vendor/pup410/lib/puppet/pops/types/p_sensitive_type.rb +73 -0
- data/vendor/pup410/lib/puppet/pops/types/p_timespan_type.rb +141 -0
- data/vendor/pup410/lib/puppet/pops/types/p_timestamp_type.rb +69 -0
- data/vendor/pup410/lib/puppet/pops/types/p_type_set_type.rb +352 -0
- data/vendor/pup410/lib/puppet/pops/types/puppet_object.rb +16 -0
- data/vendor/pup410/lib/puppet/pops/types/recursion_guard.rb +136 -0
- data/vendor/pup410/lib/puppet/pops/types/ruby_generator.rb +275 -0
- data/vendor/pup410/lib/puppet/pops/types/string_converter.rb +1022 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/type_acceptor.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/type_asserter.rb +47 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/type_assertion_error.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/type_calculator.rb +836 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/type_conversion_error.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/type_factory.rb +538 -0
- data/vendor/pup410/lib/puppet/pops/types/type_formatter.rb +686 -0
- data/vendor/pup410/lib/puppet/pops/types/type_mismatch_describer.rb +1105 -0
- data/vendor/pup410/lib/puppet/pops/types/type_parser.rb +564 -0
- data/vendor/pup410/lib/puppet/pops/types/type_set_reference.rb +59 -0
- data/vendor/pup410/lib/puppet/pops/types/types.rb +3464 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/utils.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/validation.rb +470 -0
- data/vendor/pup410/lib/puppet/pops/validation/checker4_0.rb +980 -0
- data/vendor/pup410/lib/puppet/pops/validation/validator_factory_4_0.rb +39 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/visitable.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/visitor.rb +95 -0
- data/vendor/pup410/lib/puppet/property.rb +597 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/boolean.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/ensure.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/keyvalue.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/list.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/ordered_list.rb +0 -0
- data/vendor/pup410/lib/puppet/provider.rb +601 -0
- data/vendor/pup410/lib/puppet/provider/aixobject.rb +392 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/augeas/augeas.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/cisco.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/command.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/computer/computer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/confine.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/cron/crontab.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/exec.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/exec/posix.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/exec/shell.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/exec/windows.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/file/posix.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/file/windows.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/group/aix.rb +141 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/directoryservice.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/groupadd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/pw.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/group/windows_adsi.rb +109 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/host/parsed.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/interface/cisco.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/ldap.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/macauthorization/macauthorization.rb +298 -0
- data/vendor/pup410/lib/puppet/provider/mailalias/aliases.rb +50 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/maillist/mailman.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/mcx/mcxcontent.rb +173 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/mount.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/mount/parsed.rb +280 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/naginator.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/nameservice.rb +317 -0
- data/vendor/pup410/lib/puppet/provider/nameservice/directoryservice.rb +507 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/nameservice/objectadd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/nameservice/pw.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/network_device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/aix.rb +152 -0
- data/vendor/pup410/lib/puppet/provider/package/appdmg.rb +110 -0
- data/vendor/pup410/lib/puppet/provider/package/apple.rb +47 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/apt.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/aptitude.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/aptrpm.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/blastwave.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/dnf.rb +46 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/dpkg.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/fink.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/freebsd.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/gem.rb +174 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/hpux.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/macports.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/nim.rb +280 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/openbsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/opkg.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/pacman.rb +267 -0
- data/vendor/pup410/lib/puppet/provider/package/pip.rb +179 -0
- data/vendor/pup410/lib/puppet/provider/package/pip3.rb +20 -0
- data/vendor/pup410/lib/puppet/provider/package/pkg.rb +249 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgdmg.rb +152 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgin.rb +87 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgng.rb +143 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgutil.rb +186 -0
- data/vendor/pup410/lib/puppet/provider/package/portage.rb +193 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/ports.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/portupgrade.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/puppet_gem.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/rpm.rb +402 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/rug.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/sun.rb +132 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/sunfreeware.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/tdnf.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/up2date.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/urpmi.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows/exe_package.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows/msi_package.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows/package.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/yum.rb +270 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/zypper.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/parsedfile.rb +459 -0
- data/vendor/pup410/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +590 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/selboolean/getsetsebool.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/selmodule/semodule.rb +138 -0
- data/vendor/pup410/lib/puppet/provider/service/base.rb +121 -0
- data/vendor/pup410/lib/puppet/provider/service/bsd.rb +51 -0
- data/vendor/pup410/lib/puppet/provider/service/daemontools.rb +194 -0
- data/vendor/pup410/lib/puppet/provider/service/debian.rb +74 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/freebsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/gentoo.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/service/init.rb +193 -0
- data/vendor/pup410/lib/puppet/provider/service/launchd.rb +346 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/openbsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/openrc.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/openwrt.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/rcng.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/redhat.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/service/runit.rb +111 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/service.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/service/smf.rb +167 -0
- data/vendor/pup410/lib/puppet/provider/service/src.rb +147 -0
- data/vendor/pup410/lib/puppet/provider/service/systemd.rb +186 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/upstart.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/windows.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/ssh_authorized_key/parsed.rb +105 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/sshkey/parsed.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/user/aix.rb +375 -0
- data/vendor/pup410/lib/puppet/provider/user/directoryservice.rb +632 -0
- data/vendor/pup410/lib/puppet/provider/user/hpux.rb +95 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/user/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/user/openbsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/user/pw.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/user/user_role_add.rb +227 -0
- data/vendor/pup410/lib/puppet/provider/user/useradd.rb +231 -0
- data/vendor/pup410/lib/puppet/provider/user/windows_adsi.rb +148 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/vlan/cisco.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/yumrepo/inifile.rb +304 -0
- data/vendor/pup410/lib/puppet/provider/zfs/zfs.rb +84 -0
- data/vendor/pup410/lib/puppet/provider/zone/solaris.rb +364 -0
- data/vendor/pup410/lib/puppet/provider/zpool/zpool.rb +125 -0
- data/vendor/pup410/lib/puppet/reference/configuration.rb +82 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/function.rb +0 -0
- data/vendor/pup410/lib/puppet/reference/indirection.rb +71 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/metaparameter.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/providers.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/report.rb +0 -0
- data/vendor/pup410/lib/puppet/reference/type.rb +114 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/relationship.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reports.rb +0 -0
- data/vendor/pup410/lib/puppet/reports/http.rb +33 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reports/log.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reports/store.rb +0 -0
- data/vendor/pup410/lib/puppet/resource.rb +728 -0
- data/vendor/pup410/lib/puppet/resource/capability_finder.rb +128 -0
- data/vendor/pup410/lib/puppet/resource/catalog.rb +675 -0
- data/vendor/pup410/lib/puppet/resource/status.rb +232 -0
- data/vendor/pup410/lib/puppet/resource/type.rb +572 -0
- data/vendor/pup410/lib/puppet/resource/type_collection.rb +257 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/job.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/scheduler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/splay_job.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/timer.rb +0 -0
- data/vendor/pup410/lib/puppet/settings.rb +1455 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/array_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/autosign_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/base_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/boolean_setting.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/config_file.rb +143 -0
- data/vendor/pup410/lib/puppet/settings/directory_setting.rb +18 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/duration_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/enum_setting.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/environment_conf.rb +204 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/errors.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/file_or_directory_setting.rb +40 -0
- data/vendor/pup410/lib/puppet/settings/file_setting.rb +245 -0
- data/vendor/pup410/lib/puppet/settings/ini_file.rb +171 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/path_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/priority_setting.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/server_list_setting.rb +20 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/string_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/symbolic_enum_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/terminus_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/ttl_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/value_translator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/base.rb +153 -0
- data/vendor/pup410/lib/puppet/ssl/certificate.rb +95 -0
- data/vendor/pup410/lib/puppet/ssl/certificate_authority.rb +553 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_authority/autosign_command.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/certificate_authority/interface.rb +324 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_factory.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/certificate_request.rb +327 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_request_attributes.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_revocation_list.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_signer.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/configuration.rb +61 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/digest.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/host.rb +387 -0
- data/vendor/pup410/lib/puppet/ssl/inventory.rb +55 -0
- data/vendor/pup410/lib/puppet/ssl/key.rb +63 -0
- data/vendor/pup410/lib/puppet/ssl/oids.rb +187 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/validator.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/validator/default_validator.rb +174 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/validator/no_validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/status.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/syntax_checkers.rb +0 -0
- data/vendor/pup410/lib/puppet/syntax_checkers/base64.rb +41 -0
- data/vendor/pup410/lib/puppet/syntax_checkers/json.rb +35 -0
- data/vendor/pup410/lib/puppet/test/test_helper.rb +256 -0
- data/vendor/pup410/lib/puppet/transaction.rb +399 -0
- data/vendor/pup410/lib/puppet/transaction/additional_resource_generator.rb +219 -0
- data/vendor/pup410/lib/puppet/transaction/event.rb +133 -0
- data/vendor/pup410/lib/puppet/transaction/event_manager.rb +167 -0
- data/vendor/pup410/lib/puppet/transaction/persistence.rb +84 -0
- data/vendor/pup410/lib/puppet/transaction/report.rb +460 -0
- data/vendor/pup410/lib/puppet/transaction/resource_harness.rb +316 -0
- data/vendor/pup410/lib/puppet/type.rb +2670 -0
- data/vendor/pup410/lib/puppet/type/augeas.rb +211 -0
- data/vendor/pup410/lib/puppet/type/component.rb +88 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/computer.rb +0 -0
- data/vendor/pup410/lib/puppet/type/cron.rb +492 -0
- data/vendor/pup410/lib/puppet/type/exec.rb +622 -0
- data/vendor/pup410/lib/puppet/type/file.rb +1032 -0
- data/vendor/pup410/lib/puppet/type/file/checksum.rb +44 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/checksum_value.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/content.rb +160 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/ctime.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/data_sync.rb +92 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/ensure.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/group.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/mode.rb +177 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/mtime.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/owner.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/selcontext.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/source.rb +352 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/target.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/type.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/filebucket.rb +0 -0
- data/vendor/pup410/lib/puppet/type/group.rb +206 -0
- data/vendor/pup410/lib/puppet/type/host.rb +95 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/interface.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/k5login.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/macauthorization.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/mailalias.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/maillist.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/mcx.rb +0 -0
- data/vendor/pup410/lib/puppet/type/mount.rb +310 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_command.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_contact.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_contactgroup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_host.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostdependency.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostescalation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostextinfo.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostgroup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_service.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_servicedependency.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_serviceescalation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_serviceextinfo.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_servicegroup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_timeperiod.rb +0 -0
- data/vendor/pup410/lib/puppet/type/notify.rb +44 -0
- data/vendor/pup410/lib/puppet/type/package.rb +571 -0
- data/vendor/pup410/lib/puppet/type/resources.rb +180 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/router.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/schedule.rb +0 -0
- data/vendor/pup410/lib/puppet/type/scheduled_task.rb +184 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/selboolean.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/selmodule.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/service.rb +0 -0
- data/vendor/pup410/lib/puppet/type/ssh_authorized_key.rb +159 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/sshkey.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/stage.rb +0 -0
- data/vendor/pup410/lib/puppet/type/tidy.rb +332 -0
- data/vendor/pup410/lib/puppet/type/user.rb +768 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/vlan.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/whit.rb +0 -0
- data/vendor/pup410/lib/puppet/type/yumrepo.rb +409 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/zfs.rb +0 -0
- data/vendor/pup410/lib/puppet/type/zone.rb +382 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/zpool.rb +0 -0
- data/vendor/pup410/lib/puppet/util.rb +701 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/autoload.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/backups.rb +0 -0
- data/vendor/pup410/lib/puppet/util/character_encoding.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/checksums.rb +0 -0
- data/vendor/pup410/lib/puppet/util/classgen.rb +228 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/colors.rb +0 -0
- data/vendor/pup410/lib/puppet/util/command_line.rb +185 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/command_line/puppet_option_parser.rb +0 -0
- data/vendor/pup410/lib/puppet/util/command_line/trollop.rb +824 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/constant_inflector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/diff.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/docs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/errors.rb +0 -0
- data/vendor/pup410/lib/puppet/util/execution.rb +359 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/execution_stub.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/feature.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/file_watcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/fileparsing.rb +0 -0
- data/vendor/pup410/lib/puppet/util/filetype.rb +309 -0
- data/vendor/pup410/lib/puppet/util/http_proxy.rb +197 -0
- data/vendor/pup410/lib/puppet/util/inifile.rb +341 -0
- data/vendor/pup410/lib/puppet/util/instance_loader.rb +81 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/json_lockfile.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap/connection.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap/generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap/manager.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/libuser.conf +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/libuser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/limits.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/lockfile.rb +0 -0
- data/vendor/pup410/lib/puppet/util/log.rb +411 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/log/destination.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/log/destinations.rb +0 -0
- data/vendor/pup410/lib/puppet/util/logging.rb +311 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/metaid.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/methodhelper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/metric.rb +0 -0
- data/vendor/pup410/lib/puppet/util/monkey_patches.rb +147 -0
- data/vendor/pup410/lib/puppet/util/multi_match.rb +51 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/nagios_maker.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco/device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco/facts.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco/interface.rb +0 -0
- data/vendor/pup410/lib/puppet/util/network_device/config.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/ipcalc.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport/ssh.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport/telnet.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/package.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/pidlock.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/platform.rb +0 -0
- data/vendor/pup410/lib/puppet/util/plist.rb +151 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/posix.rb +0 -0
- data/vendor/pup410/lib/puppet/util/profiler.rb +53 -0
- data/vendor/pup410/lib/puppet/util/profiler/aggregate.rb +85 -0
- data/vendor/pup410/lib/puppet/util/profiler/around_profiler.rb +67 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/profiler/logging.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/profiler/object_counts.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/profiler/wall_clock.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/provider_features.rb +0 -0
- data/vendor/pup410/lib/puppet/util/psych_support.rb +38 -0
- data/vendor/pup410/lib/puppet/util/rdoc.rb +60 -0
- data/vendor/pup410/lib/puppet/util/reference.rb +126 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/resource_template.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/retry_action.rb +0 -0
- data/vendor/pup410/lib/puppet/util/rubygems.rb +75 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/run_mode.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/selinux.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/skip_tags.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/splayer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ssl.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/storage.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/suidmanager.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/symbolic_file_mode.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/tag_set.rb +0 -0
- data/vendor/pup410/lib/puppet/util/tagging.rb +118 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/terminal.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/user_attr.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/warnings.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watched_file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watcher/change_watcher.rb +0 -0
- data/vendor/pup410/lib/puppet/util/watcher/periodic_watcher.rb +37 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watcher/timer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/access_control_entry.rb +84 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/access_control_list.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/adsi.rb +548 -0
- data/vendor/pup410/lib/puppet/util/windows/api_types.rb +282 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/com.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/error.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/file.rb +488 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/principal.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/process.rb +497 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/registry.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/root_certs.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/security.rb +857 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/security_descriptor.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/sid.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/string.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/taskscheduler.rb +1276 -0
- data/vendor/pup410/lib/puppet/util/windows/user.rb +309 -0
- data/vendor/pup410/lib/puppet/util/yaml.rb +36 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/CHANGELOG +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/Gemfile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/LICENSE +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/PUPPET_README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/Rakefile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/deep_merge.gemspec +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge/core.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge/deep_merge_hash.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge/rails_compat.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_deep_merge.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_pathspec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_rgen.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_semantic.rb +0 -0
- data/vendor/pup410/lib/puppet/vendor/load_semantic_puppet.rb +1 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/CHANGELOG.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/LICENSE +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/PUPPET_README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/README.md +0 -0
- data/vendor/pup410/lib/puppet/vendor/pathspec/lib/pathspec.rb +122 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/lib/pathspec/regexspec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/lib/pathspec/spec.rb +0 -0
- data/vendor/pup410/lib/puppet/vendor/require_vendored.rb +6 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/CHANGELOG +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/MIT-LICENSE +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/PUPPET_README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/README.rdoc +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/Rakefile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/TODO +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/anounce.txt +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/design_rationale.txt +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/ea_support.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/id_store.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel_generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_to_uml13.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_to_uml13_ea.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/metamodels/uml13_metamodel.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/metamodels/uml13_metamodel_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/metamodel_generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/mm_ext/ecore_mmgen_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/mmgen.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/templates/metamodel_generator.tpl +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/array_extensions.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_builder_methods.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_interface.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_to_ruby.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ruby_to_ecore.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/environment.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/fragment/dump_file_cache.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/fragment/fragmented_model.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/fragment/model_fragment.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/abstract_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/abstract_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/default_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/ecore_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_parser.y +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/nodebased_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/qualified_name_resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/reference_resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/resolution_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/xmi11_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/builder_extensions.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/builder_runtime.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/constant_order_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/data_types.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/intermediate/annotation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/intermediate/feature.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/mm_multiple.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder/builder_context.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder/model_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder/reference_resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/json_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/opposite_reference_filter.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/qualified_name_provider.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/xmi11_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/xmi20_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/xml_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/directory_template_container.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/output_handler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/template_container.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/template_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/transformer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/auto_class_creator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/cached_glob.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/file_cache_map.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/file_change_detector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/method_delegation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/model_comparator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/model_comparator_base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/model_dumper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/name_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/pattern_matcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/transformers/ecore_to_uml13.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/transformers/uml13_to_ecore.rb +0 -0
- data/vendor/pup410/lib/puppet/vendor/rgen_patch.rb +132 -0
- data/vendor/pup410/lib/puppet/vendor/semantic/lib/semantic.rb +5 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet.rb +17 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency.rb +181 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph.rb +60 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph_node.rb +117 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/module_release.rb +58 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb +25 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/unsatisfiable_graph.rb +31 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/gem_version.rb +3 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/locales/config.yaml +21 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +195 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +422 -0
- data/vendor/pup410/lib/puppet/version.rb +93 -0
- data/vendor/pup410/lib/puppet_x.rb +14 -0
- data/vendor/pup410/lib/semver.rb +146 -0
- data/vendor/pup410/locales/config.yaml +29 -0
- data/vendor/pup410/locales/puppet.pot +180 -0
- data/vendor/pup410/puppet-4.10.8.gemspec +17 -0
- metadata +1161 -1321
- data/vendor/gems/puppet-4.5.2/Gemfile +0 -92
- data/vendor/gems/puppet-4.5.2/bin/extlookup2hiera +0 -56
- data/vendor/gems/puppet-4.5.2/bin/puppet +0 -9
- data/vendor/gems/puppet-4.5.2/conf/auth.conf +0 -124
- data/vendor/gems/puppet-4.5.2/conf/environment.conf +0 -18
- data/vendor/gems/puppet-4.5.2/conf/fileserver.conf +0 -42
- data/vendor/gems/puppet-4.5.2/conf/puppet.conf +0 -6
- data/vendor/gems/puppet-4.5.2/ext/README.environment +0 -8
- data/vendor/gems/puppet-4.5.2/ext/autotest/Rakefile +0 -8
- data/vendor/gems/puppet-4.5.2/ext/autotest/config +0 -43
- data/vendor/gems/puppet-4.5.2/ext/autotest/readme.rst +0 -16
- data/vendor/gems/puppet-4.5.2/ext/build_defaults.yaml +0 -20
- data/vendor/gems/puppet-4.5.2/ext/cert_inspector +0 -140
- data/vendor/gems/puppet-4.5.2/ext/dbfix.sql +0 -132
- data/vendor/gems/puppet-4.5.2/ext/debian/README.Debian +0 -8
- data/vendor/gems/puppet-4.5.2/ext/debian/README.source +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/TODO.Debian +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/changelog.erb +0 -1122
- data/vendor/gems/puppet-4.5.2/ext/debian/compat +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/control +0 -146
- data/vendor/gems/puppet-4.5.2/ext/debian/copyright +0 -361
- data/vendor/gems/puppet-4.5.2/ext/debian/docs +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/fileserver.conf +0 -41
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.dirs +0 -13
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.install +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.lintian-overrides +0 -5
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.manpages +0 -30
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.postinst +0 -35
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.postrm +0 -33
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.dirs +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.emacsen-install +0 -25
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.emacsen-remove +0 -11
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.emacsen-startup +0 -9
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.install +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-testsuite.install +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-testsuite.lintian-overrides +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.default +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.init +0 -113
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.lintian-overrides +0 -3
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.logrotate +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.postinst +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.postrm +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.preinst +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-common.install +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-common.manpages +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-common.postinst +0 -6
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-passenger.dirs +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-passenger.postinst +0 -162
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-passenger.postrm +0 -61
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.README.debian +0 -17
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.default +0 -14
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.init +0 -137
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.lintian-overrides +0 -3
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.postinst +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.postrm +0 -5
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.preinst +0 -22
- data/vendor/gems/puppet-4.5.2/ext/debian/rules +0 -132
- data/vendor/gems/puppet-4.5.2/ext/debian/source/format +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/source/options +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/vim-puppet.README.Debian +0 -13
- data/vendor/gems/puppet-4.5.2/ext/debian/vim-puppet.dirs +0 -5
- data/vendor/gems/puppet-4.5.2/ext/debian/vim-puppet.yaml +0 -7
- data/vendor/gems/puppet-4.5.2/ext/debian/watch +0 -2
- data/vendor/gems/puppet-4.5.2/ext/emacs/puppet-mode-init.el +0 -6
- data/vendor/gems/puppet-4.5.2/ext/emacs/puppet-mode.el +0 -433
- data/vendor/gems/puppet-4.5.2/ext/envpuppet +0 -139
- data/vendor/gems/puppet-4.5.2/ext/envpuppet.bat +0 -14
- data/vendor/gems/puppet-4.5.2/ext/freebsd/puppetd +0 -26
- data/vendor/gems/puppet-4.5.2/ext/freebsd/puppetmasterd +0 -26
- data/vendor/gems/puppet-4.5.2/ext/gentoo/conf.d/puppet +0 -5
- data/vendor/gems/puppet-4.5.2/ext/gentoo/conf.d/puppetmaster +0 -12
- data/vendor/gems/puppet-4.5.2/ext/gentoo/init.d/puppet +0 -38
- data/vendor/gems/puppet-4.5.2/ext/gentoo/init.d/puppetmaster +0 -51
- data/vendor/gems/puppet-4.5.2/ext/gentoo/puppet/fileserver.conf +0 -41
- data/vendor/gems/puppet-4.5.2/ext/ips/puppet-agent +0 -44
- data/vendor/gems/puppet-4.5.2/ext/ips/puppet-master +0 -44
- data/vendor/gems/puppet-4.5.2/ext/ips/puppet.p5m.erb +0 -12
- data/vendor/gems/puppet-4.5.2/ext/ips/puppetagent.xml +0 -42
- data/vendor/gems/puppet-4.5.2/ext/ips/puppetmaster.xml +0 -42
- data/vendor/gems/puppet-4.5.2/ext/ips/rules +0 -19
- data/vendor/gems/puppet-4.5.2/ext/ips/transforms +0 -34
- data/vendor/gems/puppet-4.5.2/ext/ldap/puppet.schema +0 -24
- data/vendor/gems/puppet-4.5.2/ext/logcheck/puppet +0 -23
- data/vendor/gems/puppet-4.5.2/ext/nagios/check_puppet.rb +0 -123
- data/vendor/gems/puppet-4.5.2/ext/osx/file_mapping.yaml +0 -33
- data/vendor/gems/puppet-4.5.2/ext/osx/postflight.erb +0 -109
- data/vendor/gems/puppet-4.5.2/ext/osx/preflight.erb +0 -52
- data/vendor/gems/puppet-4.5.2/ext/osx/prototype.plist.erb +0 -38
- data/vendor/gems/puppet-4.5.2/ext/osx/puppet.plist +0 -30
- data/vendor/gems/puppet-4.5.2/ext/project_data.yaml +0 -59
- data/vendor/gems/puppet-4.5.2/ext/puppet-test +0 -500
- data/vendor/gems/puppet-4.5.2/ext/puppetlisten/puppetlisten.rb +0 -77
- data/vendor/gems/puppet-4.5.2/ext/puppetlisten/puppetrun.rb +0 -38
- data/vendor/gems/puppet-4.5.2/ext/pure_ruby_dsl/dsl_test.rb +0 -7
- data/vendor/gems/puppet-4.5.2/ext/rack/config.ru +0 -44
- data/vendor/gems/puppet-4.5.2/ext/rack/example-passenger-vhost.conf +0 -57
- data/vendor/gems/puppet-4.5.2/ext/redhat/client.init +0 -169
- data/vendor/gems/puppet-4.5.2/ext/redhat/client.sysconfig +0 -2
- data/vendor/gems/puppet-4.5.2/ext/redhat/fileserver.conf +0 -41
- data/vendor/gems/puppet-4.5.2/ext/redhat/logrotate +0 -21
- data/vendor/gems/puppet-4.5.2/ext/redhat/puppet.spec.erb +0 -849
- data/vendor/gems/puppet-4.5.2/ext/redhat/server.init +0 -128
- data/vendor/gems/puppet-4.5.2/ext/redhat/server.sysconfig +0 -13
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/classes/databases +0 -2
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/classes/webservers +0 -2
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/environment/development +0 -2
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/parameters/service/prod +0 -1
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/parameters/service/qa +0 -3
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/parameters/service/sandbox +0 -1
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/regexp_nodes.rb +0 -271
- data/vendor/gems/puppet-4.5.2/ext/solaris/pkginfo +0 -6
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppet +0 -44
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppet.xml +0 -44
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppetd.xml +0 -77
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppetmasterd.xml +0 -77
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/svc-puppetd +0 -64
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/svc-puppetmasterd +0 -60
- data/vendor/gems/puppet-4.5.2/ext/suse/client.init +0 -141
- data/vendor/gems/puppet-4.5.2/ext/suse/puppet.spec +0 -310
- data/vendor/gems/puppet-4.5.2/ext/suse/server.init +0 -173
- data/vendor/gems/puppet-4.5.2/ext/systemd/puppet.service +0 -15
- data/vendor/gems/puppet-4.5.2/ext/upload_facts.rb +0 -119
- data/vendor/gems/puppet-4.5.2/ext/vim/README +0 -3
- data/vendor/gems/puppet-4.5.2/ext/vim/ftdetect/puppet.vim +0 -2
- data/vendor/gems/puppet-4.5.2/ext/vim/ftplugin/puppet.vim +0 -94
- data/vendor/gems/puppet-4.5.2/ext/vim/indent/puppet.vim +0 -76
- data/vendor/gems/puppet-4.5.2/ext/vim/syntax/puppet.vim +0 -115
- data/vendor/gems/puppet-4.5.2/ext/windows/eventlog/Rakefile +0 -32
- data/vendor/gems/puppet-4.5.2/ext/windows/eventlog/puppetres.dll +0 -0
- data/vendor/gems/puppet-4.5.2/ext/windows/eventlog/puppetres.mc +0 -18
- data/vendor/gems/puppet-4.5.2/ext/windows/puppet_interactive.bat +0 -6
- data/vendor/gems/puppet-4.5.2/ext/windows/puppet_shell.bat +0 -9
- data/vendor/gems/puppet-4.5.2/ext/windows/run_puppet_interactive.bat +0 -9
- data/vendor/gems/puppet-4.5.2/ext/windows/service/daemon.bat +0 -6
- data/vendor/gems/puppet-4.5.2/ext/windows/service/daemon.rb +0 -192
- data/vendor/gems/puppet-4.5.2/ext/yaml_nodes.rb +0 -105
- data/vendor/gems/puppet-4.5.2/install.rb +0 -477
- data/vendor/gems/puppet-4.5.2/lib/hiera/puppet_function.rb +0 -82
- data/vendor/gems/puppet-4.5.2/lib/hiera/scope.rb +0 -63
- data/vendor/gems/puppet-4.5.2/lib/puppet.rb +0 -286
- data/vendor/gems/puppet-4.5.2/lib/puppet/agent.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/agent/disabler.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/agent/locker.rb +0 -52
- data/vendor/gems/puppet-4.5.2/lib/puppet/application.rb +0 -462
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/agent.rb +0 -456
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/apply.rb +0 -352
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/ca.rb +0 -11
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/catalog.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/cert.rb +0 -297
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/certificate.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/certificate_request.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/certificate_revocation_list.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/config.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/describe.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/device.rb +0 -256
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/doc.rb +0 -226
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/epp.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/face_base.rb +0 -269
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/facts.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/file.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/filebucket.rb +0 -258
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/help.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/indirection_base.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/inspect.rb +0 -179
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/key.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/lookup.rb +0 -342
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/man.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/master.rb +0 -321
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/module.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/node.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/parser.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/plugin.rb +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/report.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/resource.rb +0 -224
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/resource_type.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/status.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application_support.rb +0 -57
- data/vendor/gems/puppet-4.5.2/lib/puppet/configurer.rb +0 -389
- data/vendor/gems/puppet-4.5.2/lib/puppet/configurer/fact_handler.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/configurer/plugin_handler.rb +0 -27
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/data_adapter.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/data_function_support.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/function_env_data_provider.rb +0 -18
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/function_module_data_provider.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_config.rb +0 -129
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_env_data_provider.rb +0 -18
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_interpolate.rb +0 -19
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_module_data_provider.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_support.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/json_data_provider_factory.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/lookup_adapter.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/yaml_data_provider_factory.rb +0 -26
- data/vendor/gems/puppet-4.5.2/lib/puppet/defaults.rb +0 -1902
- data/vendor/gems/puppet-4.5.2/lib/puppet/environments.rb +0 -487
- data/vendor/gems/puppet-4.5.2/lib/puppet/error.rb +0 -100
- data/vendor/gems/puppet-4.5.2/lib/puppet/external/dot.rb +0 -326
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/ca.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/catalog.rb +0 -130
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/certificate.rb +0 -159
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/certificate_request.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/certificate_revocation_list.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/config.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/epp.rb +0 -479
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/facts.rb +0 -38
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/file.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/help.rb +0 -193
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/help/face.erb +0 -111
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/key.rb +0 -15
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/man.rb +0 -99
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/module.rb +0 -19
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/module/generate.rb +0 -251
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/module/install.rb +0 -145
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/node.rb +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/parser.rb +0 -161
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/plugin.rb +0 -58
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/report.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/resource.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/resource_type.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/status.rb +0 -48
- data/vendor/gems/puppet-4.5.2/lib/puppet/feature/base.rb +0 -87
- data/vendor/gems/puppet-4.5.2/lib/puppet/feature/external_facts.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_serving/metadata.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system.rb +0 -376
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/file_impl.rb +0 -149
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/memory_impl.rb +0 -82
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/path_pattern.rb +0 -97
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/windows.rb +0 -103
- data/vendor/gems/puppet-4.5.2/lib/puppet/forge.rb +0 -226
- data/vendor/gems/puppet-4.5.2/lib/puppet/forge/cache.rb +0 -59
- data/vendor/gems/puppet-4.5.2/lib/puppet/forge/repository.rb +0 -155
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions.rb +0 -732
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/assert_type.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/defined.rb +0 -161
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/dig.rb +0 -39
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/epp.rb +0 -45
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera.rb +0 -81
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera_array.rb +0 -74
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera_hash.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera_include.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/lest.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/new.rb +0 -502
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/regsubst.rb +0 -80
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/reverse_each.rb +0 -82
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/scanf.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/step.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/then.rb +0 -74
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/type.rb +0 -70
- data/vendor/gems/puppet-4.5.2/lib/puppet/graph/simple_graph.rb +0 -562
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/catalog/compiler.rb +0 -367
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/catalog/static_compiler.rb +0 -229
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/face.rb +0 -148
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/facts/facter.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/file_bucket_file/file.rb +0 -199
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/key/ca.rb +0 -16
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/key/file.rb +0 -49
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/request.rb +0 -256
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/rest.rb +0 -260
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/ssl_file.rb +0 -180
- data/vendor/gems/puppet-4.5.2/lib/puppet/info_service/class_information_service.rb +0 -112
- data/vendor/gems/puppet-4.5.2/lib/puppet/interface.rb +0 -228
- data/vendor/gems/puppet-4.5.2/lib/puppet/interface/documentation.rb +0 -342
- data/vendor/gems/puppet-4.5.2/lib/puppet/interface/face_collection.rb +0 -125
- data/vendor/gems/puppet-4.5.2/lib/puppet/loaders.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/metatype/manager.rb +0 -195
- data/vendor/gems/puppet-4.5.2/lib/puppet/module.rb +0 -355
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool.rb +0 -192
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/applications/builder.rb +0 -148
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/applications/installer.rb +0 -351
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/applications/upgrader.rb +0 -277
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/checksums.rb +0 -49
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/errors/installer.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/installed_modules.rb +0 -96
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/local_tarball.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/metadata.rb +0 -221
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/skeleton/templates/generator/examples/init.pp.erb +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/tar.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/indirected_routes.rb +0 -248
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb +0 -28
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/compression.rb +0 -116
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/connection.rb +0 -233
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/error.rb +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/handler.rb +0 -178
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/rack/rest.rb +0 -147
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/webrick.rb +0 -124
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/rights.rb +0 -219
- data/vendor/gems/puppet-4.5.2/lib/puppet/node/environment.rb +0 -540
- data/vendor/gems/puppet-4.5.2/lib/puppet/node/facts.rb +0 -133
- data/vendor/gems/puppet-4.5.2/lib/puppet/parameter.rb +0 -572
- data/vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb +0 -15
- data/vendor/gems/puppet-4.5.2/lib/puppet/parameter/value.rb +0 -91
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser.rb +0 -20
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/leaf.rb +0 -75
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/pops_bridge.rb +0 -304
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/resource.rb +0 -61
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/resource_instance.rb +0 -6
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/resourceparam.rb +0 -26
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/compiler.rb +0 -895
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/environment_compiler.rb +0 -164
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions.rb +0 -272
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/assert_type.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/contain.rb +0 -38
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/create_resources.rb +0 -83
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/defined.rb +0 -131
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/each.rb +0 -104
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/epp.rb +0 -36
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/filter.rb +0 -78
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera.rb +0 -89
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera_array.rb +0 -78
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera_hash.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera_include.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/include.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/inline_epp.rb +0 -51
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/lookup.rb +0 -130
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/map.rb +0 -76
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/match.rb +0 -43
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/reduce.rb +0 -106
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/regsubst.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/require.rb +0 -63
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/scanf.rb +0 -33
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/slice.rb +0 -39
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/split.rb +0 -28
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/with.rb +0 -28
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/resource.rb +0 -367
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/scope.rb +0 -1082
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/type_loader.rb +0 -149
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/configuration.rb +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/data_providers.rb +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/data_providers/data_provider.rb +0 -336
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/data_providers/registry.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops.rb +0 -136
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/adaptable.rb +0 -204
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/adapters.rb +0 -193
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/binder/producers.rb +0 -831
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/binder/scheme_handler/confdir_scheme.rb +0 -34
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/access_operator.rb +0 -639
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/callable_signature.rb +0 -100
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/closure.rb +0 -270
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/collector_transformer.rb +0 -229
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +0 -29
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/collectors/exported_collector.rb +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/compare_operator.rb +0 -229
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/evaluator_impl.rb +0 -1218
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/external_syntax_support.rb +0 -52
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb +0 -85
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/literal_evaluator.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/relationship_operator.rb +0 -169
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/runtime3_converter.rb +0 -192
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/runtime3_support.rb +0 -537
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/functions/dispatch.rb +0 -85
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/functions/dispatcher.rb +0 -76
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/functions/function.rb +0 -113
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/issue_reporter.rb +0 -115
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/issues.rb +0 -729
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/label_provider.rb +0 -76
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/base_loader.rb +0 -143
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/loader.rb +0 -204
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/loader_paths.rb +0 -194
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/module_loaders.rb +0 -273
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/null_loader.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/puppet_function_instantiator.rb +0 -83
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/ruby_function_instantiator.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/runtime3_type_loader.rb +0 -57
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/static_loader.rb +0 -166
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/type_definition_instantiator.rb +0 -77
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loaders.rb +0 -352
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup.rb +0 -79
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/explainer.rb +0 -509
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/interpolation.rb +0 -115
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/invocation.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/sub_lookup.rb +0 -86
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/merge_strategy.rb +0 -338
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/migration/migration_checker.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/factory.rb +0 -1139
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/model_label_provider.rb +0 -125
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/model_meta.rb +0 -627
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/model_tree_dumper.rb +0 -437
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/egrammar.ra +0 -866
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/eparser.rb +0 -3157
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/evaluating_parser.rb +0 -165
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/heredoc_support.rb +0 -144
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/interpolation_support.rb +0 -237
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/lexer2.rb +0 -768
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/locator.rb +0 -292
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/parser_support.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/slurp_support.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/patterns.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/pcore.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/semantic_error.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/implementation_registry.rb +0 -146
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_object_type.rb +0 -846
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_runtime_type.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_sem_ver_range_type.rb +0 -164
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_sem_ver_type.rb +0 -113
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/puppet_object.rb +0 -21
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/recursion_guard.rb +0 -92
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/ruby_generator.rb +0 -258
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/string_converter.rb +0 -922
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_asserter.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_calculator.rb +0 -807
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_factory.rb +0 -491
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_formatter.rb +0 -569
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_mismatch_describer.rb +0 -1039
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_parser.rb +0 -525
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/types.rb +0 -2855
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/validation.rb +0 -462
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/validation/checker4_0.rb +0 -956
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/validation/validator_factory_4_0.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/visitor.rb +0 -94
- data/vendor/gems/puppet-4.5.2/lib/puppet/property.rb +0 -537
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider.rb +0 -604
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/aixobject.rb +0 -392
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/exec.rb +0 -96
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/group/aix.rb +0 -141
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/group/windows_adsi.rb +0 -106
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/macauthorization/macauthorization.rb +0 -298
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/mailalias/aliases.rb +0 -50
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/mcx/mcxcontent.rb +0 -172
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/mount/parsed.rb +0 -280
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/nameservice.rb +0 -292
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/nameservice/directoryservice.rb +0 -499
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/aix.rb +0 -152
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/appdmg.rb +0 -110
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/apple.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb +0 -41
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/gem.rb +0 -169
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/nim.rb +0 -280
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pacman.rb +0 -267
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pip.rb +0 -178
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pip3.rb +0 -20
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkg.rb +0 -245
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgdmg.rb +0 -152
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgin.rb +0 -87
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgng.rb +0 -143
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgutil.rb +0 -186
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/portage.rb +0 -153
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/rpm.rb +0 -402
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/sun.rb +0 -132
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/yum.rb +0 -241
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/parsedfile.rb +0 -459
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +0 -583
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/selmodule/semodule.rb +0 -134
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/base.rb +0 -121
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/bsd.rb +0 -51
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/daemontools.rb +0 -194
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/debian.rb +0 -74
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/init.rb +0 -191
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/launchd.rb +0 -331
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/runit.rb +0 -111
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/smf.rb +0 -160
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/src.rb +0 -147
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/systemd.rb +0 -149
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/ssh_authorized_key/parsed.rb +0 -105
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/aix.rb +0 -369
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/directoryservice.rb +0 -630
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/hpux.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/user_role_add.rb +0 -212
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/useradd.rb +0 -231
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/windows_adsi.rb +0 -142
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/yumrepo/inifile.rb +0 -304
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/zfs/zfs.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/zone/solaris.rb +0 -361
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/zpool/zpool.rb +0 -125
- data/vendor/gems/puppet-4.5.2/lib/puppet/reference/configuration.rb +0 -80
- data/vendor/gems/puppet-4.5.2/lib/puppet/reference/indirection.rb +0 -71
- data/vendor/gems/puppet-4.5.2/lib/puppet/reference/type.rb +0 -114
- data/vendor/gems/puppet-4.5.2/lib/puppet/reports/http.rb +0 -31
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource.rb +0 -623
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/capability_finder.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/catalog.rb +0 -652
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/status.rb +0 -223
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/type.rb +0 -562
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/type_collection.rb +0 -256
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/type_collection_helper.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings.rb +0 -1431
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/config_file.rb +0 -142
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/directory_setting.rb +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/environment_conf.rb +0 -192
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/file_or_directory_setting.rb +0 -34
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/file_setting.rb +0 -235
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/ini_file.rb +0 -171
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/base.rb +0 -140
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate_authority.rb +0 -517
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate_authority/interface.rb +0 -184
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate_request.rb +0 -327
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/configuration.rb +0 -58
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/host.rb +0 -365
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/inventory.rb +0 -48
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/key.rb +0 -59
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/oids.rb +0 -177
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/validator/default_validator.rb +0 -174
- data/vendor/gems/puppet-4.5.2/lib/puppet/syntax_checkers/json.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/test/test_helper.rb +0 -253
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction.rb +0 -381
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/additional_resource_generator.rb +0 -207
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/event.rb +0 -106
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/event_manager.rb +0 -167
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/report.rb +0 -408
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/resource_harness.rb +0 -236
- data/vendor/gems/puppet-4.5.2/lib/puppet/type.rb +0 -2615
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/augeas.rb +0 -211
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/component.rb +0 -77
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/cron.rb +0 -492
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/exec.rb +0 -601
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file.rb +0 -995
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/checksum.rb +0 -43
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/content.rb +0 -160
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/data_sync.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/mode.rb +0 -173
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/source.rb +0 -346
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/group.rb +0 -200
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/host.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/mount.rb +0 -314
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/notify.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/package.rb +0 -571
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/resources.rb +0 -180
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/scheduled_task.rb +0 -184
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/ssh_authorized_key.rb +0 -153
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/tidy.rb +0 -329
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/user.rb +0 -747
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/yumrepo.rb +0 -409
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/zone.rb +0 -382
- data/vendor/gems/puppet-4.5.2/lib/puppet/util.rb +0 -579
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/classgen.rb +0 -228
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/command_line.rb +0 -181
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/command_line/trollop.rb +0 -824
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/execution.rb +0 -356
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/filetype.rb +0 -303
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/http_proxy.rb +0 -197
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/inifile.rb +0 -341
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/instance_loader.rb +0 -81
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/log.rb +0 -386
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/logging.rb +0 -310
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/monkey_patches.rb +0 -145
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/multi_match.rb +0 -51
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/network_device/config.rb +0 -98
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/plist.rb +0 -130
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/profiler.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/profiler/aggregate.rb +0 -85
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/profiler/around_profiler.rb +0 -67
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/psych_support.rb +0 -38
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/rdoc.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/reference.rb +0 -124
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/rubygems.rb +0 -75
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/tagging.rb +0 -118
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/watcher/periodic_watcher.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/access_control_entry.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/adsi.rb +0 -523
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/api_types.rb +0 -275
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/file.rb +0 -425
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/process.rb +0 -479
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/security.rb +0 -857
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/taskscheduler.rb +0 -1220
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/user.rb +0 -291
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/yaml.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/deep_merge/test/test_deep_merge.rb +0 -608
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/pathspec/lib/pathspec.rb +0 -121
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/require_vendored.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/array_extensions_test.rb +0 -64
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/ea_instantiator_test.rb +0 -35
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/ea_serializer_test.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/ecore_self_test.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/environment_test.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/json_test.rb +0 -171
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_builder_test.rb +0 -1482
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_from_ecore_test.rb +0 -57
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_order_test.rb +0 -131
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test.rb +0 -98
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/TestModel.rb +0 -70
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/houseMetamodel.ecore +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/houseMetamodel_from_ecore.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/using_builtin_types.ecore +0 -9
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/method_delegation_test.rb +0 -178
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/builder_context_test.rb +0 -59
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/builder_test.rb +0 -242
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/ecore_original.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/ecore_original_regenerated.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/reference_resolver_test.rb +0 -156
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/serializer_test.rb +0 -94
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/statemachine_metamodel.rb +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/test_model/statemachine1.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder_test.rb +0 -6
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_fragment_test.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/output_handler_test.rb +0 -58
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/qualified_name_provider_test.rb +0 -48
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/qualified_name_resolver_test.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/reference_resolver_test.rb +0 -117
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/rgen_test.rb +0 -26
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/expected_result1.txt +0 -29
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/expected_result2.txt +0 -9
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/expected_result3.txt +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/indentStringTestDefaultIndent.out +0 -1
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/indentStringTestTabIndent.out +0 -1
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/a.tpl +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/b.tpl +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/code/array.tpl +0 -11
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/content/author.tpl +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/content/chapter.tpl +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/local.tpl +0 -8
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/test.tpl +0 -8
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/evaluate_test/test.tpl +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/indent_string_test.tpl +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/index/c/cmod.tpl +0 -1
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/index/chapter.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_backslash_r_test.tpl +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/no_indent.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/sub1/no_indent.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test.tpl +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test2.tpl +0 -13
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test3.tpl +0 -10
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/null_context_test.tpl +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/root.tpl +0 -31
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1.tpl +0 -9
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1/sub1.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/test.tpl +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/testout.txt +0 -29
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/class_model_checker.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.eap +0 -0
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.xml +0 -1029
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel_partial.xml +0 -317
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ecore_model_checker.rb +0 -101
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/manual_testmodel.xml +0 -22
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/object_model_checker.rb +0 -67
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/transformer_test.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/util/file_cache_map_test.rb +0 -99
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/util/pattern_matcher_test.rb +0 -97
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/util_test.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test.rb +0 -160
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_ecore_model_checker.rb +0 -94
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_ecore_instantiator.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_metamodel.rb +0 -49
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_to_ecore.rb +0 -75
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen_patch.rb +0 -132
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Gemfile +0 -20
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/PUPPET_README.md +0 -6
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency.rb +0 -181
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/graph.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/graph_node.rb +0 -117
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/module_release.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/source.rb +0 -25
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/unsatisfiable_graph.rb +0 -31
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/version.rb +0 -168
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/version_range.rb +0 -424
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/spec_helper.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/graph_node_spec.rb +0 -141
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/graph_spec.rb +0 -162
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/module_release_spec.rb +0 -143
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/source_spec.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/unsatisfiable_graph_spec.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency_spec.rb +0 -383
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/version_range_spec.rb +0 -307
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/version_spec.rb +0 -608
- data/vendor/gems/puppet-4.5.2/lib/puppet/version.rb +0 -89
- data/vendor/gems/puppet-4.5.2/lib/puppet_x.rb +0 -8
- data/vendor/gems/puppet-4.5.2/lib/semver.rb +0 -139
- data/vendor/gems/puppet-4.5.2/puppet-4.5.2.gemspec +0 -104
@@ -0,0 +1,59 @@
|
|
1
|
+
module Puppet::Pops
|
2
|
+
module Types
|
3
|
+
class TypeSetReference
|
4
|
+
include Annotatable
|
5
|
+
|
6
|
+
attr_reader :name_authority
|
7
|
+
attr_reader :name
|
8
|
+
attr_reader :version_range
|
9
|
+
attr_reader :type_set
|
10
|
+
|
11
|
+
def initialize(owner, i12n_hash)
|
12
|
+
@owner = owner
|
13
|
+
@name_authority = (i12n_hash[KEY_NAME_AUTHORITY] || owner.name_authority).freeze
|
14
|
+
@name = i12n_hash[KEY_NAME].freeze
|
15
|
+
@version_range = PSemVerRangeType.convert(i12n_hash[KEY_VERSION_RANGE])
|
16
|
+
init_annotatable(i12n_hash)
|
17
|
+
end
|
18
|
+
|
19
|
+
def accept(visitor, guard)
|
20
|
+
annotatable_accept(visitor, guard)
|
21
|
+
end
|
22
|
+
|
23
|
+
def eql?(o)
|
24
|
+
self.class == o.class && @name_authority.eql?(o.name_authority) && @name.eql?(o.name) && @version_range.eql?(o.version_range)
|
25
|
+
end
|
26
|
+
|
27
|
+
def hash
|
28
|
+
[@name_authority, @name, @version_range].hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def i12n_hash
|
32
|
+
result = super
|
33
|
+
result[KEY_NAME_AUTHORITY] = @name_authority unless @name_authority == @owner.name_authority
|
34
|
+
result[KEY_NAME] = @name
|
35
|
+
result[KEY_VERSION_RANGE] = @version_range.to_s
|
36
|
+
result
|
37
|
+
end
|
38
|
+
|
39
|
+
def resolve(type_parser, loader)
|
40
|
+
typed_name = Loader::TypedName.new(:type, @name, @name_authority)
|
41
|
+
loaded_entry = loader.load_typed(typed_name)
|
42
|
+
type_set = loaded_entry.nil? ? nil : loaded_entry.value
|
43
|
+
|
44
|
+
raise ArgumentError, "#{self} cannot be resolved" if type_set.nil?
|
45
|
+
raise ArgumentError, "#{self} resolves to a #{type_set.name}" unless type_set.is_a?(PTypeSetType)
|
46
|
+
|
47
|
+
@type_set = type_set.resolve(type_parser, loader)
|
48
|
+
unless @version_range.include?(@type_set.version)
|
49
|
+
raise ArgumentError, "#{self} resolves to an incompatible version. Expected #{@version_range}, got #{type_set.version}"
|
50
|
+
end
|
51
|
+
nil
|
52
|
+
end
|
53
|
+
|
54
|
+
def to_s
|
55
|
+
"#{@owner.label} reference to TypeSet named '#{@name}'"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,3464 @@
|
|
1
|
+
require_relative 'iterable'
|
2
|
+
require_relative 'enumeration'
|
3
|
+
require_relative 'recursion_guard'
|
4
|
+
require_relative 'type_acceptor'
|
5
|
+
require_relative 'type_asserter'
|
6
|
+
require_relative 'type_assertion_error'
|
7
|
+
require_relative 'type_conversion_error'
|
8
|
+
require_relative 'type_formatter'
|
9
|
+
require_relative 'type_calculator'
|
10
|
+
require_relative 'type_factory'
|
11
|
+
require_relative 'type_parser'
|
12
|
+
require_relative 'class_loader'
|
13
|
+
require_relative 'type_mismatch_describer'
|
14
|
+
require_relative 'puppet_object'
|
15
|
+
|
16
|
+
module Puppet::Pops
|
17
|
+
module Types
|
18
|
+
|
19
|
+
# The EMPTY_xxx declarations is for backward compatibility. They should not be explicitly referenced
|
20
|
+
|
21
|
+
# @api private
|
22
|
+
# @deprecated
|
23
|
+
EMPTY_HASH = Puppet::Pops::EMPTY_HASH
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
# @deprecated
|
27
|
+
EMPTY_ARRAY = Puppet::Pops::EMPTY_ARRAY
|
28
|
+
|
29
|
+
# @api private
|
30
|
+
# @deprecated
|
31
|
+
EMPTY_STRING = Puppet::Pops::EMPTY_STRING
|
32
|
+
|
33
|
+
# The Types model is a model of Puppet Language types.
|
34
|
+
#
|
35
|
+
# The exact relationship between types is not visible in this model wrt. the PDataType which is an abstraction
|
36
|
+
# of Scalar, Array[Data], and Hash[Scalar, Data] nested to any depth. This means it is not possible to
|
37
|
+
# infer the type by simply looking at the inheritance hierarchy. The {TypeCalculator} should
|
38
|
+
# be used to answer questions about types. The {TypeFactory} should be used to create an instance
|
39
|
+
# of a type whenever one is needed.
|
40
|
+
#
|
41
|
+
# The implementation of the Types model contains methods that are required for the type objects to behave as
|
42
|
+
# expected when comparing them and using them as keys in hashes. (No other logic is, or should be included directly in
|
43
|
+
# the model's classes).
|
44
|
+
#
|
45
|
+
# @api public
|
46
|
+
#
|
47
|
+
# TODO: See PUP-2978 for possible performance optimization
|
48
|
+
class TypedModelObject < Object
|
49
|
+
include PuppetObject
|
50
|
+
include Visitable
|
51
|
+
include Adaptable
|
52
|
+
|
53
|
+
def self._ptype
|
54
|
+
@type
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.create_ptype(loader, ir, parent_name, attributes_hash = EMPTY_HASH)
|
58
|
+
@type = Pcore::create_object_type(loader, ir, self, "Pcore::#{simple_name}Type", "Pcore::#{parent_name}", attributes_hash)
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.register_ptypes(loader, ir)
|
62
|
+
types = []
|
63
|
+
Types.constants.each do |c|
|
64
|
+
cls = Types.const_get(c)
|
65
|
+
next unless cls.is_a?(Class) && cls < self
|
66
|
+
type = cls.register_ptype(loader, ir)
|
67
|
+
types << type unless type.nil?
|
68
|
+
end
|
69
|
+
tp = TypeParser.singleton
|
70
|
+
types.each { |type| type.resolve(tp, loader) }
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Base type for all types
|
75
|
+
# @api public
|
76
|
+
#
|
77
|
+
class PAnyType < TypedModelObject
|
78
|
+
|
79
|
+
def self.register_ptype(loader, ir)
|
80
|
+
@type = Pcore::create_object_type(loader, ir, self, 'Pcore::AnyType', 'Any', EMPTY_HASH)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Accept a visitor that will be sent the message `visit`, once with `self` as the
|
84
|
+
# argument. The visitor will then visit all types that this type contains.
|
85
|
+
#
|
86
|
+
def accept(visitor, guard)
|
87
|
+
visitor.visit(self, guard)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks if _o_ is a type that is assignable to this type.
|
91
|
+
# If _o_ is a `Class` then it is first converted to a type.
|
92
|
+
# If _o_ is a Variant, then it is considered assignable when all its types are assignable
|
93
|
+
#
|
94
|
+
# The check for assignable must be guarded against self recursion since `self`, the given type _o_,
|
95
|
+
# or both, might be a `TypeAlias`. The initial caller of this method will typically never care
|
96
|
+
# about this and hence pass only the first argument, but as soon as a check of a contained type
|
97
|
+
# encounters a `TypeAlias`, then a `RecursionGuard` instance is created and passed on in all
|
98
|
+
# subsequent calls. The recursion is allowed to continue until self recursion has been detected in
|
99
|
+
# both `self` and in the given type. At that point the given type is considered to be assignable
|
100
|
+
# to `self` since all checks up to that point were positive.
|
101
|
+
#
|
102
|
+
# @param o [Class,PAnyType] the class or type to test
|
103
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
104
|
+
# @return [Boolean] `true` when _o_ is assignable to this type
|
105
|
+
# @api public
|
106
|
+
def assignable?(o, guard = nil)
|
107
|
+
case o
|
108
|
+
when Class
|
109
|
+
# Safe to call _assignable directly since a Class never is a Unit or Variant
|
110
|
+
_assignable?(TypeCalculator.singleton.type(o), guard)
|
111
|
+
when PUnitType
|
112
|
+
true
|
113
|
+
when PTypeAliasType
|
114
|
+
# An alias may contain self recursive constructs.
|
115
|
+
if o.self_recursion?
|
116
|
+
guard ||= RecursionGuard.new
|
117
|
+
if guard.add_that(o) == RecursionGuard::SELF_RECURSION_IN_BOTH
|
118
|
+
# Recursion detected both in self and other. This means that other is assignable
|
119
|
+
# to self. This point would not have been reached otherwise
|
120
|
+
true
|
121
|
+
else
|
122
|
+
assignable?(o.resolved_type, guard)
|
123
|
+
end
|
124
|
+
else
|
125
|
+
assignable?(o.resolved_type, guard)
|
126
|
+
end
|
127
|
+
when PVariantType
|
128
|
+
# Assignable if all contained types are assignable
|
129
|
+
o.types.all? { |vt| assignable?(vt, guard) }
|
130
|
+
when PNotUndefType
|
131
|
+
if !(o.type.nil? || o.type.assignable?(PUndefType::DEFAULT))
|
132
|
+
assignable?(o.type, guard)
|
133
|
+
else
|
134
|
+
_assignable?(o, guard)
|
135
|
+
end
|
136
|
+
else
|
137
|
+
_assignable?(o, guard)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# Returns `true` if this instance is a callable that accepts the given _args_type_ type
|
142
|
+
#
|
143
|
+
# @param args_type [PAnyType] the arguments to test
|
144
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
145
|
+
# @return [Boolean] `true` if this instance is a callable that accepts the given _args_
|
146
|
+
def callable?(args_type, guard = nil)
|
147
|
+
args_type.is_a?(PAnyType) && kind_of_callable? && args_type.callable_args?(self, guard)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Returns `true` if this instance is a callable that accepts the given _args_
|
151
|
+
#
|
152
|
+
# @param args [Array] the arguments to test
|
153
|
+
# @param block [Proc] block, or nil if not called with a block
|
154
|
+
# @return [Boolean] `true` if this instance is a callable that accepts the given _args_
|
155
|
+
def callable_with?(args, block = nil)
|
156
|
+
false
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns `true` if this instance is considered valid as arguments to the given `callable`
|
160
|
+
# @param callable [PAnyType] the callable
|
161
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
162
|
+
# @return [Boolean] `true` if this instance is considered valid as arguments to the given `callable`
|
163
|
+
# @api private
|
164
|
+
def callable_args?(callable, guard)
|
165
|
+
false
|
166
|
+
end
|
167
|
+
|
168
|
+
# Called from the `PTypeAliasType` when it detects self recursion. The default is to do nothing
|
169
|
+
# but some self recursive constructs are illegal such as when a `PObjectType` somehow inherits itself
|
170
|
+
# @param originator [PTypeAliasType] the starting point for the check
|
171
|
+
# @raise Puppet::Error if an illegal self recursion is detected
|
172
|
+
# @api private
|
173
|
+
def check_self_recursion(originator)
|
174
|
+
end
|
175
|
+
|
176
|
+
# Generalizes value specific types. Types that are not value specific will return `self` otherwise
|
177
|
+
# the generalized type is returned.
|
178
|
+
#
|
179
|
+
# @return [PAnyType] The generalized type
|
180
|
+
# @api public
|
181
|
+
def generalize
|
182
|
+
# Applicable to all types that have no variables
|
183
|
+
self
|
184
|
+
end
|
185
|
+
|
186
|
+
# Normalizes the type. This does not change the characteristics of the type but it will remove duplicates
|
187
|
+
# and constructs like NotUndef[T] where T is not assignable from Undef and change Variant[*T] where all
|
188
|
+
# T are enums into an Enum.
|
189
|
+
#
|
190
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
191
|
+
# @return [PAnyType] The iterable type that this type is assignable to or `nil`
|
192
|
+
# @api public
|
193
|
+
def normalize(guard = nil)
|
194
|
+
self
|
195
|
+
end
|
196
|
+
|
197
|
+
# Called from the TypeParser once it has found a type using the Loader to enable that this type can
|
198
|
+
# resolve internal type expressions using a loader. Presently, this method is a no-op for all types
|
199
|
+
# except the {{PTypeAliasType}}.
|
200
|
+
#
|
201
|
+
# @param type_parser [TypeParser] type parser
|
202
|
+
# @param loader [Loader::Loader] loader to use
|
203
|
+
# @return [PTypeAliasType] the receiver of the call, i.e. `self`
|
204
|
+
# @api private
|
205
|
+
def resolve(type_parser, loader)
|
206
|
+
self
|
207
|
+
end
|
208
|
+
|
209
|
+
# Responds `true` for all callables, variants of callables and unless _optional_ is
|
210
|
+
# false, all optional callables.
|
211
|
+
# @param optional [Boolean]
|
212
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
213
|
+
# @return [Boolean] `true`if this type is considered callable
|
214
|
+
# @api private
|
215
|
+
def kind_of_callable?(optional = true, guard = nil)
|
216
|
+
false
|
217
|
+
end
|
218
|
+
|
219
|
+
# Returns `true` if an instance of this type is iterable, `false` otherwise
|
220
|
+
# The method #iterable_type must produce a `PIterableType` instance when this
|
221
|
+
# method returns `true`
|
222
|
+
#
|
223
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
224
|
+
# @return [Boolean] flag to indicate if instances of this type is iterable.
|
225
|
+
def iterable?(guard = nil)
|
226
|
+
false
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the `PIterableType` that this type should be assignable to, or `nil` if no such type exists.
|
230
|
+
# A type that returns a `PIterableType` must respond `true` to `#iterable?`.
|
231
|
+
#
|
232
|
+
# @example
|
233
|
+
# Any Collection[T] is assignable to an Iterable[T]
|
234
|
+
# A String is assignable to an Iterable[String] iterating over the strings characters
|
235
|
+
# An Integer is assignable to an Iterable[Integer] iterating over the 'times' enumerator
|
236
|
+
# A Type[T] is assignable to an Iterable[Type[T]] if T is an Integer or Enum
|
237
|
+
#
|
238
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
239
|
+
# @return [PIterableType,nil] The iterable type that this type is assignable to or `nil`
|
240
|
+
# @api private
|
241
|
+
def iterable_type(guard = nil)
|
242
|
+
nil
|
243
|
+
end
|
244
|
+
|
245
|
+
def hash
|
246
|
+
self.class.hash
|
247
|
+
end
|
248
|
+
|
249
|
+
# Returns true if the given argument _o_ is an instance of this type
|
250
|
+
# @param guard [RecursionGuard] guard against recursion. Only used by internal calls
|
251
|
+
# @return [Boolean]
|
252
|
+
# @api public
|
253
|
+
def instance?(o, guard = nil)
|
254
|
+
true
|
255
|
+
end
|
256
|
+
|
257
|
+
# An object is considered to really be an instance of a type when something other than a
|
258
|
+
# TypeAlias or a Variant responds true to a call to {#instance?}.
|
259
|
+
#
|
260
|
+
# @return [Integer] -1 = is not instance, 0 = recursion detected, 1 = is instance
|
261
|
+
# @api private
|
262
|
+
def really_instance?(o, guard = nil)
|
263
|
+
instance?(o, guard) ? 1 : -1
|
264
|
+
end
|
265
|
+
|
266
|
+
def eql?(o)
|
267
|
+
self.class == o.class
|
268
|
+
end
|
269
|
+
|
270
|
+
def ==(o)
|
271
|
+
eql?(o)
|
272
|
+
end
|
273
|
+
|
274
|
+
def simple_name
|
275
|
+
self.class.simple_name
|
276
|
+
end
|
277
|
+
|
278
|
+
# Strips the class name from all module prefixes, the leading 'P' and the ending 'Type'. I.e.
|
279
|
+
# an instance of PVariantType will return 'Variant'
|
280
|
+
# @return [String] the simple name of this type
|
281
|
+
def self.simple_name
|
282
|
+
if @simple_name.nil?
|
283
|
+
n = name
|
284
|
+
@simple_name = n[n.rindex('::')+3..n.size-5]
|
285
|
+
end
|
286
|
+
@simple_name
|
287
|
+
end
|
288
|
+
|
289
|
+
def to_alias_expanded_s
|
290
|
+
TypeFormatter.new.alias_expanded_string(self)
|
291
|
+
end
|
292
|
+
|
293
|
+
def to_s
|
294
|
+
TypeFormatter.string(self)
|
295
|
+
end
|
296
|
+
|
297
|
+
# Returns the name of the type, without parameters
|
298
|
+
# @return [String] the name of the type
|
299
|
+
# @api public
|
300
|
+
def name
|
301
|
+
simple_name
|
302
|
+
end
|
303
|
+
|
304
|
+
def create(*args)
|
305
|
+
Loaders.find_loader(nil).load(:function, 'new').call({}, self, *args)
|
306
|
+
end
|
307
|
+
|
308
|
+
def new_function(loader)
|
309
|
+
self.class.new_function(self, loader)
|
310
|
+
end
|
311
|
+
|
312
|
+
# This default implementation of of a new_function raises an Argument Error.
|
313
|
+
# Types for which creating a new instance is supported, should create and return
|
314
|
+
# a Puppet Function class by using Puppet:Loaders.create_loaded_function(:new, loader)
|
315
|
+
# and return that result.
|
316
|
+
#
|
317
|
+
# @raises ArgumentError
|
318
|
+
#
|
319
|
+
def self.new_function(instance, loader)
|
320
|
+
raise ArgumentError.new("Creation of new instance of type '#{instance.to_s}' is not supported")
|
321
|
+
end
|
322
|
+
|
323
|
+
|
324
|
+
# The default instance of this type. Each type in the type system has this constant
|
325
|
+
# declared.
|
326
|
+
#
|
327
|
+
DEFAULT = PAnyType.new
|
328
|
+
|
329
|
+
protected
|
330
|
+
|
331
|
+
# @api private
|
332
|
+
def _assignable?(o, guard)
|
333
|
+
o.is_a?(PAnyType)
|
334
|
+
end
|
335
|
+
|
336
|
+
# Produces the tuple entry at the given index given a tuple type, its from/to constraints on the last
|
337
|
+
# type, and an index.
|
338
|
+
# Produces nil if the index is out of bounds
|
339
|
+
# from must be less than to, and from may not be less than 0
|
340
|
+
#
|
341
|
+
# @api private
|
342
|
+
#
|
343
|
+
def tuple_entry_at(tuple_t, to, index)
|
344
|
+
regular = (tuple_t.types.size - 1)
|
345
|
+
if index < regular
|
346
|
+
tuple_t.types[index]
|
347
|
+
elsif index < regular + to
|
348
|
+
# in the varargs part
|
349
|
+
tuple_t.types[-1]
|
350
|
+
else
|
351
|
+
nil
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
355
|
+
# Applies a transformation by sending the given _method_ and _method_args_ to each of the types of the given array
|
356
|
+
# and collecting the results in a new array. If all transformation calls returned the type instance itself (i.e. no
|
357
|
+
# transformation took place), then this method will return `self`. If a transformation did occur, then this method
|
358
|
+
# will either return the transformed array or in case a block was given, the result of calling a given block with
|
359
|
+
# the transformed array.
|
360
|
+
#
|
361
|
+
# @param types [Array<PAnyType>] the array of types to transform
|
362
|
+
# @param method [Symbol] The method to call on each type
|
363
|
+
# @param method_args [Object] The arguments to pass to the method, if any
|
364
|
+
# @return [Object] self, the transformed array, or the result of calling a given block with the transformed array
|
365
|
+
# @yieldparam altered_types [Array<PAnyType>] the altered type array
|
366
|
+
# @api private
|
367
|
+
def alter_type_array(types, method, *method_args)
|
368
|
+
modified = false
|
369
|
+
modified_types = types.map do |t|
|
370
|
+
t_mod = t.send(method, *method_args)
|
371
|
+
modified = !t.equal?(t_mod) unless modified
|
372
|
+
t_mod
|
373
|
+
end
|
374
|
+
if modified
|
375
|
+
block_given? ? yield(modified_types) : modified_types
|
376
|
+
else
|
377
|
+
self
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# @abstract Encapsulates common behavior for a type that contains one type
|
383
|
+
# @api public
|
384
|
+
class PTypeWithContainedType < PAnyType
|
385
|
+
def self.register_ptype(loader, ir)
|
386
|
+
# Abstract type. It doesn't register anything
|
387
|
+
end
|
388
|
+
|
389
|
+
attr_reader :type
|
390
|
+
|
391
|
+
def initialize(type)
|
392
|
+
@type = type
|
393
|
+
end
|
394
|
+
|
395
|
+
def accept(visitor, guard)
|
396
|
+
super
|
397
|
+
@type.accept(visitor, guard) unless @type.nil?
|
398
|
+
end
|
399
|
+
|
400
|
+
def generalize
|
401
|
+
if @type.nil?
|
402
|
+
self.class::DEFAULT
|
403
|
+
else
|
404
|
+
ge_type = @type.generalize
|
405
|
+
@type.equal?(ge_type) ? self : self.class.new(ge_type)
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
def normalize(guard = nil)
|
410
|
+
if @type.nil?
|
411
|
+
self.class::DEFAULT
|
412
|
+
else
|
413
|
+
ne_type = @type.normalize(guard)
|
414
|
+
@type.equal?(ne_type) ? self : self.class.new(ne_type)
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
418
|
+
def hash
|
419
|
+
self.class.hash ^ @type.hash
|
420
|
+
end
|
421
|
+
|
422
|
+
def eql?(o)
|
423
|
+
self.class == o.class && @type == o.type
|
424
|
+
end
|
425
|
+
|
426
|
+
def resolve(type_parser, loader)
|
427
|
+
rtype = @type
|
428
|
+
rtype = rtype.resolve(type_parser, loader) unless rtype.nil?
|
429
|
+
rtype.equal?(@type) ? self : self.class.new(rtype)
|
430
|
+
end
|
431
|
+
end
|
432
|
+
|
433
|
+
# The type of types.
|
434
|
+
# @api public
|
435
|
+
#
|
436
|
+
class PType < PTypeWithContainedType
|
437
|
+
|
438
|
+
def self.register_ptype(loader, ir)
|
439
|
+
create_ptype(loader, ir, 'AnyType',
|
440
|
+
'type' => {
|
441
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
442
|
+
KEY_VALUE => nil
|
443
|
+
}
|
444
|
+
)
|
445
|
+
end
|
446
|
+
|
447
|
+
def instance?(o, guard = nil)
|
448
|
+
if o.is_a?(PAnyType)
|
449
|
+
type.nil? || type.assignable?(o, guard)
|
450
|
+
elsif o.is_a?(Module) || o.is_a?(Puppet::Resource) || o.is_a?(Puppet::Parser::Resource)
|
451
|
+
@type.nil? ? true : assignable?(TypeCalculator.infer(o))
|
452
|
+
else
|
453
|
+
false
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
def iterable?(guard = nil)
|
458
|
+
case @type
|
459
|
+
when PEnumType
|
460
|
+
true
|
461
|
+
when PIntegerType
|
462
|
+
@type.finite_range?
|
463
|
+
else
|
464
|
+
false
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
def iterable_type(guard = nil)
|
469
|
+
# The types PIntegerType and PEnumType are Iterable
|
470
|
+
case @type
|
471
|
+
when PEnumType
|
472
|
+
# @type describes the element type perfectly since the iteration is made over the
|
473
|
+
# contained choices.
|
474
|
+
PIterableType.new(@type)
|
475
|
+
when PIntegerType
|
476
|
+
# @type describes the element type perfectly since the iteration is made over the
|
477
|
+
# specified range.
|
478
|
+
@type.finite_range? ? PIterableType.new(@type) : nil
|
479
|
+
else
|
480
|
+
nil
|
481
|
+
end
|
482
|
+
end
|
483
|
+
|
484
|
+
def eql?(o)
|
485
|
+
self.class == o.class && @type == o.type
|
486
|
+
end
|
487
|
+
|
488
|
+
def self.simple_name
|
489
|
+
# since this the class is inconsistently named PType and not PTypeType
|
490
|
+
'Type'
|
491
|
+
end
|
492
|
+
|
493
|
+
DEFAULT = PType.new(nil)
|
494
|
+
|
495
|
+
protected
|
496
|
+
|
497
|
+
# @api private
|
498
|
+
def _assignable?(o, guard)
|
499
|
+
return false unless o.is_a?(PType)
|
500
|
+
return true if @type.nil? # wide enough to handle all types
|
501
|
+
return false if o.type.nil? # wider than t
|
502
|
+
@type.assignable?(o.type, guard)
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
class PNotUndefType < PTypeWithContainedType
|
507
|
+
def self.register_ptype(loader, ir)
|
508
|
+
create_ptype(loader, ir, 'AnyType',
|
509
|
+
'type' => {
|
510
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
511
|
+
KEY_VALUE => nil
|
512
|
+
}
|
513
|
+
)
|
514
|
+
end
|
515
|
+
|
516
|
+
def initialize(type = nil)
|
517
|
+
super(type.class == PAnyType ? nil : type)
|
518
|
+
end
|
519
|
+
|
520
|
+
def instance?(o, guard = nil)
|
521
|
+
!(o.nil? || o == :undef) && (@type.nil? || @type.instance?(o, guard))
|
522
|
+
end
|
523
|
+
|
524
|
+
def normalize(guard = nil)
|
525
|
+
n = super
|
526
|
+
if n.type.nil?
|
527
|
+
n
|
528
|
+
else
|
529
|
+
if n.type.is_a?(POptionalType)
|
530
|
+
# No point in having an optional in a NotUndef
|
531
|
+
PNotUndefType.new(n.type.type).normalize
|
532
|
+
elsif !n.type.assignable?(PUndefType::DEFAULT)
|
533
|
+
# THe type is NotUndef anyway, so it can be stripped of
|
534
|
+
n.type
|
535
|
+
else
|
536
|
+
n
|
537
|
+
end
|
538
|
+
end
|
539
|
+
end
|
540
|
+
|
541
|
+
def new_function(loader)
|
542
|
+
# If only NotUndef, then use Unit's null converter
|
543
|
+
if type.nil?
|
544
|
+
PUnitType.new_function(self.class, loader)
|
545
|
+
else
|
546
|
+
type.new_function(loader)
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
550
|
+
DEFAULT = PNotUndefType.new
|
551
|
+
|
552
|
+
protected
|
553
|
+
|
554
|
+
# @api private
|
555
|
+
def _assignable?(o, guard)
|
556
|
+
o.is_a?(PAnyType) && !o.assignable?(PUndefType::DEFAULT, guard) && (@type.nil? || @type.assignable?(o, guard))
|
557
|
+
end
|
558
|
+
end
|
559
|
+
|
560
|
+
# @api public
|
561
|
+
#
|
562
|
+
class PUndefType < PAnyType
|
563
|
+
def self.register_ptype(loader, ir)
|
564
|
+
create_ptype(loader, ir, 'AnyType')
|
565
|
+
end
|
566
|
+
|
567
|
+
def instance?(o, guard = nil)
|
568
|
+
o.nil? || :undef == o
|
569
|
+
end
|
570
|
+
|
571
|
+
# @api private
|
572
|
+
def callable_args?(callable_t, guard)
|
573
|
+
# if callable_t is Optional (or indeed PUndefType), this means that 'missing callable' is accepted
|
574
|
+
callable_t.assignable?(DEFAULT, guard)
|
575
|
+
end
|
576
|
+
|
577
|
+
DEFAULT = PUndefType.new
|
578
|
+
|
579
|
+
protected
|
580
|
+
# @api private
|
581
|
+
def _assignable?(o, guard)
|
582
|
+
o.is_a?(PUndefType)
|
583
|
+
end
|
584
|
+
end
|
585
|
+
|
586
|
+
# A type private to the type system that describes "ignored type" - i.e. "I am what you are"
|
587
|
+
# @api private
|
588
|
+
#
|
589
|
+
class PUnitType < PAnyType
|
590
|
+
def self.register_ptype(loader, ir)
|
591
|
+
create_ptype(loader, ir, 'AnyType')
|
592
|
+
end
|
593
|
+
|
594
|
+
def instance?(o, guard = nil)
|
595
|
+
true
|
596
|
+
end
|
597
|
+
|
598
|
+
# A "null" implementation - that simply returns the given argument
|
599
|
+
def self.new_function(_, loader)
|
600
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_unit, loader) do
|
601
|
+
dispatch :from_args do
|
602
|
+
param 'Any', :from
|
603
|
+
end
|
604
|
+
|
605
|
+
def from_args(from)
|
606
|
+
from
|
607
|
+
end
|
608
|
+
end
|
609
|
+
end
|
610
|
+
|
611
|
+
DEFAULT = PUnitType.new
|
612
|
+
|
613
|
+
protected
|
614
|
+
# @api private
|
615
|
+
def _assignable?(o, guard)
|
616
|
+
true
|
617
|
+
end
|
618
|
+
end
|
619
|
+
|
620
|
+
# @api public
|
621
|
+
#
|
622
|
+
class PDefaultType < PAnyType
|
623
|
+
def self.register_ptype(loader, ir)
|
624
|
+
create_ptype(loader, ir, 'AnyType')
|
625
|
+
end
|
626
|
+
|
627
|
+
def instance?(o, guard = nil)
|
628
|
+
o == :default
|
629
|
+
end
|
630
|
+
|
631
|
+
DEFAULT = PDefaultType.new
|
632
|
+
|
633
|
+
protected
|
634
|
+
# @api private
|
635
|
+
def _assignable?(o, guard)
|
636
|
+
o.is_a?(PDefaultType)
|
637
|
+
end
|
638
|
+
end
|
639
|
+
|
640
|
+
# A flexible data type, being assignable to its subtypes as well as PArrayType and PHashType with element type assignable to PDataType.
|
641
|
+
#
|
642
|
+
# @api public
|
643
|
+
#
|
644
|
+
class PDataType < PAnyType
|
645
|
+
def self.register_ptype(loader, ir)
|
646
|
+
create_ptype(loader, ir, 'AnyType')
|
647
|
+
end
|
648
|
+
|
649
|
+
def eql?(o)
|
650
|
+
self.class == o.class || o == PVariantType::DATA
|
651
|
+
end
|
652
|
+
|
653
|
+
def instance?(o, guard = nil)
|
654
|
+
PVariantType::DATA.instance?(o, guard)
|
655
|
+
end
|
656
|
+
|
657
|
+
DEFAULT = PDataType.new
|
658
|
+
|
659
|
+
protected
|
660
|
+
|
661
|
+
# Data is assignable by other Data and by Array[Data] and Hash[Scalar, Data]
|
662
|
+
# @api private
|
663
|
+
def _assignable?(o, guard)
|
664
|
+
# We cannot put the NotUndefType[Data] in the @data_variant_t since that causes an endless recursion
|
665
|
+
case o
|
666
|
+
when Types::PDataType
|
667
|
+
true
|
668
|
+
when Types::PNotUndefType
|
669
|
+
assignable?(o.type || PUndefType::DEFAULT, guard)
|
670
|
+
else
|
671
|
+
PVariantType::DATA.assignable?(o, guard)
|
672
|
+
end
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
676
|
+
# Type that is PDataType compatible, but is not a PCollectionType.
|
677
|
+
# @api public
|
678
|
+
#
|
679
|
+
class PScalarType < PAnyType
|
680
|
+
def self.register_ptype(loader, ir)
|
681
|
+
create_ptype(loader, ir, 'AnyType')
|
682
|
+
end
|
683
|
+
|
684
|
+
def instance?(o, guard = nil)
|
685
|
+
if o.is_a?(String) || o.is_a?(Numeric) || o.is_a?(TrueClass) || o.is_a?(FalseClass) || o.is_a?(Regexp) || o.is_a?(SemanticPuppet::VersionRange)
|
686
|
+
true
|
687
|
+
elsif o.is_a?(Array) || o.is_a?(Hash) || o.is_a?(PAnyType) || o.is_a?(NilClass)
|
688
|
+
false
|
689
|
+
else
|
690
|
+
assignable?(TypeCalculator.infer(o))
|
691
|
+
end
|
692
|
+
end
|
693
|
+
|
694
|
+
DEFAULT = PScalarType.new
|
695
|
+
|
696
|
+
protected
|
697
|
+
|
698
|
+
# @api private
|
699
|
+
def _assignable?(o, guard)
|
700
|
+
o.is_a?(PScalarType)
|
701
|
+
end
|
702
|
+
end
|
703
|
+
|
704
|
+
# A string type describing the set of strings having one of the given values
|
705
|
+
# @api public
|
706
|
+
#
|
707
|
+
class PEnumType < PScalarType
|
708
|
+
def self.register_ptype(loader, ir)
|
709
|
+
create_ptype(loader, ir, 'ScalarType', 'values' => PArrayType.new(PStringType::NON_EMPTY))
|
710
|
+
end
|
711
|
+
|
712
|
+
attr_reader :values
|
713
|
+
|
714
|
+
def initialize(values)
|
715
|
+
@values = values.uniq.sort.freeze
|
716
|
+
end
|
717
|
+
|
718
|
+
# Returns Enumerator if no block is given, otherwise, calls the given
|
719
|
+
# block with each of the strings for this enum
|
720
|
+
def each(&block)
|
721
|
+
r = Iterable.on(self)
|
722
|
+
block_given? ? r.each(&block) : r
|
723
|
+
end
|
724
|
+
|
725
|
+
def generalize
|
726
|
+
# General form of an Enum is a String
|
727
|
+
if @values.empty?
|
728
|
+
PStringType::DEFAULT
|
729
|
+
else
|
730
|
+
range = @values.map(&:size).minmax
|
731
|
+
PStringType.new(PIntegerType.new(range.min, range.max))
|
732
|
+
end
|
733
|
+
end
|
734
|
+
|
735
|
+
def iterable?(guard = nil)
|
736
|
+
true
|
737
|
+
end
|
738
|
+
|
739
|
+
def iterable_type(guard = nil)
|
740
|
+
# An instance of an Enum is a String
|
741
|
+
PStringType::ITERABLE_TYPE
|
742
|
+
end
|
743
|
+
|
744
|
+
def hash
|
745
|
+
@values.hash
|
746
|
+
end
|
747
|
+
|
748
|
+
def eql?(o)
|
749
|
+
self.class == o.class && @values == o.values
|
750
|
+
end
|
751
|
+
|
752
|
+
def instance?(o, guard = nil)
|
753
|
+
o.is_a?(String) && @values.any? { |p| p == o }
|
754
|
+
end
|
755
|
+
|
756
|
+
DEFAULT = PEnumType.new(EMPTY_ARRAY)
|
757
|
+
|
758
|
+
protected
|
759
|
+
|
760
|
+
# @api private
|
761
|
+
def _assignable?(o, guard)
|
762
|
+
return true if self == o
|
763
|
+
svalues = values
|
764
|
+
if svalues.empty?
|
765
|
+
return true if o.is_a?(PStringType) || o.is_a?(PEnumType) || o.is_a?(PPatternType)
|
766
|
+
end
|
767
|
+
case o
|
768
|
+
when PStringType
|
769
|
+
# if the contained string is found in the set of enums
|
770
|
+
instance?(o.value, guard)
|
771
|
+
when PEnumType
|
772
|
+
!o.values.empty? && o.values.all? { |s| instance?(s, guard) }
|
773
|
+
else
|
774
|
+
false
|
775
|
+
end
|
776
|
+
end
|
777
|
+
end
|
778
|
+
|
779
|
+
# Abstract class that encapsulates behavior common to PNumericType and PAbstractTimeDataType
|
780
|
+
# @api public
|
781
|
+
class PAbstractRangeType < PScalarType
|
782
|
+
def initialize(from, to = Float::INFINITY)
|
783
|
+
from = -Float::INFINITY if from.nil? || from == :default
|
784
|
+
to = Float::INFINITY if to.nil? || to == :default
|
785
|
+
raise ArgumentError, "'from' must be less or equal to 'to'. Got (#{from}, #{to}" if from.is_a?(Numeric) && to.is_a?(Numeric) && from > to
|
786
|
+
@from = from
|
787
|
+
@to = to
|
788
|
+
end
|
789
|
+
|
790
|
+
# Checks if this numeric range intersects with another
|
791
|
+
#
|
792
|
+
# @param o [PNumericType] the range to compare with
|
793
|
+
# @return [Boolean] `true` if this range intersects with the other range
|
794
|
+
# @api public
|
795
|
+
def intersect?(o)
|
796
|
+
self.class == o.class && !(@to < o.numeric_from || o.numeric_to < @from)
|
797
|
+
end
|
798
|
+
|
799
|
+
# Returns the lower bound of the numeric range or `nil` if no lower bound is set.
|
800
|
+
# @return [Float,Integer]
|
801
|
+
def from
|
802
|
+
@from == -Float::INFINITY ? nil : @from
|
803
|
+
end
|
804
|
+
|
805
|
+
# Returns the upper bound of the numeric range or `nil` if no upper bound is set.
|
806
|
+
# @return [Float,Integer]
|
807
|
+
def to
|
808
|
+
@to == Float::INFINITY ? nil : @to
|
809
|
+
end
|
810
|
+
|
811
|
+
# Same as #from but will return `-Float::Infinity` instead of `nil` if no lower bound is set.
|
812
|
+
# @return [Float,Integer]
|
813
|
+
def numeric_from
|
814
|
+
@from
|
815
|
+
end
|
816
|
+
|
817
|
+
# Same as #to but will return `Float::Infinity` instead of `nil` if no lower bound is set.
|
818
|
+
# @return [Float,Integer]
|
819
|
+
def numeric_to
|
820
|
+
@to
|
821
|
+
end
|
822
|
+
|
823
|
+
def hash
|
824
|
+
@from.hash ^ @to.hash
|
825
|
+
end
|
826
|
+
|
827
|
+
def eql?(o)
|
828
|
+
self.class == o.class && @from == o.numeric_from && @to == o.numeric_to
|
829
|
+
end
|
830
|
+
|
831
|
+
def instance?(o, guard = nil)
|
832
|
+
o.is_a?(Numeric) && o >= @from && o <= @to
|
833
|
+
end
|
834
|
+
|
835
|
+
def unbounded?
|
836
|
+
@from == -Float::INFINITY && @to == Float::INFINITY
|
837
|
+
end
|
838
|
+
end
|
839
|
+
|
840
|
+
# @api public
|
841
|
+
#
|
842
|
+
class PNumericType < PAbstractRangeType
|
843
|
+
def self.register_ptype(loader, ir)
|
844
|
+
create_ptype(loader, ir, 'ScalarType',
|
845
|
+
'from' => { KEY_TYPE => POptionalType.new(PNumericType::DEFAULT), KEY_VALUE => nil },
|
846
|
+
'to' => { KEY_TYPE => POptionalType.new(PNumericType::DEFAULT), KEY_VALUE => nil }
|
847
|
+
)
|
848
|
+
end
|
849
|
+
|
850
|
+
def self.new_function(_, loader)
|
851
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_numeric, loader) do
|
852
|
+
local_types do
|
853
|
+
type 'Convertible = Variant[Undef, Integer, Float, Boolean, String, Timespan, Timestamp]'
|
854
|
+
type 'NamedArgs = Struct[{from => Convertible, Optional[abs] => Boolean}]'
|
855
|
+
end
|
856
|
+
|
857
|
+
dispatch :from_args do
|
858
|
+
param 'Convertible', :from
|
859
|
+
optional_param 'Boolean', :abs
|
860
|
+
end
|
861
|
+
|
862
|
+
dispatch :from_hash do
|
863
|
+
param 'NamedArgs', :hash_args
|
864
|
+
end
|
865
|
+
|
866
|
+
def from_args(from, abs = false)
|
867
|
+
result = from_convertible(from)
|
868
|
+
abs ? result.abs : result
|
869
|
+
end
|
870
|
+
|
871
|
+
def from_hash(args_hash)
|
872
|
+
from_args(args_hash['from'], args_hash['abs'] || false)
|
873
|
+
end
|
874
|
+
|
875
|
+
def from_convertible(from)
|
876
|
+
case from
|
877
|
+
when NilClass
|
878
|
+
throw :undefined_value
|
879
|
+
when Float
|
880
|
+
from
|
881
|
+
when Integer
|
882
|
+
from
|
883
|
+
when Time::TimeData
|
884
|
+
from.to_f
|
885
|
+
when TrueClass
|
886
|
+
1
|
887
|
+
when FalseClass
|
888
|
+
0
|
889
|
+
when String
|
890
|
+
begin
|
891
|
+
if from[0] == '0' && (from[1].downcase == 'b' || from[1].downcase == 'x')
|
892
|
+
Integer(from)
|
893
|
+
else
|
894
|
+
Puppet::Pops::Utils.to_n(from)
|
895
|
+
end
|
896
|
+
rescue TypeError => e
|
897
|
+
raise TypeConversionError.new(e.message)
|
898
|
+
rescue ArgumentError => e
|
899
|
+
raise TypeConversionError.new(e.message)
|
900
|
+
end
|
901
|
+
else
|
902
|
+
t = Puppet::Pops::Types::TypeCalculator.singleton.infer(from).generalize
|
903
|
+
raise TypeConversionError.new("Value of type '#{t}' cannot be converted to Numeric")
|
904
|
+
end
|
905
|
+
end
|
906
|
+
end
|
907
|
+
end
|
908
|
+
|
909
|
+
protected
|
910
|
+
|
911
|
+
# @api_private
|
912
|
+
def _assignable?(o, guard)
|
913
|
+
return false unless o.is_a?(self.class)
|
914
|
+
# If o min and max are within the range of t
|
915
|
+
@from <= o.numeric_from && @to >= o.numeric_to
|
916
|
+
end
|
917
|
+
|
918
|
+
DEFAULT = PNumericType.new(-Float::INFINITY)
|
919
|
+
end
|
920
|
+
|
921
|
+
# @api public
|
922
|
+
#
|
923
|
+
class PIntegerType < PNumericType
|
924
|
+
def self.register_ptype(loader, ir)
|
925
|
+
create_ptype(loader, ir, 'NumericType')
|
926
|
+
end
|
927
|
+
|
928
|
+
# Will respond `true` for any range that is bounded at both ends.
|
929
|
+
#
|
930
|
+
# @return [Boolean] `true` if the type describes a finite range.
|
931
|
+
def finite_range?
|
932
|
+
@from != -Float::INFINITY && @to != Float::INFINITY
|
933
|
+
end
|
934
|
+
|
935
|
+
def generalize
|
936
|
+
DEFAULT
|
937
|
+
end
|
938
|
+
|
939
|
+
def instance?(o, guard = nil)
|
940
|
+
o.is_a?(Integer) && o >= numeric_from && o <= numeric_to
|
941
|
+
end
|
942
|
+
|
943
|
+
# Checks if this range is adjacent to the given range
|
944
|
+
#
|
945
|
+
# @param o [PIntegerType] the range to compare with
|
946
|
+
# @return [Boolean] `true` if this range is adjacent to the other range
|
947
|
+
# @api public
|
948
|
+
def adjacent?(o)
|
949
|
+
o.is_a?(PIntegerType) && (@to + 1 == o.from || o.to + 1 == @from)
|
950
|
+
end
|
951
|
+
|
952
|
+
# Concatenates this range with another range provided that the ranges intersect or
|
953
|
+
# are adjacent. When that's not the case, this method will return `nil`
|
954
|
+
#
|
955
|
+
# @param o [PIntegerType] the range to concatenate with this range
|
956
|
+
# @return [PIntegerType,nil] the concatenated range or `nil` when the ranges were apart
|
957
|
+
# @api public
|
958
|
+
def merge(o)
|
959
|
+
if intersect?(o) || adjacent?(o)
|
960
|
+
min = @from <= o.numeric_from ? @from : o.numeric_from
|
961
|
+
max = @to >= o.numeric_to ? @to : o.numeric_to
|
962
|
+
PIntegerType.new(min, max)
|
963
|
+
else
|
964
|
+
nil
|
965
|
+
end
|
966
|
+
end
|
967
|
+
|
968
|
+
def iterable?(guard = nil)
|
969
|
+
true
|
970
|
+
end
|
971
|
+
|
972
|
+
def iterable_type(guard = nil)
|
973
|
+
# It's unknown if the iterable will be a range (min, max) or a "times" (0, max)
|
974
|
+
PIterableType.new(PIntegerType::DEFAULT)
|
975
|
+
end
|
976
|
+
|
977
|
+
# Returns Float.Infinity if one end of the range is unbound
|
978
|
+
def size
|
979
|
+
return Float::INFINITY if @from == -Float::INFINITY || @to == Float::INFINITY
|
980
|
+
1+(to-from).abs
|
981
|
+
end
|
982
|
+
|
983
|
+
# Returns the range as an array ordered so the smaller number is always first.
|
984
|
+
# The number may be Infinity or -Infinity.
|
985
|
+
def range
|
986
|
+
[@from, @to]
|
987
|
+
end
|
988
|
+
|
989
|
+
# Returns Enumerator if no block is given
|
990
|
+
# Returns nil if size is infinity (does not yield)
|
991
|
+
def each(&block)
|
992
|
+
r = Iterable.on(self)
|
993
|
+
block_given? ? r.each(&block) : r
|
994
|
+
end
|
995
|
+
|
996
|
+
# Returns a range where both to and from are positive numbers. Negative
|
997
|
+
# numbers are converted to zero
|
998
|
+
# @return [PIntegerType] a positive range
|
999
|
+
def to_size
|
1000
|
+
@from >= 0 ? self : PIntegerType.new(0, @to < 0 ? 0 : @to)
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
def new_function(loader)
|
1004
|
+
@@new_function ||= Puppet::Functions.create_loaded_function(:new, loader) do
|
1005
|
+
local_types do
|
1006
|
+
type 'Radix = Variant[Default, Integer[2,2], Integer[8,8], Integer[10,10], Integer[16,16]]'
|
1007
|
+
type 'Convertible = Variant[Undef, Numeric, Boolean, String, Timespan, Timestamp]'
|
1008
|
+
type 'NamedArgs = Struct[{from => Convertible, Optional[radix] => Radix, Optional[abs] => Boolean}]'
|
1009
|
+
end
|
1010
|
+
|
1011
|
+
dispatch :from_args do
|
1012
|
+
param 'Convertible', :from
|
1013
|
+
optional_param 'Radix', :radix
|
1014
|
+
optional_param 'Boolean', :abs
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
dispatch :from_hash do
|
1018
|
+
param 'NamedArgs', :hash_args
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
def from_args(from, radix = :default, abs = false)
|
1022
|
+
result = from_convertible(from, radix)
|
1023
|
+
abs ? result.abs : result
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
def from_hash(args_hash)
|
1027
|
+
from_args(args_hash['from'], args_hash['radix'] || :default, args_hash['abs'] || false)
|
1028
|
+
end
|
1029
|
+
|
1030
|
+
def from_convertible(from, radix)
|
1031
|
+
case from
|
1032
|
+
when NilClass
|
1033
|
+
throw :undefined_value
|
1034
|
+
when Float, Time::TimeData
|
1035
|
+
from.to_i
|
1036
|
+
when Integer
|
1037
|
+
from
|
1038
|
+
when TrueClass
|
1039
|
+
1
|
1040
|
+
when FalseClass
|
1041
|
+
0
|
1042
|
+
when String
|
1043
|
+
begin
|
1044
|
+
radix == :default ? Integer(from) : Integer(from, assert_radix(radix))
|
1045
|
+
rescue TypeError => e
|
1046
|
+
raise TypeConversionError.new(e.message)
|
1047
|
+
rescue ArgumentError => e
|
1048
|
+
# Test for special case where there is whitespace between sign and number
|
1049
|
+
match = Patterns::WS_BETWEEN_SIGN_AND_NUMBER.match(from)
|
1050
|
+
if match
|
1051
|
+
begin
|
1052
|
+
# Try again, this time with whitespace removed
|
1053
|
+
return from_args(match[1] + match[2], radix)
|
1054
|
+
rescue TypeConversionError
|
1055
|
+
# Ignored to retain original error
|
1056
|
+
end
|
1057
|
+
end
|
1058
|
+
raise TypeConversionError.new(e.message)
|
1059
|
+
end
|
1060
|
+
else
|
1061
|
+
t = Puppet::Pops::Types::TypeCalculator.singleton.infer(from).generalize
|
1062
|
+
raise TypeConversionError.new("Value of type '#{t}' cannot be converted to an Integer")
|
1063
|
+
end
|
1064
|
+
end
|
1065
|
+
|
1066
|
+
def assert_radix(radix)
|
1067
|
+
case radix
|
1068
|
+
when 2, 8, 10, 16, :default
|
1069
|
+
else
|
1070
|
+
raise ArgumentError.new("Illegal radix: '#{radix}', expected 2, 8, 10, 16, or default")
|
1071
|
+
end
|
1072
|
+
radix
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
end
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
DEFAULT = PIntegerType.new(-Float::INFINITY)
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# @api public
|
1082
|
+
#
|
1083
|
+
class PFloatType < PNumericType
|
1084
|
+
def self.register_ptype(loader, ir)
|
1085
|
+
create_ptype(loader, ir, 'NumericType')
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
def generalize
|
1089
|
+
DEFAULT
|
1090
|
+
end
|
1091
|
+
|
1092
|
+
def instance?(o, guard = nil)
|
1093
|
+
o.is_a?(Float) && o >= numeric_from && o <= numeric_to
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
# Concatenates this range with another range provided that the ranges intersect. When that's not the case, this
|
1097
|
+
# method will return `nil`
|
1098
|
+
#
|
1099
|
+
# @param o [PFloatType] the range to concatenate with this range
|
1100
|
+
# @return [PFloatType,nil] the concatenated range or `nil` when the ranges were apart
|
1101
|
+
# @api public
|
1102
|
+
def merge(o)
|
1103
|
+
if intersect?(o)
|
1104
|
+
min = @from <= o.from ? @from : o.from
|
1105
|
+
max = @to >= o.to ? @to : o.to
|
1106
|
+
PFloatType.new(min, max)
|
1107
|
+
else
|
1108
|
+
nil
|
1109
|
+
end
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Returns a new function that produces a Float value
|
1113
|
+
#
|
1114
|
+
def self.new_function(_, loader)
|
1115
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_float, loader) do
|
1116
|
+
local_types do
|
1117
|
+
type 'Convertible = Variant[Undef, Numeric, Boolean, String, Timespan, Timestamp]'
|
1118
|
+
type 'NamedArgs = Struct[{from => Convertible, Optional[abs] => Boolean}]'
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
dispatch :from_args do
|
1122
|
+
param 'Convertible', :from
|
1123
|
+
optional_param 'Boolean', :abs
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
dispatch :from_hash do
|
1127
|
+
param 'NamedArgs', :hash_args
|
1128
|
+
end
|
1129
|
+
|
1130
|
+
def from_args(from, abs = false)
|
1131
|
+
result = from_convertible(from)
|
1132
|
+
abs ? result.abs : result
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
def from_hash(args_hash)
|
1136
|
+
from_args(args_hash['from'], args_hash['abs'] || false)
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
def from_convertible(from)
|
1140
|
+
case from
|
1141
|
+
when NilClass
|
1142
|
+
throw :undefined_value
|
1143
|
+
when Float
|
1144
|
+
from
|
1145
|
+
when Integer
|
1146
|
+
Float(from)
|
1147
|
+
when Time::TimeData
|
1148
|
+
from.to_f
|
1149
|
+
when TrueClass
|
1150
|
+
1.0
|
1151
|
+
when FalseClass
|
1152
|
+
0.0
|
1153
|
+
when String
|
1154
|
+
begin
|
1155
|
+
# support a binary as float
|
1156
|
+
if from[0] == '0' && from[1].downcase == 'b'
|
1157
|
+
from = Integer(from)
|
1158
|
+
end
|
1159
|
+
Float(from)
|
1160
|
+
rescue TypeError => e
|
1161
|
+
raise TypeConversionError.new(e.message)
|
1162
|
+
rescue ArgumentError => e
|
1163
|
+
# Test for special case where there is whitespace between sign and number
|
1164
|
+
match = Patterns::WS_BETWEEN_SIGN_AND_NUMBER.match(from)
|
1165
|
+
if match
|
1166
|
+
begin
|
1167
|
+
# Try again, this time with whitespace removed
|
1168
|
+
return from_args(match[1] + match[2])
|
1169
|
+
rescue TypeConversionError
|
1170
|
+
# Ignored to retain original error
|
1171
|
+
end
|
1172
|
+
end
|
1173
|
+
raise TypeConversionError.new(e.message)
|
1174
|
+
end
|
1175
|
+
else
|
1176
|
+
t = Puppet::Pops::Types::TypeCalculator.singleton.infer(from).generalize
|
1177
|
+
raise TypeConversionError.new("Value of type '#{t}' cannot be converted to Float")
|
1178
|
+
end
|
1179
|
+
end
|
1180
|
+
end
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
DEFAULT = PFloatType.new(-Float::INFINITY)
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
# @api public
|
1187
|
+
#
|
1188
|
+
class PCollectionType < PAnyType
|
1189
|
+
def self.register_ptype(loader, ir)
|
1190
|
+
create_ptype(loader, ir, 'AnyType',
|
1191
|
+
'size_type' => {
|
1192
|
+
KEY_TYPE => POptionalType.new(PType.new(PIntegerType::DEFAULT)),
|
1193
|
+
KEY_VALUE => nil
|
1194
|
+
}
|
1195
|
+
)
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
attr_reader :size_type
|
1199
|
+
|
1200
|
+
def initialize(size_type)
|
1201
|
+
@size_type = size_type
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
def accept(visitor, guard)
|
1205
|
+
super
|
1206
|
+
@size_type.accept(visitor, guard) unless @size_type.nil?
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
def generalize
|
1210
|
+
DEFAULT
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
def normalize(guard = nil)
|
1214
|
+
DEFAULT
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
def instance?(o, guard = nil)
|
1218
|
+
if o.is_a?(Array) || o.is_a?(Hash)
|
1219
|
+
@size_type.nil? || @size_type.instance?(o.size)
|
1220
|
+
else
|
1221
|
+
false
|
1222
|
+
end
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
# Returns an array with from (min) size to (max) size
|
1226
|
+
def size_range
|
1227
|
+
(@size_type || DEFAULT_SIZE).range
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
def has_empty_range?
|
1231
|
+
from, to = size_range
|
1232
|
+
from == 0 && to == 0
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
def hash
|
1236
|
+
@size_type.hash
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
def iterable?(guard = nil)
|
1240
|
+
true
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
def eql?(o)
|
1244
|
+
self.class == o.class && @size_type == o.size_type
|
1245
|
+
end
|
1246
|
+
|
1247
|
+
|
1248
|
+
DEFAULT_SIZE = PIntegerType.new(0)
|
1249
|
+
ZERO_SIZE = PIntegerType.new(0, 0)
|
1250
|
+
NOT_EMPTY_SIZE = PIntegerType.new(1)
|
1251
|
+
DEFAULT = PCollectionType.new(nil)
|
1252
|
+
|
1253
|
+
protected
|
1254
|
+
|
1255
|
+
# @api private
|
1256
|
+
#
|
1257
|
+
def _assignable?(o, guard)
|
1258
|
+
case o
|
1259
|
+
when PCollectionType
|
1260
|
+
(@size_type || DEFAULT_SIZE).assignable?(o.size_type || DEFAULT_SIZE, guard)
|
1261
|
+
when PTupleType
|
1262
|
+
# compute the tuple's min/max size, and check if that size matches
|
1263
|
+
size_s = size_type || DEFAULT_SIZE
|
1264
|
+
size_o = o.size_type
|
1265
|
+
if size_o.nil?
|
1266
|
+
type_count = o.types.size
|
1267
|
+
size_o = PIntegerType.new(type_count, type_count)
|
1268
|
+
end
|
1269
|
+
size_s.assignable?(size_o)
|
1270
|
+
when PStructType
|
1271
|
+
from = to = o.elements.size
|
1272
|
+
(@size_type || DEFAULT_SIZE).assignable?(PIntegerType.new(from, to), guard)
|
1273
|
+
else
|
1274
|
+
false
|
1275
|
+
end
|
1276
|
+
end
|
1277
|
+
end
|
1278
|
+
|
1279
|
+
class PIterableType < PTypeWithContainedType
|
1280
|
+
def self.register_ptype(loader, ir)
|
1281
|
+
create_ptype(loader, ir, 'AnyType',
|
1282
|
+
'type' => {
|
1283
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
1284
|
+
KEY_VALUE => nil
|
1285
|
+
}
|
1286
|
+
)
|
1287
|
+
end
|
1288
|
+
|
1289
|
+
def element_type
|
1290
|
+
@type
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
def instance?(o, guard = nil)
|
1294
|
+
if @type.nil? || @type.assignable?(PAnyType::DEFAULT, guard)
|
1295
|
+
# Any element_type will do
|
1296
|
+
case o
|
1297
|
+
when Iterable, String, Hash, Array, Range, PEnumType
|
1298
|
+
true
|
1299
|
+
when Integer
|
1300
|
+
o >= 0
|
1301
|
+
when PIntegerType
|
1302
|
+
o.finite_range?
|
1303
|
+
else
|
1304
|
+
false
|
1305
|
+
end
|
1306
|
+
else
|
1307
|
+
assignable?(TypeCalculator.infer(o), guard)
|
1308
|
+
end
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
def iterable?(guard = nil)
|
1312
|
+
true
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
def iterable_type(guard = nil)
|
1316
|
+
self
|
1317
|
+
end
|
1318
|
+
|
1319
|
+
DEFAULT = PIterableType.new(nil)
|
1320
|
+
|
1321
|
+
protected
|
1322
|
+
|
1323
|
+
# @api private
|
1324
|
+
def _assignable?(o, guard)
|
1325
|
+
if @type.nil? || @type.assignable?(PAnyType::DEFAULT, guard)
|
1326
|
+
# Don't request the iterable_type. Since this Iterable accepts Any element, it is enough that o is iterable.
|
1327
|
+
o.iterable?
|
1328
|
+
else
|
1329
|
+
o = o.iterable_type
|
1330
|
+
o.nil? || o.element_type.nil? ? false : @type.assignable?(o.element_type, guard)
|
1331
|
+
end
|
1332
|
+
end
|
1333
|
+
end
|
1334
|
+
|
1335
|
+
# @api public
|
1336
|
+
#
|
1337
|
+
class PIteratorType < PTypeWithContainedType
|
1338
|
+
def self.register_ptype(loader, ir)
|
1339
|
+
create_ptype(loader, ir, 'AnyType',
|
1340
|
+
'type' => {
|
1341
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
1342
|
+
KEY_VALUE => nil
|
1343
|
+
}
|
1344
|
+
)
|
1345
|
+
end
|
1346
|
+
|
1347
|
+
def element_type
|
1348
|
+
@type
|
1349
|
+
end
|
1350
|
+
|
1351
|
+
def instance?(o, guard = nil)
|
1352
|
+
o.is_a?(Iterable) && (@type.nil? || @type.assignable?(o.element_type, guard))
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
def iterable?(guard = nil)
|
1356
|
+
true
|
1357
|
+
end
|
1358
|
+
|
1359
|
+
def iterable_type(guard = nil)
|
1360
|
+
@type.nil? ? PIterableType::DEFAULT : PIterableType.new(@type)
|
1361
|
+
end
|
1362
|
+
|
1363
|
+
DEFAULT = PIteratorType.new(nil)
|
1364
|
+
|
1365
|
+
protected
|
1366
|
+
|
1367
|
+
# @api private
|
1368
|
+
def _assignable?(o, guard)
|
1369
|
+
o.is_a?(PIteratorType) && (@type.nil? || @type.assignable?(o.element_type, guard))
|
1370
|
+
end
|
1371
|
+
end
|
1372
|
+
|
1373
|
+
# @api public
|
1374
|
+
#
|
1375
|
+
class PStringType < PScalarType
|
1376
|
+
def self.register_ptype(loader, ir)
|
1377
|
+
create_ptype(loader, ir, 'ScalarType',
|
1378
|
+
'size_type_or_value' => {
|
1379
|
+
KEY_TYPE => POptionalType.new(PVariantType.new([PStringType::DEFAULT, PType.new(PIntegerType::DEFAULT)])),
|
1380
|
+
KEY_VALUE => nil
|
1381
|
+
})
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
attr_reader :size_type_or_value
|
1385
|
+
|
1386
|
+
def initialize(size_type_or_value, deprecated_multi_args = EMPTY_ARRAY)
|
1387
|
+
unless deprecated_multi_args.empty?
|
1388
|
+
if Puppet[:strict] != :off
|
1389
|
+
Puppet.warn_once(:deprecatation, "PStringType#initialize_multi_args", "Passing more than one argument to PStringType#initialize is deprecated")
|
1390
|
+
end
|
1391
|
+
size_type_or_value = deprecated_multi_args[0]
|
1392
|
+
end
|
1393
|
+
@size_type_or_value = size_type_or_value
|
1394
|
+
end
|
1395
|
+
|
1396
|
+
def accept(visitor, guard)
|
1397
|
+
super
|
1398
|
+
@size_type_or_value.accept(visitor, guard) if @size_type_or_value.is_a?(PIntegerType)
|
1399
|
+
end
|
1400
|
+
|
1401
|
+
def generalize
|
1402
|
+
DEFAULT
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
def hash
|
1406
|
+
@size_type_or_value.hash
|
1407
|
+
end
|
1408
|
+
|
1409
|
+
def iterable?(guard = nil)
|
1410
|
+
true
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
def iterable_type(guard = nil)
|
1414
|
+
ITERABLE_TYPE
|
1415
|
+
end
|
1416
|
+
|
1417
|
+
def eql?(o)
|
1418
|
+
self.class == o.class && @size_type_or_value == o.size_type_or_value
|
1419
|
+
end
|
1420
|
+
|
1421
|
+
def instance?(o, guard = nil)
|
1422
|
+
# true if size compliant
|
1423
|
+
if o.is_a?(String)
|
1424
|
+
if @size_type_or_value.is_a?(PIntegerType)
|
1425
|
+
@size_type_or_value.instance?(o.size, guard)
|
1426
|
+
else
|
1427
|
+
@size_type_or_value.nil? ? true : o == value
|
1428
|
+
end
|
1429
|
+
else
|
1430
|
+
false
|
1431
|
+
end
|
1432
|
+
end
|
1433
|
+
|
1434
|
+
def value
|
1435
|
+
@size_type_or_value.is_a?(PIntegerType) ? nil : @size_type_or_value
|
1436
|
+
end
|
1437
|
+
|
1438
|
+
# @deprecated
|
1439
|
+
# @api private
|
1440
|
+
def values
|
1441
|
+
if Puppet[:strict] != :off
|
1442
|
+
Puppet.warn_once(:deprecatation, "PStringType#values", "Method PStringType#values is deprecated. Use #value instead")
|
1443
|
+
end
|
1444
|
+
@value.is_a?(String) ? [@value] : EMPTY_ARRAY
|
1445
|
+
end
|
1446
|
+
|
1447
|
+
def size_type
|
1448
|
+
@size_type_or_value.is_a?(PIntegerType) ? @size_type_or_value : nil
|
1449
|
+
end
|
1450
|
+
|
1451
|
+
def size_type
|
1452
|
+
@size_type_or_value.is_a?(PIntegerType) ? @size_type_or_value : nil
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
def derived_size_type
|
1456
|
+
if @size_type_or_value.is_a?(PIntegerType)
|
1457
|
+
@size_type_or_value
|
1458
|
+
elsif @size_type_or_value.is_a?(String)
|
1459
|
+
sz = @size_type_or_value.size
|
1460
|
+
PIntegerType.new(sz, sz)
|
1461
|
+
else
|
1462
|
+
PCollectionType::DEFAULT_SIZE
|
1463
|
+
end
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
def self.new_function(_, loader)
|
1467
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_string, loader) do
|
1468
|
+
local_types do
|
1469
|
+
type 'Format = Pattern[/^%([\s\+\-#0\[\{<\(\|]*)([1-9][0-9]*)?(?:\.([0-9]+))?([a-zA-Z])/]'
|
1470
|
+
type 'ContainerFormat = Struct[{
|
1471
|
+
Optional[format] => String,
|
1472
|
+
Optional[separator] => String,
|
1473
|
+
Optional[separator2] => String,
|
1474
|
+
Optional[string_formats] => Hash[Type, Format]
|
1475
|
+
}]'
|
1476
|
+
type 'TypeMap = Hash[Type, Variant[Format, ContainerFormat]]'
|
1477
|
+
type 'Convertible = Any'
|
1478
|
+
type 'Formats = Variant[Default, String[1], TypeMap]'
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
dispatch :from_args do
|
1482
|
+
param 'Convertible', :from
|
1483
|
+
optional_param 'Formats', :string_formats
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
def from_args(from, formats = :default)
|
1487
|
+
StringConverter.singleton.convert(from, formats)
|
1488
|
+
end
|
1489
|
+
end
|
1490
|
+
end
|
1491
|
+
|
1492
|
+
DEFAULT = PStringType.new(nil)
|
1493
|
+
NON_EMPTY = PStringType.new(PCollectionType::NOT_EMPTY_SIZE)
|
1494
|
+
|
1495
|
+
# Iterates over each character of the string
|
1496
|
+
ITERABLE_TYPE = PIterableType.new(PStringType.new(PIntegerType.new(1,1)))
|
1497
|
+
|
1498
|
+
protected
|
1499
|
+
|
1500
|
+
# @api private
|
1501
|
+
def _assignable?(o, guard)
|
1502
|
+
if @size_type_or_value.is_a?(PIntegerType)
|
1503
|
+
# A general string is assignable by any other string or pattern restricted string
|
1504
|
+
# if the string has a size constraint it does not match since there is no reasonable way
|
1505
|
+
# to compute the min/max length a pattern will match. For enum, it is possible to test that
|
1506
|
+
# each enumerator value is within range
|
1507
|
+
case o
|
1508
|
+
when PStringType
|
1509
|
+
@size_type_or_value.assignable?(o.derived_size_type, guard)
|
1510
|
+
|
1511
|
+
when PEnumType
|
1512
|
+
if o.values.empty?
|
1513
|
+
# enum represents all enums, and thus all strings, a sized constrained string can thus not
|
1514
|
+
# be assigned any enum (unless it is max size).
|
1515
|
+
@size_type_or_value.assignable?(PCollectionType::DEFAULT_SIZE, guard)
|
1516
|
+
else
|
1517
|
+
# true if all enum values are within range
|
1518
|
+
orange = o.values.map(&:size).minmax
|
1519
|
+
srange = @size_type_or_value.range
|
1520
|
+
# If o min and max are within the range of t
|
1521
|
+
srange[0] <= orange[0] && srange[1] >= orange[1]
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
when PPatternType
|
1525
|
+
# true if size constraint is at least 0 to +Infinity (which is the same as the default)
|
1526
|
+
@size_type_or_value.assignable?(PCollectionType::DEFAULT_SIZE, guard)
|
1527
|
+
else
|
1528
|
+
# no other type matches string
|
1529
|
+
false
|
1530
|
+
end
|
1531
|
+
else
|
1532
|
+
case o
|
1533
|
+
when PStringType
|
1534
|
+
# Must match exactly when value is a string
|
1535
|
+
@size_type_or_value.nil? || @size_type_or_value == o.size_type_or_value
|
1536
|
+
when PEnumType
|
1537
|
+
@size_type_or_value.nil? ? true : o.values.size == 1 && @size_type_or_value == o.values[0]
|
1538
|
+
when PPatternType
|
1539
|
+
@size_type_or_value.nil?
|
1540
|
+
else
|
1541
|
+
# All others are false, since no other type describes the same set of specific strings
|
1542
|
+
false
|
1543
|
+
end
|
1544
|
+
end
|
1545
|
+
end
|
1546
|
+
end
|
1547
|
+
|
1548
|
+
# @api public
|
1549
|
+
#
|
1550
|
+
class PRegexpType < PScalarType
|
1551
|
+
def self.register_ptype(loader, ir)
|
1552
|
+
create_ptype(loader, ir, 'ScalarType',
|
1553
|
+
'pattern' => {
|
1554
|
+
KEY_TYPE => PVariantType.new([PUndefType::DEFAULT, PStringType::DEFAULT, PRegexpType::DEFAULT]),
|
1555
|
+
KEY_VALUE => nil
|
1556
|
+
})
|
1557
|
+
end
|
1558
|
+
|
1559
|
+
|
1560
|
+
# Returns a new function that produces a Regexp instance
|
1561
|
+
#
|
1562
|
+
def self.new_function(_, loader)
|
1563
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_float, loader) do
|
1564
|
+
dispatch :from_string do
|
1565
|
+
param 'String', :pattern
|
1566
|
+
end
|
1567
|
+
|
1568
|
+
def from_string(pattern)
|
1569
|
+
Regexp.new(pattern)
|
1570
|
+
end
|
1571
|
+
end
|
1572
|
+
end
|
1573
|
+
|
1574
|
+
attr_reader :pattern
|
1575
|
+
|
1576
|
+
# @param regexp [Regexp] the regular expression
|
1577
|
+
# @return [String] the Regexp as a slash delimited string with slashes escaped
|
1578
|
+
def self.regexp_to_s_with_delimiters(regexp)
|
1579
|
+
regexp.options == 0 ? regexp.inspect : "/#{regexp.to_s}/"
|
1580
|
+
end
|
1581
|
+
|
1582
|
+
# @param regexp [Regexp] the regular expression
|
1583
|
+
# @return [String] the Regexp as a string without escaped slash
|
1584
|
+
def self.regexp_to_s(regexp)
|
1585
|
+
# Rubies < 2.0.0 retains escaped delimiters in the source string.
|
1586
|
+
@source_retains_escaped_slash ||= Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
|
1587
|
+
source = regexp.source
|
1588
|
+
if @source_retains_escaped_slash && source.include?('\\')
|
1589
|
+
# Restore corrupt string in rubies <2.0.0, i.e. turn '\/' into '/' but
|
1590
|
+
# don't touch valid escapes such as '\s', '\{' etc.
|
1591
|
+
escaped = false
|
1592
|
+
bld = ''
|
1593
|
+
source.each_codepoint do |codepoint|
|
1594
|
+
if escaped
|
1595
|
+
bld << 0x5c unless codepoint == 0x2f # '/'
|
1596
|
+
bld << codepoint
|
1597
|
+
escaped = false
|
1598
|
+
elsif codepoint == 0x5c # '\'
|
1599
|
+
escaped = true
|
1600
|
+
elsif codepoint <= 0x7f
|
1601
|
+
bld << codepoint
|
1602
|
+
else
|
1603
|
+
bld << [codepoint].pack('U')
|
1604
|
+
end
|
1605
|
+
end
|
1606
|
+
source = bld
|
1607
|
+
end
|
1608
|
+
append_flags_group(source, regexp.options)
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
def self.append_flags_group(rx_string, options)
|
1612
|
+
if options == 0
|
1613
|
+
rx_string
|
1614
|
+
else
|
1615
|
+
bld = '(?'
|
1616
|
+
bld << 'i' if (options & Regexp::IGNORECASE) != 0
|
1617
|
+
bld << 'm' if (options & Regexp::MULTILINE) != 0
|
1618
|
+
bld << 'x' if (options & Regexp::EXTENDED) != 0
|
1619
|
+
unless options == (Regexp::IGNORECASE | Regexp::MULTILINE | Regexp::EXTENDED)
|
1620
|
+
bld << '-'
|
1621
|
+
bld << 'i' if (options & Regexp::IGNORECASE) == 0
|
1622
|
+
bld << 'm' if (options & Regexp::MULTILINE) == 0
|
1623
|
+
bld << 'x' if (options & Regexp::EXTENDED) == 0
|
1624
|
+
end
|
1625
|
+
bld << ':' << rx_string << ')'
|
1626
|
+
bld.freeze
|
1627
|
+
end
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
def initialize(pattern)
|
1631
|
+
if pattern.is_a?(Regexp)
|
1632
|
+
@regexp = pattern
|
1633
|
+
@pattern = PRegexpType.regexp_to_s(pattern)
|
1634
|
+
else
|
1635
|
+
@pattern = pattern
|
1636
|
+
end
|
1637
|
+
end
|
1638
|
+
|
1639
|
+
def regexp
|
1640
|
+
@regexp ||= Regexp.new(@pattern || '')
|
1641
|
+
end
|
1642
|
+
|
1643
|
+
def hash
|
1644
|
+
@pattern.hash
|
1645
|
+
end
|
1646
|
+
|
1647
|
+
def eql?(o)
|
1648
|
+
self.class == o.class && @pattern == o.pattern
|
1649
|
+
end
|
1650
|
+
|
1651
|
+
def instance?(o, guard=nil)
|
1652
|
+
o.is_a?(Regexp) && @pattern.nil? || regexp == o
|
1653
|
+
end
|
1654
|
+
|
1655
|
+
DEFAULT = PRegexpType.new(nil)
|
1656
|
+
|
1657
|
+
protected
|
1658
|
+
|
1659
|
+
# @api private
|
1660
|
+
#
|
1661
|
+
def _assignable?(o, guard)
|
1662
|
+
o.is_a?(PRegexpType) && (@pattern.nil? || @pattern == o.pattern)
|
1663
|
+
end
|
1664
|
+
end
|
1665
|
+
|
1666
|
+
# Represents a subtype of String that narrows the string to those matching the patterns
|
1667
|
+
# If specified without a pattern it is basically the same as the String type.
|
1668
|
+
#
|
1669
|
+
# @api public
|
1670
|
+
#
|
1671
|
+
class PPatternType < PScalarType
|
1672
|
+
def self.register_ptype(loader, ir)
|
1673
|
+
create_ptype(loader, ir, 'ScalarType', 'patterns' => PArrayType.new(PRegexpType::DEFAULT))
|
1674
|
+
end
|
1675
|
+
|
1676
|
+
attr_reader :patterns
|
1677
|
+
|
1678
|
+
def initialize(patterns)
|
1679
|
+
@patterns = patterns.freeze
|
1680
|
+
end
|
1681
|
+
|
1682
|
+
def accept(visitor, guard)
|
1683
|
+
super
|
1684
|
+
@patterns.each { |p| p.accept(visitor, guard) }
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
def hash
|
1688
|
+
@patterns.hash
|
1689
|
+
end
|
1690
|
+
|
1691
|
+
def eql?(o)
|
1692
|
+
self.class == o.class && @patterns.size == o.patterns.size && (@patterns - o.patterns).empty?
|
1693
|
+
end
|
1694
|
+
|
1695
|
+
def instance?(o, guard = nil)
|
1696
|
+
o.is_a?(String) && (@patterns.empty? || @patterns.any? { |p| p.regexp.match(o) })
|
1697
|
+
end
|
1698
|
+
|
1699
|
+
DEFAULT = PPatternType.new(EMPTY_ARRAY)
|
1700
|
+
|
1701
|
+
protected
|
1702
|
+
|
1703
|
+
# @api private
|
1704
|
+
#
|
1705
|
+
def _assignable?(o, guard)
|
1706
|
+
return true if self == o
|
1707
|
+
case o
|
1708
|
+
when PStringType
|
1709
|
+
v = o.value
|
1710
|
+
if v.nil?
|
1711
|
+
# Strings cannot all match a pattern, but if there is no pattern it is ok
|
1712
|
+
# (There should really always be a pattern, but better safe than sorry).
|
1713
|
+
@patterns.empty?
|
1714
|
+
else
|
1715
|
+
# the string in String type must match one of the patterns in Pattern type,
|
1716
|
+
# or Pattern represents all Patterns == all Strings
|
1717
|
+
regexps = @patterns.map { |p| p.regexp }
|
1718
|
+
regexps.empty? || regexps.any? { |re| re.match(v) }
|
1719
|
+
end
|
1720
|
+
when PEnumType
|
1721
|
+
if o.values.empty?
|
1722
|
+
# Enums (unknown which ones) cannot all match a pattern, but if there is no pattern it is ok
|
1723
|
+
# (There should really always be a pattern, but better safe than sorry).
|
1724
|
+
@patterns.empty?
|
1725
|
+
else
|
1726
|
+
# all strings in String/Enum type must match one of the patterns in Pattern type,
|
1727
|
+
# or Pattern represents all Patterns == all Strings
|
1728
|
+
regexps = @patterns.map { |p| p.regexp }
|
1729
|
+
regexps.empty? || o.values.all? { |s| regexps.any? {|re| re.match(s) } }
|
1730
|
+
end
|
1731
|
+
when PPatternType
|
1732
|
+
@patterns.empty?
|
1733
|
+
else
|
1734
|
+
false
|
1735
|
+
end
|
1736
|
+
end
|
1737
|
+
end
|
1738
|
+
|
1739
|
+
# @api public
|
1740
|
+
#
|
1741
|
+
class PBooleanType < PScalarType
|
1742
|
+
def self.register_ptype(loader, ir)
|
1743
|
+
create_ptype(loader, ir, 'ScalarType')
|
1744
|
+
end
|
1745
|
+
|
1746
|
+
def instance?(o, guard = nil)
|
1747
|
+
o == true || o == false
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
def self.new_function(_, loader)
|
1751
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_boolean, loader) do
|
1752
|
+
dispatch :from_args do
|
1753
|
+
param 'Variant[Undef, Integer, Float, Boolean, String]', :from
|
1754
|
+
end
|
1755
|
+
|
1756
|
+
def from_args(from)
|
1757
|
+
from = from.downcase if from.is_a?(String)
|
1758
|
+
case from
|
1759
|
+
when NilClass
|
1760
|
+
throw :undefined_value
|
1761
|
+
when Float
|
1762
|
+
from != 0.0
|
1763
|
+
when Integer
|
1764
|
+
from != 0
|
1765
|
+
when true, false
|
1766
|
+
from
|
1767
|
+
when 'false', 'no', 'n'
|
1768
|
+
false
|
1769
|
+
when 'true', 'yes', 'y'
|
1770
|
+
true
|
1771
|
+
else
|
1772
|
+
raise TypeConversionError.new("Value '#{from}' of type '#{from.class}' cannot be converted to Boolean")
|
1773
|
+
end
|
1774
|
+
end
|
1775
|
+
end
|
1776
|
+
end
|
1777
|
+
|
1778
|
+
DEFAULT = PBooleanType.new
|
1779
|
+
|
1780
|
+
protected
|
1781
|
+
|
1782
|
+
# @api private
|
1783
|
+
#
|
1784
|
+
def _assignable?(o, guard)
|
1785
|
+
o.is_a?(PBooleanType)
|
1786
|
+
end
|
1787
|
+
end
|
1788
|
+
|
1789
|
+
# @api public
|
1790
|
+
#
|
1791
|
+
# @api public
|
1792
|
+
#
|
1793
|
+
class PStructElement < TypedModelObject
|
1794
|
+
def self.register_ptype(loader, ir)
|
1795
|
+
@type = Pcore::create_object_type(loader, ir, self, 'Pcore::StructElement'.freeze, nil,
|
1796
|
+
'key_type' => PType::DEFAULT,
|
1797
|
+
'value_type' => PType::DEFAULT)
|
1798
|
+
end
|
1799
|
+
|
1800
|
+
attr_accessor :key_type, :value_type
|
1801
|
+
|
1802
|
+
def accept(visitor, guard)
|
1803
|
+
@key_type.accept(visitor, guard)
|
1804
|
+
@value_type.accept(visitor, guard)
|
1805
|
+
end
|
1806
|
+
|
1807
|
+
def hash
|
1808
|
+
value_type.hash ^ key_type.hash
|
1809
|
+
end
|
1810
|
+
|
1811
|
+
def name
|
1812
|
+
k = key_type
|
1813
|
+
k = k.optional_type if k.is_a?(POptionalType)
|
1814
|
+
k.value
|
1815
|
+
end
|
1816
|
+
|
1817
|
+
def initialize(key_type, value_type)
|
1818
|
+
@key_type = key_type
|
1819
|
+
@value_type = value_type
|
1820
|
+
end
|
1821
|
+
|
1822
|
+
def generalize
|
1823
|
+
gv_type = @value_type.generalize
|
1824
|
+
@value_type.equal?(gv_type) ? self : PStructElement.new(@key_type, gv_type)
|
1825
|
+
end
|
1826
|
+
|
1827
|
+
def normalize(guard = nil)
|
1828
|
+
nv_type = @value_type.normalize(guard)
|
1829
|
+
@value_type.equal?(nv_type) ? self : PStructElement.new(@key_type, nv_type)
|
1830
|
+
end
|
1831
|
+
|
1832
|
+
def resolve(type_parser, loader)
|
1833
|
+
rkey_type = @key_type
|
1834
|
+
rkey_type = rkey_type.resolve(type_parser, loader) unless rkey_type.nil?
|
1835
|
+
rvalue_type = @value_type
|
1836
|
+
rvalue_type = rvalue_type.resolve(type_parser, loader) unless rvalue_type.nil?
|
1837
|
+
rkey_type.equal?(@key_type) && rvalue_type.equal?(@value_type) ? self : self.class.new(rkey_type, rvalue_type)
|
1838
|
+
end
|
1839
|
+
|
1840
|
+
def <=>(o)
|
1841
|
+
self.name <=> o.name
|
1842
|
+
end
|
1843
|
+
|
1844
|
+
def eql?(o)
|
1845
|
+
self == o
|
1846
|
+
end
|
1847
|
+
|
1848
|
+
def ==(o)
|
1849
|
+
self.class == o.class && value_type == o.value_type && key_type == o.key_type
|
1850
|
+
end
|
1851
|
+
end
|
1852
|
+
|
1853
|
+
# @api public
|
1854
|
+
#
|
1855
|
+
class PStructType < PAnyType
|
1856
|
+
include Enumerable
|
1857
|
+
|
1858
|
+
def self.register_ptype(loader, ir)
|
1859
|
+
create_ptype(loader, ir, 'AnyType', 'elements' => PArrayType.new(PTypeReferenceType.new('Pcore::StructElement')))
|
1860
|
+
end
|
1861
|
+
|
1862
|
+
def initialize(elements)
|
1863
|
+
@elements = elements.freeze
|
1864
|
+
end
|
1865
|
+
|
1866
|
+
def accept(visitor, guard)
|
1867
|
+
super
|
1868
|
+
@elements.each { |elem| elem.accept(visitor, guard) }
|
1869
|
+
end
|
1870
|
+
|
1871
|
+
def each
|
1872
|
+
if block_given?
|
1873
|
+
elements.each { |elem| yield elem }
|
1874
|
+
else
|
1875
|
+
elements.to_enum
|
1876
|
+
end
|
1877
|
+
end
|
1878
|
+
|
1879
|
+
def generalize
|
1880
|
+
if @elements.empty?
|
1881
|
+
DEFAULT
|
1882
|
+
else
|
1883
|
+
alter_type_array(@elements, :generalize) { |altered| PStructType.new(altered) }
|
1884
|
+
end
|
1885
|
+
end
|
1886
|
+
|
1887
|
+
def normalize(guard = nil)
|
1888
|
+
if @elements.empty?
|
1889
|
+
DEFAULT
|
1890
|
+
else
|
1891
|
+
alter_type_array(@elements, :normalize, guard) { |altered| PStructType.new(altered) }
|
1892
|
+
end
|
1893
|
+
end
|
1894
|
+
|
1895
|
+
def hashed_elements
|
1896
|
+
@hashed ||= @elements.reduce({}) {|memo, e| memo[e.name] = e; memo }
|
1897
|
+
end
|
1898
|
+
|
1899
|
+
def hash
|
1900
|
+
@elements.hash
|
1901
|
+
end
|
1902
|
+
|
1903
|
+
def iterable?(guard = nil)
|
1904
|
+
true
|
1905
|
+
end
|
1906
|
+
|
1907
|
+
def iterable_type(guard = nil)
|
1908
|
+
if self == DEFAULT
|
1909
|
+
PIterableType.new(PHashType::DEFAULT_KEY_PAIR_TUPLE)
|
1910
|
+
else
|
1911
|
+
tc = TypeCalculator.singleton
|
1912
|
+
PIterableType.new(
|
1913
|
+
PTupleType.new([
|
1914
|
+
PVariantType.maybe_create(@elements.map {|se| se.key_type }),
|
1915
|
+
PVariantType.maybe_create(@elements.map {|se| se.value_type })],
|
1916
|
+
PHashType::KEY_PAIR_TUPLE_SIZE))
|
1917
|
+
end
|
1918
|
+
end
|
1919
|
+
|
1920
|
+
def resolve(type_parser, loader)
|
1921
|
+
changed = false
|
1922
|
+
relements = @elements.map do |elem|
|
1923
|
+
relem = elem.resolve(type_parser, loader)
|
1924
|
+
changed ||= !relem.equal?(elem)
|
1925
|
+
relem
|
1926
|
+
end
|
1927
|
+
changed ? self.class.new(relements) : self
|
1928
|
+
end
|
1929
|
+
|
1930
|
+
def eql?(o)
|
1931
|
+
self.class == o.class && @elements == o.elements
|
1932
|
+
end
|
1933
|
+
|
1934
|
+
def elements
|
1935
|
+
@elements
|
1936
|
+
end
|
1937
|
+
|
1938
|
+
def instance?(o, guard = nil)
|
1939
|
+
return false unless o.is_a?(Hash)
|
1940
|
+
matched = 0
|
1941
|
+
@elements.all? do |e|
|
1942
|
+
key = e.name
|
1943
|
+
v = o[key]
|
1944
|
+
if v.nil? && !o.include?(key)
|
1945
|
+
# Entry is missing. Only OK when key is optional
|
1946
|
+
e.key_type.assignable?(PUndefType::DEFAULT, guard)
|
1947
|
+
else
|
1948
|
+
matched += 1
|
1949
|
+
e.value_type.instance?(v, guard)
|
1950
|
+
end
|
1951
|
+
end && matched == o.size
|
1952
|
+
end
|
1953
|
+
|
1954
|
+
def new_function(loader)
|
1955
|
+
# Simply delegate to Hash type and let the higher level assertion deal with
|
1956
|
+
# compliance with the Struct type regarding the produced result.
|
1957
|
+
PHashType.new_function(self, loader)
|
1958
|
+
end
|
1959
|
+
|
1960
|
+
DEFAULT = PStructType.new(EMPTY_ARRAY)
|
1961
|
+
|
1962
|
+
protected
|
1963
|
+
|
1964
|
+
# @api private
|
1965
|
+
def _assignable?(o, guard)
|
1966
|
+
if o.is_a?(Types::PStructType)
|
1967
|
+
h2 = o.hashed_elements
|
1968
|
+
matched = 0
|
1969
|
+
elements.all? do |e1|
|
1970
|
+
e2 = h2[e1.name]
|
1971
|
+
if e2.nil?
|
1972
|
+
e1.key_type.assignable?(PUndefType::DEFAULT, guard)
|
1973
|
+
else
|
1974
|
+
matched += 1
|
1975
|
+
e1.key_type.assignable?(e2.key_type, guard) && e1.value_type.assignable?(e2.value_type, guard)
|
1976
|
+
end
|
1977
|
+
end && matched == h2.size
|
1978
|
+
elsif o.is_a?(Types::PHashType)
|
1979
|
+
required = 0
|
1980
|
+
required_elements_assignable = elements.all? do |e|
|
1981
|
+
key_type = e.key_type
|
1982
|
+
if key_type.assignable?(PUndefType::DEFAULT)
|
1983
|
+
# Element is optional so Hash does not need to provide it
|
1984
|
+
true
|
1985
|
+
else
|
1986
|
+
required += 1
|
1987
|
+
if e.value_type.assignable?(o.value_type, guard)
|
1988
|
+
# Hash must have something that is assignable. We don't care about the name or size of the key though
|
1989
|
+
# because we have no instance of a hash to compare against.
|
1990
|
+
key_type.generalize.assignable?(o.key_type)
|
1991
|
+
else
|
1992
|
+
false
|
1993
|
+
end
|
1994
|
+
end
|
1995
|
+
end
|
1996
|
+
if required_elements_assignable
|
1997
|
+
size_o = o.size_type || PCollectionType::DEFAULT_SIZE
|
1998
|
+
PIntegerType.new(required, elements.size).assignable?(size_o, guard)
|
1999
|
+
else
|
2000
|
+
false
|
2001
|
+
end
|
2002
|
+
else
|
2003
|
+
false
|
2004
|
+
end
|
2005
|
+
end
|
2006
|
+
end
|
2007
|
+
|
2008
|
+
# @api public
|
2009
|
+
#
|
2010
|
+
class PTupleType < PAnyType
|
2011
|
+
include Enumerable
|
2012
|
+
|
2013
|
+
def self.register_ptype(loader, ir)
|
2014
|
+
create_ptype(loader, ir, 'AnyType',
|
2015
|
+
'types' => PArrayType.new(PType::DEFAULT),
|
2016
|
+
'size_type' => {
|
2017
|
+
KEY_TYPE => POptionalType.new(PType.new(PIntegerType::DEFAULT)),
|
2018
|
+
KEY_VALUE => nil
|
2019
|
+
}
|
2020
|
+
)
|
2021
|
+
end
|
2022
|
+
|
2023
|
+
# If set, describes min and max required of the given types - if max > size of
|
2024
|
+
# types, the last type entry repeats
|
2025
|
+
#
|
2026
|
+
attr_reader :size_type
|
2027
|
+
|
2028
|
+
attr_reader :types
|
2029
|
+
|
2030
|
+
def accept(visitor, guard)
|
2031
|
+
super
|
2032
|
+
@size_type.accept(visitor, guard) unless @size_type.nil?
|
2033
|
+
@types.each { |elem| elem.accept(visitor, guard) }
|
2034
|
+
end
|
2035
|
+
|
2036
|
+
# @api private
|
2037
|
+
def callable_args?(callable_t, guard)
|
2038
|
+
unless size_type.nil?
|
2039
|
+
raise ArgumentError, 'Callable tuple may not have a size constraint when used as args'
|
2040
|
+
end
|
2041
|
+
|
2042
|
+
params_tuple = callable_t.param_types
|
2043
|
+
param_block_t = callable_t.block_type
|
2044
|
+
arg_types = @types
|
2045
|
+
arg_block_t = arg_types.last
|
2046
|
+
if arg_block_t.kind_of_callable?(true, guard)
|
2047
|
+
# Can't pass a block to a callable that doesn't accept one
|
2048
|
+
return false if param_block_t.nil?
|
2049
|
+
|
2050
|
+
# Check that the block is of the right tyṕe
|
2051
|
+
return false unless param_block_t.assignable?(arg_block_t, guard)
|
2052
|
+
|
2053
|
+
# Check other arguments
|
2054
|
+
arg_count = arg_types.size - 1
|
2055
|
+
params_size_t = params_tuple.size_type || PIntegerType.new(*params_tuple.size_range)
|
2056
|
+
return false unless params_size_t.assignable?(PIntegerType.new(arg_count, arg_count), guard)
|
2057
|
+
|
2058
|
+
ctypes = params_tuple.types
|
2059
|
+
arg_count.times do |index|
|
2060
|
+
return false unless (ctypes[index] || ctypes[-1]).assignable?(arg_types[index], guard)
|
2061
|
+
end
|
2062
|
+
return true
|
2063
|
+
end
|
2064
|
+
|
2065
|
+
# Check that tuple is assignable and that the block (if declared) is optional
|
2066
|
+
params_tuple.assignable?(self, guard) && (param_block_t.nil? || param_block_t.assignable?(PUndefType::DEFAULT, guard))
|
2067
|
+
end
|
2068
|
+
|
2069
|
+
def initialize(types, size_type = nil)
|
2070
|
+
@types = types
|
2071
|
+
@size_type = size_type.nil? ? nil : size_type.to_size
|
2072
|
+
end
|
2073
|
+
|
2074
|
+
# Returns Enumerator for the types if no block is given, otherwise, calls the given
|
2075
|
+
# block with each of the types in this tuple
|
2076
|
+
def each
|
2077
|
+
if block_given?
|
2078
|
+
types.each { |x| yield x }
|
2079
|
+
else
|
2080
|
+
types.to_enum
|
2081
|
+
end
|
2082
|
+
end
|
2083
|
+
|
2084
|
+
def generalize
|
2085
|
+
if self == DEFAULT
|
2086
|
+
DEFAULT
|
2087
|
+
else
|
2088
|
+
alter_type_array(@types, :generalize) { |altered_types| PTupleType.new(altered_types, @size_type) }
|
2089
|
+
end
|
2090
|
+
end
|
2091
|
+
|
2092
|
+
def normalize(guard = nil)
|
2093
|
+
if self == DEFAULT
|
2094
|
+
DEFAULT
|
2095
|
+
else
|
2096
|
+
alter_type_array(@types, :normalize, guard) { |altered_types| PTupleType.new(altered_types, @size_type) }
|
2097
|
+
end
|
2098
|
+
end
|
2099
|
+
|
2100
|
+
def resolve(type_parser, loader)
|
2101
|
+
changed = false
|
2102
|
+
rtypes = @types.map do |type|
|
2103
|
+
rtype = type.resolve(type_parser, loader)
|
2104
|
+
changed ||= !rtype.equal?(type)
|
2105
|
+
rtype
|
2106
|
+
end
|
2107
|
+
changed ? self.class.new(rtypes, @size_type) : self
|
2108
|
+
end
|
2109
|
+
|
2110
|
+
def instance?(o, guard = nil)
|
2111
|
+
return false unless o.is_a?(Array)
|
2112
|
+
if @size_type
|
2113
|
+
return false unless @size_type.instance?(o.size, guard)
|
2114
|
+
else
|
2115
|
+
return false unless @types.empty? || @types.size == o.size
|
2116
|
+
end
|
2117
|
+
index = -1
|
2118
|
+
@types.empty? || o.all? do |element|
|
2119
|
+
@types.fetch(index += 1) { @types.last }.instance?(element, guard)
|
2120
|
+
end
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
def iterable?(guard = nil)
|
2124
|
+
true
|
2125
|
+
end
|
2126
|
+
|
2127
|
+
def iterable_type(guard = nil)
|
2128
|
+
PIterableType.new(PVariantType.maybe_create(types))
|
2129
|
+
end
|
2130
|
+
|
2131
|
+
# Returns the number of elements accepted [min, max] in the tuple
|
2132
|
+
def size_range
|
2133
|
+
if @size_type.nil?
|
2134
|
+
types_size = @types.size
|
2135
|
+
types_size == 0 ? [0, Float::INFINITY] : [types_size, types_size]
|
2136
|
+
else
|
2137
|
+
@size_type.range
|
2138
|
+
end
|
2139
|
+
end
|
2140
|
+
|
2141
|
+
# Returns the number of accepted occurrences [min, max] of the last type in the tuple
|
2142
|
+
# The defaults is [1,1]
|
2143
|
+
#
|
2144
|
+
def repeat_last_range
|
2145
|
+
if @size_type.nil?
|
2146
|
+
return [1, 1]
|
2147
|
+
end
|
2148
|
+
types_size = @types.size
|
2149
|
+
from, to = @size_type.range
|
2150
|
+
min = from - (types_size-1)
|
2151
|
+
min = min <= 0 ? 0 : min
|
2152
|
+
max = to - (types_size-1)
|
2153
|
+
[min, max]
|
2154
|
+
end
|
2155
|
+
|
2156
|
+
def hash
|
2157
|
+
@size_type.hash ^ @types.hash
|
2158
|
+
end
|
2159
|
+
|
2160
|
+
def eql?(o)
|
2161
|
+
self.class == o.class && @types == o.types && @size_type == o.size_type
|
2162
|
+
end
|
2163
|
+
|
2164
|
+
def new_function(loader)
|
2165
|
+
# Simply delegate to Array type and let the higher level assertion deal with
|
2166
|
+
# compliance with the Tuple type regarding the produced result.
|
2167
|
+
PArrayType.new_function(self, loader)
|
2168
|
+
end
|
2169
|
+
|
2170
|
+
DATA = PTupleType.new([PDataType::DEFAULT], PCollectionType::DEFAULT_SIZE)
|
2171
|
+
DEFAULT = PTupleType.new(EMPTY_ARRAY)
|
2172
|
+
|
2173
|
+
protected
|
2174
|
+
|
2175
|
+
# @api private
|
2176
|
+
def _assignable?(o, guard)
|
2177
|
+
return true if self == o
|
2178
|
+
return false unless o.is_a?(PTupleType) || o.is_a?(PArrayType)
|
2179
|
+
s_types = types
|
2180
|
+
size_s = size_type || PIntegerType.new(*size_range)
|
2181
|
+
|
2182
|
+
if o.is_a?(PTupleType)
|
2183
|
+
size_o = o.size_type || PIntegerType.new(*o.size_range)
|
2184
|
+
return false unless size_s.assignable?(size_o, guard)
|
2185
|
+
unless s_types.empty?
|
2186
|
+
o_types = o.types
|
2187
|
+
return size_s.numeric_from == 0 if o_types.empty?
|
2188
|
+
o_types.size.times do |index|
|
2189
|
+
return false unless (s_types[index] || s_types[-1]).assignable?(o_types[index], guard)
|
2190
|
+
end
|
2191
|
+
end
|
2192
|
+
else
|
2193
|
+
size_o = o.size_type || PCollectionType::DEFAULT_SIZE
|
2194
|
+
return false unless size_s.assignable?(size_o, guard)
|
2195
|
+
unless s_types.empty?
|
2196
|
+
o_entry = o.element_type
|
2197
|
+
# Array of anything can not be assigned (unless tuple is tuple of anything) - this case
|
2198
|
+
# was handled at the top of this method.
|
2199
|
+
#
|
2200
|
+
return false if o_entry.nil?
|
2201
|
+
[s_types.size, size_o.range[1]].min.times { |index| return false unless (s_types[index] || s_types[-1]).assignable?(o_entry, guard) }
|
2202
|
+
end
|
2203
|
+
end
|
2204
|
+
true
|
2205
|
+
end
|
2206
|
+
end
|
2207
|
+
|
2208
|
+
# @api public
|
2209
|
+
#
|
2210
|
+
class PCallableType < PAnyType
|
2211
|
+
def self.register_ptype(loader, ir)
|
2212
|
+
create_ptype(loader, ir, 'AnyType',
|
2213
|
+
'param_types' => {
|
2214
|
+
KEY_TYPE => POptionalType.new(PTupleType::DEFAULT),
|
2215
|
+
KEY_VALUE => nil
|
2216
|
+
},
|
2217
|
+
'block_type' => {
|
2218
|
+
KEY_TYPE => POptionalType.new(PCallableType::DEFAULT),
|
2219
|
+
KEY_VALUE => nil
|
2220
|
+
},
|
2221
|
+
'return_type' => {
|
2222
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
2223
|
+
KEY_VALUE => PAnyType::DEFAULT
|
2224
|
+
}
|
2225
|
+
)
|
2226
|
+
end
|
2227
|
+
|
2228
|
+
# @return [PAnyType] The type for the values returned by this callable. Returns `nil` if return value is unconstrained
|
2229
|
+
attr_reader :return_type
|
2230
|
+
|
2231
|
+
# Types of parameters as a Tuple with required/optional count, or an Integer with min (required), max count
|
2232
|
+
# @return [PTupleType] the tuple representing the parameter types
|
2233
|
+
attr_reader :param_types
|
2234
|
+
|
2235
|
+
# Although being an abstract type reference, only Callable, or all Callables wrapped in
|
2236
|
+
# Optional or Variant are supported
|
2237
|
+
# If not set, the meaning is that block is not supported.
|
2238
|
+
# @return [PAnyType|nil] the block type
|
2239
|
+
attr_reader :block_type
|
2240
|
+
|
2241
|
+
# @param param_types [PTupleType]
|
2242
|
+
# @param block_type [PAnyType]
|
2243
|
+
# @param return_type [PAnyType]
|
2244
|
+
def initialize(param_types, block_type = nil, return_type = nil)
|
2245
|
+
@param_types = param_types
|
2246
|
+
@block_type = block_type
|
2247
|
+
@return_type = return_type == PAnyType::DEFAULT ? nil : return_type
|
2248
|
+
end
|
2249
|
+
|
2250
|
+
def accept(visitor, guard)
|
2251
|
+
super
|
2252
|
+
@param_types.accept(visitor, guard) unless @param_types.nil?
|
2253
|
+
@block_type.accept(visitor, guard) unless @block_type.nil?
|
2254
|
+
@return_type.accept(visitor, guard) unless @return_type.nil?
|
2255
|
+
end
|
2256
|
+
|
2257
|
+
def generalize
|
2258
|
+
if self == DEFAULT
|
2259
|
+
DEFAULT
|
2260
|
+
else
|
2261
|
+
params_t = @param_types.nil? ? nil : @param_types.generalize
|
2262
|
+
block_t = @block_type.nil? ? nil : @block_type.generalize
|
2263
|
+
return_t = @return_type.nil? ? nil : @return_type.generalize
|
2264
|
+
@param_types.equal?(params_t) && @block_type.equal?(block_t) && @return_type.equal?(return_t) ? self : PCallableType.new(params_t, block_t, return_t)
|
2265
|
+
end
|
2266
|
+
end
|
2267
|
+
|
2268
|
+
def normalize(guard = nil)
|
2269
|
+
if self == DEFAULT
|
2270
|
+
DEFAULT
|
2271
|
+
else
|
2272
|
+
params_t = @param_types.nil? ? nil : @param_types.normalize(guard)
|
2273
|
+
block_t = @block_type.nil? ? nil : @block_type.normalize(guard)
|
2274
|
+
return_t = @return_type.nil? ? nil : @return_type.normalize(guard)
|
2275
|
+
@param_types.equal?(params_t) && @block_type.equal?(block_t) && @return_type.equal?(return_t) ? self : PCallableType.new(params_t, block_t, return_t)
|
2276
|
+
end
|
2277
|
+
end
|
2278
|
+
|
2279
|
+
def instance?(o, guard = nil)
|
2280
|
+
(o.is_a?(Proc) || o.is_a?(Evaluator::Closure) || o.is_a?(Functions::Function)) && assignable?(TypeCalculator.infer(o), guard)
|
2281
|
+
end
|
2282
|
+
|
2283
|
+
# Returns `true` if this instance is a callable that accepts the given _args_
|
2284
|
+
#
|
2285
|
+
# @param args [Array] the arguments to test
|
2286
|
+
# @return [Boolean] `true` if this instance is a callable that accepts the given _args_
|
2287
|
+
def callable_with?(args, block = nil)
|
2288
|
+
# nil param_types and compatible return type means other Callable is assignable
|
2289
|
+
return true if @param_types.nil?
|
2290
|
+
return false unless @param_types.instance?(args)
|
2291
|
+
if @block_type.nil?
|
2292
|
+
block == nil
|
2293
|
+
else
|
2294
|
+
@block_type.instance?(block)
|
2295
|
+
end
|
2296
|
+
end
|
2297
|
+
|
2298
|
+
# @api private
|
2299
|
+
def callable_args?(required_callable_t, guard)
|
2300
|
+
# If the required callable is euqal or more specific than self, self is acceptable arguments
|
2301
|
+
required_callable_t.assignable?(self, guard)
|
2302
|
+
end
|
2303
|
+
|
2304
|
+
def kind_of_callable?(optional=true, guard = nil)
|
2305
|
+
true
|
2306
|
+
end
|
2307
|
+
|
2308
|
+
# Returns the number of accepted arguments [min, max]
|
2309
|
+
def size_range
|
2310
|
+
@param_types.nil? ? nil : @param_types.size_range
|
2311
|
+
end
|
2312
|
+
|
2313
|
+
# Returns the number of accepted arguments for the last parameter type [min, max]
|
2314
|
+
#
|
2315
|
+
def last_range
|
2316
|
+
@param_types.nil? ? nil : @param_types.repeat_last_range
|
2317
|
+
end
|
2318
|
+
|
2319
|
+
# Range [0,0], [0,1], or [1,1] for the block
|
2320
|
+
#
|
2321
|
+
def block_range
|
2322
|
+
case block_type
|
2323
|
+
when POptionalType
|
2324
|
+
[0,1]
|
2325
|
+
when PVariantType, PCallableType
|
2326
|
+
[1,1]
|
2327
|
+
else
|
2328
|
+
[0,0]
|
2329
|
+
end
|
2330
|
+
end
|
2331
|
+
|
2332
|
+
def hash
|
2333
|
+
[@param_types, @block_type, @return_type].hash
|
2334
|
+
end
|
2335
|
+
|
2336
|
+
def eql?(o)
|
2337
|
+
self.class == o.class && @param_types == o.param_types && @block_type == o.block_type && @return_type == o.return_type
|
2338
|
+
end
|
2339
|
+
|
2340
|
+
def resolve(type_parser, loader)
|
2341
|
+
params_t = @param_types.nil? ? nil : @param_types.resolve(type_parser, loader)
|
2342
|
+
block_t = @block_type.nil? ? nil : @block_type.resolve(type_parser, loader)
|
2343
|
+
return_t = @return_type.nil? ? nil : @return_type.resolve(type_parser, loader)
|
2344
|
+
@param_types.equal?(params_t) && @block_type.equal?(block_t) && @return_type.equal?(return_t) ? self : self.class.new(params_t, block_t, return_t)
|
2345
|
+
end
|
2346
|
+
|
2347
|
+
DEFAULT = PCallableType.new(nil, nil, nil)
|
2348
|
+
|
2349
|
+
protected
|
2350
|
+
|
2351
|
+
# @api private
|
2352
|
+
def _assignable?(o, guard)
|
2353
|
+
return false unless o.is_a?(PCallableType)
|
2354
|
+
return false unless @return_type.nil? || @return_type.assignable?(o.return_type || PAnyType::DEFAULT, guard)
|
2355
|
+
|
2356
|
+
# nil param_types and compatible return type means other Callable is assignable
|
2357
|
+
return true if @param_types.nil?
|
2358
|
+
|
2359
|
+
# NOTE: these tests are made in reverse as it is calling the callable that is constrained
|
2360
|
+
# (it's lower bound), not its upper bound
|
2361
|
+
other_param_types = o.param_types
|
2362
|
+
|
2363
|
+
return false if other_param_types.nil? || !other_param_types.assignable?(@param_types, guard)
|
2364
|
+
# names are ignored, they are just information
|
2365
|
+
# Blocks must be compatible
|
2366
|
+
this_block_t = @block_type || PUndefType::DEFAULT
|
2367
|
+
that_block_t = o.block_type || PUndefType::DEFAULT
|
2368
|
+
that_block_t.assignable?(this_block_t, guard)
|
2369
|
+
end
|
2370
|
+
end
|
2371
|
+
|
2372
|
+
# @api public
|
2373
|
+
#
|
2374
|
+
class PArrayType < PCollectionType
|
2375
|
+
|
2376
|
+
def self.register_ptype(loader, ir)
|
2377
|
+
create_ptype(loader, ir, 'CollectionType',
|
2378
|
+
'element_type' => {
|
2379
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
2380
|
+
KEY_VALUE => nil
|
2381
|
+
}
|
2382
|
+
)
|
2383
|
+
end
|
2384
|
+
|
2385
|
+
attr_reader :element_type
|
2386
|
+
|
2387
|
+
def initialize(element_type, size_type = nil)
|
2388
|
+
super(size_type)
|
2389
|
+
if !size_type.nil? && size_type.from == 0 && size_type.to == 0
|
2390
|
+
@element_type = PUnitType::DEFAULT
|
2391
|
+
else
|
2392
|
+
@element_type = element_type
|
2393
|
+
end
|
2394
|
+
end
|
2395
|
+
|
2396
|
+
def accept(visitor, guard)
|
2397
|
+
super
|
2398
|
+
@element_type.accept(visitor, guard) unless @element_type.nil?
|
2399
|
+
end
|
2400
|
+
|
2401
|
+
# @api private
|
2402
|
+
def callable_args?(callable, guard = nil)
|
2403
|
+
param_t = callable.param_types
|
2404
|
+
block_t = callable.block_type
|
2405
|
+
# does not support calling with a block, but have to check that callable is ok with missing block
|
2406
|
+
(param_t.nil? || param_t.assignable?(self, guard)) && (block_t.nil? || block_t.assignable?(PUndefType::DEFAULT, guard))
|
2407
|
+
end
|
2408
|
+
|
2409
|
+
def generalize
|
2410
|
+
if self == DATA
|
2411
|
+
self
|
2412
|
+
elsif @element_type.nil?
|
2413
|
+
DEFAULT
|
2414
|
+
else
|
2415
|
+
ge_type = @element_type.generalize
|
2416
|
+
@size_type.nil? && @element_type.equal?(ge_type) ? self : self.class.new(ge_type, nil)
|
2417
|
+
end
|
2418
|
+
end
|
2419
|
+
|
2420
|
+
def eql?(o)
|
2421
|
+
super && @element_type == o.element_type
|
2422
|
+
end
|
2423
|
+
|
2424
|
+
def hash
|
2425
|
+
super ^ @element_type.hash
|
2426
|
+
end
|
2427
|
+
|
2428
|
+
def normalize(guard = nil)
|
2429
|
+
if self == DATA
|
2430
|
+
self
|
2431
|
+
elsif @element_type.nil?
|
2432
|
+
DEFAULT
|
2433
|
+
else
|
2434
|
+
ne_type = @element_type.normalize(guard)
|
2435
|
+
@element_type.equal?(ne_type) ? self : self.class.new(ne_type, @size_type)
|
2436
|
+
end
|
2437
|
+
end
|
2438
|
+
|
2439
|
+
def resolve(type_parser, loader)
|
2440
|
+
relement_type = @element_type
|
2441
|
+
relement_type = relement_type.resolve(type_parser, loader) unless relement_type.nil?
|
2442
|
+
relement_type.equal?(@element_type) ? self : self.class.new(relement_type, @size_type)
|
2443
|
+
end
|
2444
|
+
|
2445
|
+
def instance?(o, guard = nil)
|
2446
|
+
return false unless o.is_a?(Array)
|
2447
|
+
element_t = element_type
|
2448
|
+
return false unless element_t.nil? || o.all? {|element| element_t.instance?(element, guard) }
|
2449
|
+
size_t = size_type
|
2450
|
+
size_t.nil? || size_t.instance?(o.size, guard)
|
2451
|
+
end
|
2452
|
+
|
2453
|
+
def iterable_type(guard = nil)
|
2454
|
+
@element_type.nil? ? PIterableType::DEFAULT : PIterableType.new(@element_type)
|
2455
|
+
end
|
2456
|
+
|
2457
|
+
# Returns a new function that produces an Array
|
2458
|
+
#
|
2459
|
+
def self.new_function(_, loader)
|
2460
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_array, loader) do
|
2461
|
+
|
2462
|
+
dispatch :from_args do
|
2463
|
+
param 'Any', :from
|
2464
|
+
optional_param 'Boolean', :wrap
|
2465
|
+
end
|
2466
|
+
|
2467
|
+
def from_args(from, wrap = false)
|
2468
|
+
case from
|
2469
|
+
when NilClass
|
2470
|
+
if wrap
|
2471
|
+
[nil]
|
2472
|
+
else
|
2473
|
+
throw :undefined_value
|
2474
|
+
end
|
2475
|
+
when Array
|
2476
|
+
from
|
2477
|
+
when Hash
|
2478
|
+
wrap ? [from] : from.to_a
|
2479
|
+
|
2480
|
+
when PBinaryType::Binary
|
2481
|
+
# For older rubies, the #bytes method returns an Enumerator that must be rolled out
|
2482
|
+
wrap ? [from] : from.binary_buffer.bytes.to_a
|
2483
|
+
|
2484
|
+
else
|
2485
|
+
if wrap
|
2486
|
+
[from]
|
2487
|
+
else
|
2488
|
+
if PIterableType::DEFAULT.instance?(from)
|
2489
|
+
Iterable.on(from).to_a
|
2490
|
+
else
|
2491
|
+
t = Puppet::Pops::Types::TypeCalculator.singleton.infer(from).generalize
|
2492
|
+
raise TypeConversionError.new("Value of type '#{t}' cannot be converted to Array")
|
2493
|
+
end
|
2494
|
+
end
|
2495
|
+
end
|
2496
|
+
end
|
2497
|
+
end
|
2498
|
+
end
|
2499
|
+
|
2500
|
+
DATA = PArrayType.new(PDataType::DEFAULT, DEFAULT_SIZE)
|
2501
|
+
DEFAULT = PArrayType.new(nil)
|
2502
|
+
EMPTY = PArrayType.new(PUnitType::DEFAULT, ZERO_SIZE)
|
2503
|
+
|
2504
|
+
protected
|
2505
|
+
|
2506
|
+
# Array is assignable if o is an Array and o's element type is assignable, or if o is a Tuple
|
2507
|
+
# @api private
|
2508
|
+
def _assignable?(o, guard)
|
2509
|
+
s_entry = element_type
|
2510
|
+
if o.is_a?(PTupleType)
|
2511
|
+
# If s_entry is nil, this Array type has no opinion on element types. Therefore any
|
2512
|
+
# tuple can be assigned.
|
2513
|
+
return true if s_entry.nil?
|
2514
|
+
|
2515
|
+
o_types = o.types
|
2516
|
+
size_s = size_type || DEFAULT_SIZE
|
2517
|
+
size_o = o.size_type
|
2518
|
+
if size_o.nil?
|
2519
|
+
type_count = o_types.size
|
2520
|
+
size_o = PIntegerType.new(type_count, type_count)
|
2521
|
+
end
|
2522
|
+
size_s.assignable?(size_o) && o_types.all? { |ot| s_entry.assignable?(ot, guard) }
|
2523
|
+
elsif o.is_a?(PArrayType)
|
2524
|
+
super && (s_entry.nil? || s_entry.assignable?(o.element_type, guard))
|
2525
|
+
else
|
2526
|
+
false
|
2527
|
+
end
|
2528
|
+
end
|
2529
|
+
end
|
2530
|
+
|
2531
|
+
# @api public
|
2532
|
+
#
|
2533
|
+
class PHashType < PCollectionType
|
2534
|
+
|
2535
|
+
def self.register_ptype(loader, ir)
|
2536
|
+
create_ptype(loader, ir, 'CollectionType',
|
2537
|
+
'key_type' => {
|
2538
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
2539
|
+
KEY_VALUE => nil
|
2540
|
+
},
|
2541
|
+
'value_type' => {
|
2542
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
2543
|
+
KEY_VALUE => nil,
|
2544
|
+
}
|
2545
|
+
)
|
2546
|
+
end
|
2547
|
+
|
2548
|
+
attr_accessor :key_type, :value_type
|
2549
|
+
|
2550
|
+
def initialize(key_type, value_type, size_type = nil)
|
2551
|
+
super(size_type)
|
2552
|
+
if !size_type.nil? && size_type.from == 0 && size_type.to == 0
|
2553
|
+
@key_type = PUnitType::DEFAULT
|
2554
|
+
@value_type = PUnitType::DEFAULT
|
2555
|
+
else
|
2556
|
+
@key_type = key_type
|
2557
|
+
@value_type = value_type
|
2558
|
+
end
|
2559
|
+
end
|
2560
|
+
|
2561
|
+
def accept(visitor, guard)
|
2562
|
+
super
|
2563
|
+
@key_type.accept(visitor, guard) unless @key_type.nil?
|
2564
|
+
@value_type.accept(visitor, guard) unless @value_type.nil?
|
2565
|
+
end
|
2566
|
+
|
2567
|
+
def element_type
|
2568
|
+
if Puppet[:strict] != :off
|
2569
|
+
Puppet.warn_once(:deprecation, 'Puppet::Pops::Types::PHashType#element_type',
|
2570
|
+
'Puppet::Pops::Types::PHashType#element_type is deprecated, use #value_type instead')
|
2571
|
+
end
|
2572
|
+
@value_type
|
2573
|
+
end
|
2574
|
+
|
2575
|
+
def generalize
|
2576
|
+
if self == DEFAULT || self == DATA || self == EMPTY
|
2577
|
+
self
|
2578
|
+
else
|
2579
|
+
key_t = @key_type
|
2580
|
+
key_t = key_t.generalize unless key_t.nil?
|
2581
|
+
value_t = @value_type
|
2582
|
+
value_t = value_t.generalize unless value_t.nil?
|
2583
|
+
@size_type.nil? && @key_type.equal?(key_t) && @value_type.equal?(value_t) ? self : PHashType.new(key_t, value_t, nil)
|
2584
|
+
end
|
2585
|
+
end
|
2586
|
+
|
2587
|
+
def normalize(guard = nil)
|
2588
|
+
if self == DEFAULT || self == DATA || self == EMPTY
|
2589
|
+
self
|
2590
|
+
else
|
2591
|
+
key_t = @key_type
|
2592
|
+
key_t = key_t.normalize(guard) unless key_t.nil?
|
2593
|
+
value_t = @value_type
|
2594
|
+
value_t = value_t.normalize(guard) unless value_t.nil?
|
2595
|
+
@size_type.nil? && @key_type.equal?(key_t) && @value_type.equal?(value_t) ? self : PHashType.new(key_t, value_t, @size_type)
|
2596
|
+
end
|
2597
|
+
end
|
2598
|
+
|
2599
|
+
def hash
|
2600
|
+
super ^ @key_type.hash ^ @value_type.hash
|
2601
|
+
end
|
2602
|
+
|
2603
|
+
def instance?(o, guard = nil)
|
2604
|
+
return false unless o.is_a?(Hash)
|
2605
|
+
key_t = key_type
|
2606
|
+
value_t = value_type
|
2607
|
+
if (key_t.nil? || o.keys.all? {|key| key_t.instance?(key, guard) }) &&
|
2608
|
+
(value_t.nil? || o.values.all? {|value| value_t.instance?(value, guard) })
|
2609
|
+
size_t = size_type
|
2610
|
+
size_t.nil? || size_t.instance?(o.size, guard)
|
2611
|
+
else
|
2612
|
+
false
|
2613
|
+
end
|
2614
|
+
end
|
2615
|
+
|
2616
|
+
def iterable?(guard = nil)
|
2617
|
+
true
|
2618
|
+
end
|
2619
|
+
|
2620
|
+
def iterable_type(guard = nil)
|
2621
|
+
if self == DEFAULT || self == EMPTY
|
2622
|
+
PIterableType.new(DEFAULT_KEY_PAIR_TUPLE)
|
2623
|
+
else
|
2624
|
+
PIterableType.new(PTupleType.new([@key_type, @value_type], KEY_PAIR_TUPLE_SIZE))
|
2625
|
+
end
|
2626
|
+
end
|
2627
|
+
|
2628
|
+
def eql?(o)
|
2629
|
+
super && @key_type == o.key_type && @value_type == o.value_type
|
2630
|
+
end
|
2631
|
+
|
2632
|
+
def is_the_empty_hash?
|
2633
|
+
self == EMPTY
|
2634
|
+
end
|
2635
|
+
|
2636
|
+
def resolve(type_parser, loader)
|
2637
|
+
rkey_type = @key_type
|
2638
|
+
rkey_type = rkey_type.resolve(type_parser, loader) unless rkey_type.nil?
|
2639
|
+
rvalue_type = @value_type
|
2640
|
+
rvalue_type = rvalue_type.resolve(type_parser, loader) unless rvalue_type.nil?
|
2641
|
+
rkey_type.equal?(@key_type) && rvalue_type.equal?(@value_type) ? self : self.class.new(rkey_type, rvalue_type, @size_type)
|
2642
|
+
end
|
2643
|
+
|
2644
|
+
# Returns a new function that produces a Hash
|
2645
|
+
#
|
2646
|
+
def self.new_function(_, loader)
|
2647
|
+
@new_function ||= Puppet::Functions.create_loaded_function(:new_hash, loader) do
|
2648
|
+
local_types do
|
2649
|
+
type 'KeyValueArray = Array[Tuple[Any,Any],1]'
|
2650
|
+
end
|
2651
|
+
|
2652
|
+
dispatch :from_tuples do
|
2653
|
+
param 'KeyValueArray', :from
|
2654
|
+
end
|
2655
|
+
|
2656
|
+
dispatch :from_array do
|
2657
|
+
param 'Any', :from
|
2658
|
+
end
|
2659
|
+
|
2660
|
+
def from_tuples(tuple_array)
|
2661
|
+
Hash[tuple_array]
|
2662
|
+
end
|
2663
|
+
|
2664
|
+
def from_array(from)
|
2665
|
+
case from
|
2666
|
+
when NilClass
|
2667
|
+
throw :undefined_value
|
2668
|
+
when Array
|
2669
|
+
if from.size == 0
|
2670
|
+
{}
|
2671
|
+
else
|
2672
|
+
unless from.size % 2 == 0
|
2673
|
+
raise TypeConversionError.new("odd number of arguments for Hash")
|
2674
|
+
end
|
2675
|
+
Hash[*from]
|
2676
|
+
end
|
2677
|
+
when Hash
|
2678
|
+
from
|
2679
|
+
else
|
2680
|
+
if PIterableType::DEFAULT.instance?(from)
|
2681
|
+
Hash[*Iterable.on(from).to_a]
|
2682
|
+
else
|
2683
|
+
t = Puppet::Pops::Types::TypeCalculator.singleton.infer(from).generalize
|
2684
|
+
raise TypeConversionError.new("Value of type '#{t}' cannot be converted to Hash")
|
2685
|
+
end
|
2686
|
+
end
|
2687
|
+
end
|
2688
|
+
end
|
2689
|
+
end
|
2690
|
+
|
2691
|
+
DEFAULT = PHashType.new(nil, nil)
|
2692
|
+
KEY_PAIR_TUPLE_SIZE = PIntegerType.new(2,2)
|
2693
|
+
DEFAULT_KEY_PAIR_TUPLE = PTupleType.new([PUnitType::DEFAULT, PUnitType::DEFAULT], KEY_PAIR_TUPLE_SIZE)
|
2694
|
+
DATA = PHashType.new(PScalarType::DEFAULT, PDataType::DEFAULT, DEFAULT_SIZE)
|
2695
|
+
EMPTY = PHashType.new(PUnitType::DEFAULT, PUnitType::DEFAULT, PIntegerType.new(0, 0))
|
2696
|
+
|
2697
|
+
protected
|
2698
|
+
|
2699
|
+
# Hash is assignable if o is a Hash and o's key and element types are assignable
|
2700
|
+
# @api private
|
2701
|
+
def _assignable?(o, guard)
|
2702
|
+
case o
|
2703
|
+
when PHashType
|
2704
|
+
size_s = size_type
|
2705
|
+
return true if (size_s.nil? || size_s.from == 0) && o.is_the_empty_hash?
|
2706
|
+
return false unless (key_type.nil? || key_type.assignable?(o.key_type, guard)) && (value_type.nil? || value_type.assignable?(o.value_type, guard))
|
2707
|
+
super
|
2708
|
+
when PStructType
|
2709
|
+
# hash must accept String as key type
|
2710
|
+
# hash must accept all value types
|
2711
|
+
# hash must accept the size of the struct
|
2712
|
+
o_elements = o.elements
|
2713
|
+
(size_type || DEFAULT_SIZE).instance?(o_elements.size, guard) &&
|
2714
|
+
o_elements.all? {|e| (key_type.nil? || key_type.instance?(e.name, guard)) && (value_type.nil? || value_type.assignable?(e.value_type, guard)) }
|
2715
|
+
else
|
2716
|
+
false
|
2717
|
+
end
|
2718
|
+
end
|
2719
|
+
end
|
2720
|
+
|
2721
|
+
# A flexible type describing an any? of other types
|
2722
|
+
# @api public
|
2723
|
+
#
|
2724
|
+
class PVariantType < PAnyType
|
2725
|
+
include Enumerable
|
2726
|
+
|
2727
|
+
def self.register_ptype(loader, ir)
|
2728
|
+
create_ptype(loader, ir, 'AnyType', 'types' => PArrayType.new(PType::DEFAULT))
|
2729
|
+
end
|
2730
|
+
|
2731
|
+
attr_reader :types
|
2732
|
+
|
2733
|
+
# Checks if the number of unique types in the given array is greater than one, and if so
|
2734
|
+
# creates a Variant with those types and returns it. If only one unique type is found,
|
2735
|
+
# that type is instead returned.
|
2736
|
+
#
|
2737
|
+
# @param types [Array<PAnyType>] the variants
|
2738
|
+
# @return [PAnyType] the resulting type
|
2739
|
+
# @api public
|
2740
|
+
def self.maybe_create(types)
|
2741
|
+
types = flatten_variants(types).uniq
|
2742
|
+
types.size == 1 ? types[0] : new(types)
|
2743
|
+
end
|
2744
|
+
|
2745
|
+
# @param types [Array[PAnyType]] the variants
|
2746
|
+
def initialize(types)
|
2747
|
+
@types = types.freeze
|
2748
|
+
end
|
2749
|
+
|
2750
|
+
def accept(visitor, guard)
|
2751
|
+
super
|
2752
|
+
@types.each { |t| t.accept(visitor, guard) }
|
2753
|
+
end
|
2754
|
+
|
2755
|
+
def each
|
2756
|
+
if block_given?
|
2757
|
+
types.each { |t| yield t }
|
2758
|
+
else
|
2759
|
+
types.to_enum
|
2760
|
+
end
|
2761
|
+
end
|
2762
|
+
|
2763
|
+
def generalize
|
2764
|
+
if self == DEFAULT || self == DATA
|
2765
|
+
self
|
2766
|
+
else
|
2767
|
+
alter_type_array(@types, :generalize) { |altered| PVariantType.maybe_create(altered) }
|
2768
|
+
end
|
2769
|
+
end
|
2770
|
+
|
2771
|
+
def normalize(guard = nil)
|
2772
|
+
if self == DEFAULT || self == DATA || @types.empty?
|
2773
|
+
self
|
2774
|
+
else
|
2775
|
+
# Normalize all contained types
|
2776
|
+
modified = false
|
2777
|
+
types = alter_type_array(@types, :normalize, guard)
|
2778
|
+
if types == self
|
2779
|
+
types = @types
|
2780
|
+
else
|
2781
|
+
modified = true
|
2782
|
+
end
|
2783
|
+
|
2784
|
+
if types.size == 1
|
2785
|
+
types[0]
|
2786
|
+
elsif types.any? { |t| t.is_a?(PUndefType) || t.is_a?(POptionalType) }
|
2787
|
+
# Undef entry present. Use an OptionalType with a normalized Variant without Undefs and Optional wrappers
|
2788
|
+
POptionalType.new(PVariantType.maybe_create(types.reject { |t| t.is_a?(PUndefType) }.map { |t| t.is_a?(POptionalType) ? t.type : t })).normalize
|
2789
|
+
else
|
2790
|
+
# Merge all variants into this one
|
2791
|
+
types = PVariantType.flatten_variants(types)
|
2792
|
+
size_before_merge = types.size
|
2793
|
+
|
2794
|
+
types = swap_not_undefs(types)
|
2795
|
+
types = merge_enums(types)
|
2796
|
+
types = merge_patterns(types)
|
2797
|
+
types = merge_version_ranges(types)
|
2798
|
+
types = merge_numbers(PIntegerType, types)
|
2799
|
+
types = merge_numbers(PFloatType, types)
|
2800
|
+
types = merge_numbers(PTimespanType, types)
|
2801
|
+
types = merge_numbers(PTimestampType, types)
|
2802
|
+
|
2803
|
+
if types.size == 1
|
2804
|
+
types[0]
|
2805
|
+
else
|
2806
|
+
modified || types.size != size_before_merge ? PVariantType.maybe_create(types) : self
|
2807
|
+
end
|
2808
|
+
end
|
2809
|
+
end
|
2810
|
+
end
|
2811
|
+
|
2812
|
+
def self.flatten_variants(types)
|
2813
|
+
modified = false
|
2814
|
+
types = types.map do |t|
|
2815
|
+
if t.is_a?(PVariantType)
|
2816
|
+
modified = true
|
2817
|
+
t.types
|
2818
|
+
else
|
2819
|
+
t
|
2820
|
+
end
|
2821
|
+
end
|
2822
|
+
types.flatten! if modified
|
2823
|
+
types
|
2824
|
+
end
|
2825
|
+
|
2826
|
+
def hash
|
2827
|
+
@types.hash
|
2828
|
+
end
|
2829
|
+
|
2830
|
+
def instance?(o, guard = nil)
|
2831
|
+
# instance of variant if o is instance? of any of variant's types
|
2832
|
+
@types.any? { |type| type.instance?(o, guard) }
|
2833
|
+
end
|
2834
|
+
|
2835
|
+
def really_instance?(o, guard = nil)
|
2836
|
+
@types.reduce(-1) do |memo, type|
|
2837
|
+
ri = type.really_instance?(o, guard)
|
2838
|
+
ri > memo ? ri : memo
|
2839
|
+
end
|
2840
|
+
end
|
2841
|
+
|
2842
|
+
def kind_of_callable?(optional = true, guard = nil)
|
2843
|
+
@types.all? { |type| type.kind_of_callable?(optional, guard) }
|
2844
|
+
end
|
2845
|
+
|
2846
|
+
def resolved?
|
2847
|
+
@types.all? { |type| type.resolved? }
|
2848
|
+
end
|
2849
|
+
|
2850
|
+
def eql?(o)
|
2851
|
+
o = DATA if o.is_a?(PDataType)
|
2852
|
+
self.class == o.class && @types.size == o.types.size && (@types - o.types).empty?
|
2853
|
+
end
|
2854
|
+
|
2855
|
+
# Variant compatible with the Data type.
|
2856
|
+
DATA = PVariantType.new([PHashType::DATA, PArrayType::DATA, PScalarType::DEFAULT, PUndefType::DEFAULT, PTupleType::DATA])
|
2857
|
+
|
2858
|
+
DEFAULT = PVariantType.new(EMPTY_ARRAY)
|
2859
|
+
|
2860
|
+
protected
|
2861
|
+
|
2862
|
+
# @api private
|
2863
|
+
def _assignable?(o, guard)
|
2864
|
+
# Data is a specific variant
|
2865
|
+
o = DATA if o.is_a?(PDataType)
|
2866
|
+
if o.is_a?(PVariantType)
|
2867
|
+
# A variant is assignable if all of its options are assignable to one of this type's options
|
2868
|
+
return true if self == o
|
2869
|
+
o.types.all? do |other|
|
2870
|
+
# if the other is a Variant, all of its options, but be assignable to one of this type's options
|
2871
|
+
other = other.is_a?(PDataType) ? DATA : other
|
2872
|
+
if other.is_a?(PVariantType)
|
2873
|
+
assignable?(other, guard)
|
2874
|
+
else
|
2875
|
+
types.any? {|option_t| option_t.assignable?(other, guard) }
|
2876
|
+
end
|
2877
|
+
end
|
2878
|
+
else
|
2879
|
+
# A variant is assignable if o is assignable to any of its types
|
2880
|
+
types.any? { |option_t| option_t.assignable?(o, guard) }
|
2881
|
+
end
|
2882
|
+
end
|
2883
|
+
|
2884
|
+
# @api private
|
2885
|
+
def swap_not_undefs(array)
|
2886
|
+
if array.size > 1
|
2887
|
+
parts = array.partition {|t| t.is_a?(PNotUndefType) }
|
2888
|
+
not_undefs = parts[0]
|
2889
|
+
if not_undefs.size > 1
|
2890
|
+
others = parts[1]
|
2891
|
+
others << PNotUndefType.new(PVariantType.maybe_create(not_undefs.map { |not_undef| not_undef.type }).normalize)
|
2892
|
+
array = others
|
2893
|
+
end
|
2894
|
+
end
|
2895
|
+
array
|
2896
|
+
end
|
2897
|
+
|
2898
|
+
# @api private
|
2899
|
+
def merge_enums(array)
|
2900
|
+
if array.size > 1
|
2901
|
+
parts = array.partition {|t| t.is_a?(PEnumType) && !t.values.empty? || t.is_a?(PStringType) && !t.value.nil? }
|
2902
|
+
enums = parts[0]
|
2903
|
+
if enums.size > 1
|
2904
|
+
others = parts[1]
|
2905
|
+
others << PEnumType.new(enums.map { |enum| enum.is_a?(PStringType) ? enum.value : enum.values }.flatten.uniq)
|
2906
|
+
array = others
|
2907
|
+
end
|
2908
|
+
end
|
2909
|
+
array
|
2910
|
+
end
|
2911
|
+
|
2912
|
+
# @api private
|
2913
|
+
def merge_patterns(array)
|
2914
|
+
if array.size > 1
|
2915
|
+
parts = array.partition {|t| t.is_a?(PPatternType) }
|
2916
|
+
patterns = parts[0]
|
2917
|
+
if patterns.size > 1
|
2918
|
+
others = parts[1]
|
2919
|
+
others << PPatternType.new(patterns.map { |pattern| pattern.patterns }.flatten.uniq)
|
2920
|
+
array = others
|
2921
|
+
end
|
2922
|
+
end
|
2923
|
+
array
|
2924
|
+
end
|
2925
|
+
|
2926
|
+
# @api private
|
2927
|
+
def merge_numbers(clazz, array)
|
2928
|
+
if array.size > 1
|
2929
|
+
parts = array.partition {|t| t.is_a?(clazz) }
|
2930
|
+
ranges = parts[0]
|
2931
|
+
array = merge_ranges(ranges) + parts[1] if ranges.size > 1
|
2932
|
+
end
|
2933
|
+
array
|
2934
|
+
end
|
2935
|
+
|
2936
|
+
def merge_version_ranges(array)
|
2937
|
+
if array.size > 1
|
2938
|
+
parts = array.partition {|t| t.is_a?(PSemVerType) }
|
2939
|
+
ranges = parts[0]
|
2940
|
+
array = [PSemVerType.new(ranges.map(&:ranges).flatten)] + parts[1] if ranges.size > 1
|
2941
|
+
end
|
2942
|
+
array
|
2943
|
+
end
|
2944
|
+
|
2945
|
+
# @api private
|
2946
|
+
def merge_ranges(ranges)
|
2947
|
+
result = []
|
2948
|
+
until ranges.empty?
|
2949
|
+
unmerged = []
|
2950
|
+
x = ranges.pop
|
2951
|
+
result << ranges.inject(x) do |memo, y|
|
2952
|
+
merged = memo.merge(y)
|
2953
|
+
if merged.nil?
|
2954
|
+
unmerged << y
|
2955
|
+
else
|
2956
|
+
memo = merged
|
2957
|
+
end
|
2958
|
+
memo
|
2959
|
+
end
|
2960
|
+
ranges = unmerged
|
2961
|
+
end
|
2962
|
+
result
|
2963
|
+
end
|
2964
|
+
end
|
2965
|
+
|
2966
|
+
# Abstract representation of a type that can be placed in a Catalog.
|
2967
|
+
# @api public
|
2968
|
+
#
|
2969
|
+
class PCatalogEntryType < PAnyType
|
2970
|
+
def self.register_ptype(loader, ir)
|
2971
|
+
create_ptype(loader, ir, 'AnyType')
|
2972
|
+
end
|
2973
|
+
|
2974
|
+
DEFAULT = PCatalogEntryType.new
|
2975
|
+
|
2976
|
+
def instance?(o, guard = nil)
|
2977
|
+
assignable?(TypeCalculator.infer(o), guard)
|
2978
|
+
end
|
2979
|
+
|
2980
|
+
protected
|
2981
|
+
# @api private
|
2982
|
+
def _assignable?(o, guard)
|
2983
|
+
o.is_a?(PCatalogEntryType)
|
2984
|
+
end
|
2985
|
+
end
|
2986
|
+
|
2987
|
+
# Represents a (host-) class in the Puppet Language.
|
2988
|
+
# @api public
|
2989
|
+
#
|
2990
|
+
class PHostClassType < PCatalogEntryType
|
2991
|
+
attr_reader :class_name
|
2992
|
+
|
2993
|
+
def self.register_ptype(loader, ir)
|
2994
|
+
create_ptype(loader, ir, 'CatalogEntryType',
|
2995
|
+
'class_name' => {
|
2996
|
+
KEY_TYPE => POptionalType.new(PStringType::NON_EMPTY),
|
2997
|
+
KEY_VALUE => nil
|
2998
|
+
}
|
2999
|
+
)
|
3000
|
+
end
|
3001
|
+
|
3002
|
+
NAME = 'Class'.freeze
|
3003
|
+
|
3004
|
+
def initialize(class_name)
|
3005
|
+
@class_name = class_name
|
3006
|
+
end
|
3007
|
+
|
3008
|
+
def hash
|
3009
|
+
11 ^ @class_name.hash
|
3010
|
+
end
|
3011
|
+
def eql?(o)
|
3012
|
+
self.class == o.class && @class_name == o.class_name
|
3013
|
+
end
|
3014
|
+
|
3015
|
+
def self.simple_name
|
3016
|
+
NAME
|
3017
|
+
end
|
3018
|
+
|
3019
|
+
DEFAULT = PHostClassType.new(nil)
|
3020
|
+
|
3021
|
+
protected
|
3022
|
+
|
3023
|
+
# @api private
|
3024
|
+
def _assignable?(o, guard)
|
3025
|
+
return false unless o.is_a?(PHostClassType)
|
3026
|
+
# Class = Class[name}, Class[name] != Class
|
3027
|
+
return true if @class_name.nil?
|
3028
|
+
# Class[name] = Class[name]
|
3029
|
+
@class_name == o.class_name
|
3030
|
+
end
|
3031
|
+
end
|
3032
|
+
|
3033
|
+
# Represents a Resource Type in the Puppet Language
|
3034
|
+
# @api public
|
3035
|
+
#
|
3036
|
+
class PResourceType < PCatalogEntryType
|
3037
|
+
|
3038
|
+
def self.register_ptype(loader, ir)
|
3039
|
+
create_ptype(loader, ir, 'CatalogEntryType',
|
3040
|
+
'type_name' => {
|
3041
|
+
KEY_TYPE => POptionalType.new(PStringType::NON_EMPTY),
|
3042
|
+
KEY_VALUE => nil
|
3043
|
+
},
|
3044
|
+
'title' => {
|
3045
|
+
KEY_TYPE => POptionalType.new(PStringType::NON_EMPTY),
|
3046
|
+
KEY_VALUE => nil
|
3047
|
+
}
|
3048
|
+
)
|
3049
|
+
end
|
3050
|
+
|
3051
|
+
attr_reader :type_name, :title, :downcased_name
|
3052
|
+
|
3053
|
+
def initialize(type_name, title = nil)
|
3054
|
+
@type_name = type_name.freeze
|
3055
|
+
@title = title.freeze
|
3056
|
+
@downcased_name = type_name.nil? ? nil : @type_name.downcase.freeze
|
3057
|
+
end
|
3058
|
+
|
3059
|
+
def eql?(o)
|
3060
|
+
self.class == o.class && @downcased_name == o.downcased_name && @title == o.title
|
3061
|
+
end
|
3062
|
+
|
3063
|
+
def hash
|
3064
|
+
@downcased_name.hash ^ @title.hash
|
3065
|
+
end
|
3066
|
+
|
3067
|
+
DEFAULT = PResourceType.new(nil)
|
3068
|
+
|
3069
|
+
protected
|
3070
|
+
|
3071
|
+
# @api private
|
3072
|
+
def _assignable?(o, guard)
|
3073
|
+
o.is_a?(PResourceType) && (@downcased_name.nil? || @downcased_name == o.downcased_name && (@title.nil? || @title == o.title))
|
3074
|
+
end
|
3075
|
+
end
|
3076
|
+
|
3077
|
+
# Represents a type that accept PUndefType instead of the type parameter
|
3078
|
+
# required_type - is a short hand for Variant[T, Undef]
|
3079
|
+
# @api public
|
3080
|
+
#
|
3081
|
+
class POptionalType < PTypeWithContainedType
|
3082
|
+
|
3083
|
+
def self.register_ptype(loader, ir)
|
3084
|
+
create_ptype(loader, ir, 'AnyType',
|
3085
|
+
'type' => {
|
3086
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
3087
|
+
KEY_VALUE => nil
|
3088
|
+
}
|
3089
|
+
)
|
3090
|
+
end
|
3091
|
+
|
3092
|
+
def optional_type
|
3093
|
+
@type
|
3094
|
+
end
|
3095
|
+
|
3096
|
+
def kind_of_callable?(optional=true, guard = nil)
|
3097
|
+
optional && !@type.nil? && @type.kind_of_callable?(optional, guard)
|
3098
|
+
end
|
3099
|
+
|
3100
|
+
def instance?(o, guard = nil)
|
3101
|
+
PUndefType::DEFAULT.instance?(o, guard) || (!@type.nil? && @type.instance?(o, guard))
|
3102
|
+
end
|
3103
|
+
|
3104
|
+
def normalize(guard = nil)
|
3105
|
+
n = super
|
3106
|
+
if n.type.nil?
|
3107
|
+
n
|
3108
|
+
else
|
3109
|
+
if n.type.is_a?(PNotUndefType)
|
3110
|
+
# No point in having an NotUndef in an Optional
|
3111
|
+
POptionalType.new(n.type.type).normalize
|
3112
|
+
elsif n.type.assignable?(PUndefType::DEFAULT)
|
3113
|
+
# THe type is Optional anyway, so it can be stripped of
|
3114
|
+
n.type
|
3115
|
+
else
|
3116
|
+
n
|
3117
|
+
end
|
3118
|
+
end
|
3119
|
+
end
|
3120
|
+
|
3121
|
+
def new_function(loader)
|
3122
|
+
optional_type.new_function(loader)
|
3123
|
+
end
|
3124
|
+
|
3125
|
+
DEFAULT = POptionalType.new(nil)
|
3126
|
+
|
3127
|
+
protected
|
3128
|
+
|
3129
|
+
# @api private
|
3130
|
+
def _assignable?(o, guard)
|
3131
|
+
return true if o.is_a?(PUndefType)
|
3132
|
+
return true if @type.nil?
|
3133
|
+
if o.is_a?(POptionalType)
|
3134
|
+
@type.assignable?(o.optional_type, guard)
|
3135
|
+
else
|
3136
|
+
@type.assignable?(o, guard)
|
3137
|
+
end
|
3138
|
+
end
|
3139
|
+
end
|
3140
|
+
|
3141
|
+
class PTypeReferenceType < PAnyType
|
3142
|
+
|
3143
|
+
def self.register_ptype(loader, ir)
|
3144
|
+
create_ptype(loader, ir, 'AnyType', 'type_string' => PStringType::NON_EMPTY)
|
3145
|
+
end
|
3146
|
+
|
3147
|
+
attr_reader :type_string
|
3148
|
+
|
3149
|
+
def initialize(type_string)
|
3150
|
+
@type_string = type_string
|
3151
|
+
end
|
3152
|
+
|
3153
|
+
def callable?(args)
|
3154
|
+
false
|
3155
|
+
end
|
3156
|
+
|
3157
|
+
def instance?(o, guard = nil)
|
3158
|
+
false
|
3159
|
+
end
|
3160
|
+
|
3161
|
+
def hash
|
3162
|
+
@type_string.hash
|
3163
|
+
end
|
3164
|
+
|
3165
|
+
def eql?(o)
|
3166
|
+
super && o.type_string == @type_string
|
3167
|
+
end
|
3168
|
+
|
3169
|
+
def resolve(type_parser, loader)
|
3170
|
+
type_parser.parse(@type_string, loader)
|
3171
|
+
end
|
3172
|
+
|
3173
|
+
protected
|
3174
|
+
|
3175
|
+
def _assignable?(o, guard)
|
3176
|
+
# A type must be assignable to itself or a lot of unit tests will break
|
3177
|
+
o == self
|
3178
|
+
end
|
3179
|
+
|
3180
|
+
DEFAULT = PTypeReferenceType.new('UnresolvedReference')
|
3181
|
+
end
|
3182
|
+
|
3183
|
+
# Describes a named alias for another Type.
|
3184
|
+
# The alias is created with a name and an unresolved type expression. The type expression may
|
3185
|
+
# in turn contain other aliases (including the alias that contains it) which means that an alias
|
3186
|
+
# might contain self recursion. Whether or not that is the case is computed and remembered when the alias
|
3187
|
+
# is resolved since guarding against self recursive constructs is relatively expensive.
|
3188
|
+
#
|
3189
|
+
# @api public
|
3190
|
+
class PTypeAliasType < PAnyType
|
3191
|
+
|
3192
|
+
def self.register_ptype(loader, ir)
|
3193
|
+
create_ptype(loader, ir, 'AnyType',
|
3194
|
+
'name' => PStringType::NON_EMPTY,
|
3195
|
+
'type_expr' => PAnyType::DEFAULT,
|
3196
|
+
'resolved_type' => {
|
3197
|
+
KEY_TYPE => POptionalType.new(PType::DEFAULT),
|
3198
|
+
KEY_VALUE => nil
|
3199
|
+
}
|
3200
|
+
)
|
3201
|
+
end
|
3202
|
+
|
3203
|
+
attr_reader :name
|
3204
|
+
|
3205
|
+
# @param name [String] The name of the type
|
3206
|
+
# @param type_expr [Model::PopsObject] The expression that describes the aliased type
|
3207
|
+
# @param resolved_type [PAnyType] the resolve type (only used for the DEFAULT initialization)
|
3208
|
+
def initialize(name, type_expr, resolved_type = nil)
|
3209
|
+
@name = name
|
3210
|
+
@type_expr = type_expr
|
3211
|
+
@resolved_type = resolved_type
|
3212
|
+
@self_recursion = false
|
3213
|
+
end
|
3214
|
+
|
3215
|
+
def assignable?(o, guard = nil)
|
3216
|
+
if @self_recursion
|
3217
|
+
guard ||= RecursionGuard.new
|
3218
|
+
guard.with_this(self) { |state| state == RecursionGuard::SELF_RECURSION_IN_BOTH ? true : super(o, guard) }
|
3219
|
+
else
|
3220
|
+
super(o, guard)
|
3221
|
+
end
|
3222
|
+
end
|
3223
|
+
|
3224
|
+
# Returns the resolved type. The type must have been resolved by a call prior to calls to this
|
3225
|
+
# method or an error will be raised.
|
3226
|
+
#
|
3227
|
+
# @return [PAnyType] The resolved type of this alias.
|
3228
|
+
# @raise [Puppet::Error] unless the type has been resolved prior to calling this method
|
3229
|
+
def resolved_type
|
3230
|
+
raise Puppet::Error, "Reference to unresolved type #{@name}" unless @resolved_type
|
3231
|
+
@resolved_type
|
3232
|
+
end
|
3233
|
+
|
3234
|
+
def callable_args?(callable, guard)
|
3235
|
+
guarded_recursion(guard, false) { |g| resolved_type.callable_args?(callable, g) }
|
3236
|
+
end
|
3237
|
+
|
3238
|
+
def check_self_recursion(originator)
|
3239
|
+
resolved_type.check_self_recursion(originator) unless originator.equal?(self)
|
3240
|
+
end
|
3241
|
+
|
3242
|
+
def kind_of_callable?(optional=true, guard = nil)
|
3243
|
+
guarded_recursion(guard, false) { |g| resolved_type.kind_of_callable?(optional, g) }
|
3244
|
+
end
|
3245
|
+
|
3246
|
+
def instance?(o, guard = nil)
|
3247
|
+
really_instance?(o, guard) == 1
|
3248
|
+
end
|
3249
|
+
|
3250
|
+
def iterable?(guard = nil)
|
3251
|
+
guarded_recursion(guard, false) { |g| resolved_type.iterable?(g) }
|
3252
|
+
end
|
3253
|
+
|
3254
|
+
def iterable_type(guard = nil)
|
3255
|
+
guarded_recursion(guard, nil) { |g| resolved_type.iterable_type(g) }
|
3256
|
+
end
|
3257
|
+
|
3258
|
+
def hash
|
3259
|
+
@name.hash
|
3260
|
+
end
|
3261
|
+
|
3262
|
+
# Acceptor used when checking for self recursion and that a type contains
|
3263
|
+
# something other than aliases or type references
|
3264
|
+
#
|
3265
|
+
# @api private
|
3266
|
+
class AssertOtherTypeAcceptor
|
3267
|
+
def initialize
|
3268
|
+
@other_type_detected = false
|
3269
|
+
end
|
3270
|
+
|
3271
|
+
def visit(type, _)
|
3272
|
+
unless type.is_a?(PTypeAliasType) || type.is_a?(PVariantType)
|
3273
|
+
@other_type_detected = true
|
3274
|
+
end
|
3275
|
+
end
|
3276
|
+
|
3277
|
+
def other_type_detected?
|
3278
|
+
@other_type_detected
|
3279
|
+
end
|
3280
|
+
end
|
3281
|
+
|
3282
|
+
# Acceptor used when re-checking for self recursion after a self recursion has been detected
|
3283
|
+
#
|
3284
|
+
# @api private
|
3285
|
+
class AssertSelfRecursionStatusAcceptor
|
3286
|
+
def visit(type, _)
|
3287
|
+
type.set_self_recursion_status if type.is_a?(PTypeAliasType)
|
3288
|
+
end
|
3289
|
+
end
|
3290
|
+
|
3291
|
+
def set_self_recursion_status
|
3292
|
+
return if @self_recursion || @resolved_type.is_a?(PTypeReferenceType)
|
3293
|
+
@self_recursion = true
|
3294
|
+
guard = RecursionGuard.new
|
3295
|
+
accept(NoopTypeAcceptor::INSTANCE, guard)
|
3296
|
+
@self_recursion = guard.recursive_this?(self)
|
3297
|
+
when_self_recursion_detected if @self_recursion # no difference
|
3298
|
+
end
|
3299
|
+
|
3300
|
+
# Called from the TypeParser once it has found a type using the Loader. The TypeParser will
|
3301
|
+
# interpret the contained expression and the resolved type is remembered. This method also
|
3302
|
+
# checks and remembers if the resolve type contains self recursion.
|
3303
|
+
#
|
3304
|
+
# @param type_parser [TypeParser] type parser that will interpret the type expression
|
3305
|
+
# @param loader [Loader::Loader] loader to use when loading type aliases
|
3306
|
+
# @return [PTypeAliasType] the receiver of the call, i.e. `self`
|
3307
|
+
# @api private
|
3308
|
+
def resolve(type_parser, loader)
|
3309
|
+
if @resolved_type.nil?
|
3310
|
+
# resolved to PTypeReferenceType::DEFAULT during resolve to avoid endless recursion
|
3311
|
+
@resolved_type = PTypeReferenceType::DEFAULT
|
3312
|
+
@self_recursion = true # assumed while it being found out below
|
3313
|
+
begin
|
3314
|
+
if @type_expr.is_a?(PTypeReferenceType)
|
3315
|
+
@resolved_type = @type_expr.resolve(type_parser, loader)
|
3316
|
+
else
|
3317
|
+
@resolved_type = type_parser.interpret(@type_expr, loader).normalize
|
3318
|
+
end
|
3319
|
+
|
3320
|
+
# Find out if this type is recursive. A recursive type has performance implications
|
3321
|
+
# on several methods and this knowledge is used to avoid that for non-recursive
|
3322
|
+
# types.
|
3323
|
+
guard = RecursionGuard.new
|
3324
|
+
real_type_asserter = AssertOtherTypeAcceptor.new
|
3325
|
+
accept(real_type_asserter, guard)
|
3326
|
+
unless real_type_asserter.other_type_detected?
|
3327
|
+
raise ArgumentError, "Type alias '#{name}' cannot be resolved to a real type"
|
3328
|
+
end
|
3329
|
+
@self_recursion = guard.recursive_this?(self)
|
3330
|
+
# All aliases involved must re-check status since this alias is now resolved
|
3331
|
+
if @self_recursion
|
3332
|
+
accept(AssertSelfRecursionStatusAcceptor.new, RecursionGuard.new)
|
3333
|
+
when_self_recursion_detected
|
3334
|
+
end
|
3335
|
+
rescue
|
3336
|
+
@resolved_type = nil
|
3337
|
+
raise
|
3338
|
+
end
|
3339
|
+
else
|
3340
|
+
# An alias may appoint an Object type that isn't resolved yet. The default type
|
3341
|
+
# reference is used to prevent endless recursion and should not be resolved here.
|
3342
|
+
@resolved_type.resolve(type_parser, loader) unless @resolved_type.equal?(PTypeReferenceType::DEFAULT)
|
3343
|
+
end
|
3344
|
+
self
|
3345
|
+
end
|
3346
|
+
|
3347
|
+
def eql?(o)
|
3348
|
+
super && o.name == @name
|
3349
|
+
end
|
3350
|
+
|
3351
|
+
def accept(visitor, guard)
|
3352
|
+
guarded_recursion(guard, nil) do |g|
|
3353
|
+
super(visitor, g)
|
3354
|
+
@resolved_type.accept(visitor, g) unless @resolved_type.nil?
|
3355
|
+
end
|
3356
|
+
end
|
3357
|
+
|
3358
|
+
def self_recursion?
|
3359
|
+
@self_recursion
|
3360
|
+
end
|
3361
|
+
|
3362
|
+
# Returns the expanded string the form of the alias, e.g. <alias name> = <resolved type>
|
3363
|
+
#
|
3364
|
+
# @return [String] the expanded form of this alias
|
3365
|
+
# @api public
|
3366
|
+
def to_s
|
3367
|
+
TypeFormatter.singleton.alias_expanded_string(self)
|
3368
|
+
end
|
3369
|
+
|
3370
|
+
# Delegates to resolved type
|
3371
|
+
def respond_to_missing?(name, include_private)
|
3372
|
+
resolved_type.respond_to?(name, include_private)
|
3373
|
+
end
|
3374
|
+
|
3375
|
+
# Delegates to resolved type
|
3376
|
+
def method_missing(name, *arguments, &block)
|
3377
|
+
super if @resolved_type.equal?(PTypeReferenceType::DEFAULT)
|
3378
|
+
resolved_type.send(name, *arguments, &block)
|
3379
|
+
end
|
3380
|
+
|
3381
|
+
# @api private
|
3382
|
+
def really_instance?(o, guard = nil)
|
3383
|
+
if @self_recursion
|
3384
|
+
guard ||= RecursionGuard.new
|
3385
|
+
guard.with_that(o) do
|
3386
|
+
guard.with_this(self) { |state| state == RecursionGuard::SELF_RECURSION_IN_BOTH ? 0 : resolved_type.really_instance?(o, guard) }
|
3387
|
+
end
|
3388
|
+
else
|
3389
|
+
resolved_type.really_instance?(o, guard)
|
3390
|
+
end
|
3391
|
+
end
|
3392
|
+
|
3393
|
+
# @return `nil` to prevent serialization of the type_expr used when first initializing this instance
|
3394
|
+
# @api private
|
3395
|
+
def type_expr
|
3396
|
+
nil
|
3397
|
+
end
|
3398
|
+
|
3399
|
+
protected
|
3400
|
+
|
3401
|
+
def _assignable?(o, guard)
|
3402
|
+
resolved_type.assignable?(o, guard)
|
3403
|
+
end
|
3404
|
+
|
3405
|
+
def new_function(loader)
|
3406
|
+
resolved_type.new_function(loader)
|
3407
|
+
end
|
3408
|
+
|
3409
|
+
private
|
3410
|
+
|
3411
|
+
def guarded_recursion(guard, dflt)
|
3412
|
+
if @self_recursion
|
3413
|
+
guard ||= RecursionGuard.new
|
3414
|
+
guard.with_this(self) { |state| (state & RecursionGuard::SELF_RECURSION_IN_THIS) == 0 ? yield(guard) : dflt }
|
3415
|
+
else
|
3416
|
+
yield(guard)
|
3417
|
+
end
|
3418
|
+
end
|
3419
|
+
|
3420
|
+
def when_self_recursion_detected
|
3421
|
+
if @resolved_type.is_a?(PVariantType)
|
3422
|
+
# Drop variants that are not real types
|
3423
|
+
resolved_types = @resolved_type.types
|
3424
|
+
real_types = resolved_types.select do |type|
|
3425
|
+
next false if type == self
|
3426
|
+
real_type_asserter = AssertOtherTypeAcceptor.new
|
3427
|
+
type.accept(real_type_asserter, RecursionGuard.new)
|
3428
|
+
real_type_asserter.other_type_detected?
|
3429
|
+
end
|
3430
|
+
if real_types.size != resolved_types.size
|
3431
|
+
if real_types.size == 1
|
3432
|
+
@resolved_type = real_types[0]
|
3433
|
+
else
|
3434
|
+
@resolved_type = PVariantType.maybe_create(real_types)
|
3435
|
+
end
|
3436
|
+
# Drop self recursion status in case it's not self recursive anymore
|
3437
|
+
guard = RecursionGuard.new
|
3438
|
+
accept(NoopTypeAcceptor::INSTANCE, guard)
|
3439
|
+
@self_recursion = guard.recursive_this?(self)
|
3440
|
+
end
|
3441
|
+
end
|
3442
|
+
@resolved_type.check_self_recursion(self) if @self_recursion
|
3443
|
+
end
|
3444
|
+
|
3445
|
+
DEFAULT = PTypeAliasType.new('UnresolvedAlias', nil, PTypeReferenceType::DEFAULT)
|
3446
|
+
end
|
3447
|
+
end
|
3448
|
+
end
|
3449
|
+
|
3450
|
+
require 'puppet/pops/pcore'
|
3451
|
+
|
3452
|
+
require_relative 'annotatable'
|
3453
|
+
require_relative 'p_meta_type'
|
3454
|
+
require_relative 'p_object_type'
|
3455
|
+
require_relative 'p_runtime_type'
|
3456
|
+
require_relative 'p_sem_ver_type'
|
3457
|
+
require_relative 'p_sem_ver_range_type'
|
3458
|
+
require_relative 'p_sensitive_type'
|
3459
|
+
require_relative 'p_type_set_type'
|
3460
|
+
require_relative 'p_timespan_type'
|
3461
|
+
require_relative 'p_timestamp_type'
|
3462
|
+
require_relative 'p_binary_type'
|
3463
|
+
require_relative 'type_set_reference'
|
3464
|
+
require_relative 'implementation_registry'
|