puppet 3.8.7-x86-mingw32 → 4.0.0.rc1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/CONTRIBUTING.md +26 -11
- data/Gemfile +13 -25
- data/LICENSE +1 -1
- data/Rakefile +9 -0
- data/bin/puppet +7 -6
- data/conf/auth.conf +30 -26
- data/conf/environment.conf +16 -0
- data/conf/fileserver.conf +2 -2
- data/conf/puppet.conf +6 -0
- data/ext/README.environment +1 -1
- data/ext/build_defaults.yaml +16 -7
- data/ext/debian/control +5 -5
- data/ext/debian/puppet-common.manpages +0 -5
- data/ext/debian/puppet-common.postinst +3 -3
- data/ext/debian/puppet.init +23 -12
- data/ext/debian/puppet.logrotate +1 -2
- data/ext/debian/puppetmaster-common.postinst +6 -0
- data/ext/debian/puppetmaster.init +5 -5
- data/ext/debian/rules +4 -1
- data/ext/debian/vim-puppet.dirs +2 -0
- data/ext/debian/vim-puppet.yaml +2 -0
- data/ext/emacs/puppet-mode.el +0 -1
- data/ext/gentoo/conf.d/puppet +1 -1
- data/ext/gentoo/conf.d/puppetmaster +1 -1
- data/ext/nagios/check_puppet.rb +1 -1
- data/ext/project_data.yaml +6 -7
- data/ext/puppet-nm-dispatcher +13 -0
- data/ext/puppet-test +0 -66
- data/ext/puppetlisten/puppetlisten.rb +7 -5
- data/ext/rack/config.ru +12 -5
- data/ext/redhat/client.init +3 -3
- data/ext/redhat/logrotate +1 -2
- data/ext/redhat/puppet.spec.erb +12 -8
- data/ext/redhat/server.init +1 -1
- data/ext/regexp_nodes/regexp_nodes.rb +1 -1
- data/ext/solaris/smf/svc-puppetd +1 -1
- data/ext/solaris/smf/svc-puppetmasterd +1 -1
- data/ext/suse/client.init +1 -1
- data/ext/suse/server.init +1 -1
- data/ext/systemd/puppet.service +1 -3
- data/ext/vim/syntax/puppet.vim +1 -1
- data/ext/windows/service/daemon.rb +19 -2
- data/install.rb +63 -7
- data/lib/hiera/puppet_function.rb +7 -18
- data/lib/hiera/scope.rb +4 -1
- data/lib/puppet.rb +19 -51
- data/lib/puppet/agent.rb +2 -6
- data/lib/puppet/application.rb +14 -65
- data/lib/puppet/application/agent.rb +7 -56
- data/lib/puppet/application/apply.rb +1 -6
- data/lib/puppet/application/ca.rb +5 -0
- data/lib/puppet/application/cert.rb +7 -3
- data/lib/puppet/application/certificate.rb +2 -0
- data/lib/puppet/application/device.rb +10 -36
- data/lib/puppet/application/doc.rb +16 -63
- data/lib/puppet/application/epp.rb +5 -0
- data/lib/puppet/application/face_base.rb +24 -5
- data/lib/puppet/application/master.rb +2 -5
- data/lib/puppet/application/resource.rb +17 -17
- data/lib/puppet/application_support.rb +57 -0
- data/lib/puppet/configurer.rb +3 -7
- data/lib/puppet/configurer/downloader.rb +1 -0
- data/lib/puppet/configurer/fact_handler.rb +1 -1
- data/lib/puppet/daemon.rb +6 -15
- data/lib/puppet/data_providers.rb +28 -0
- data/lib/puppet/data_providers/data_adapter.rb +86 -0
- data/lib/puppet/data_providers/data_function_support.rb +32 -0
- data/lib/puppet/data_providers/function_env_data_provider.rb +28 -0
- data/lib/puppet/data_providers/function_module_data_provider.rb +44 -0
- data/lib/puppet/defaults.rb +135 -530
- data/lib/puppet/environments.rb +10 -156
- data/lib/puppet/error.rb +4 -30
- data/lib/puppet/external/nagios/base.rb +2 -2
- data/lib/puppet/external/pson/common.rb +2 -17
- data/lib/puppet/external/pson/pure/generator.rb +1 -0
- data/lib/puppet/external/pson/pure/parser.rb +0 -11
- data/lib/puppet/face/catalog.rb +4 -4
- data/lib/puppet/face/certificate.rb +2 -3
- data/lib/puppet/face/certificate_request.rb +4 -3
- data/lib/puppet/face/certificate_revocation_list.rb +5 -9
- data/lib/puppet/face/config.rb +2 -2
- data/lib/puppet/face/epp.rb +479 -0
- data/lib/puppet/face/facts.rb +6 -49
- data/lib/puppet/face/file.rb +2 -2
- data/lib/puppet/face/file/download.rb +1 -2
- data/lib/puppet/face/help.rb +2 -3
- data/lib/puppet/face/module/build.rb +5 -5
- data/lib/puppet/face/module/changes.rb +1 -1
- data/lib/puppet/face/module/generate.rb +6 -6
- data/lib/puppet/face/module/install.rb +16 -16
- data/lib/puppet/face/module/list.rb +9 -9
- data/lib/puppet/face/module/uninstall.rb +5 -5
- data/lib/puppet/face/module/upgrade.rb +3 -3
- data/lib/puppet/face/node.rb +3 -4
- data/lib/puppet/face/node/clean.rb +5 -68
- data/lib/puppet/face/parser.rb +6 -8
- data/lib/puppet/face/report.rb +4 -4
- data/lib/puppet/face/resource.rb +1 -1
- data/lib/puppet/face/resource_type.rb +7 -4
- data/lib/puppet/face/status.rb +6 -12
- data/lib/puppet/feature/base.rb +0 -7
- data/lib/puppet/file_bucket/dipper.rb +1 -2
- data/lib/puppet/file_bucket/file.rb +12 -25
- data/lib/puppet/file_serving/base.rb +1 -11
- data/lib/puppet/file_serving/content.rb +5 -7
- data/lib/puppet/file_serving/metadata.rb +4 -61
- data/lib/puppet/file_serving/mount/pluginfacts.rb +1 -1
- data/lib/puppet/file_serving/mount/plugins.rb +1 -1
- data/lib/puppet/file_serving/terminus_helper.rb +16 -5
- data/lib/puppet/file_system.rb +6 -22
- data/lib/puppet/file_system/file_impl.rb +0 -4
- data/lib/puppet/file_system/memory_file.rb +0 -5
- data/lib/puppet/file_system/memory_impl.rb +0 -4
- data/lib/puppet/file_system/{file19.rb → posix.rb} +1 -1
- data/lib/puppet/file_system/{file19windows.rb → windows.rb} +2 -10
- data/lib/puppet/forge/repository.rb +12 -8
- data/lib/puppet/functions.rb +17 -51
- data/lib/puppet/functions/assert_type.rb +7 -7
- data/lib/puppet/functions/each.rb +1 -3
- data/lib/puppet/functions/epp.rb +3 -3
- data/lib/puppet/functions/filter.rb +3 -5
- data/lib/puppet/functions/hiera.rb +2 -23
- data/lib/puppet/functions/hiera_array.rb +3 -25
- data/lib/puppet/functions/hiera_hash.rb +2 -26
- data/lib/puppet/functions/hiera_include.rb +4 -37
- data/lib/puppet/functions/inline_epp.rb +1 -2
- data/lib/puppet/functions/lookup.rb +234 -0
- data/lib/puppet/functions/map.rb +1 -3
- data/lib/puppet/functions/match.rb +5 -5
- data/lib/puppet/functions/reduce.rb +1 -3
- data/lib/puppet/functions/regsubst.rb +79 -0
- data/lib/puppet/functions/scanf.rb +4 -3
- data/lib/puppet/functions/slice.rb +1 -3
- data/lib/puppet/functions/split.rb +47 -0
- data/lib/puppet/functions/with.rb +1 -1
- data/lib/puppet/graph/relationship_graph.rb +41 -13
- data/lib/puppet/graph/simple_graph.rb +6 -10
- data/lib/puppet/indirector/catalog/compiler.rb +0 -2
- data/lib/puppet/indirector/catalog/static_compiler.rb +4 -5
- data/lib/puppet/indirector/direct_file_server.rb +1 -3
- data/lib/puppet/indirector/face.rb +11 -2
- data/lib/puppet/indirector/facts/facter.rb +5 -1
- data/lib/puppet/indirector/facts/network_device.rb +5 -2
- data/lib/puppet/indirector/facts/store_configs.rb +3 -0
- data/lib/puppet/indirector/facts/yaml.rb +4 -0
- data/lib/puppet/indirector/file_metadata/file.rb +0 -15
- data/lib/puppet/indirector/file_server.rb +2 -16
- data/lib/puppet/indirector/hiera.rb +39 -1
- data/lib/puppet/indirector/indirection.rb +2 -9
- data/lib/puppet/indirector/node/ldap.rb +1 -1
- data/lib/puppet/indirector/request.rb +21 -81
- data/lib/puppet/indirector/resource/ral.rb +1 -2
- data/lib/puppet/indirector/resource/store_configs.rb +1 -2
- data/lib/puppet/indirector/resource_type/parser.rb +1 -1
- data/lib/puppet/indirector/rest.rb +21 -33
- data/lib/puppet/interface.rb +0 -7
- data/lib/puppet/interface/action_builder.rb +1 -1
- data/lib/puppet/interface/action_manager.rb +9 -13
- data/lib/puppet/interface/face_collection.rb +2 -2
- data/lib/puppet/interface/option_builder.rb +1 -3
- data/lib/puppet/metatype/manager.rb +1 -7
- data/lib/puppet/module.rb +42 -35
- data/lib/puppet/module_tool.rb +5 -7
- data/lib/puppet/module_tool/applications/application.rb +3 -10
- data/lib/puppet/module_tool/applications/installer.rb +13 -15
- data/lib/puppet/module_tool/applications/unpacker.rb +1 -1
- data/lib/puppet/module_tool/applications/upgrader.rb +9 -11
- data/lib/puppet/module_tool/contents_description.rb +17 -13
- data/lib/puppet/module_tool/installed_modules.rb +4 -6
- data/lib/puppet/module_tool/metadata.rb +3 -14
- data/lib/puppet/module_tool/skeleton/templates/generator/Gemfile +3 -3
- data/lib/puppet/module_tool/skeleton/templates/generator/Rakefile +0 -1
- data/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb +1 -1
- data/lib/puppet/module_tool/tar/gnu.rb +1 -1
- data/lib/puppet/module_tool/tar/mini.rb +2 -2
- data/lib/puppet/network/auth_config_parser.rb +2 -2
- data/lib/puppet/network/authconfig.rb +32 -16
- data/lib/puppet/network/format_handler.rb +7 -7
- data/lib/puppet/network/format_support.rb +4 -0
- data/lib/puppet/network/formats.rb +6 -62
- data/lib/puppet/network/http.rb +12 -2
- data/lib/puppet/network/http/api.rb +42 -0
- data/lib/puppet/network/http/api/ca.rb +2 -0
- data/lib/puppet/network/http/api/ca/v1.rb +11 -0
- data/lib/puppet/network/http/api/{v1.rb → indirected_routes.rb} +57 -29
- data/lib/puppet/network/http/api/indirection_type.rb +32 -0
- data/lib/puppet/network/http/api/master.rb +2 -0
- data/lib/puppet/network/http/api/master/v3.rb +22 -0
- data/lib/puppet/network/http/api/master/v3/authorization.rb +18 -0
- data/lib/puppet/network/http/api/{v2 → master/v3}/environments.rb +2 -2
- data/lib/puppet/network/http/compression.rb +3 -5
- data/lib/puppet/network/http/connection.rb +1 -8
- data/lib/puppet/network/http/factory.rb +2 -3
- data/lib/puppet/network/http/handler.rb +3 -11
- data/lib/puppet/network/http/rack/rest.rb +4 -4
- data/lib/puppet/network/http/request.rb +4 -4
- data/lib/puppet/network/http/webrick.rb +1 -6
- data/lib/puppet/network/http/webrick/rest.rb +15 -8
- data/lib/puppet/network/resolver.rb +2 -2
- data/lib/puppet/network/rights.rb +2 -2
- data/lib/puppet/node.rb +2 -29
- data/lib/puppet/node/environment.rb +92 -184
- data/lib/puppet/node/facts.rb +22 -44
- data/lib/puppet/parameter.rb +3 -16
- data/lib/puppet/parameter/value.rb +1 -3
- data/lib/puppet/parameter/value_collection.rb +12 -11
- data/lib/puppet/parser.rb +12 -2
- data/lib/puppet/parser/ast.rb +9 -78
- data/lib/puppet/parser/ast/block_expression.rb +11 -36
- data/lib/puppet/parser/ast/branch.rb +15 -18
- data/lib/puppet/parser/ast/hostclass.rb +1 -3
- data/lib/puppet/parser/ast/leaf.rb +55 -212
- data/lib/puppet/parser/ast/node.rb +3 -11
- data/lib/puppet/parser/ast/pops_bridge.rb +2 -7
- data/lib/puppet/parser/ast/resource.rb +14 -20
- data/lib/puppet/parser/ast/resource_instance.rb +4 -7
- data/lib/puppet/parser/ast/resourceparam.rb +21 -22
- data/lib/puppet/parser/compiler.rb +41 -70
- data/lib/puppet/parser/e4_parser_adapter.rb +2 -23
- data/lib/puppet/parser/files.rb +22 -67
- data/lib/puppet/parser/functions.rb +1 -3
- data/lib/puppet/parser/functions/assert_type.rb +1 -2
- data/lib/puppet/parser/functions/contain.rb +5 -3
- data/lib/puppet/parser/functions/create_resources.rb +9 -1
- data/lib/puppet/parser/functions/defined.rb +33 -61
- data/lib/puppet/parser/functions/each.rb +1 -3
- data/lib/puppet/parser/functions/epp.rb +1 -2
- data/lib/puppet/parser/functions/file.rb +1 -3
- data/lib/puppet/parser/functions/filter.rb +1 -3
- data/lib/puppet/parser/functions/hiera.rb +4 -6
- data/lib/puppet/parser/functions/hiera_array.rb +4 -6
- data/lib/puppet/parser/functions/hiera_hash.rb +6 -8
- data/lib/puppet/parser/functions/hiera_include.rb +2 -10
- data/lib/puppet/parser/functions/include.rb +4 -2
- data/lib/puppet/parser/functions/lookup.rb +115 -105
- data/lib/puppet/parser/functions/map.rb +1 -3
- data/lib/puppet/parser/functions/match.rb +1 -2
- data/lib/puppet/parser/functions/realize.rb +1 -6
- data/lib/puppet/parser/functions/reduce.rb +1 -3
- data/lib/puppet/parser/functions/regsubst.rb +1 -57
- data/lib/puppet/parser/functions/require.rb +6 -4
- data/lib/puppet/parser/functions/scanf.rb +1 -1
- data/lib/puppet/parser/functions/slice.rb +1 -3
- data/lib/puppet/parser/functions/split.rb +1 -1
- data/lib/puppet/parser/functions/with.rb +1 -2
- data/lib/puppet/parser/parser_factory.rb +5 -21
- data/lib/puppet/parser/relationship.rb +14 -37
- data/lib/puppet/parser/resource.rb +11 -22
- data/lib/puppet/parser/scope.rb +45 -135
- data/lib/puppet/parser/templatewrapper.rb +1 -29
- data/lib/puppet/parser/type_loader.rb +12 -15
- data/lib/puppet/plugins.rb +9 -0
- data/lib/{puppetx/puppet/bindings_scheme_handler.rb → puppet/plugins/binding_schemes.rb} +14 -4
- data/lib/puppet/plugins/configuration.rb +68 -0
- data/lib/puppet/plugins/data_providers.rb +90 -0
- data/lib/{puppetx/puppet/syntax_checker.rb → puppet/plugins/syntax_checkers.rb} +14 -2
- data/lib/puppet/pops.rb +6 -7
- data/lib/puppet/pops/adaptable.rb +16 -5
- data/lib/puppet/pops/binder/binder.rb +5 -4
- data/lib/puppet/pops/binder/bindings_composer.rb +6 -4
- data/lib/puppet/pops/binder/bindings_factory.rb +4 -0
- data/lib/puppet/pops/binder/bindings_label_provider.rb +1 -1
- data/lib/puppet/pops/binder/bindings_loader.rb +3 -8
- data/lib/puppet/pops/binder/bindings_model_dumper.rb +36 -8
- data/lib/puppet/pops/binder/config/binder_config.rb +2 -2
- data/lib/puppet/pops/binder/config/binder_config_checker.rb +1 -1
- data/lib/puppet/pops/binder/config/issues.rb +4 -0
- data/lib/puppet/pops/binder/injector.rb +0 -1
- data/lib/puppet/pops/binder/scheme_handler/symbolic_scheme.rb +1 -1
- data/lib/puppet/pops/evaluator/access_operator.rb +18 -50
- data/lib/puppet/pops/evaluator/callable_mismatch_describer.rb +5 -5
- data/lib/puppet/pops/evaluator/callable_signature.rb +2 -2
- data/lib/puppet/pops/evaluator/closure.rb +16 -21
- data/lib/puppet/pops/evaluator/collector_transformer.rb +11 -1
- data/lib/puppet/pops/evaluator/compare_operator.rb +0 -43
- data/lib/puppet/pops/evaluator/epp_evaluator.rb +1 -1
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +36 -152
- data/lib/puppet/pops/evaluator/external_syntax_support.rb +6 -3
- data/lib/puppet/pops/evaluator/relationship_operator.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_converter.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_support.rb +9 -57
- data/lib/puppet/pops/functions/dispatch.rb +1 -6
- data/lib/puppet/pops/issue_reporter.rb +16 -42
- data/lib/puppet/pops/issues.rb +13 -128
- data/lib/puppet/pops/loader/dependency_loader.rb +3 -3
- data/lib/puppet/pops/loader/loader.rb +21 -20
- data/lib/puppet/pops/loaders.rb +13 -8
- data/lib/puppet/pops/lookup.rb +96 -0
- data/lib/puppet/pops/merge_strategy.rb +283 -0
- data/lib/puppet/pops/model/ast_transformer.rb +4 -522
- data/lib/puppet/pops/model/factory.rb +20 -21
- data/lib/puppet/pops/model/model.rb +1 -1
- data/lib/puppet/pops/model/model_label_provider.rb +1 -1
- data/lib/puppet/pops/model/model_meta.rb +10 -7
- data/lib/puppet/pops/model/tree_dumper.rb +1 -1
- data/lib/puppet/pops/parser/egrammar.ra +1 -13
- data/lib/puppet/pops/parser/eparser.rb +1132 -1272
- data/lib/puppet/pops/parser/epp_support.rb +11 -22
- data/lib/puppet/pops/parser/evaluating_parser.rb +11 -10
- data/lib/puppet/pops/parser/heredoc_support.rb +12 -13
- data/lib/puppet/pops/parser/interpolation_support.rb +1 -7
- data/lib/puppet/pops/parser/lexer2.rb +33 -36
- data/lib/puppet/pops/parser/lexer_support.rb +20 -46
- data/lib/puppet/pops/parser/locator.rb +6 -30
- data/lib/puppet/pops/parser/parser_support.rb +14 -11
- data/lib/puppet/pops/parser/slurp_support.rb +6 -22
- data/lib/puppet/pops/patterns.rb +0 -3
- data/lib/puppet/pops/types/class_loader.rb +8 -8
- data/lib/puppet/pops/types/enumeration.rb +1 -1
- data/lib/puppet/pops/types/type_asserter.rb +45 -0
- data/lib/puppet/pops/types/type_assertion_error.rb +26 -0
- data/lib/puppet/pops/types/type_calculator.rb +110 -212
- data/lib/puppet/pops/types/type_factory.rb +15 -74
- data/lib/puppet/pops/types/type_parser.rb +15 -24
- data/lib/puppet/pops/types/types.rb +25 -35
- data/lib/puppet/pops/types/types_meta.rb +2 -13
- data/lib/puppet/pops/utils.rb +1 -1
- data/lib/puppet/pops/validation.rb +3 -26
- data/lib/puppet/pops/validation/checker4_0.rb +6 -56
- data/lib/puppet/pops/validation/validator_factory_4_0.rb +1 -3
- data/lib/puppet/pops/visitor.rb +10 -7
- data/lib/puppet/property.rb +44 -124
- data/lib/puppet/provider.rb +0 -52
- data/lib/puppet/provider/aixobject.rb +2 -2
- data/lib/puppet/provider/augeas/augeas.rb +9 -6
- data/lib/puppet/provider/command.rb +1 -1
- data/lib/puppet/provider/cron/crontab.rb +37 -0
- data/lib/puppet/provider/exec.rb +2 -16
- data/lib/puppet/provider/file/posix.rb +1 -1
- data/lib/puppet/provider/file/windows.rb +1 -1
- data/lib/puppet/provider/group/aix.rb +1 -1
- data/lib/puppet/provider/group/pw.rb +0 -1
- data/lib/puppet/provider/group/windows_adsi.rb +4 -18
- data/lib/puppet/provider/host/parsed.rb +4 -2
- data/lib/puppet/provider/macauthorization/macauthorization.rb +0 -12
- data/lib/puppet/provider/mailalias/aliases.rb +23 -12
- data/lib/puppet/provider/mount/parsed.rb +2 -145
- data/lib/puppet/provider/nameservice/directoryservice.rb +57 -131
- data/lib/puppet/provider/network_device.rb +3 -0
- data/lib/puppet/provider/package/appdmg.rb +5 -2
- data/lib/puppet/provider/package/apt.rb +1 -1
- data/lib/puppet/provider/package/fink.rb +1 -1
- data/lib/puppet/provider/package/openbsd.rb +26 -12
- data/lib/puppet/provider/package/opkg.rb +6 -1
- data/lib/puppet/provider/package/pacman.rb +159 -127
- data/lib/puppet/provider/package/pip.rb +1 -11
- data/lib/puppet/provider/package/pkg.rb +73 -29
- data/lib/puppet/provider/package/pkgdmg.rb +2 -2
- data/lib/puppet/provider/package/pkgin.rb +1 -1
- data/lib/puppet/provider/package/portage.rb +5 -1
- data/lib/puppet/provider/package/portupgrade.rb +0 -2
- data/lib/puppet/provider/package/rpm.rb +109 -0
- data/lib/puppet/provider/package/rug.rb +0 -1
- data/lib/puppet/provider/package/windows/package.rb +1 -1
- data/lib/puppet/provider/package/yum.rb +121 -30
- data/lib/puppet/provider/package/zypper.rb +8 -17
- data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +7 -32
- data/lib/puppet/provider/service/base.rb +17 -3
- data/lib/puppet/provider/service/bsd.rb +1 -1
- data/lib/puppet/provider/service/daemontools.rb +1 -1
- data/lib/puppet/provider/service/init.rb +0 -7
- data/lib/puppet/provider/service/launchd.rb +11 -89
- data/lib/puppet/provider/service/openbsd.rb +56 -298
- data/lib/puppet/provider/service/runit.rb +1 -1
- data/lib/puppet/provider/service/systemd.rb +1 -0
- data/lib/puppet/provider/service/upstart.rb +4 -2
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
- data/lib/puppet/provider/user/aix.rb +1 -1
- data/lib/puppet/provider/user/directoryservice.rb +40 -70
- data/lib/puppet/provider/user/hpux.rb +31 -2
- data/lib/puppet/provider/user/openbsd.rb +74 -0
- data/lib/puppet/provider/user/pw.rb +0 -1
- data/lib/puppet/provider/user/user_role_add.rb +1 -3
- data/lib/puppet/provider/user/windows_adsi.rb +2 -9
- data/lib/puppet/provider/yumrepo/inifile.rb +1 -3
- data/lib/puppet/provider/zfs/zfs.rb +3 -2
- data/lib/puppet/provider/zone/solaris.rb +3 -3
- data/lib/puppet/reference/configuration.rb +4 -3
- data/lib/puppet/reference/metaparameter.rb +0 -9
- data/lib/puppet/reference/providers.rb +1 -1
- data/lib/puppet/reference/type.rb +8 -10
- data/lib/puppet/relationship.rb +4 -17
- data/lib/puppet/resource.rb +132 -114
- data/lib/puppet/resource/catalog.rb +23 -30
- data/lib/puppet/resource/status.rb +74 -22
- data/lib/puppet/resource/type.rb +12 -52
- data/lib/puppet/resource/type_collection.rb +26 -73
- data/lib/puppet/settings.rb +94 -153
- data/lib/puppet/settings/base_setting.rb +6 -30
- data/lib/puppet/settings/config_file.rb +14 -11
- data/lib/puppet/settings/duration_setting.rb +1 -1
- data/lib/puppet/settings/environment_conf.rb +14 -12
- data/lib/puppet/settings/file_setting.rb +9 -10
- data/lib/puppet/settings/ttl_setting.rb +1 -3
- data/lib/puppet/ssl/certificate.rb +38 -8
- data/lib/puppet/ssl/certificate_authority/interface.rb +7 -1
- data/lib/puppet/ssl/certificate_factory.rb +3 -3
- data/lib/puppet/ssl/certificate_request.rb +36 -8
- data/lib/puppet/ssl/configuration.rb +2 -8
- data/lib/puppet/ssl/host.rb +1 -8
- data/lib/puppet/ssl/inventory.rb +0 -7
- data/lib/puppet/ssl/oids.rb +72 -3
- data/lib/puppet/ssl/validator/default_validator.rb +0 -1
- data/lib/puppet/status.rb +0 -5
- data/lib/puppet/syntax_checkers.rb +3 -0
- data/lib/{puppetx/puppetlabs → puppet}/syntax_checkers/json.rb +2 -2
- data/lib/puppet/test/test_helper.rb +11 -12
- data/lib/puppet/transaction.rb +12 -9
- data/lib/puppet/transaction/event.rb +4 -5
- data/lib/puppet/transaction/event_manager.rb +50 -5
- data/lib/puppet/transaction/report.rb +5 -10
- data/lib/puppet/transaction/resource_harness.rb +7 -2
- data/lib/puppet/type.rb +113 -29
- data/lib/puppet/type/augeas.rb +1 -0
- data/lib/puppet/type/exec.rb +2 -2
- data/lib/puppet/type/file.rb +8 -9
- data/lib/puppet/type/file/content.rb +19 -15
- data/lib/puppet/type/file/mode.rb +16 -11
- data/lib/puppet/type/file/selcontext.rb +1 -1
- data/lib/puppet/type/file/source.rb +15 -15
- data/lib/puppet/type/filebucket.rb +2 -2
- data/lib/puppet/type/group.rb +5 -17
- data/lib/puppet/type/host.rb +12 -3
- data/lib/puppet/type/k5login.rb +1 -1
- data/lib/puppet/type/mailalias.rb +20 -6
- data/lib/puppet/type/maillist.rb +1 -1
- data/lib/puppet/type/mount.rb +6 -16
- data/lib/puppet/type/notify.rb +1 -1
- data/lib/puppet/type/package.rb +91 -16
- data/lib/puppet/type/resources.rb +0 -7
- data/lib/puppet/type/router.rb +1 -1
- data/lib/puppet/type/schedule.rb +1 -1
- data/lib/puppet/type/scheduled_task.rb +0 -13
- data/lib/puppet/type/selboolean.rb +2 -2
- data/lib/puppet/type/service.rb +1 -1
- data/lib/puppet/type/ssh_authorized_key.rb +1 -1
- data/lib/puppet/type/sshkey.rb +1 -1
- data/lib/puppet/type/tidy.rb +4 -1
- data/lib/puppet/type/user.rb +16 -3
- data/lib/puppet/type/yumrepo.rb +26 -0
- data/lib/puppet/type/zfs.rb +1 -1
- data/lib/puppet/type/zpool.rb +1 -1
- data/lib/puppet/util.rb +2 -85
- data/lib/puppet/util/autoload.rb +3 -13
- data/lib/puppet/util/checksums.rb +59 -22
- data/lib/puppet/util/classgen.rb +1 -9
- data/lib/puppet/util/colors.rb +0 -117
- data/lib/puppet/util/command_line.rb +1 -23
- data/lib/puppet/util/errors.rb +2 -4
- data/lib/puppet/util/execution.rb +19 -22
- data/lib/puppet/util/feature.rb +2 -4
- data/lib/puppet/util/fileparsing.rb +3 -2
- data/lib/puppet/util/log.rb +13 -56
- data/lib/puppet/util/log/destinations.rb +17 -36
- data/lib/puppet/util/logging.rb +52 -37
- data/lib/puppet/util/metric.rb +0 -149
- data/lib/puppet/util/monkey_patches.rb +1 -94
- data/lib/puppet/util/network_device/base.rb +1 -5
- data/lib/puppet/util/network_device/cisco/interface.rb +2 -2
- data/lib/puppet/util/network_device/config.rb +0 -5
- data/lib/puppet/util/network_device/transport/ssh.rb +2 -2
- data/lib/puppet/util/profiler.rb +1 -1
- data/lib/puppet/util/profiler/aggregate.rb +1 -1
- data/lib/puppet/util/profiler/around_profiler.rb +1 -1
- data/lib/puppet/util/psych_support.rb +38 -0
- data/lib/puppet/util/rdoc.rb +6 -42
- data/lib/puppet/util/rdoc/code_objects.rb +5 -45
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +1 -1
- data/lib/puppet/util/rdoc/parser.rb +5 -15
- data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +8 -227
- data/lib/puppet/util/retry_action.rb +46 -0
- data/lib/puppet/util/run_mode.rb +31 -7
- data/lib/puppet/util/selinux.rb +2 -2
- data/lib/puppet/util/ssl.rb +11 -11
- data/lib/puppet/util/suidmanager.rb +4 -31
- data/lib/puppet/util/tag_set.rb +0 -11
- data/lib/puppet/util/tagging.rb +50 -19
- data/lib/puppet/util/warnings.rb +1 -0
- data/lib/puppet/util/windows/adsi.rb +13 -60
- data/lib/puppet/util/windows/api_types.rb +16 -2
- data/lib/puppet/util/windows/file.rb +2 -8
- data/lib/puppet/util/windows/process.rb +58 -0
- data/lib/puppet/util/windows/registry.rb +319 -31
- data/lib/puppet/util/windows/security.rb +1 -68
- data/lib/puppet/util/windows/taskscheduler.rb +0 -21
- data/lib/puppet/util/windows/user.rb +2 -3
- data/lib/puppet/vendor/deep_merge/CHANGELOG +45 -0
- data/lib/puppet/vendor/deep_merge/Gemfile +3 -0
- data/lib/puppet/vendor/deep_merge/LICENSE +21 -0
- data/lib/puppet/vendor/deep_merge/README.md +113 -0
- data/lib/puppet/vendor/deep_merge/Rakefile +19 -0
- data/lib/puppet/vendor/deep_merge/deep_merge.gemspec +35 -0
- data/lib/puppet/vendor/deep_merge/lib/deep_merge.rb +2 -0
- data/lib/puppet/vendor/deep_merge/lib/deep_merge/core.rb +210 -0
- data/lib/puppet/vendor/deep_merge/lib/deep_merge/deep_merge_hash.rb +28 -0
- data/lib/puppet/vendor/deep_merge/lib/deep_merge/rails_compat.rb +27 -0
- data/lib/puppet/vendor/deep_merge/test/test_deep_merge.rb +608 -0
- data/lib/puppet/vendor/load_deep_merge.rb +1 -0
- data/lib/puppet/vendor/load_rgen.rb +1 -0
- data/lib/puppet/vendor/require_vendored.rb +1 -3
- data/lib/puppet/vendor/rgen_patch.rb +132 -0
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet_x.rb +8 -0
- data/lib/semver.rb +0 -1
- data/man/man5/puppet.conf.5 +432 -287
- data/man/man8/extlookup2hiera.8 +2 -15
- data/man/man8/puppet-agent.8 +14 -14
- data/man/man8/puppet-apply.8 +29 -30
- data/man/man8/puppet-ca.8 +29 -17
- data/man/man8/puppet-catalog.8 +5 -34
- data/man/man8/puppet-cert.8 +8 -4
- data/man/man8/puppet-certificate.8 +15 -29
- data/man/man8/puppet-certificate_request.8 +9 -16
- data/man/man8/puppet-certificate_revocation_list.8 +5 -31
- data/man/man8/puppet-config.8 +52 -11
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +5 -16
- data/man/man8/puppet-doc.8 +7 -80
- data/man/man8/puppet-epp.8 +349 -0
- data/man/man8/puppet-facts.8 +5 -95
- data/man/man8/puppet-file.8 +2 -28
- data/man/man8/puppet-filebucket.8 +2 -2
- data/man/man8/puppet-help.8 +2 -2
- data/man/man8/puppet-inspect.8 +1 -1
- data/man/man8/puppet-key.8 +6 -3
- data/man/man8/puppet-man.8 +2 -2
- data/man/man8/puppet-master.8 +11 -7
- data/man/man8/puppet-module.8 +75 -49
- data/man/man8/puppet-node.8 +8 -56
- data/man/man8/puppet-parser.8 +38 -4
- data/man/man8/puppet-plugin.8 +2 -2
- data/man/man8/puppet-report.8 +8 -70
- data/man/man8/puppet-resource.8 +7 -3
- data/man/man8/puppet-resource_type.8 +2 -28
- data/man/man8/puppet-status.8 +5 -47
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/integration/provider/mailalias/aliases/test1 +3 -0
- data/spec/fixtures/integration/provider/sshkey/sample +21 -0
- data/spec/fixtures/unit/data_providers/environments/production/environment.conf +2 -0
- data/spec/fixtures/unit/data_providers/environments/production/lib/puppet/functions/environment/data.rb +7 -0
- data/spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/bindings/abc/default.rb +9 -0
- data/spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/functions/abc/data.rb +8 -0
- data/spec/fixtures/unit/data_providers/environments/production/modules/abc/manifests/init.pp +9 -0
- data/spec/fixtures/unit/data_providers/environments/sample/environment.conf +2 -0
- data/spec/fixtures/unit/data_providers/environments/sample/manifests/site.pp +6 -0
- data/spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet/bindings/dataprovider/default.rb +54 -0
- data/spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet_x/helindbe/sample_env_data.rb +31 -0
- data/spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/lib/puppet_x/helindbe/sample_module_data.rb +32 -0
- data/spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/manifests/init.pp +5 -0
- data/spec/fixtures/unit/functions/lookup/environments/production/environment.conf +2 -0
- data/spec/fixtures/unit/functions/lookup/environments/production/lib/puppet/functions/environment/data.rb +11 -0
- data/spec/fixtures/unit/functions/lookup/environments/production/modules/abc/lib/puppet/bindings/abc/default.rb +9 -0
- data/spec/fixtures/unit/functions/lookup/environments/production/modules/abc/lib/puppet/functions/abc/data.rb +9 -0
- data/spec/fixtures/unit/functions/lookup/environments/production/modules/abc/manifests/init.pp +8 -0
- data/spec/fixtures/unit/parser/lexer/subclass_name_duplication.pp +0 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/binder_config.yaml +1 -1
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/awesome2/lib/{puppetx → puppet_x}/awesome2/echo_scheme_handler.rb +3 -3
- data/spec/fixtures/unit/pops/binder/config/binder_config/nolayer/binder_config.yaml +6 -0
- data/spec/fixtures/unit/pops/parser/lexer/subclass_name_duplication.pp +0 -0
- data/spec/fixtures/unit/provider/mount/parsed/aix.filesystems +85 -93
- data/spec/fixtures/unit/provider/mount/parsed/aix.mount +7 -11
- data/spec/fixtures/unit/provider/package/pkg/dummy_implicit_version +3 -0
- data/spec/fixtures/unit/provider/package/pkg/dummy_solaris10 +1 -1
- data/spec/fixtures/unit/provider/package/pkg/dummy_solaris11.certificate_warning +1 -1
- data/spec/fixtures/unit/provider/package/pkg/dummy_solaris11.ifo.installed +1 -1
- data/spec/fixtures/unit/provider/package/pkg/dummy_solaris11.ifo.known +1 -1
- data/spec/fixtures/unit/provider/package/pkg/dummy_solaris11.installed +1 -1
- data/spec/fixtures/unit/provider/package/pkg/dummy_solaris11.known +1 -1
- data/spec/fixtures/unit/provider/package/pkg/incomplete +1 -1
- data/spec/fixtures/unit/provider/package/pkg/solaris11 +2 -2
- data/spec/fixtures/unit/provider/package/pkg/unknown_status +12 -12
- data/spec/fixtures/unit/provider/package/yum/yum-check-update-multiline.txt +201 -0
- data/spec/fixtures/unit/provider/package/yum/yum-check-update-simple.txt +12 -0
- data/spec/fixtures/unit/provider/parsedfile/simple.txt +3 -0
- data/spec/fixtures/unit/provider/service/openbsd/rcctl_getall +6 -0
- data/spec/fixtures/unit/ssl/certificate/old-style-cert-exts.pem +33 -0
- data/spec/fixtures/unit/ssl/certificate_request/old-style-cert-request.pem +28 -0
- data/spec/integration/agent/logging_spec.rb +1 -5
- data/spec/integration/application/apply_spec.rb +1 -1
- data/spec/integration/application/doc_spec.rb +1 -43
- data/spec/integration/configurer_spec.rb +5 -5
- data/spec/integration/data_binding.rb +4 -0
- data/spec/integration/defaults_spec.rb +42 -143
- data/spec/integration/directory_environments_spec.rb +3 -3
- data/spec/integration/environments/default_manifest_spec.rb +3 -51
- data/spec/integration/environments/setting_hooks_spec.rb +1 -1
- data/spec/integration/environments/settings_interpolation_spec.rb +50 -105
- data/spec/integration/environments/settings_spec.rb +100 -0
- data/spec/integration/faces/ca_spec.rb +51 -51
- data/spec/integration/faces/documentation_spec.rb +6 -6
- data/spec/integration/file_bucket/file_spec.rb +5 -16
- data/spec/integration/file_serving/fileset_spec.rb +1 -1
- data/spec/integration/file_serving/terminus_helper_spec.rb +1 -1
- data/spec/integration/indirector/catalog/compiler_spec.rb +6 -6
- data/spec/integration/indirector/direct_file_server_spec.rb +40 -12
- data/spec/integration/indirector/facts/facter_spec.rb +1 -1
- data/spec/integration/indirector/file_content/file_server_spec.rb +23 -21
- data/spec/integration/indirector/file_metadata/file_server_spec.rb +53 -0
- data/spec/integration/indirector/node/ldap_spec.rb +0 -0
- data/spec/integration/network/authconfig_spec.rb +26 -26
- data/spec/integration/network/formats_spec.rb +12 -12
- data/spec/integration/network/http/api/indirected_routes_spec.rb +56 -0
- data/spec/integration/node/environment_spec.rb +12 -15
- data/spec/integration/node/facts_spec.rb +3 -3
- data/spec/integration/node_spec.rb +8 -8
- data/spec/integration/parser/catalog_spec.rb +1 -32
- data/spec/integration/parser/class_spec.rb +0 -4
- data/spec/integration/parser/{collector_spec.rb → collection_spec.rb} +3 -27
- data/spec/integration/parser/compiler_spec.rb +769 -385
- data/spec/integration/parser/conditionals_spec.rb +2 -27
- data/spec/integration/parser/functions/require_spec.rb +8 -8
- data/spec/integration/parser/node_spec.rb +29 -42
- data/spec/integration/parser/resource_expressions_spec.rb +125 -210
- data/spec/integration/parser/scope_spec.rb +168 -319
- data/spec/integration/parser/undef_param_spec.rb +5 -5
- data/spec/integration/provider/cron/crontab_spec.rb +3 -3
- data/spec/integration/provider/mailalias/aliases_spec.rb +0 -0
- data/spec/integration/provider/mount_spec.rb +33 -28
- data/spec/integration/provider/package_spec.rb +3 -14
- data/spec/integration/provider/service/init_spec.rb +4 -4
- data/spec/integration/provider/service/systemd_spec.rb +3 -3
- data/spec/integration/provider/ssh_authorized_key_spec.rb +12 -12
- data/spec/integration/provider/sshkey_spec.rb +159 -0
- data/spec/integration/reference/providers_spec.rb +1 -1
- data/spec/integration/reports_spec.rb +1 -1
- data/spec/integration/resource/catalog_spec.rb +3 -3
- data/spec/integration/resource/type_collection_spec.rb +10 -25
- data/spec/integration/ssl/autosign_spec.rb +1 -1
- data/spec/integration/ssl/certificate_authority_spec.rb +8 -8
- data/spec/integration/ssl/certificate_request_spec.rb +2 -2
- data/spec/integration/ssl/certificate_revocation_list_spec.rb +0 -0
- data/spec/integration/ssl/host_spec.rb +7 -7
- data/spec/integration/transaction/report_spec.rb +0 -0
- data/spec/integration/transaction_spec.rb +86 -50
- data/spec/integration/type/exec_spec.rb +5 -5
- data/spec/integration/type/file_spec.rb +277 -280
- data/spec/integration/type/package_spec.rb +105 -6
- data/spec/integration/type/tidy_spec.rb +1 -1
- data/spec/integration/type/user_spec.rb +4 -4
- data/spec/integration/type_spec.rb +2 -2
- data/spec/integration/util/autoload_spec.rb +7 -12
- data/spec/integration/util/rdoc/parser_spec.rb +13 -99
- data/spec/integration/util/settings_spec.rb +1 -1
- data/spec/integration/util/windows/process_spec.rb +6 -6
- data/spec/integration/util/windows/security_spec.rb +79 -105
- data/spec/integration/util/windows/user_spec.rb +12 -12
- data/spec/integration/util_spec.rb +8 -8
- data/spec/lib/matchers/containment_matchers.rb +1 -1
- data/spec/lib/matchers/include.rb +3 -3
- data/spec/lib/matchers/include_in_order.rb +2 -2
- data/spec/lib/matchers/json.rb +5 -35
- data/spec/lib/matchers/match_tokens2.rb +1 -1
- data/spec/lib/matchers/relationship_graph_matchers.rb +1 -1
- data/spec/lib/matchers/resource.rb +8 -23
- data/spec/lib/puppet/face/1.0.0/huzzah.rb +2 -2
- data/spec/lib/puppet/face/basetest.rb +0 -0
- data/spec/lib/puppet/face/huzzah.rb +2 -2
- data/spec/lib/puppet/face/version_matching.rb +1 -1
- data/spec/lib/puppet/indirector_proxy.rb +34 -0
- data/spec/lib/puppet/indirector_testing.rb +1 -11
- data/spec/lib/puppet_spec/files.rb +1 -1
- data/spec/lib/puppet_spec/fixtures.rb +0 -0
- data/spec/lib/puppet_spec/handler.rb +53 -0
- data/spec/lib/puppet_spec/matchers.rb +12 -5
- data/spec/lib/puppet_spec/module_tool/shared_functions.rb +3 -3
- data/spec/lib/puppet_spec/modules.rb +11 -0
- data/spec/lib/puppet_spec/network.rb +101 -0
- data/spec/lib/puppet_spec/pops.rb +2 -2
- data/spec/lib/puppet_spec/settings.rb +17 -0
- data/spec/lib/puppet_spec/verbose.rb +0 -0
- data/spec/shared_behaviours/all_parsedfile_providers.rb +1 -1
- data/spec/shared_behaviours/an_indirector_face.rb +2 -2
- data/spec/shared_behaviours/documentation_on_faces.rb +46 -46
- data/spec/shared_behaviours/file_server_terminus.rb +1 -1
- data/spec/shared_behaviours/file_serving.rb +0 -0
- data/spec/shared_behaviours/hiera_indirections.rb +10 -10
- data/spec/shared_behaviours/iterative_functions.rb +1 -1
- data/spec/shared_behaviours/memory_terminus.rb +5 -5
- data/spec/shared_behaviours/path_parameters.rb +8 -8
- data/spec/shared_behaviours/store_configs_terminus.rb +3 -3
- data/spec/shared_behaviours/things_that_declare_options.rb +25 -25
- data/spec/shared_contexts/checksum.rb +62 -0
- data/spec/shared_contexts/{checksums.rb → digests.rb} +2 -2
- data/spec/spec_helper.rb +14 -5
- data/spec/unit/agent/disabler_spec.rb +3 -3
- data/spec/unit/agent/locker_spec.rb +9 -9
- data/spec/unit/agent_spec.rb +18 -18
- data/spec/unit/application/agent_spec.rb +25 -92
- data/spec/unit/application/apply_spec.rb +16 -16
- data/spec/unit/application/cert_spec.rb +15 -15
- data/spec/unit/application/certificate_spec.rb +2 -2
- data/spec/unit/application/config_spec.rb +1 -1
- data/spec/unit/application/describe_spec.rb +6 -6
- data/spec/unit/application/device_spec.rb +25 -63
- data/spec/unit/application/doc_spec.rb +22 -31
- data/spec/unit/application/face_base_spec.rb +88 -59
- data/spec/unit/application/facts_spec.rb +2 -11
- data/spec/unit/application/filebucket_spec.rb +7 -7
- data/spec/unit/application/indirection_base_spec.rb +0 -4
- data/spec/unit/application/inspect_spec.rb +21 -21
- data/spec/unit/application/master_spec.rb +8 -9
- data/spec/unit/application/resource_spec.rb +27 -79
- data/spec/unit/application_spec.rb +54 -58
- data/spec/unit/configurer/downloader_factory_spec.rb +0 -0
- data/spec/unit/configurer/downloader_spec.rb +26 -20
- data/spec/unit/configurer/fact_handler_spec.rb +19 -12
- data/spec/unit/configurer/plugin_handler_spec.rb +0 -0
- data/spec/unit/configurer_spec.rb +44 -44
- data/spec/unit/confine/exists_spec.rb +10 -10
- data/spec/unit/confine/false_spec.rb +7 -7
- data/spec/unit/confine/feature_spec.rb +7 -7
- data/spec/unit/confine/true_spec.rb +7 -7
- data/spec/unit/confine/variable_spec.rb +13 -13
- data/spec/unit/confine_collection_spec.rb +12 -12
- data/spec/unit/confine_spec.rb +10 -10
- data/spec/unit/confiner_spec.rb +8 -8
- data/spec/unit/context/trusted_information_spec.rb +9 -2
- data/spec/unit/daemon_spec.rb +10 -21
- data/spec/unit/data_binding_spec.rb +1 -1
- data/spec/unit/data_providers/function_data_provider_spec.rb +96 -0
- data/spec/unit/data_providers/sample_data_provider_spec.rb +52 -0
- data/spec/unit/defaults_spec.rb +6 -6
- data/spec/unit/environments_spec.rb +4 -6
- data/spec/unit/{util → external}/pson_spec.rb +15 -25
- data/spec/unit/face/catalog_spec.rb +0 -0
- data/spec/unit/face/certificate_spec.rb +19 -19
- data/spec/unit/face/config_spec.rb +2 -7
- data/spec/unit/face/epp_face_spec.rb +303 -0
- data/spec/unit/face/facts_spec.rb +1 -15
- data/spec/unit/face/file_spec.rb +3 -5
- data/spec/unit/face/help_spec.rb +17 -16
- data/spec/unit/face/module/build_spec.rb +2 -2
- data/spec/unit/face/module/list_spec.rb +11 -11
- data/spec/unit/face/module/search_spec.rb +17 -17
- data/spec/unit/face/node_spec.rb +4 -122
- data/spec/unit/face/parser_spec.rb +1 -1
- data/spec/unit/face/plugin_spec.rb +2 -2
- data/spec/unit/face_spec.rb +0 -0
- data/spec/unit/file_bucket/dipper_spec.rb +23 -23
- data/spec/unit/file_bucket/file_spec.rb +12 -28
- data/spec/unit/file_serving/base_spec.rb +26 -26
- data/spec/unit/file_serving/configuration/parser_spec.rb +10 -10
- data/spec/unit/file_serving/configuration_spec.rb +17 -17
- data/spec/unit/file_serving/content_spec.rb +19 -31
- data/spec/unit/file_serving/fileset_spec.rb +32 -33
- data/spec/unit/file_serving/metadata_spec.rb +115 -71
- data/spec/unit/file_serving/mount/file_spec.rb +15 -15
- data/spec/unit/file_serving/mount/modules_spec.rb +2 -2
- data/spec/unit/file_serving/mount/pluginfacts_spec.rb +5 -5
- data/spec/unit/file_serving/mount/plugins_spec.rb +5 -5
- data/spec/unit/file_serving/mount_spec.rb +5 -5
- data/spec/unit/file_serving/terminus_helper_spec.rb +19 -0
- data/spec/unit/file_serving/terminus_selector_spec.rb +6 -6
- data/spec/unit/file_system/uniquefile_spec.rb +2 -2
- data/spec/unit/file_system_spec.rb +79 -117
- data/spec/unit/forge/errors_spec.rb +8 -8
- data/spec/unit/forge/module_release_spec.rb +2 -4
- data/spec/unit/forge/repository_spec.rb +38 -44
- data/spec/unit/forge_spec.rb +1 -1
- data/spec/unit/functions/assert_type_spec.rb +1 -1
- data/spec/unit/functions/each_spec.rb +19 -23
- data/spec/unit/functions/epp_spec.rb +9 -17
- data/spec/unit/functions/filter_spec.rb +0 -22
- data/spec/unit/functions/hiera_spec.rb +18 -24
- data/spec/unit/functions/inline_epp_spec.rb +8 -16
- data/spec/unit/functions/lookup_spec.rb +324 -0
- data/spec/unit/functions/map_spec.rb +1 -7
- data/spec/unit/functions/reduce_spec.rb +0 -11
- data/spec/unit/functions/regsubst_spec.rb +94 -0
- data/spec/unit/functions/scanf_spec.rb +0 -4
- data/spec/unit/functions/slice_spec.rb +0 -12
- data/spec/unit/functions/split_spec.rb +46 -0
- data/spec/unit/functions/with_spec.rb +4 -13
- data/spec/unit/functions4_spec.rb +57 -162
- data/spec/unit/graph/rb_tree_map_spec.rb +78 -78
- data/spec/unit/graph/relationship_graph_spec.rb +17 -17
- data/spec/unit/graph/{simple_graph.rb → simple_graph_spec.rb} +122 -126
- data/spec/unit/hiera/scope_spec.rb +13 -12
- data/spec/unit/hiera_puppet_spec.rb +12 -12
- data/spec/unit/indirector/catalog/compiler_spec.rb +10 -15
- data/spec/unit/indirector/catalog/json_spec.rb +2 -2
- data/spec/unit/indirector/catalog/msgpack_spec.rb +2 -2
- data/spec/unit/indirector/catalog/rest_spec.rb +1 -1
- data/spec/unit/indirector/catalog/static_compiler_spec.rb +14 -14
- data/spec/unit/indirector/catalog/store_configs_spec.rb +0 -0
- data/spec/unit/indirector/catalog/yaml_spec.rb +4 -4
- data/spec/unit/indirector/certificate/ca_spec.rb +3 -3
- data/spec/unit/indirector/certificate/disabled_ca_spec.rb +0 -0
- data/spec/unit/indirector/certificate/file_spec.rb +3 -3
- data/spec/unit/indirector/certificate/rest_spec.rb +6 -6
- data/spec/unit/indirector/certificate_request/ca_spec.rb +8 -8
- data/spec/unit/indirector/certificate_request/disabled_ca_spec.rb +0 -0
- data/spec/unit/indirector/certificate_request/file_spec.rb +2 -2
- data/spec/unit/indirector/certificate_request/rest_spec.rb +4 -4
- data/spec/unit/indirector/certificate_revocation_list/ca_spec.rb +2 -2
- data/spec/unit/indirector/certificate_revocation_list/disabled_ca_spec.rb +0 -0
- data/spec/unit/indirector/certificate_revocation_list/file_spec.rb +2 -2
- data/spec/unit/indirector/certificate_revocation_list/rest_spec.rb +4 -4
- data/spec/unit/indirector/certificate_status/file_spec.rb +18 -18
- data/spec/unit/indirector/certificate_status/rest_spec.rb +2 -2
- data/spec/unit/indirector/code_spec.rb +3 -3
- data/spec/unit/indirector/data_binding/hiera_spec.rb +3 -3
- data/spec/unit/indirector/data_binding/none_spec.rb +5 -5
- data/spec/unit/indirector/direct_file_server_spec.rb +14 -4
- data/spec/unit/indirector/envelope_spec.rb +4 -4
- data/spec/unit/indirector/exec_spec.rb +4 -4
- data/spec/unit/indirector/face_spec.rb +13 -8
- data/spec/unit/indirector/facts/facter_spec.rb +10 -20
- data/spec/unit/indirector/facts/network_device_spec.rb +10 -20
- data/spec/unit/indirector/facts/store_configs_spec.rb +0 -0
- data/spec/unit/indirector/facts/yaml_spec.rb +6 -6
- data/spec/unit/indirector/file_bucket_file/file_spec.rb +34 -34
- data/spec/unit/indirector/file_bucket_file/rest_spec.rb +1 -1
- data/spec/unit/indirector/file_content/file_server_spec.rb +2 -2
- data/spec/unit/indirector/file_content/file_spec.rb +2 -2
- data/spec/unit/indirector/file_content/rest_spec.rb +1 -1
- data/spec/unit/indirector/file_metadata/file_server_spec.rb +2 -2
- data/spec/unit/indirector/file_metadata/file_spec.rb +13 -5
- data/spec/unit/indirector/file_metadata/rest_spec.rb +1 -1
- data/spec/unit/indirector/file_server_spec.rb +35 -17
- data/spec/unit/indirector/indirection_spec.rb +56 -56
- data/spec/unit/indirector/json_spec.rb +15 -16
- data/spec/unit/indirector/key/ca_spec.rb +3 -3
- data/spec/unit/indirector/key/disabled_ca_spec.rb +0 -0
- data/spec/unit/indirector/key/file_spec.rb +5 -5
- data/spec/unit/indirector/ldap_spec.rb +13 -13
- data/spec/unit/indirector/memory_spec.rb +0 -0
- data/spec/unit/indirector/msgpack_spec.rb +15 -15
- data/spec/unit/indirector/node/exec_spec.rb +20 -9
- data/spec/unit/indirector/node/ldap_spec.rb +48 -48
- data/spec/unit/indirector/node/memory_spec.rb +0 -0
- data/spec/unit/indirector/node/msgpack_spec.rb +4 -4
- data/spec/unit/indirector/node/plain_spec.rb +2 -2
- data/spec/unit/indirector/node/rest_spec.rb +0 -0
- data/spec/unit/indirector/node/store_configs_spec.rb +0 -0
- data/spec/unit/indirector/node/yaml_spec.rb +4 -4
- data/spec/unit/indirector/none_spec.rb +2 -2
- data/spec/unit/indirector/plain_spec.rb +1 -1
- data/spec/unit/indirector/report/msgpack_spec.rb +5 -5
- data/spec/unit/indirector/report/processor_spec.rb +4 -4
- data/spec/unit/indirector/report/rest_spec.rb +8 -8
- data/spec/unit/indirector/report/yaml_spec.rb +5 -5
- data/spec/unit/indirector/request_spec.rb +103 -206
- data/spec/unit/indirector/resource/ral_spec.rb +8 -10
- data/spec/unit/indirector/resource/store_configs_spec.rb +2 -4
- data/spec/unit/indirector/resource_type/parser_spec.rb +37 -37
- data/spec/unit/indirector/resource_type/rest_spec.rb +2 -2
- data/spec/unit/indirector/rest_spec.rb +70 -55
- data/spec/unit/indirector/ssl_file_spec.rb +13 -13
- data/spec/unit/indirector/status/rest_spec.rb +1 -1
- data/spec/unit/indirector/store_configs_spec.rb +0 -0
- data/spec/unit/indirector/terminus_spec.rb +17 -17
- data/spec/unit/indirector/yaml_spec.rb +12 -12
- data/spec/unit/indirector_spec.rb +7 -7
- data/spec/unit/interface/action_builder_spec.rb +15 -15
- data/spec/unit/interface/action_manager_spec.rb +31 -56
- data/spec/unit/interface/action_spec.rb +62 -65
- data/spec/unit/interface/documentation_spec.rb +2 -2
- data/spec/unit/interface/face_collection_spec.rb +33 -33
- data/spec/unit/interface/option_builder_spec.rb +8 -8
- data/spec/unit/interface/option_spec.rb +23 -23
- data/spec/unit/interface_spec.rb +19 -24
- data/spec/unit/man_spec.rb +0 -0
- data/spec/unit/module_spec.rb +163 -115
- data/spec/unit/module_tool/applications/builder_spec.rb +0 -19
- data/spec/unit/module_tool/applications/installer_spec.rb +29 -29
- data/spec/unit/module_tool/applications/searcher_spec.rb +4 -4
- data/spec/unit/module_tool/applications/uninstaller_spec.rb +15 -15
- data/spec/unit/module_tool/applications/unpacker_spec.rb +3 -3
- data/spec/unit/module_tool/applications/upgrader_spec.rb +28 -28
- data/spec/unit/module_tool/install_directory_spec.rb +3 -3
- data/spec/unit/module_tool/metadata_spec.rb +26 -26
- data/spec/unit/module_tool/tar/gnu_spec.rb +1 -1
- data/spec/unit/module_tool/tar/mini_spec.rb +2 -2
- data/spec/unit/module_tool/tar_spec.rb +2 -2
- data/spec/unit/module_tool_spec.rb +13 -34
- data/spec/unit/network/auth_config_parser_spec.rb +7 -7
- data/spec/unit/network/authconfig_spec.rb +9 -9
- data/spec/unit/network/authstore_spec.rb +38 -39
- data/spec/unit/network/format_handler_spec.rb +14 -14
- data/spec/unit/network/format_spec.rb +34 -34
- data/spec/unit/network/format_support_spec.rb +10 -10
- data/spec/unit/network/formats_spec.rb +50 -136
- data/spec/unit/network/http/api/ca/v1_spec.rb +26 -0
- data/spec/unit/network/http/api/{v1_spec.rb → indirected_routes_spec.rb} +128 -184
- data/spec/unit/network/http/api/{v2 → master/v3}/authorization_spec.rb +23 -21
- data/spec/unit/network/http/api/{v2 → master/v3}/environments_spec.rb +5 -5
- data/spec/unit/network/http/api/master/v3_spec.rb +39 -0
- data/spec/unit/network/http/api_spec.rb +127 -0
- data/spec/unit/network/http/compression_spec.rb +20 -26
- data/spec/unit/network/http/connection_spec.rb +2 -5
- data/spec/unit/network/http/factory_spec.rb +6 -8
- data/spec/unit/network/http/handler_spec.rb +31 -84
- data/spec/unit/network/http/nocache_pool_spec.rb +0 -0
- data/spec/unit/network/http/pool_spec.rb +0 -0
- data/spec/unit/network/http/rack/rest_spec.rb +38 -39
- data/spec/unit/network/http/rack_spec.rb +1 -1
- data/spec/unit/network/http/route_spec.rb +3 -3
- data/spec/unit/network/http/session_spec.rb +4 -4
- data/spec/unit/network/http/site_spec.rb +1 -1
- data/spec/unit/network/http/webrick/rest_spec.rb +36 -55
- data/spec/unit/network/http/webrick_spec.rb +16 -27
- data/spec/unit/network/http_pool_spec.rb +11 -11
- data/spec/unit/network/http_spec.rb +0 -0
- data/spec/unit/network/resolver_spec.rb +10 -10
- data/spec/unit/network/rights_spec.rb +67 -67
- data/spec/unit/network/server_spec.rb +3 -3
- data/spec/unit/node/environment_spec.rb +177 -273
- data/spec/unit/node/facts_spec.rb +71 -33
- data/spec/unit/node_spec.rb +150 -158
- data/spec/unit/other/selinux_spec.rb +6 -6
- data/spec/unit/parameter/boolean_spec.rb +4 -3
- data/spec/unit/parameter/package_options_spec.rb +5 -5
- data/spec/unit/parameter/path_spec.rb +1 -1
- data/spec/unit/parameter/value_collection_spec.rb +23 -28
- data/spec/unit/parameter/value_spec.rb +20 -24
- data/spec/unit/parameter_spec.rb +26 -26
- data/spec/unit/parser/ast/block_expression_spec.rb +3 -2
- data/spec/unit/parser/ast/leaf_spec.rb +5 -378
- data/spec/unit/parser/compiler_spec.rb +84 -74
- data/spec/unit/parser/files_spec.rb +55 -121
- data/spec/unit/parser/functions/contain_spec.rb +8 -11
- data/spec/unit/parser/functions/create_resources_spec.rb +29 -29
- data/spec/unit/parser/functions/defined_spec.rb +52 -51
- data/spec/unit/parser/functions/digest_spec.rb +2 -2
- data/spec/unit/parser/functions/fail_spec.rb +1 -1
- data/spec/unit/parser/functions/file_spec.rb +7 -13
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +5 -5
- data/spec/unit/parser/functions/generate_spec.rb +20 -20
- data/spec/unit/parser/functions/hiera_array_spec.rb +2 -16
- data/spec/unit/parser/functions/hiera_hash_spec.rb +2 -12
- data/spec/unit/parser/functions/hiera_include_spec.rb +2 -29
- data/spec/unit/parser/functions/hiera_spec.rb +2 -12
- data/spec/unit/parser/functions/include_spec.rb +9 -19
- data/spec/unit/parser/functions/inline_template_spec.rb +3 -3
- data/spec/unit/parser/functions/lookup_spec.rb +3 -140
- data/spec/unit/parser/functions/realize_spec.rb +0 -0
- data/spec/unit/parser/functions/regsubst_spec.rb +7 -179
- data/spec/unit/parser/functions/require_spec.rb +14 -21
- data/spec/unit/parser/functions/scanf_spec.rb +0 -0
- data/spec/unit/parser/functions/shellquote_spec.rb +20 -20
- data/spec/unit/parser/functions/split_spec.rb +2 -37
- data/spec/unit/parser/functions/sprintf_spec.rb +7 -11
- data/spec/unit/parser/functions/tag_spec.rb +3 -3
- data/spec/unit/parser/functions/template_spec.rb +10 -10
- data/spec/unit/parser/functions/versioncmp_spec.rb +3 -3
- data/spec/unit/parser/functions_spec.rb +8 -8
- data/spec/unit/parser/relationship_spec.rb +14 -32
- data/spec/unit/parser/resource/param_spec.rb +0 -0
- data/spec/unit/parser/resource_spec.rb +57 -57
- data/spec/unit/parser/scope_spec.rb +89 -101
- data/spec/unit/parser/templatewrapper_spec.rb +15 -32
- data/spec/unit/parser/type_loader_spec.rb +53 -73
- data/spec/unit/pops/adaptable_spec.rb +22 -22
- data/spec/unit/pops/binder/bindings_checker_spec.rb +14 -14
- data/spec/unit/pops/binder/bindings_composer_spec.rb +4 -6
- data/spec/unit/pops/binder/bindings_validator_factory_spec.rb +3 -3
- data/spec/unit/pops/binder/config/binder_config_spec.rb +8 -1
- data/spec/unit/pops/binder/injector_spec.rb +92 -92
- data/spec/unit/pops/containment_spec.rb +4 -4
- data/spec/unit/pops/evaluator/access_ops_spec.rb +5 -24
- data/spec/unit/pops/evaluator/arithmetic_ops_spec.rb +23 -23
- data/spec/unit/pops/evaluator/basic_expressions_spec.rb +22 -22
- data/spec/unit/pops/evaluator/collections_ops_spec.rb +1 -3
- data/spec/unit/pops/evaluator/comparison_ops_spec.rb +104 -107
- data/spec/unit/pops/evaluator/conditionals_spec.rb +39 -39
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +75 -143
- data/spec/unit/pops/evaluator/evaluator_rspec_helper.rb +1 -5
- data/spec/unit/pops/evaluator/logical_ops_spec.rb +15 -15
- data/spec/unit/pops/evaluator/string_interpolation_spec.rb +5 -5
- data/spec/unit/pops/evaluator/variables_spec.rb +18 -18
- data/spec/unit/pops/factory_rspec_helper.rb +0 -8
- data/spec/unit/pops/factory_spec.rb +104 -104
- data/spec/unit/pops/issues_spec.rb +21 -21
- data/spec/unit/pops/label_provider_spec.rb +6 -6
- data/spec/unit/pops/loaders/loaders_spec.rb +3 -3
- data/spec/unit/pops/model/model_spec.rb +10 -10
- data/spec/unit/pops/parser/epp_parser_spec.rb +20 -20
- data/spec/unit/pops/parser/evaluating_parser_spec.rb +2 -2
- data/spec/unit/pops/parser/lexer2_spec.rb +65 -276
- data/spec/unit/pops/parser/parse_basic_expressions_spec.rb +91 -91
- data/spec/unit/pops/parser/parse_calls_spec.rb +19 -19
- data/spec/unit/pops/parser/parse_conditionals_spec.rb +38 -22
- data/spec/unit/pops/parser/parse_containers_spec.rb +47 -47
- data/spec/unit/pops/parser/parse_heredoc_spec.rb +15 -62
- data/spec/unit/pops/parser/parse_resource_spec.rb +75 -70
- data/spec/unit/pops/parser/parser_rspec_helper.rb +0 -5
- data/spec/unit/pops/parser/parser_spec.rb +7 -7
- data/spec/unit/pops/parser/parsing_typed_parameters_spec.rb +0 -7
- data/spec/unit/pops/parser/rgen_sanitycheck_spec.rb +2 -2
- data/spec/unit/pops/types/class_loader_spec.rb +10 -0
- data/spec/unit/pops/types/type_calculator_spec.rb +456 -651
- data/spec/unit/pops/types/type_factory_spec.rb +59 -59
- data/spec/unit/pops/types/type_parser_spec.rb +2 -10
- data/spec/unit/pops/validator/validator_spec.rb +3 -57
- data/spec/unit/pops/visitor_spec.rb +4 -4
- data/spec/unit/property/boolean_spec.rb +2 -2
- data/spec/unit/property/ensure_spec.rb +1 -1
- data/spec/unit/property/keyvalue_spec.rb +16 -16
- data/spec/unit/property/list_spec.rb +18 -18
- data/spec/unit/property/ordered_list_spec.rb +7 -7
- data/spec/unit/property_spec.rb +72 -96
- data/spec/unit/provider/aixobject_spec.rb +12 -12
- data/spec/unit/provider/augeas/augeas_spec.rb +171 -149
- data/spec/unit/provider/cisco_spec.rb +2 -2
- data/spec/unit/provider/command_spec.rb +1 -1
- data/spec/unit/provider/cron/crontab_spec.rb +9 -9
- data/spec/unit/provider/cron/parsed_spec.rb +59 -38
- data/spec/unit/provider/exec/posix_spec.rb +9 -19
- data/spec/unit/provider/exec/shell_spec.rb +13 -13
- data/spec/unit/provider/exec/windows_spec.rb +10 -10
- data/spec/unit/provider/exec_spec.rb +2 -2
- data/spec/unit/provider/file/posix_spec.rb +27 -27
- data/spec/unit/provider/file/windows_spec.rb +15 -15
- data/spec/unit/provider/group/groupadd_spec.rb +1 -1
- data/spec/unit/provider/group/ldap_spec.rb +11 -11
- data/spec/unit/provider/group/pw_spec.rb +3 -3
- data/spec/unit/provider/group/windows_adsi_spec.rb +48 -62
- data/spec/unit/provider/host/parsed_spec.rb +58 -22
- data/spec/unit/provider/interface/cisco_spec.rb +3 -3
- data/spec/unit/provider/ldap_spec.rb +23 -23
- data/spec/unit/provider/macauthorization_spec.rb +6 -6
- data/spec/unit/provider/mcx/mcxcontent_spec.rb +6 -6
- data/spec/unit/provider/mount/parsed_spec.rb +101 -119
- data/spec/unit/provider/mount_spec.rb +0 -0
- data/spec/unit/provider/naginator_spec.rb +8 -8
- data/spec/unit/provider/nameservice/directoryservice_spec.rb +5 -27
- data/spec/unit/provider/nameservice_spec.rb +26 -26
- data/spec/unit/provider/network_device_spec.rb +11 -11
- data/spec/unit/provider/package/aix_spec.rb +3 -3
- data/spec/unit/provider/package/appdmg_spec.rb +1 -1
- data/spec/unit/provider/package/apt_spec.rb +4 -4
- data/spec/unit/provider/package/aptitude_spec.rb +1 -1
- data/spec/unit/provider/package/aptrpm_spec.rb +3 -3
- data/spec/unit/provider/package/dpkg_spec.rb +0 -0
- data/spec/unit/provider/package/freebsd_spec.rb +1 -1
- data/spec/unit/provider/package/gem_spec.rb +12 -12
- data/spec/unit/provider/package/hpux_spec.rb +3 -3
- data/spec/unit/provider/package/macports_spec.rb +15 -15
- data/spec/unit/provider/package/nim_spec.rb +11 -11
- data/spec/unit/provider/package/openbsd_spec.rb +72 -37
- data/spec/unit/provider/package/opkg_spec.rb +14 -11
- data/spec/unit/provider/package/pacman_spec.rb +185 -86
- data/spec/unit/provider/package/pip_spec.rb +25 -54
- data/spec/unit/provider/package/pkg_spec.rb +145 -71
- data/spec/unit/provider/package/pkgdmg_spec.rb +9 -9
- data/spec/unit/provider/package/pkgin_spec.rb +18 -18
- data/spec/unit/provider/package/pkgutil_spec.rb +19 -19
- data/spec/unit/provider/package/portage_spec.rb +8 -4
- data/spec/unit/provider/package/rpm_spec.rb +103 -9
- data/spec/unit/provider/package/sun_spec.rb +14 -14
- data/spec/unit/provider/package/up2date_spec.rb +1 -1
- data/spec/unit/provider/package/{urpmi.rb → urpmi_spec.rb} +3 -3
- data/spec/unit/provider/package/windows/exe_package_spec.rb +15 -13
- data/spec/unit/provider/package/windows/msi_package_spec.rb +16 -16
- data/spec/unit/provider/package/windows/package_spec.rb +14 -14
- data/spec/unit/provider/package/windows_spec.rb +26 -26
- data/spec/unit/provider/package/yum_spec.rb +292 -98
- data/spec/unit/provider/package/zypper_spec.rb +20 -31
- data/spec/unit/provider/parsedfile_spec.rb +9 -9
- data/spec/unit/provider/scheduled_task/win32_taskscheduler_spec.rb +192 -434
- data/spec/unit/provider/selboolean_spec.rb +2 -2
- data/spec/unit/provider/selmodule_spec.rb +8 -8
- data/spec/unit/provider/service/base_spec.rb +27 -38
- data/spec/unit/provider/service/daemontools_spec.rb +11 -11
- data/spec/unit/provider/service/debian_spec.rb +8 -8
- data/spec/unit/provider/service/freebsd_spec.rb +7 -8
- data/spec/unit/provider/service/gentoo_spec.rb +12 -13
- data/spec/unit/provider/service/init_spec.rb +25 -38
- data/spec/unit/provider/service/launchd_spec.rb +19 -125
- data/spec/unit/provider/service/openbsd_spec.rb +90 -144
- data/spec/unit/provider/service/openrc_spec.rb +14 -14
- data/spec/unit/provider/service/openwrt_spec.rb +9 -9
- data/spec/unit/provider/service/redhat_spec.rb +14 -15
- data/spec/unit/provider/service/runit_spec.rb +11 -11
- data/spec/unit/provider/service/smf_spec.rb +19 -19
- data/spec/unit/provider/service/src_spec.rb +9 -9
- data/spec/unit/provider/service/systemd_spec.rb +33 -15
- data/spec/unit/provider/service/upstart_spec.rb +59 -59
- data/spec/unit/provider/service/windows_spec.rb +6 -6
- data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +18 -18
- data/spec/unit/provider/sshkey/parsed_spec.rb +11 -11
- data/spec/unit/provider/user/aix_spec.rb +19 -19
- data/spec/unit/provider/user/directoryservice_spec.rb +51 -95
- data/spec/unit/provider/user/hpux_spec.rb +24 -3
- data/spec/unit/provider/user/ldap_spec.rb +12 -12
- data/spec/unit/provider/user/openbsd_spec.rb +77 -0
- data/spec/unit/provider/user/pw_spec.rb +5 -5
- data/spec/unit/provider/user/user_role_add_spec.rb +20 -20
- data/spec/unit/provider/user/useradd_spec.rb +48 -32
- data/spec/unit/provider/user/windows_adsi_spec.rb +9 -31
- data/spec/unit/provider/vlan/cisco_spec.rb +3 -3
- data/spec/unit/provider/yumrepo/inifile_spec.rb +3 -3
- data/spec/unit/provider/zfs/zfs_spec.rb +11 -11
- data/spec/unit/provider/zone/solaris_spec.rb +22 -55
- data/spec/unit/provider/zpool/zpool_spec.rb +22 -22
- data/spec/unit/provider_spec.rb +110 -102
- data/spec/unit/puppet_spec.rb +15 -8
- data/spec/unit/relationship_spec.rb +37 -41
- data/spec/unit/reports/http_spec.rb +0 -0
- data/spec/unit/reports/store_spec.rb +3 -3
- data/spec/unit/reports_spec.rb +5 -5
- data/spec/unit/resource/catalog_spec.rb +93 -111
- data/spec/unit/resource/status_spec.rb +49 -75
- data/spec/unit/resource/type_collection_helper_spec.rb +1 -1
- data/spec/unit/resource/type_collection_spec.rb +59 -164
- data/spec/unit/resource/type_spec.rb +115 -120
- data/spec/unit/resource_spec.rb +176 -159
- data/spec/unit/scheduler/job_spec.rb +12 -12
- data/spec/unit/scheduler/scheduler_spec.rb +8 -8
- data/spec/unit/scheduler/splay_job_spec.rb +4 -4
- data/spec/unit/semver_spec.rb +66 -64
- data/spec/unit/settings/autosign_setting_spec.rb +1 -0
- data/spec/unit/settings/config_file_spec.rb +13 -40
- data/spec/unit/settings/directory_setting_spec.rb +1 -1
- data/spec/unit/settings/duration_setting_spec.rb +9 -5
- data/spec/unit/settings/environment_conf_spec.rb +0 -11
- data/spec/unit/settings/file_setting_spec.rb +38 -69
- data/spec/unit/settings/ini_file_spec.rb +2 -2
- data/spec/unit/settings/path_setting_spec.rb +5 -5
- data/spec/unit/settings/priority_setting_spec.rb +7 -7
- data/spec/unit/settings/string_setting_spec.rb +7 -7
- data/spec/unit/settings/terminus_setting_spec.rb +4 -4
- data/spec/unit/settings/value_translator_spec.rb +22 -22
- data/spec/unit/settings_spec.rb +189 -338
- data/spec/unit/ssl/base_spec.rb +5 -5
- data/spec/unit/ssl/certificate_authority/autosign_command_spec.rb +2 -2
- data/spec/unit/ssl/certificate_authority/interface_spec.rb +40 -13
- data/spec/unit/ssl/certificate_authority_spec.rb +23 -23
- data/spec/unit/ssl/certificate_factory_spec.rb +39 -26
- data/spec/unit/ssl/certificate_request_attributes_spec.rb +2 -2
- data/spec/unit/ssl/certificate_request_spec.rb +52 -40
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +10 -10
- data/spec/unit/ssl/certificate_spec.rb +35 -38
- data/spec/unit/ssl/configuration_spec.rb +12 -14
- data/spec/unit/ssl/digest_spec.rb +5 -5
- data/spec/unit/ssl/host_spec.rb +91 -91
- data/spec/unit/ssl/inventory_spec.rb +11 -34
- data/spec/unit/ssl/key_spec.rb +23 -23
- data/spec/unit/ssl/oids_spec.rb +28 -15
- data/spec/unit/ssl/validator_spec.rb +16 -17
- data/spec/unit/status_spec.rb +6 -12
- data/spec/unit/transaction/additional_resource_generator_spec.rb +2 -2
- data/spec/unit/transaction/event_manager_spec.rb +38 -8
- data/spec/unit/transaction/event_spec.rb +29 -29
- data/spec/unit/transaction/report_spec.rb +76 -90
- data/spec/unit/transaction/resource_harness_spec.rb +42 -42
- data/spec/unit/transaction_spec.rb +66 -59
- data/spec/unit/type/augeas_spec.rb +20 -20
- data/spec/unit/type/component_spec.rb +10 -10
- data/spec/unit/type/computer_spec.rb +10 -10
- data/spec/unit/type/cron_spec.rb +21 -21
- data/spec/unit/type/exec_spec.rb +65 -73
- data/spec/unit/type/file/checksum_spec.rb +8 -8
- data/spec/unit/type/file/content_spec.rb +144 -85
- data/spec/unit/type/file/ctime_spec.rb +4 -4
- data/spec/unit/type/file/ensure_spec.rb +11 -11
- data/spec/unit/type/file/group_spec.rb +5 -5
- data/spec/unit/type/file/mode_spec.rb +30 -28
- data/spec/unit/type/file/mtime_spec.rb +4 -4
- data/spec/unit/type/file/owner_spec.rb +5 -5
- data/spec/unit/type/file/selinux_spec.rb +8 -8
- data/spec/unit/type/file/source_spec.rb +118 -135
- data/spec/unit/type/file/type_spec.rb +2 -2
- data/spec/unit/type/file_spec.rb +161 -160
- data/spec/unit/type/filebucket_spec.rb +8 -8
- data/spec/unit/type/group_spec.rb +12 -12
- data/spec/unit/type/host_spec.rb +41 -25
- data/spec/unit/type/interface_spec.rb +6 -6
- data/spec/unit/type/k5login_spec.rb +18 -18
- data/spec/unit/type/macauthorization_spec.rb +17 -17
- data/spec/unit/type/mailalias_spec.rb +34 -6
- data/spec/unit/type/maillist_spec.rb +2 -2
- data/spec/unit/type/mcx_spec.rb +13 -13
- data/spec/unit/type/mount_spec.rb +40 -40
- data/spec/unit/type/nagios_spec.rb +23 -23
- data/spec/unit/type/noop_metaparam_spec.rb +5 -5
- data/spec/unit/type/package/package_settings_spec.rb +9 -9
- data/spec/unit/type/package_spec.rb +87 -18
- data/spec/unit/type/resources_spec.rb +46 -46
- data/spec/unit/type/schedule_spec.rb +83 -83
- data/spec/unit/type/scheduled_task_spec.rb +15 -15
- data/spec/unit/type/selboolean_spec.rb +2 -2
- data/spec/unit/type/selmodule_spec.rb +2 -2
- data/spec/unit/type/service_spec.rb +24 -24
- data/spec/unit/type/ssh_authorized_key_spec.rb +2 -2
- data/spec/unit/type/sshkey_spec.rb +0 -0
- data/spec/unit/type/stage_spec.rb +1 -1
- data/spec/unit/type/tidy_spec.rb +58 -39
- data/spec/unit/type/user_spec.rb +56 -56
- data/spec/unit/type/vlan_spec.rb +6 -6
- data/spec/unit/type/whit_spec.rb +1 -1
- data/spec/unit/type/yumrepo_spec.rb +15 -0
- data/spec/unit/type/zfs_spec.rb +3 -3
- data/spec/unit/type/zone_spec.rb +19 -19
- data/spec/unit/type/zpool_spec.rb +15 -15
- data/spec/unit/type_spec.rb +236 -163
- data/spec/unit/util/autoload_spec.rb +31 -25
- data/spec/unit/util/backups_spec.rb +4 -4
- data/spec/unit/util/checksums_spec.rb +55 -27
- data/spec/unit/util/colors_spec.rb +6 -50
- data/spec/unit/util/command_line_spec.rb +13 -41
- data/spec/unit/util/command_line_utils/puppet_option_parser_spec.rb +2 -2
- data/spec/unit/util/constant_inflector_spec.rb +12 -12
- data/spec/unit/util/diff_spec.rb +4 -4
- data/spec/unit/util/errors_spec.rb +5 -5
- data/spec/unit/util/execution_spec.rb +74 -29
- data/spec/unit/util/execution_stub_spec.rb +10 -10
- data/spec/unit/util/feature_spec.rb +15 -19
- data/spec/unit/util/filetype_spec.rb +9 -9
- data/spec/unit/util/http_proxy_spec.rb +18 -18
- data/spec/unit/util/inifile_spec.rb +2 -2
- data/spec/unit/util/json_lockfile_spec.rb +1 -1
- data/spec/unit/util/ldap/connection_spec.rb +6 -6
- data/spec/unit/util/ldap/generator_spec.rb +8 -8
- data/spec/unit/util/ldap/manager_spec.rb +40 -40
- data/spec/unit/util/lockfile_spec.rb +13 -13
- data/spec/unit/util/log/destinations_spec.rb +52 -49
- data/spec/unit/util/log_spec.rb +48 -173
- data/spec/unit/util/logging_spec.rb +120 -3
- data/spec/unit/util/metric_spec.rb +18 -33
- data/spec/unit/util/monkey_patches_spec.rb +18 -139
- data/spec/unit/util/nagios_maker_spec.rb +2 -2
- data/spec/unit/util/network_device/cisco/device_spec.rb +23 -23
- data/spec/unit/util/network_device/cisco/facts_spec.rb +3 -3
- data/spec/unit/util/network_device/cisco/interface_spec.rb +0 -0
- data/spec/unit/util/network_device/config_spec.rb +10 -16
- data/spec/unit/util/network_device/ipcalc_spec.rb +10 -10
- data/spec/unit/util/network_device/transport/base_spec.rb +2 -2
- data/spec/unit/util/network_device/transport/ssh_spec.rb +10 -10
- data/spec/unit/util/network_device/transport/telnet_spec.rb +3 -3
- data/spec/unit/util/network_device_spec.rb +2 -2
- data/spec/unit/util/package_spec.rb +2 -2
- data/spec/unit/util/pidlock_spec.rb +38 -38
- data/spec/unit/util/posix_spec.rb +25 -25
- data/spec/unit/util/profiler/aggregate_spec.rb +14 -18
- data/spec/unit/util/profiler/around_profiler_spec.rb +6 -6
- data/spec/unit/util/profiler/logging_spec.rb +8 -8
- data/spec/unit/util/profiler/object_counts_spec.rb +3 -5
- data/spec/unit/util/profiler/wall_clock_spec.rb +1 -1
- data/spec/unit/util/profiler_spec.rb +6 -14
- data/spec/unit/util/rdoc_spec.rb +0 -85
- data/spec/unit/util/reference_spec.rb +1 -1
- data/spec/unit/util/resource_template_spec.rb +2 -2
- data/spec/unit/util/{retryaction_spec.rb → retry_action_spec.rb} +25 -2
- data/spec/unit/util/rubygems_spec.rb +8 -8
- data/spec/unit/util/run_mode_spec.rb +159 -17
- data/spec/unit/util/selinux_spec.rb +61 -39
- data/spec/unit/util/ssl_spec.rb +13 -13
- data/spec/unit/util/storage_spec.rb +27 -27
- data/spec/unit/util/suidmanager_spec.rb +56 -67
- data/spec/unit/util/symbolic_file_mode_spec.rb +15 -16
- data/spec/unit/util/tag_set_spec.rb +5 -5
- data/spec/unit/util/tagging_spec.rb +0 -0
- data/spec/unit/util/terminal_spec.rb +5 -5
- data/spec/unit/util/user_attr_spec.rb +6 -6
- data/spec/unit/util/warnings_spec.rb +9 -1
- data/spec/unit/util/watcher_spec.rb +1 -1
- data/spec/unit/util/windows/access_control_entry_spec.rb +9 -9
- data/spec/unit/util/windows/access_control_list_spec.rb +21 -21
- data/spec/unit/util/windows/adsi_spec.rb +71 -209
- data/spec/unit/util/windows/api_types_spec.rb +3 -3
- data/spec/unit/util/windows/registry_spec.rb +71 -46
- data/spec/unit/util/windows/root_certs_spec.rb +1 -1
- data/spec/unit/util/windows/security_descriptor_spec.rb +18 -18
- data/spec/unit/util/windows/sid_spec.rb +40 -20
- data/spec/unit/util/windows/string_spec.rb +4 -4
- data/spec/unit/util/yaml_spec.rb +1 -1
- data/spec/unit/util_spec.rb +73 -124
- data/spec/unit/version_spec.rb +4 -4
- data/spec/watchr.rb +1 -5
- data/tasks/benchmark.rake +1 -6
- data/tasks/ci.rake +1 -1
- data/tasks/manpages.rake +0 -9
- data/tasks/parallel.rake +4 -7
- data/tasks/parser.rake +0 -5
- metadata +179 -481
- data/conf/tagmail.conf +0 -16
- data/ext/debian/puppet.conf +0 -14
- data/ext/debian/puppetmaster-common.puppetqd.default +0 -27
- data/ext/debian/puppetmaster-common.puppetqd.init +0 -84
- data/ext/gentoo/puppet/puppet.conf +0 -25
- data/ext/ips/puppet.conf +0 -29
- data/ext/nagios/naggen +0 -309
- data/ext/puppet-load.rb +0 -393
- data/ext/redhat/puppet.conf +0 -25
- data/ext/redhat/queue.init +0 -105
- data/lib/hiera/backend/puppet_backend.rb +0 -103
- data/lib/puppet/application/instrumentation_data.rb +0 -7
- data/lib/puppet/application/instrumentation_listener.rb +0 -7
- data/lib/puppet/application/instrumentation_probe.rb +0 -7
- data/lib/puppet/application/kick.rb +0 -351
- data/lib/puppet/application/queue.rb +0 -161
- data/lib/puppet/application/secret_agent.rb +0 -9
- data/lib/puppet/dsl.rb +0 -7
- data/lib/puppet/dsl/resource_api.rb +0 -120
- data/lib/puppet/dsl/resource_type_api.rb +0 -34
- data/lib/puppet/face/instrumentation_data.rb +0 -30
- data/lib/puppet/face/instrumentation_listener.rb +0 -98
- data/lib/puppet/face/instrumentation_probe.rb +0 -79
- data/lib/puppet/face/secret_agent.rb +0 -54
- data/lib/puppet/feature/pson.rb +0 -4
- data/lib/puppet/feature/rails.rb +0 -47
- data/lib/puppet/feature/rdoc1.rb +0 -16
- data/lib/puppet/feature/rubygems.rb +0 -7
- data/lib/puppet/feature/stomp.rb +0 -5
- data/lib/puppet/file_collection.rb +0 -19
- data/lib/puppet/file_collection/lookup.rb +0 -10
- data/lib/puppet/file_system/file18.rb +0 -5
- data/lib/puppet/functions/defined.rb +0 -130
- data/lib/puppet/indirector/active_record.rb +0 -29
- data/lib/puppet/indirector/catalog/active_record.rb +0 -39
- data/lib/puppet/indirector/catalog/queue.rb +0 -9
- data/lib/puppet/indirector/couch.rb +0 -78
- data/lib/puppet/indirector/facts/active_record.rb +0 -44
- data/lib/puppet/indirector/facts/couch.rb +0 -36
- data/lib/puppet/indirector/facts/inventory_active_record.rb +0 -110
- data/lib/puppet/indirector/facts/inventory_service.rb +0 -20
- data/lib/puppet/indirector/facts/rest.rb +0 -8
- data/lib/puppet/indirector/instrumentation_data.rb +0 -3
- data/lib/puppet/indirector/instrumentation_data/local.rb +0 -22
- data/lib/puppet/indirector/instrumentation_data/rest.rb +0 -8
- data/lib/puppet/indirector/instrumentation_listener.rb +0 -3
- data/lib/puppet/indirector/instrumentation_listener/local.rb +0 -26
- data/lib/puppet/indirector/instrumentation_listener/rest.rb +0 -8
- data/lib/puppet/indirector/instrumentation_probe.rb +0 -3
- data/lib/puppet/indirector/instrumentation_probe/local.rb +0 -27
- data/lib/puppet/indirector/instrumentation_probe/rest.rb +0 -8
- data/lib/puppet/indirector/node/active_record.rb +0 -22
- data/lib/puppet/indirector/queue.rb +0 -80
- data/lib/puppet/indirector/resource/active_record.rb +0 -104
- data/lib/puppet/indirector/resource/rest.rb +0 -17
- data/lib/puppet/indirector/run/local.rb +0 -15
- data/lib/puppet/indirector/run/rest.rb +0 -12
- data/lib/puppet/module_tool/modulefile.rb +0 -78
- data/lib/puppet/network/authentication.rb +0 -35
- data/lib/puppet/network/http/api/v2.rb +0 -32
- data/lib/puppet/network/http/api/v2/authorization.rb +0 -15
- data/lib/puppet/parser/ast/arithmetic_operator.rb +0 -91
- data/lib/puppet/parser/ast/astarray.rb +0 -50
- data/lib/puppet/parser/ast/asthash.rb +0 -37
- data/lib/puppet/parser/ast/boolean_operator.rb +0 -46
- data/lib/puppet/parser/ast/caseopt.rb +0 -52
- data/lib/puppet/parser/ast/casestatement.rb +0 -41
- data/lib/puppet/parser/ast/collection.rb +0 -53
- data/lib/puppet/parser/ast/collexpr.rb +0 -109
- data/lib/puppet/parser/ast/comparison_operator.rb +0 -38
- data/lib/puppet/parser/ast/definition.rb +0 -17
- data/lib/puppet/parser/ast/else.rb +0 -22
- data/lib/puppet/parser/ast/function.rb +0 -59
- data/lib/puppet/parser/ast/ifstatement.rb +0 -34
- data/lib/puppet/parser/ast/in_operator.rb +0 -24
- data/lib/puppet/parser/ast/lambda.rb +0 -135
- data/lib/puppet/parser/ast/match_operator.rb +0 -28
- data/lib/puppet/parser/ast/method_call.rb +0 -77
- data/lib/puppet/parser/ast/minus.rb +0 -23
- data/lib/puppet/parser/ast/nop.rb +0 -11
- data/lib/puppet/parser/ast/not.rb +0 -19
- data/lib/puppet/parser/ast/relationship.rb +0 -47
- data/lib/puppet/parser/ast/resource_defaults.rb +0 -24
- data/lib/puppet/parser/ast/resource_override.rb +0 -62
- data/lib/puppet/parser/ast/resource_reference.rb +0 -28
- data/lib/puppet/parser/ast/selector.rb +0 -50
- data/lib/puppet/parser/ast/vardef.rb +0 -38
- data/lib/puppet/parser/code_merger.rb +0 -13
- data/lib/puppet/parser/collector.rb +0 -177
- data/lib/puppet/parser/functions/extlookup.rb +0 -153
- data/lib/puppet/parser/functions/search.rb +0 -12
- data/lib/puppet/parser/grammar.ra +0 -806
- data/lib/puppet/parser/lexer.rb +0 -608
- data/lib/puppet/parser/makefile +0 -8
- data/lib/puppet/parser/methods.rb +0 -69
- data/lib/puppet/parser/parser.rb +0 -2559
- data/lib/puppet/parser/parser_support.rb +0 -195
- data/lib/puppet/pops/binder/lookup.rb +0 -216
- data/lib/puppet/pops/migration/migration_checker.rb +0 -45
- data/lib/puppet/pops/model/ast_tree_dumper.rb +0 -386
- data/lib/puppet/provider/package/msi.rb +0 -125
- data/lib/puppet/provider/package/yumhelper.py +0 -159
- data/lib/puppet/rails.rb +0 -139
- data/lib/puppet/rails/benchmark.rb +0 -63
- data/lib/puppet/rails/database/001_add_created_at_to_all_tables.rb +0 -13
- data/lib/puppet/rails/database/002_remove_duplicated_index_on_all_tables.rb +0 -13
- data/lib/puppet/rails/database/003_add_environment_to_host.rb +0 -9
- data/lib/puppet/rails/database/004_add_inventory_service_tables.rb +0 -36
- data/lib/puppet/rails/database/schema.rb +0 -136
- data/lib/puppet/rails/fact_name.rb +0 -7
- data/lib/puppet/rails/fact_value.rb +0 -10
- data/lib/puppet/rails/host.rb +0 -258
- data/lib/puppet/rails/inventory_fact.rb +0 -5
- data/lib/puppet/rails/inventory_node.rb +0 -43
- data/lib/puppet/rails/param_name.rb +0 -25
- data/lib/puppet/rails/param_value.rb +0 -74
- data/lib/puppet/rails/puppet_tag.rb +0 -10
- data/lib/puppet/rails/resource.rb +0 -235
- data/lib/puppet/rails/resource_tag.rb +0 -26
- data/lib/puppet/rails/source_file.rb +0 -8
- data/lib/puppet/reports/rrdgraph.rb +0 -128
- data/lib/puppet/reports/tagmail.rb +0 -179
- data/lib/puppet/run.rb +0 -109
- data/lib/puppet/util/cacher.rb +0 -74
- data/lib/puppet/util/inline_docs.rb +0 -26
- data/lib/puppet/util/instrumentation.rb +0 -152
- data/lib/puppet/util/instrumentation/data.rb +0 -46
- data/lib/puppet/util/instrumentation/indirection_probe.rb +0 -41
- data/lib/puppet/util/instrumentation/instrumentable.rb +0 -136
- data/lib/puppet/util/instrumentation/listener.rb +0 -72
- data/lib/puppet/util/instrumentation/listeners/log.rb +0 -23
- data/lib/puppet/util/instrumentation/listeners/performance.rb +0 -24
- data/lib/puppet/util/log/rate_limited_logger.rb +0 -40
- data/lib/puppet/util/monkey_patches/lines.rb +0 -13
- data/lib/puppet/util/plugins.rb +0 -82
- data/lib/puppet/util/pson.rb +0 -13
- data/lib/puppet/util/queue.rb +0 -96
- data/lib/puppet/util/queue/stomp.rb +0 -60
- data/lib/puppet/util/rails/cache_accumulator.rb +0 -65
- data/lib/puppet/util/rails/collection_merger.rb +0 -17
- data/lib/puppet/util/rails/reference_serializer.rb +0 -32
- data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc1.rb +0 -19
- data/lib/puppet/util/retryaction.rb +0 -47
- data/lib/puppet/util/zaml.rb +0 -419
- data/lib/puppet/vendor/load_safe_yaml.rb +0 -1
- data/lib/puppet/vendor/safe_yaml/CHANGES.md +0 -104
- data/lib/puppet/vendor/safe_yaml/Gemfile +0 -11
- data/lib/puppet/vendor/safe_yaml/LICENSE.txt +0 -22
- data/lib/puppet/vendor/safe_yaml/PUPPET_README.md +0 -6
- data/lib/puppet/vendor/safe_yaml/README.md +0 -179
- data/lib/puppet/vendor/safe_yaml/Rakefile +0 -6
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb +0 -253
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/deep.rb +0 -34
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/parse/date.rb +0 -27
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/parse/hexadecimal.rb +0 -12
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/parse/sexagesimal.rb +0 -26
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/psych_handler.rb +0 -92
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/psych_resolver.rb +0 -52
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/resolver.rb +0 -94
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -17
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_hack.rb +0 -36
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb +0 -43
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_resolver.rb +0 -38
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform.rb +0 -41
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_boolean.rb +0 -21
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb +0 -11
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_float.rb +0 -33
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_integer.rb +0 -25
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb +0 -18
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb +0 -13
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/transformation_map.rb +0 -47
- data/lib/puppet/vendor/safe_yaml/lib/safe_yaml/version.rb +0 -3
- data/lib/puppet/vendor/safe_yaml/run_specs_all_ruby_versions.sh +0 -21
- data/lib/puppet/vendor/safe_yaml/safe_yaml.gemspec +0 -18
- data/lib/puppet/vendor/safe_yaml/spec/exploit.1.9.2.yaml +0 -2
- data/lib/puppet/vendor/safe_yaml/spec/exploit.1.9.3.yaml +0 -2
- data/lib/puppet/vendor/safe_yaml/spec/psych_resolver_spec.rb +0 -10
- data/lib/puppet/vendor/safe_yaml/spec/resolver_specs.rb +0 -250
- data/lib/puppet/vendor/safe_yaml/spec/safe_yaml_spec.rb +0 -702
- data/lib/puppet/vendor/safe_yaml/spec/spec_helper.rb +0 -18
- data/lib/puppet/vendor/safe_yaml/spec/support/exploitable_back_door.rb +0 -29
- data/lib/puppet/vendor/safe_yaml/spec/syck_resolver_spec.rb +0 -10
- data/lib/puppet/vendor/safe_yaml/spec/transform/base64_spec.rb +0 -11
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_date_spec.rb +0 -34
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_float_spec.rb +0 -42
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_integer_spec.rb +0 -59
- data/lib/puppet/vendor/safe_yaml/spec/transform/to_symbol_spec.rb +0 -49
- data/lib/puppet/vendor/safe_yaml_patches.rb +0 -9
- data/lib/puppetx.rb +0 -89
- data/man/man8/puppet-instrumentation_data.8 +0 -141
- data/man/man8/puppet-instrumentation_listener.8 +0 -218
- data/man/man8/puppet-instrumentation_probe.8 +0 -203
- data/man/man8/puppet-kick.8 +0 -131
- data/man/man8/puppet-queue.8 +0 -55
- data/man/man8/puppet-secret_agent.8 +0 -70
- data/spec/fixtures/module.tar.gz +0 -0
- data/spec/fixtures/unit/provider/package/pkg/publisher +0 -2
- data/spec/fixtures/unit/provider/package/pkg/simple +0 -2
- data/spec/fixtures/yaml/report0.25.x.yaml +0 -64
- data/spec/integration/indirector/catalog/queue_spec.rb +0 -55
- data/spec/integration/module_tool/tar/mini_spec.rb +0 -28
- data/spec/integration/parser/dynamic_scoping_spec.rb +0 -131
- data/spec/integration/parser/future_compiler_spec.rb +0 -822
- data/spec/integration/parser/parser_spec.rb +0 -207
- data/spec/integration/parser/ruby_manifest_spec.rb +0 -119
- data/spec/integration/type/sshkey_spec.rb +0 -22
- data/spec/integration/util/feature_spec.rb +0 -53
- data/spec/lib/puppet_spec/database.rb +0 -29
- data/spec/monkey_patches/alias_should_to_must.rb +0 -21
- data/spec/shared_contexts/platform.rb +0 -52
- data/spec/unit/application/kick_spec.rb +0 -296
- data/spec/unit/application/queue_spec.rb +0 -168
- data/spec/unit/application/secret_agent_spec.rb +0 -34
- data/spec/unit/dsl/resource_api_spec.rb +0 -180
- data/spec/unit/dsl/resource_type_api_spec.rb +0 -53
- data/spec/unit/face/instrumentation_data_spec.rb +0 -7
- data/spec/unit/face/instrumentation_listener_spec.rb +0 -38
- data/spec/unit/face/instrumentation_probe_spec.rb +0 -21
- data/spec/unit/face/secret_agent_spec.rb +0 -27
- data/spec/unit/functions/defined_spec.rb +0 -291
- data/spec/unit/hiera/backend/puppet_backend_spec.rb +0 -148
- data/spec/unit/indirector/active_record_spec.rb +0 -75
- data/spec/unit/indirector/catalog/active_record_spec.rb +0 -107
- data/spec/unit/indirector/catalog/queue_spec.rb +0 -19
- data/spec/unit/indirector/facts/active_record_spec.rb +0 -113
- data/spec/unit/indirector/facts/couch_spec.rb +0 -102
- data/spec/unit/indirector/facts/inventory_active_record_spec.rb +0 -175
- data/spec/unit/indirector/facts/inventory_service_spec.rb +0 -21
- data/spec/unit/indirector/facts/rest_spec.rb +0 -10
- data/spec/unit/indirector/instrumentation_data/local_spec.rb +0 -52
- data/spec/unit/indirector/instrumentation_data/rest_spec.rb +0 -11
- data/spec/unit/indirector/instrumentation_listener/local_spec.rb +0 -65
- data/spec/unit/indirector/instrumentation_listener/rest_spec.rb +0 -11
- data/spec/unit/indirector/instrumentation_probe/local_spec.rb +0 -65
- data/spec/unit/indirector/instrumentation_probe/rest_spec.rb +0 -11
- data/spec/unit/indirector/node/active_record_spec.rb +0 -48
- data/spec/unit/indirector/queue_spec.rb +0 -115
- data/spec/unit/indirector/resource/active_record_spec.rb +0 -166
- data/spec/unit/indirector/resource/rest_spec.rb +0 -10
- data/spec/unit/indirector/run/local_spec.rb +0 -21
- data/spec/unit/indirector/run/rest_spec.rb +0 -10
- data/spec/unit/network/authentication_spec.rb +0 -104
- data/spec/unit/network/http/api/v2_spec.rb +0 -14
- data/spec/unit/parser/ast/arithmetic_operator_spec.rb +0 -160
- data/spec/unit/parser/ast/astarray_spec.rb +0 -56
- data/spec/unit/parser/ast/asthash_spec.rb +0 -98
- data/spec/unit/parser/ast/boolean_operator_spec.rb +0 -54
- data/spec/unit/parser/ast/casestatement_spec.rb +0 -168
- data/spec/unit/parser/ast/collection_spec.rb +0 -70
- data/spec/unit/parser/ast/collexpr_spec.rb +0 -120
- data/spec/unit/parser/ast/comparison_operator_spec.rb +0 -118
- data/spec/unit/parser/ast/definition_spec.rb +0 -21
- data/spec/unit/parser/ast/function_spec.rb +0 -92
- data/spec/unit/parser/ast/hostclass_spec.rb +0 -72
- data/spec/unit/parser/ast/ifstatement_spec.rb +0 -77
- data/spec/unit/parser/ast/in_operator_spec.rb +0 -61
- data/spec/unit/parser/ast/match_operator_spec.rb +0 -51
- data/spec/unit/parser/ast/minus_spec.rb +0 -37
- data/spec/unit/parser/ast/node_spec.rb +0 -30
- data/spec/unit/parser/ast/nop_spec.rb +0 -19
- data/spec/unit/parser/ast/not_spec.rb +0 -31
- data/spec/unit/parser/ast/relationship_spec.rb +0 -87
- data/spec/unit/parser/ast/resource_defaults_spec.rb +0 -21
- data/spec/unit/parser/ast/resource_override_spec.rb +0 -50
- data/spec/unit/parser/ast/resource_reference_spec.rb +0 -56
- data/spec/unit/parser/ast/resource_spec.rb +0 -183
- data/spec/unit/parser/ast/resourceparam_spec.rb +0 -51
- data/spec/unit/parser/ast/selector_spec.rb +0 -88
- data/spec/unit/parser/ast/vardef_spec.rb +0 -68
- data/spec/unit/parser/ast_spec.rb +0 -76
- data/spec/unit/parser/collector_spec.rb +0 -438
- data/spec/unit/parser/functions/extlookup_spec.rb +0 -102
- data/spec/unit/parser/functions/search_spec.rb +0 -28
- data/spec/unit/parser/lexer_spec.rb +0 -877
- data/spec/unit/parser/parser_spec.rb +0 -535
- data/spec/unit/pops/evaluator/runtime3_converter_spec.rb +0 -19
- data/spec/unit/pops/migration_spec.rb +0 -180
- data/spec/unit/pops/model/ast_transformer_spec.rb +0 -76
- data/spec/unit/pops/transformer/transform_basic_expressions_spec.rb +0 -243
- data/spec/unit/pops/transformer/transform_calls_spec.rb +0 -115
- data/spec/unit/pops/transformer/transform_conditionals_spec.rb +0 -123
- data/spec/unit/pops/transformer/transform_containers_spec.rb +0 -190
- data/spec/unit/pops/transformer/transformer_rspec_helper.rb +0 -27
- data/spec/unit/pops/validation_spec.rb +0 -66
- data/spec/unit/provider/package/msi_spec.rb +0 -229
- data/spec/unit/rails/host_spec.rb +0 -162
- data/spec/unit/rails/param_value_spec.rb +0 -46
- data/spec/unit/rails/resource_spec.rb +0 -115
- data/spec/unit/rails_spec.rb +0 -244
- data/spec/unit/reports/rrdgraph_spec.rb +0 -29
- data/spec/unit/reports/tagmail_spec.rb +0 -218
- data/spec/unit/run_spec.rb +0 -175
- data/spec/unit/util/cache_accumulator_spec.rb +0 -74
- data/spec/unit/util/cacher_spec.rb +0 -107
- data/spec/unit/util/inline_docs_spec.rb +0 -31
- data/spec/unit/util/instrumentation/data_spec.rb +0 -46
- data/spec/unit/util/instrumentation/indirection_probe_spec.rb +0 -21
- data/spec/unit/util/instrumentation/instrumentable_spec.rb +0 -186
- data/spec/unit/util/instrumentation/listener_spec.rb +0 -101
- data/spec/unit/util/instrumentation/listeners/log_spec.rb +0 -34
- data/spec/unit/util/instrumentation/listeners/performance_spec.rb +0 -36
- data/spec/unit/util/instrumentation_spec.rb +0 -181
- data/spec/unit/util/log/rate_limited_logger_spec.rb +0 -51
- data/spec/unit/util/monkey_patches/lines_spec.rb +0 -83
- data/spec/unit/util/queue/stomp_spec.rb +0 -137
- data/spec/unit/util/queue_spec.rb +0 -94
- data/spec/unit/util/rdoc/parser_spec.rb +0 -608
- data/spec/unit/util/reference_serializer_spec.rb +0 -51
- data/spec/unit/util/zaml_spec.rb +0 -308
@@ -11,9 +11,9 @@ describe Puppet::Type.type(:file).attrclass(:type) do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should prevent the user from trying to set the type" do
|
14
|
-
|
14
|
+
expect {
|
15
15
|
@resource[:type] = "fifo"
|
16
|
-
}.
|
16
|
+
}.to raise_error(Puppet::Error, /type is read-only/)
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
data/spec/unit/type/file_spec.rb
CHANGED
@@ -17,59 +17,59 @@ describe Puppet::Type.type(:file) do
|
|
17
17
|
describe "on POSIX systems", :if => Puppet.features.posix? do
|
18
18
|
it "should remove trailing slashes" do
|
19
19
|
file[:path] = "/foo/bar/baz/"
|
20
|
-
file[:path].
|
20
|
+
expect(file[:path]).to eq("/foo/bar/baz")
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should remove double slashes" do
|
24
24
|
file[:path] = "/foo/bar//baz"
|
25
|
-
file[:path].
|
25
|
+
expect(file[:path]).to eq("/foo/bar/baz")
|
26
26
|
end
|
27
27
|
|
28
28
|
it "should remove triple slashes" do
|
29
29
|
file[:path] = "/foo/bar///baz"
|
30
|
-
file[:path].
|
30
|
+
expect(file[:path]).to eq("/foo/bar/baz")
|
31
31
|
end
|
32
32
|
|
33
33
|
it "should remove trailing double slashes" do
|
34
34
|
file[:path] = "/foo/bar/baz//"
|
35
|
-
file[:path].
|
35
|
+
expect(file[:path]).to eq("/foo/bar/baz")
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should leave a single slash alone" do
|
39
39
|
file[:path] = "/"
|
40
|
-
file[:path].
|
40
|
+
expect(file[:path]).to eq("/")
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should accept and collapse a double-slash at the start of the path" do
|
44
44
|
file[:path] = "//tmp/xxx"
|
45
|
-
file[:path].
|
45
|
+
expect(file[:path]).to eq('/tmp/xxx')
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should accept and collapse a triple-slash at the start of the path" do
|
49
49
|
file[:path] = "///tmp/xxx"
|
50
|
-
file[:path].
|
50
|
+
expect(file[:path]).to eq('/tmp/xxx')
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
describe "on Windows systems", :if => Puppet.features.microsoft_windows? do
|
55
55
|
it "should remove trailing slashes" do
|
56
56
|
file[:path] = "X:/foo/bar/baz/"
|
57
|
-
file[:path].
|
57
|
+
expect(file[:path]).to eq("X:/foo/bar/baz")
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should remove double slashes" do
|
61
61
|
file[:path] = "X:/foo/bar//baz"
|
62
|
-
file[:path].
|
62
|
+
expect(file[:path]).to eq("X:/foo/bar/baz")
|
63
63
|
end
|
64
64
|
|
65
65
|
it "should remove trailing double slashes" do
|
66
66
|
file[:path] = "X:/foo/bar/baz//"
|
67
|
-
file[:path].
|
67
|
+
expect(file[:path]).to eq("X:/foo/bar/baz")
|
68
68
|
end
|
69
69
|
|
70
70
|
it "should leave a drive letter with a slash alone" do
|
71
71
|
file[:path] = "X:/"
|
72
|
-
file[:path].
|
72
|
+
expect(file[:path]).to eq("X:/")
|
73
73
|
end
|
74
74
|
|
75
75
|
it "should not accept a drive letter without a slash" do
|
@@ -79,27 +79,27 @@ describe Puppet::Type.type(:file) do
|
|
79
79
|
describe "when using UNC filenames", :if => Puppet.features.microsoft_windows? do
|
80
80
|
it "should remove trailing slashes" do
|
81
81
|
file[:path] = "//localhost/foo/bar/baz/"
|
82
|
-
file[:path].
|
82
|
+
expect(file[:path]).to eq("//localhost/foo/bar/baz")
|
83
83
|
end
|
84
84
|
|
85
85
|
it "should remove double slashes" do
|
86
86
|
file[:path] = "//localhost/foo/bar//baz"
|
87
|
-
file[:path].
|
87
|
+
expect(file[:path]).to eq("//localhost/foo/bar/baz")
|
88
88
|
end
|
89
89
|
|
90
90
|
it "should remove trailing double slashes" do
|
91
91
|
file[:path] = "//localhost/foo/bar/baz//"
|
92
|
-
file[:path].
|
92
|
+
expect(file[:path]).to eq("//localhost/foo/bar/baz")
|
93
93
|
end
|
94
94
|
|
95
95
|
it "should remove a trailing slash from a sharename" do
|
96
96
|
file[:path] = "//localhost/foo/"
|
97
|
-
file[:path].
|
97
|
+
expect(file[:path]).to eq("//localhost/foo")
|
98
98
|
end
|
99
99
|
|
100
100
|
it "should not modify a sharename" do
|
101
101
|
file[:path] = "//localhost/foo"
|
102
|
-
file[:path].
|
102
|
+
expect(file[:path]).to eq("//localhost/foo")
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
@@ -109,20 +109,20 @@ describe Puppet::Type.type(:file) do
|
|
109
109
|
[false, 'false', :false].each do |value|
|
110
110
|
it "should disable backup if the value is #{value.inspect}" do
|
111
111
|
file[:backup] = value
|
112
|
-
file[:backup].
|
112
|
+
expect(file[:backup]).to eq(false)
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
116
|
[true, 'true', '.puppet-bak'].each do |value|
|
117
117
|
it "should use .puppet-bak if the value is #{value.inspect}" do
|
118
118
|
file[:backup] = value
|
119
|
-
file[:backup].
|
119
|
+
expect(file[:backup]).to eq('.puppet-bak')
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
123
|
it "should use the provided value if it's any other string" do
|
124
124
|
file[:backup] = "over there"
|
125
|
-
file[:backup].
|
125
|
+
expect(file[:backup]).to eq("over there")
|
126
126
|
end
|
127
127
|
|
128
128
|
it "should fail if backup is set to anything else" do
|
@@ -134,13 +134,13 @@ describe Puppet::Type.type(:file) do
|
|
134
134
|
|
135
135
|
describe "the recurse parameter" do
|
136
136
|
it "should default to recursion being disabled" do
|
137
|
-
file[:recurse].
|
137
|
+
expect(file[:recurse]).to be_falsey
|
138
138
|
end
|
139
139
|
|
140
|
-
[true, "true", "
|
140
|
+
[true, "true", "remote"].each do |value|
|
141
141
|
it "should consider #{value} to enable recursion" do
|
142
142
|
file[:recurse] = value
|
143
|
-
file[:recurse].
|
143
|
+
expect(file[:recurse]).to be_truthy
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
@@ -152,7 +152,7 @@ describe Puppet::Type.type(:file) do
|
|
152
152
|
[false, "false"].each do |value|
|
153
153
|
it "should consider #{value} to disable recursion" do
|
154
154
|
file[:recurse] = value
|
155
|
-
file[:recurse].
|
155
|
+
expect(file[:recurse]).to be_falsey
|
156
156
|
end
|
157
157
|
end
|
158
158
|
end
|
@@ -160,12 +160,12 @@ describe Puppet::Type.type(:file) do
|
|
160
160
|
describe "the recurselimit parameter" do
|
161
161
|
it "should accept integers" do
|
162
162
|
file[:recurselimit] = 12
|
163
|
-
file[:recurselimit].
|
163
|
+
expect(file[:recurselimit]).to eq(12)
|
164
164
|
end
|
165
165
|
|
166
166
|
it "should munge string numbers to number numbers" do
|
167
167
|
file[:recurselimit] = '12'
|
168
|
-
file[:recurselimit].
|
168
|
+
expect(file[:recurselimit]).to eq(12)
|
169
169
|
end
|
170
170
|
|
171
171
|
it "should fail if given a non-number" do
|
@@ -179,34 +179,34 @@ describe Puppet::Type.type(:file) do
|
|
179
179
|
[true, :true, :yes].each do |value|
|
180
180
|
it "should consider #{value} to be true" do
|
181
181
|
file[:replace] = value
|
182
|
-
file[:replace].
|
182
|
+
expect(file[:replace]).to be_truthy
|
183
183
|
end
|
184
184
|
end
|
185
185
|
|
186
186
|
[false, :false, :no].each do |value|
|
187
187
|
it "should consider #{value} to be false" do
|
188
188
|
file[:replace] = value
|
189
|
-
file[:replace].
|
189
|
+
expect(file[:replace]).to be_falsey
|
190
190
|
end
|
191
191
|
end
|
192
192
|
end
|
193
193
|
|
194
194
|
describe ".instances" do
|
195
195
|
it "should return an empty array" do
|
196
|
-
described_class.instances.
|
196
|
+
expect(described_class.instances).to eq([])
|
197
197
|
end
|
198
198
|
end
|
199
199
|
|
200
200
|
describe "#bucket" do
|
201
201
|
it "should return nil if backup is off" do
|
202
202
|
file[:backup] = false
|
203
|
-
file.bucket.
|
203
|
+
expect(file.bucket).to eq(nil)
|
204
204
|
end
|
205
205
|
|
206
206
|
it "should not return a bucket if using a file extension for backup" do
|
207
207
|
file[:backup] = '.backup'
|
208
208
|
|
209
|
-
file.bucket.
|
209
|
+
expect(file.bucket).to eq(nil)
|
210
210
|
end
|
211
211
|
|
212
212
|
it "should return the default filebucket if using the 'puppet' filebucket" do
|
@@ -214,7 +214,7 @@ describe Puppet::Type.type(:file) do
|
|
214
214
|
bucket = stub('bucket')
|
215
215
|
file.stubs(:default_bucket).returns bucket
|
216
216
|
|
217
|
-
file.bucket.
|
217
|
+
expect(file.bucket).to eq(bucket)
|
218
218
|
end
|
219
219
|
|
220
220
|
it "should fail if using a remote filebucket and no catalog exists" do
|
@@ -235,7 +235,7 @@ describe Puppet::Type.type(:file) do
|
|
235
235
|
filebucket = Puppet::Type.type(:filebucket).new(:name => 'my_bucket')
|
236
236
|
catalog.add_resource(filebucket)
|
237
237
|
|
238
|
-
file.bucket.
|
238
|
+
expect(file.bucket).to eq(filebucket.bucket)
|
239
239
|
end
|
240
240
|
end
|
241
241
|
|
@@ -243,37 +243,37 @@ describe Puppet::Type.type(:file) do
|
|
243
243
|
before :each do
|
244
244
|
# Mocha won't let me just stub SUIDManager.asuser to yield and return,
|
245
245
|
# but it will do exactly that if we're not root.
|
246
|
-
Puppet.
|
246
|
+
Puppet::Util::SUIDManager.stubs(:root?).returns false
|
247
247
|
end
|
248
248
|
|
249
249
|
it "should return the desired owner if they can write to the parent directory" do
|
250
250
|
file[:owner] = 1001
|
251
251
|
FileTest.stubs(:writable?).with(File.dirname file[:path]).returns true
|
252
252
|
|
253
|
-
file.asuser.
|
253
|
+
expect(file.asuser).to eq(1001)
|
254
254
|
end
|
255
255
|
|
256
256
|
it "should return nil if the desired owner can't write to the parent directory" do
|
257
257
|
file[:owner] = 1001
|
258
258
|
FileTest.stubs(:writable?).with(File.dirname file[:path]).returns false
|
259
259
|
|
260
|
-
file.asuser.
|
260
|
+
expect(file.asuser).to eq(nil)
|
261
261
|
end
|
262
262
|
|
263
263
|
it "should return nil if not managing owner" do
|
264
|
-
file.asuser.
|
264
|
+
expect(file.asuser).to eq(nil)
|
265
265
|
end
|
266
266
|
end
|
267
267
|
|
268
268
|
describe "#exist?" do
|
269
269
|
it "should be considered existent if it can be stat'ed" do
|
270
270
|
file.expects(:stat).returns mock('stat')
|
271
|
-
file.
|
271
|
+
expect(file).to be_exist
|
272
272
|
end
|
273
273
|
|
274
274
|
it "should be considered nonexistent if it can not be stat'ed" do
|
275
275
|
file.expects(:stat).returns nil
|
276
|
-
file.
|
276
|
+
expect(file).to_not be_exist
|
277
277
|
end
|
278
278
|
end
|
279
279
|
|
@@ -289,7 +289,7 @@ describe Puppet::Type.type(:file) do
|
|
289
289
|
|
290
290
|
file[:recurse] = true
|
291
291
|
|
292
|
-
file.eval_generate.
|
292
|
+
expect(file.eval_generate).to eq([resource])
|
293
293
|
end
|
294
294
|
|
295
295
|
it "should not recurse if recursion is disabled" do
|
@@ -297,7 +297,7 @@ describe Puppet::Type.type(:file) do
|
|
297
297
|
|
298
298
|
file[:recurse] = false
|
299
299
|
|
300
|
-
file.eval_generate.
|
300
|
+
expect(file.eval_generate).to eq([])
|
301
301
|
end
|
302
302
|
end
|
303
303
|
|
@@ -309,9 +309,9 @@ describe Puppet::Type.type(:file) do
|
|
309
309
|
|
310
310
|
ancestors = file.ancestors
|
311
311
|
|
312
|
-
ancestors.
|
312
|
+
expect(ancestors).not_to be_empty
|
313
313
|
ancestors.reverse.each_with_index do |path,i|
|
314
|
-
path.
|
314
|
+
expect(path).to eq(File.join(*pieces[0..i]))
|
315
315
|
end
|
316
316
|
end
|
317
317
|
end
|
@@ -327,11 +327,11 @@ describe Puppet::Type.type(:file) do
|
|
327
327
|
FileUtils.touch(path)
|
328
328
|
stat1 = file.stat
|
329
329
|
|
330
|
-
file.stat.
|
330
|
+
expect(file.stat).to equal(stat1)
|
331
331
|
|
332
332
|
file.flush
|
333
333
|
|
334
|
-
file.stat.
|
334
|
+
expect(file.stat).not_to equal(stat1)
|
335
335
|
end
|
336
336
|
end
|
337
337
|
|
@@ -339,17 +339,17 @@ describe Puppet::Type.type(:file) do
|
|
339
339
|
it "should remove a trailing slash from the title to create the path" do
|
340
340
|
title = File.expand_path("/abc/\n\tdef/")
|
341
341
|
file = described_class.new(:title => title)
|
342
|
-
file[:path].
|
342
|
+
expect(file[:path]).to eq(title)
|
343
343
|
end
|
344
344
|
|
345
345
|
it "should set a desired 'ensure' value if none is set and 'content' is set" do
|
346
346
|
file = described_class.new(:path => path, :content => "/foo/bar")
|
347
|
-
file[:ensure].
|
347
|
+
expect(file[:ensure]).to eq(:file)
|
348
348
|
end
|
349
349
|
|
350
350
|
it "should set a desired 'ensure' value if none is set and 'target' is set", :if => described_class.defaultprovider.feature?(:manages_symlinks) do
|
351
351
|
file = described_class.new(:path => path, :target => File.expand_path(__FILE__))
|
352
|
-
file[:ensure].
|
352
|
+
expect(file[:ensure]).to eq(:link)
|
353
353
|
end
|
354
354
|
end
|
355
355
|
|
@@ -362,9 +362,9 @@ describe Puppet::Type.type(:file) do
|
|
362
362
|
|
363
363
|
file.mark_children_for_purging(children)
|
364
364
|
|
365
|
-
children.length.
|
365
|
+
expect(children.length).to eq(3)
|
366
366
|
children.values.each do |child|
|
367
|
-
child[:ensure].
|
367
|
+
expect(child[:ensure]).to eq(:absent)
|
368
368
|
end
|
369
369
|
end
|
370
370
|
|
@@ -373,7 +373,7 @@ describe Puppet::Type.type(:file) do
|
|
373
373
|
|
374
374
|
file.mark_children_for_purging('foo' => child)
|
375
375
|
|
376
|
-
child[:ensure].
|
376
|
+
expect(child[:ensure]).to eq(:present)
|
377
377
|
end
|
378
378
|
end
|
379
379
|
|
@@ -381,8 +381,8 @@ describe Puppet::Type.type(:file) do
|
|
381
381
|
it "should create a new resource relative to the parent" do
|
382
382
|
child = file.newchild('bar')
|
383
383
|
|
384
|
-
child.
|
385
|
-
child[:path].
|
384
|
+
expect(child).to be_a(described_class)
|
385
|
+
expect(child[:path]).to eq(File.join(file[:path], 'bar'))
|
386
386
|
end
|
387
387
|
|
388
388
|
{
|
@@ -397,7 +397,7 @@ describe Puppet::Type.type(:file) do
|
|
397
397
|
# or it wouldn't be copied regardless.
|
398
398
|
file = described_class.new(:path => path, param => value)
|
399
399
|
child = file.newchild('bar')
|
400
|
-
child[param].
|
400
|
+
expect(child[param]).not_to eq(value)
|
401
401
|
end
|
402
402
|
end
|
403
403
|
|
@@ -406,13 +406,13 @@ describe Puppet::Type.type(:file) do
|
|
406
406
|
|
407
407
|
child = parent.newchild("my/path")
|
408
408
|
|
409
|
-
child[:owner].
|
410
|
-
child[:group].
|
409
|
+
expect(child[:owner]).to eq('root')
|
410
|
+
expect(child[:group]).to eq('wheel')
|
411
411
|
end
|
412
412
|
|
413
413
|
it "should not copy default values to the new child" do
|
414
414
|
child = file.newchild("my/path")
|
415
|
-
child.original_parameters.
|
415
|
+
expect(child.original_parameters).not_to include(:backup)
|
416
416
|
end
|
417
417
|
|
418
418
|
it "should not copy values to the child which were set by the source" do
|
@@ -430,19 +430,19 @@ describe Puppet::Type.type(:file) do
|
|
430
430
|
|
431
431
|
describe "#purge?" do
|
432
432
|
it "should return false if purge is not set" do
|
433
|
-
file.
|
433
|
+
expect(file).to_not be_purge
|
434
434
|
end
|
435
435
|
|
436
436
|
it "should return true if purge is set to true" do
|
437
437
|
file[:purge] = true
|
438
438
|
|
439
|
-
file.
|
439
|
+
expect(file).to be_purge
|
440
440
|
end
|
441
441
|
|
442
442
|
it "should return false if purge is set to false" do
|
443
443
|
file[:purge] = false
|
444
444
|
|
445
|
-
file.
|
445
|
+
expect(file).to_not be_purge
|
446
446
|
end
|
447
447
|
end
|
448
448
|
|
@@ -486,7 +486,7 @@ describe Puppet::Type.type(:file) do
|
|
486
486
|
two = stub 'two', :[] => "/one/two"
|
487
487
|
three = stub 'three', :[] => "/three"
|
488
488
|
file.expects(:recurse_local).returns(:one => one, :two => two, :three => three)
|
489
|
-
file.recurse.
|
489
|
+
expect(file.recurse).to eq([one, two, three])
|
490
490
|
end
|
491
491
|
|
492
492
|
describe "and purging is enabled" do
|
@@ -499,7 +499,7 @@ describe Puppet::Type.type(:file) do
|
|
499
499
|
file.expects(:recurse_local).returns("local" => local)
|
500
500
|
|
501
501
|
file.recurse
|
502
|
-
local[:ensure].
|
502
|
+
expect(local[:ensure]).to eq(:absent)
|
503
503
|
end
|
504
504
|
|
505
505
|
it "should not remove files that exist in the remote repository" do
|
@@ -512,7 +512,7 @@ describe Puppet::Type.type(:file) do
|
|
512
512
|
|
513
513
|
file.recurse
|
514
514
|
|
515
|
-
remote[:ensure].
|
515
|
+
expect(remote[:ensure]).not_to eq(:absent)
|
516
516
|
end
|
517
517
|
end
|
518
518
|
|
@@ -527,7 +527,7 @@ describe Puppet::Type.type(:file) do
|
|
527
527
|
catalog.add_resource(foo)
|
528
528
|
catalog.add_resource(bar)
|
529
529
|
|
530
|
-
file.remove_less_specific_files([foo, bar, baz]).
|
530
|
+
expect(file.remove_less_specific_files([foo, bar, baz])).to eq([baz])
|
531
531
|
end
|
532
532
|
end
|
533
533
|
|
@@ -540,7 +540,7 @@ describe Puppet::Type.type(:file) do
|
|
540
540
|
catalog.add_resource(foo)
|
541
541
|
catalog.add_resource(bar)
|
542
542
|
|
543
|
-
file.remove_less_specific_files([foo, bar, baz]).
|
543
|
+
expect(file.remove_less_specific_files([foo, bar, baz])).to eq([baz])
|
544
544
|
end
|
545
545
|
|
546
546
|
end
|
@@ -548,17 +548,17 @@ describe Puppet::Type.type(:file) do
|
|
548
548
|
describe "#recurse?" do
|
549
549
|
it "should be true if recurse is true" do
|
550
550
|
file[:recurse] = true
|
551
|
-
file.
|
551
|
+
expect(file).to be_recurse
|
552
552
|
end
|
553
553
|
|
554
554
|
it "should be true if recurse is remote" do
|
555
555
|
file[:recurse] = :remote
|
556
|
-
file.
|
556
|
+
expect(file).to be_recurse
|
557
557
|
end
|
558
558
|
|
559
559
|
it "should be false if recurse is false" do
|
560
560
|
file[:recurse] = false
|
561
|
-
file.
|
561
|
+
expect(file).to_not be_recurse
|
562
562
|
end
|
563
563
|
end
|
564
564
|
|
@@ -602,21 +602,21 @@ describe Puppet::Type.type(:file) do
|
|
602
602
|
file.stubs(:perform_recursion).returns [@first, @second]
|
603
603
|
file.recurse_link("first" => @resource, "second" => file)
|
604
604
|
|
605
|
-
file[:ensure].
|
606
|
-
file[:target].
|
605
|
+
expect(file[:ensure]).to eq(:link)
|
606
|
+
expect(file[:target]).to eq("/my/second")
|
607
607
|
end
|
608
608
|
|
609
609
|
it "should :ensure to :directory if the file is a directory" do
|
610
610
|
file.stubs(:perform_recursion).returns [@first, @second]
|
611
611
|
file.recurse_link("first" => file, "second" => @resource)
|
612
612
|
|
613
|
-
file[:ensure].
|
613
|
+
expect(file[:ensure]).to eq(:directory)
|
614
614
|
end
|
615
615
|
|
616
616
|
it "should return a hash with both created and existing resources with the relative paths as the hash keys" do
|
617
617
|
file.expects(:perform_recursion).returns [@first, @second]
|
618
618
|
file.stubs(:newchild).returns file
|
619
|
-
file.recurse_link("second" => @resource).
|
619
|
+
expect(file.recurse_link("second" => @resource)).to eq({"second" => @resource, "first" => file})
|
620
620
|
end
|
621
621
|
end
|
622
622
|
|
@@ -633,7 +633,7 @@ describe Puppet::Type.type(:file) do
|
|
633
633
|
|
634
634
|
it "should return an empty hash if the recursion returns nothing" do
|
635
635
|
file.expects(:perform_recursion).returns nil
|
636
|
-
file.recurse_local.
|
636
|
+
expect(file.recurse_local).to eq({})
|
637
637
|
end
|
638
638
|
|
639
639
|
it "should create a new child resource with each generated metadata instance's relative path" do
|
@@ -653,7 +653,7 @@ describe Puppet::Type.type(:file) do
|
|
653
653
|
it "should return a hash of the created resources with the relative paths as the hash keys" do
|
654
654
|
file.expects(:perform_recursion).returns [@metadata]
|
655
655
|
file.expects(:newchild).with("my/file").returns "fiebar"
|
656
|
-
file.recurse_local.
|
656
|
+
expect(file.recurse_local).to eq({"my/file" => "fiebar"})
|
657
657
|
end
|
658
658
|
|
659
659
|
it "should set checksum_type to none if this file checksum is none" do
|
@@ -664,7 +664,7 @@ describe Puppet::Type.type(:file) do
|
|
664
664
|
end
|
665
665
|
end
|
666
666
|
|
667
|
-
describe "#recurse_remote"
|
667
|
+
describe "#recurse_remote" do
|
668
668
|
let(:my) { File.expand_path('/my') }
|
669
669
|
|
670
670
|
before do
|
@@ -704,7 +704,7 @@ describe Puppet::Type.type(:file) do
|
|
704
704
|
it "should create a new resource for any relative file paths that do not already have a resource" do
|
705
705
|
file.stubs(:perform_recursion).returns [@first]
|
706
706
|
file.expects(:newchild).with("first").returns @resource
|
707
|
-
file.recurse_remote({}).
|
707
|
+
expect(file.recurse_remote({})).to eq({"first" => @resource})
|
708
708
|
end
|
709
709
|
|
710
710
|
it "should not create a new resource for any relative file paths that do already have a resource" do
|
@@ -720,18 +720,6 @@ describe Puppet::Type.type(:file) do
|
|
720
720
|
file.recurse_remote("first" => @resource)
|
721
721
|
end
|
722
722
|
|
723
|
-
# LAK:FIXME This is a bug, but I can't think of a fix for it. Fortunately it's already
|
724
|
-
# filed, and when it's fixed, we'll just fix the whole flow.
|
725
|
-
with_digest_algorithms do
|
726
|
-
it "it should set the checksum type to #{metadata[:digest_algorithm]} if the remote file is a file" do
|
727
|
-
@first.stubs(:ftype).returns "file"
|
728
|
-
file.stubs(:perform_recursion).returns [@first]
|
729
|
-
@resource.stubs(:[]=)
|
730
|
-
@resource.expects(:[]=).with(:checksum, digest_algorithm.intern)
|
731
|
-
file.recurse_remote("first" => @resource)
|
732
|
-
end
|
733
|
-
end
|
734
|
-
|
735
723
|
it "should store the metadata in the source property for each resource so the source does not have to requery the metadata" do
|
736
724
|
file.stubs(:perform_recursion).returns [@first]
|
737
725
|
@resource.expects(:parameter).with(:source).returns @parameter
|
@@ -812,7 +800,7 @@ describe Puppet::Type.type(:file) do
|
|
812
800
|
end
|
813
801
|
end
|
814
802
|
|
815
|
-
describe "#perform_recursion" do
|
803
|
+
describe "#perform_recursion", :uses_checksums => true do
|
816
804
|
it "should use Metadata to do its recursion" do
|
817
805
|
Puppet::FileServing::Metadata.indirection.expects(:search)
|
818
806
|
file.perform_recursion(file[:path])
|
@@ -825,7 +813,7 @@ describe Puppet::Type.type(:file) do
|
|
825
813
|
|
826
814
|
it "should return the results of the metadata search" do
|
827
815
|
Puppet::FileServing::Metadata.indirection.expects(:search).returns "foobar"
|
828
|
-
file.perform_recursion(file[:path]).
|
816
|
+
expect(file.perform_recursion(file[:path])).to eq("foobar")
|
829
817
|
end
|
830
818
|
|
831
819
|
it "should pass its recursion value to the search" do
|
@@ -857,11 +845,19 @@ describe Puppet::Type.type(:file) do
|
|
857
845
|
Puppet::FileServing::Metadata.indirection.expects(:search).with { |key, options| options[:ignore] == %w{.svn CVS} }
|
858
846
|
file.perform_recursion(file[:path])
|
859
847
|
end
|
848
|
+
|
849
|
+
with_digest_algorithms do
|
850
|
+
it "it should pass its 'checksum' setting #{metadata[:digest_algorithm]} to the search" do
|
851
|
+
file[:source] = File.expand_path('/foo')
|
852
|
+
Puppet::FileServing::Metadata.indirection.expects(:search).with { |key, options| options[:checksum_type] == digest_algorithm.intern }
|
853
|
+
file.perform_recursion(file[:path])
|
854
|
+
end
|
855
|
+
end
|
860
856
|
end
|
861
857
|
|
862
858
|
describe "#remove_existing" do
|
863
859
|
it "should do nothing if the file doesn't exist" do
|
864
|
-
file.remove_existing(:file).
|
860
|
+
expect(file.remove_existing(:file)).to eq(false)
|
865
861
|
end
|
866
862
|
|
867
863
|
it "should fail if it can't backup the file" do
|
@@ -876,7 +872,7 @@ describe Puppet::Type.type(:file) do
|
|
876
872
|
file[:force] = false
|
877
873
|
file.stubs(:stat).returns stub('stat', :ftype => 'directory')
|
878
874
|
file.expects(:perform_backup).never
|
879
|
-
file.remove_existing(:file).
|
875
|
+
expect(file.remove_existing(:file)).to eq(false)
|
880
876
|
end
|
881
877
|
|
882
878
|
it "should backup directories if force is true" do
|
@@ -886,14 +882,14 @@ describe Puppet::Type.type(:file) do
|
|
886
882
|
file.stubs(:stat).returns stub('stat', :ftype => 'directory')
|
887
883
|
file.expects(:perform_backup).once.returns(true)
|
888
884
|
|
889
|
-
file.remove_existing(:file).
|
885
|
+
expect(file.remove_existing(:file)).to eq(true)
|
890
886
|
end
|
891
887
|
end
|
892
888
|
|
893
889
|
it "should not do anything if the file is already the right type and not a link" do
|
894
890
|
file.stubs(:stat).returns stub('stat', :ftype => 'file')
|
895
891
|
|
896
|
-
file.remove_existing(:file).
|
892
|
+
expect(file.remove_existing(:file)).to eq(false)
|
897
893
|
end
|
898
894
|
|
899
895
|
it "should not remove directories and should not invalidate the stat unless force is set" do
|
@@ -903,8 +899,8 @@ describe Puppet::Type.type(:file) do
|
|
903
899
|
|
904
900
|
file.remove_existing(:file)
|
905
901
|
|
906
|
-
file.instance_variable_get(:@stat).
|
907
|
-
@logs.
|
902
|
+
expect(file.instance_variable_get(:@stat)).to eq(nil)
|
903
|
+
expect(@logs).to be_any {|log| log.level == :notice and log.message =~ /Not removing directory; use 'force' to override/}
|
908
904
|
end
|
909
905
|
|
910
906
|
it "should remove a directory if force is set" do
|
@@ -913,16 +909,16 @@ describe Puppet::Type.type(:file) do
|
|
913
909
|
|
914
910
|
FileUtils.expects(:rmtree).with(file[:path])
|
915
911
|
|
916
|
-
file.remove_existing(:file).
|
912
|
+
expect(file.remove_existing(:file)).to eq(true)
|
917
913
|
end
|
918
914
|
|
919
915
|
it "should remove an existing file" do
|
920
916
|
file.stubs(:perform_backup).returns true
|
921
917
|
FileUtils.touch(path)
|
922
918
|
|
923
|
-
file.remove_existing(:directory).
|
919
|
+
expect(file.remove_existing(:directory)).to eq(true)
|
924
920
|
|
925
|
-
Puppet::FileSystem.exist?(file[:path]).
|
921
|
+
expect(Puppet::FileSystem.exist?(file[:path])).to eq(false)
|
926
922
|
end
|
927
923
|
|
928
924
|
it "should remove an existing link", :if => described_class.defaultprovider.feature?(:manages_symlinks) do
|
@@ -933,9 +929,9 @@ describe Puppet::Type.type(:file) do
|
|
933
929
|
Puppet::FileSystem.symlink(target, path)
|
934
930
|
file[:target] = target
|
935
931
|
|
936
|
-
file.remove_existing(:directory).
|
932
|
+
expect(file.remove_existing(:directory)).to eq(true)
|
937
933
|
|
938
|
-
Puppet::FileSystem.exist?(file[:path]).
|
934
|
+
expect(Puppet::FileSystem.exist?(file[:path])).to eq(false)
|
939
935
|
end
|
940
936
|
|
941
937
|
it "should fail if the file is not a file, link, or directory" do
|
@@ -951,8 +947,8 @@ describe Puppet::Type.type(:file) do
|
|
951
947
|
|
952
948
|
Puppet::FileSystem.stubs(:unlink)
|
953
949
|
|
954
|
-
file.remove_existing(:directory).
|
955
|
-
file.instance_variable_get(:@stat).
|
950
|
+
expect(file.remove_existing(:directory)).to eq(true)
|
951
|
+
expect(file.instance_variable_get(:@stat)).to eq(:needs_stat)
|
956
952
|
end
|
957
953
|
end
|
958
954
|
|
@@ -966,44 +962,44 @@ describe Puppet::Type.type(:file) do
|
|
966
962
|
|
967
963
|
describe "#should_be_file?" do
|
968
964
|
it "should have a method for determining if the file should be a normal file" do
|
969
|
-
file.
|
965
|
+
expect(file).to respond_to(:should_be_file?)
|
970
966
|
end
|
971
967
|
|
972
968
|
it "should be a file if :ensure is set to :file" do
|
973
969
|
file[:ensure] = :file
|
974
|
-
file.
|
970
|
+
expect(file).to be_should_be_file
|
975
971
|
end
|
976
972
|
|
977
973
|
it "should be a file if :ensure is set to :present and the file exists as a normal file" do
|
978
974
|
file.stubs(:stat).returns(mock('stat', :ftype => "file"))
|
979
975
|
file[:ensure] = :present
|
980
|
-
file.
|
976
|
+
expect(file).to be_should_be_file
|
981
977
|
end
|
982
978
|
|
983
979
|
it "should not be a file if :ensure is set to something other than :file" do
|
984
980
|
file[:ensure] = :directory
|
985
|
-
file.
|
981
|
+
expect(file).to_not be_should_be_file
|
986
982
|
end
|
987
983
|
|
988
984
|
it "should not be a file if :ensure is set to :present and the file exists but is not a normal file" do
|
989
985
|
file.stubs(:stat).returns(mock('stat', :ftype => "directory"))
|
990
986
|
file[:ensure] = :present
|
991
|
-
file.
|
987
|
+
expect(file).to_not be_should_be_file
|
992
988
|
end
|
993
989
|
|
994
990
|
it "should be a file if :ensure is not set and :content is" do
|
995
991
|
file[:content] = "foo"
|
996
|
-
file.
|
992
|
+
expect(file).to be_should_be_file
|
997
993
|
end
|
998
994
|
|
999
995
|
it "should be a file if neither :ensure nor :content is set but the file exists as a normal file" do
|
1000
996
|
file.stubs(:stat).returns(mock("stat", :ftype => "file"))
|
1001
|
-
file.
|
997
|
+
expect(file).to be_should_be_file
|
1002
998
|
end
|
1003
999
|
|
1004
1000
|
it "should not be a file if neither :ensure nor :content is set but the file exists but not as a normal file" do
|
1005
1001
|
file.stubs(:stat).returns(mock("stat", :ftype => "directory"))
|
1006
|
-
file.
|
1002
|
+
expect(file).to_not be_should_be_file
|
1007
1003
|
end
|
1008
1004
|
end
|
1009
1005
|
|
@@ -1020,19 +1016,19 @@ describe Puppet::Type.type(:file) do
|
|
1020
1016
|
it "should stat the target if it is following links" do
|
1021
1017
|
file[:links] = :follow
|
1022
1018
|
|
1023
|
-
file.stat.ftype.
|
1019
|
+
expect(file.stat.ftype).to eq('file')
|
1024
1020
|
end
|
1025
1021
|
|
1026
1022
|
it "should stat the link if is it not following links" do
|
1027
1023
|
file[:links] = :manage
|
1028
1024
|
|
1029
|
-
file.stat.ftype.
|
1025
|
+
expect(file.stat.ftype).to eq('link')
|
1030
1026
|
end
|
1031
1027
|
|
1032
1028
|
it "should return nil if the file does not exist" do
|
1033
1029
|
file[:path] = make_absolute('/foo/bar/baz/non-existent')
|
1034
1030
|
|
1035
|
-
file.stat.
|
1031
|
+
expect(file.stat).to be_nil
|
1036
1032
|
end
|
1037
1033
|
|
1038
1034
|
it "should return nil if the file cannot be stat'ed" do
|
@@ -1043,7 +1039,7 @@ describe Puppet::Type.type(:file) do
|
|
1043
1039
|
|
1044
1040
|
file[:path] = child
|
1045
1041
|
|
1046
|
-
file.stat.
|
1042
|
+
expect(file.stat).to be_nil
|
1047
1043
|
|
1048
1044
|
# chmod it back so we can clean it up
|
1049
1045
|
File.chmod(0777, dir)
|
@@ -1055,15 +1051,15 @@ describe Puppet::Type.type(:file) do
|
|
1055
1051
|
impossible_child = File.join(regular_file, 'some_file')
|
1056
1052
|
|
1057
1053
|
file[:path] = impossible_child
|
1058
|
-
file.stat.
|
1054
|
+
expect(file.stat).to be_nil
|
1059
1055
|
end
|
1060
1056
|
|
1061
1057
|
it "should return the stat instance" do
|
1062
|
-
file.stat.
|
1058
|
+
expect(file.stat).to be_a(File::Stat)
|
1063
1059
|
end
|
1064
1060
|
|
1065
1061
|
it "should cache the stat instance" do
|
1066
|
-
file.stat.
|
1062
|
+
expect(file.stat).to equal(file.stat)
|
1067
1063
|
end
|
1068
1064
|
end
|
1069
1065
|
|
@@ -1175,17 +1171,21 @@ describe Puppet::Type.type(:file) do
|
|
1175
1171
|
end
|
1176
1172
|
|
1177
1173
|
it "should not fail if the checksum is correct" do
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1174
|
+
expect do
|
1175
|
+
file.instance_eval do
|
1176
|
+
parameter(:checksum).stubs(:sum_file).returns('anything!')
|
1177
|
+
fail_if_checksum_is_wrong(self[:path], 'anything!')
|
1178
|
+
end
|
1179
|
+
end.not_to raise_error
|
1182
1180
|
end
|
1183
1181
|
|
1184
1182
|
it "should not fail if the checksum is absent" do
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1183
|
+
expect do
|
1184
|
+
file.instance_eval do
|
1185
|
+
parameter(:checksum).stubs(:sum_file).returns(nil)
|
1186
|
+
fail_if_checksum_is_wrong(self[:path], 'anything!')
|
1187
|
+
end
|
1188
|
+
end.not_to raise_error
|
1189
1189
|
end
|
1190
1190
|
end
|
1191
1191
|
|
@@ -1203,23 +1203,23 @@ describe Puppet::Type.type(:file) do
|
|
1203
1203
|
it "should be true if the file has specified content" do
|
1204
1204
|
file[:content] = 'some content'
|
1205
1205
|
|
1206
|
-
file.send(:write_temporary_file?).
|
1206
|
+
expect(file.send(:write_temporary_file?)).to be_truthy
|
1207
1207
|
end
|
1208
1208
|
|
1209
1209
|
it "should be true if the file has specified source" do
|
1210
1210
|
file[:source] = File.expand_path('/tmp/foo')
|
1211
1211
|
|
1212
|
-
file.send(:write_temporary_file?).
|
1212
|
+
expect(file.send(:write_temporary_file?)).to be_truthy
|
1213
1213
|
end
|
1214
1214
|
|
1215
1215
|
it "should be false if the file has neither content nor source" do
|
1216
|
-
file.send(:write_temporary_file?).
|
1216
|
+
expect(file.send(:write_temporary_file?)).to be_falsey
|
1217
1217
|
end
|
1218
1218
|
end
|
1219
1219
|
|
1220
1220
|
describe "#property_fix" do
|
1221
1221
|
{
|
1222
|
-
:mode => 0777,
|
1222
|
+
:mode => '0777',
|
1223
1223
|
:owner => 'joeuser',
|
1224
1224
|
:group => 'joeusers',
|
1225
1225
|
:seluser => 'seluser',
|
@@ -1248,9 +1248,9 @@ describe Puppet::Type.type(:file) do
|
|
1248
1248
|
catalog.add_resource file
|
1249
1249
|
catalog.add_resource link
|
1250
1250
|
reqs = link.autorequire
|
1251
|
-
reqs.size.
|
1252
|
-
reqs[0].source.
|
1253
|
-
reqs[0].target.
|
1251
|
+
expect(reqs.size).to eq(1)
|
1252
|
+
expect(reqs[0].source).to eq(file)
|
1253
|
+
expect(reqs[0].target).to eq(link)
|
1254
1254
|
end
|
1255
1255
|
|
1256
1256
|
it "should require file resource when specified with the ensure property" do
|
@@ -1259,15 +1259,15 @@ describe Puppet::Type.type(:file) do
|
|
1259
1259
|
catalog.add_resource file
|
1260
1260
|
catalog.add_resource link
|
1261
1261
|
reqs = link.autorequire
|
1262
|
-
reqs.size.
|
1263
|
-
reqs[0].source.
|
1264
|
-
reqs[0].target.
|
1262
|
+
expect(reqs.size).to eq(1)
|
1263
|
+
expect(reqs[0].source).to eq(file)
|
1264
|
+
expect(reqs[0].target).to eq(link)
|
1265
1265
|
end
|
1266
1266
|
|
1267
1267
|
it "should not require target if target is not managed", :if => described_class.defaultprovider.feature?(:manages_symlinks) do
|
1268
1268
|
link = described_class.new(:path => File.expand_path('/foo'), :ensure => :link, :target => '/bar')
|
1269
1269
|
catalog.add_resource link
|
1270
|
-
link.autorequire.size.
|
1270
|
+
expect(link.autorequire.size).to eq(0)
|
1271
1271
|
end
|
1272
1272
|
end
|
1273
1273
|
|
@@ -1277,8 +1277,8 @@ describe Puppet::Type.type(:file) do
|
|
1277
1277
|
catalog.add_resource file
|
1278
1278
|
catalog.add_resource dir
|
1279
1279
|
reqs = file.autorequire
|
1280
|
-
reqs[0].source.
|
1281
|
-
reqs[0].target.
|
1280
|
+
expect(reqs[0].source).to eq(dir)
|
1281
|
+
expect(reqs[0].target).to eq(file)
|
1282
1282
|
end
|
1283
1283
|
|
1284
1284
|
it "should autorequire its nearest ancestor directory" do
|
@@ -1288,20 +1288,20 @@ describe Puppet::Type.type(:file) do
|
|
1288
1288
|
catalog.add_resource dir
|
1289
1289
|
catalog.add_resource grandparent
|
1290
1290
|
reqs = file.autorequire
|
1291
|
-
reqs.length.
|
1292
|
-
reqs[0].source.
|
1293
|
-
reqs[0].target.
|
1291
|
+
expect(reqs.length).to eq(1)
|
1292
|
+
expect(reqs[0].source).to eq(dir)
|
1293
|
+
expect(reqs[0].target).to eq(file)
|
1294
1294
|
end
|
1295
1295
|
|
1296
1296
|
it "should not autorequire anything when there is no nearest ancestor directory" do
|
1297
1297
|
catalog.add_resource file
|
1298
|
-
file.autorequire.
|
1298
|
+
expect(file.autorequire).to be_empty
|
1299
1299
|
end
|
1300
1300
|
|
1301
1301
|
it "should not autorequire its parent dir if its parent dir is itself" do
|
1302
1302
|
file[:path] = File.expand_path('/')
|
1303
1303
|
catalog.add_resource file
|
1304
|
-
file.autorequire.
|
1304
|
+
expect(file.autorequire).to be_empty
|
1305
1305
|
end
|
1306
1306
|
|
1307
1307
|
describe "on Windows systems", :if => Puppet.features.microsoft_windows? do
|
@@ -1312,8 +1312,8 @@ describe Puppet::Type.type(:file) do
|
|
1312
1312
|
catalog.add_resource file
|
1313
1313
|
catalog.add_resource dir
|
1314
1314
|
reqs = file.autorequire
|
1315
|
-
reqs[0].source.
|
1316
|
-
reqs[0].target.
|
1315
|
+
expect(reqs[0].source).to eq(dir)
|
1316
|
+
expect(reqs[0].target).to eq(file)
|
1317
1317
|
end
|
1318
1318
|
|
1319
1319
|
it "should autorequire its nearest ancestor directory" do
|
@@ -1324,22 +1324,22 @@ describe Puppet::Type.type(:file) do
|
|
1324
1324
|
catalog.add_resource dir
|
1325
1325
|
catalog.add_resource grandparent
|
1326
1326
|
reqs = file.autorequire
|
1327
|
-
reqs.length.
|
1328
|
-
reqs[0].source.
|
1329
|
-
reqs[0].target.
|
1327
|
+
expect(reqs.length).to eq(1)
|
1328
|
+
expect(reqs[0].source).to eq(dir)
|
1329
|
+
expect(reqs[0].target).to eq(file)
|
1330
1330
|
end
|
1331
1331
|
|
1332
1332
|
it "should not autorequire anything when there is no nearest ancestor directory" do
|
1333
1333
|
file = described_class.new(:path => "//localhost/foo/bar/baz/qux")
|
1334
1334
|
catalog.add_resource file
|
1335
|
-
file.autorequire.
|
1335
|
+
expect(file.autorequire).to be_empty
|
1336
1336
|
end
|
1337
1337
|
|
1338
1338
|
it "should not autorequire its parent dir if its parent dir is itself" do
|
1339
1339
|
file = described_class.new(:path => "//localhost/foo")
|
1340
1340
|
catalog.add_resource file
|
1341
1341
|
puts file.autorequire
|
1342
|
-
file.autorequire.
|
1342
|
+
expect(file.autorequire).to be_empty
|
1343
1343
|
end
|
1344
1344
|
end
|
1345
1345
|
end
|
@@ -1375,16 +1375,17 @@ describe Puppet::Type.type(:file) do
|
|
1375
1375
|
catalog.apply
|
1376
1376
|
|
1377
1377
|
# I convert them to strings so they display correctly if there's an error.
|
1378
|
-
(Puppet::FileSystem.stat(@target).mode & 007777).to_s(8).
|
1378
|
+
expect((Puppet::FileSystem.stat(@target).mode & 007777).to_s(8)).to eq('644')
|
1379
1379
|
end
|
1380
1380
|
|
1381
1381
|
it "should manage the mode of the followed link" do
|
1382
|
-
|
1383
|
-
|
1382
|
+
if Puppet.features.microsoft_windows?
|
1383
|
+
skip "Windows cannot presently manage the mode when following symlinks"
|
1384
|
+
else
|
1384
1385
|
@link_resource[:links] = :follow
|
1385
1386
|
catalog.apply
|
1386
1387
|
|
1387
|
-
(Puppet::FileSystem.stat(@target).mode & 007777).to_s(8).
|
1388
|
+
expect((Puppet::FileSystem.stat(@target).mode & 007777).to_s(8)).to eq('755')
|
1388
1389
|
end
|
1389
1390
|
end
|
1390
1391
|
end
|
@@ -1457,8 +1458,8 @@ describe Puppet::Type.type(:file) do
|
|
1457
1458
|
|
1458
1459
|
report = catalog.apply.report
|
1459
1460
|
|
1460
|
-
report.resource_statuses["File[#{path}]"].
|
1461
|
-
File.read(path).
|
1461
|
+
expect(report.resource_statuses["File[#{path}]"]).not_to be_failed
|
1462
|
+
expect(File.read(path)).to eq('content')
|
1462
1463
|
end
|
1463
1464
|
|
1464
1465
|
it "should not log errors if creating a new file with ensure present and no content" do
|
@@ -1468,8 +1469,8 @@ describe Puppet::Type.type(:file) do
|
|
1468
1469
|
|
1469
1470
|
catalog.apply
|
1470
1471
|
|
1471
|
-
Puppet::FileSystem.exist?(path).
|
1472
|
-
@logs.
|
1472
|
+
expect(Puppet::FileSystem.exist?(path)).to be_truthy
|
1473
|
+
expect(@logs).not_to be_any {|l| l.level != :notice }
|
1473
1474
|
end
|
1474
1475
|
end
|
1475
1476
|
|
@@ -1478,14 +1479,14 @@ describe Puppet::Type.type(:file) do
|
|
1478
1479
|
file[:source] = File.expand_path('/foo')
|
1479
1480
|
file[:checksum] = :md5lite
|
1480
1481
|
|
1481
|
-
file[:checksum].
|
1482
|
+
expect(file[:checksum]).to eq(:md5lite)
|
1482
1483
|
end
|
1483
1484
|
|
1484
1485
|
it 'should use the specified checksum when source is last' do
|
1485
1486
|
file[:checksum] = :md5lite
|
1486
1487
|
file[:source] = File.expand_path('/foo')
|
1487
1488
|
|
1488
|
-
file[:checksum].
|
1489
|
+
expect(file[:checksum]).to eq(:md5lite)
|
1489
1490
|
end
|
1490
1491
|
end
|
1491
1492
|
|