puppet 3.0.0.rc5 → 3.0.0.rc7
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/LICENSE +1 -1
- data/README_DEVELOPER.md +209 -1
- data/README_HIERA.md +148 -0
- data/Rakefile +25 -27
- data/bin/extlookup2hiera +56 -0
- data/conf/auth.conf +34 -34
- data/examples/hiera/README.md +91 -0
- data/examples/hiera/etc/hiera.yaml +15 -0
- data/examples/hiera/etc/hieradb/common.yaml +3 -0
- data/examples/hiera/etc/hieradb/dc1.yaml +6 -0
- data/examples/hiera/etc/hieradb/development.yaml +2 -0
- data/examples/hiera/etc/puppet.conf +3 -0
- data/examples/hiera/modules/data/manifests/common.pp +3 -0
- data/examples/hiera/modules/ntp/manifests/config.pp +5 -0
- data/examples/hiera/modules/ntp/manifests/data.pp +3 -0
- data/examples/hiera/modules/ntp/templates/ntp.conf.erb +3 -0
- data/examples/hiera/modules/users/manifests/common.pp +3 -0
- data/examples/hiera/modules/users/manifests/dc1.pp +3 -0
- data/examples/hiera/modules/users/manifests/development.pp +3 -0
- data/examples/hiera/site.pp +3 -0
- data/ext/build_defaults.yaml +23 -0
- data/ext/debian/README.Debian +8 -0
- data/ext/debian/README.source +2 -0
- data/ext/debian/TODO.Debian +1 -0
- data/ext/debian/changelog.erb +1104 -0
- data/ext/debian/compat +1 -0
- data/ext/debian/control +143 -0
- data/ext/debian/copyright +361 -0
- data/ext/debian/docs +1 -0
- data/ext/debian/fileserver.conf +17 -0
- data/ext/debian/puppet-common.dirs +8 -0
- data/ext/debian/puppet-common.install +4 -0
- data/ext/debian/puppet-common.lintian-overrides +5 -0
- data/ext/debian/puppet-common.manpages +2 -0
- data/ext/debian/puppet-common.postinst +35 -0
- data/ext/debian/puppet-common.postrm +32 -0
- data/ext/debian/puppet-el.dirs +1 -0
- data/ext/debian/puppet-el.emacsen-install +25 -0
- data/ext/debian/puppet-el.emacsen-remove +11 -0
- data/ext/debian/puppet-el.emacsen-startup +9 -0
- data/ext/debian/puppet-el.install +1 -0
- data/ext/debian/puppet-testsuite.install +2 -0
- data/ext/debian/puppet-testsuite.lintian-overrides +4 -0
- data/ext/debian/puppet.conf +14 -0
- data/ext/debian/puppet.default +7 -0
- data/ext/debian/puppet.init +118 -0
- data/ext/debian/puppet.lintian-overrides +3 -0
- data/ext/debian/puppet.logrotate +11 -0
- data/ext/debian/puppet.manpages +32 -0
- data/ext/debian/puppet.postinst +20 -0
- data/ext/debian/puppet.postrm +20 -0
- data/ext/debian/puppet.preinst +20 -0
- data/ext/debian/puppetmaster-common.install +2 -0
- data/ext/debian/puppetmaster-common.manpages +2 -0
- data/ext/debian/puppetmaster-common.puppetqd.default +27 -0
- data/ext/debian/puppetmaster-common.puppetqd.init +84 -0
- data/ext/debian/puppetmaster-passenger.dirs +4 -0
- data/ext/debian/puppetmaster-passenger.postinst +66 -0
- data/ext/debian/puppetmaster-passenger.postrm +33 -0
- data/ext/debian/puppetmaster.README.debian +16 -0
- data/ext/debian/puppetmaster.default +38 -0
- data/ext/debian/puppetmaster.init +158 -0
- data/ext/debian/puppetmaster.lintian-overrides +3 -0
- data/ext/debian/puppetmaster.postinst +20 -0
- data/ext/debian/puppetmaster.postrm +5 -0
- data/ext/debian/puppetmaster.preinst +22 -0
- data/ext/debian/rules +128 -0
- data/ext/debian/source/format +1 -0
- data/ext/debian/source/options +1 -0
- data/ext/debian/vim-puppet.README.Debian +13 -0
- data/ext/debian/vim-puppet.dirs +3 -0
- data/ext/debian/vim-puppet.yaml +5 -0
- data/ext/debian/watch +2 -0
- data/ext/emacs/puppet-mode.el +1 -0
- data/ext/envpuppet +4 -0
- data/ext/envpuppet.bat +3 -2
- data/{conf → ext}/freebsd/puppetd +0 -0
- data/{conf → ext}/freebsd/puppetmasterd +0 -0
- data/{conf → ext}/gentoo/conf.d/puppet +0 -0
- data/{conf → ext}/gentoo/conf.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/init.d/puppet +0 -0
- data/{conf → ext}/gentoo/init.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/puppet/fileserver.conf +0 -0
- data/{conf → ext}/gentoo/puppet/puppet.conf +0 -0
- data/ext/ips/puppet-agent +49 -0
- data/ext/ips/puppet-master +44 -0
- data/ext/ips/puppet.conf +29 -0
- data/ext/ips/puppet.p5m.erb +12 -0
- data/ext/ips/puppetagent.xml +46 -0
- data/ext/ips/puppetmaster.xml +42 -0
- data/ext/ips/rules +19 -0
- data/ext/ips/transforms +34 -0
- data/{conf → ext}/osx/PackageInfo.plist +0 -0
- data/{conf → ext}/osx/createpackage.sh +1 -1
- data/ext/osx/file_mapping.yaml +33 -0
- data/ext/osx/preflight.erb +37 -0
- data/{tasks/rake/templates → ext/osx}/prototype.plist.erb +0 -0
- data/ext/packaging/README-Solaris.md +117 -0
- data/ext/packaging/README.md +89 -0
- data/ext/packaging/tasks/00_utils.rb +236 -0
- data/ext/packaging/tasks/10_setupvars.rake +62 -0
- data/ext/packaging/tasks/apple.rake +201 -0
- data/ext/packaging/tasks/clean.rake +5 -0
- data/ext/packaging/tasks/deb.rake +105 -0
- data/ext/packaging/tasks/gem.rake +52 -0
- data/ext/packaging/tasks/ips.rake +78 -0
- data/ext/packaging/tasks/mock.rake +88 -0
- data/ext/packaging/tasks/release.rake +20 -0
- data/ext/packaging/tasks/rpm.rake +39 -0
- data/ext/packaging/tasks/ship.rake +34 -0
- data/ext/packaging/tasks/sign.rake +76 -0
- data/ext/packaging/tasks/tar.rake +20 -0
- data/ext/project_data.yaml +25 -0
- data/ext/rack/files/apache2.conf +2 -1
- data/{conf → ext}/redhat/client.init +0 -0
- data/{conf → ext}/redhat/client.sysconfig +0 -0
- data/{conf → ext}/redhat/fileserver.conf +0 -0
- data/{conf → ext}/redhat/logrotate +0 -0
- data/{conf → ext}/redhat/puppet.conf +0 -0
- data/{conf/redhat/puppet.spec → ext/redhat/puppet.spec.erb} +140 -33
- data/{conf → ext}/redhat/queue.init +0 -0
- data/{conf → ext}/redhat/rundir-perms.patch +0 -0
- data/{conf → ext}/redhat/server.init +0 -0
- data/{conf → ext}/redhat/server.sysconfig +0 -0
- data/{conf → ext}/solaris/pkginfo +0 -0
- data/{conf → ext}/solaris/smf/puppetd.xml +0 -0
- data/{conf → ext}/solaris/smf/puppetmasterd.xml +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetd +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetmasterd +0 -0
- data/{conf → ext}/suse/client.init +0 -0
- data/{conf → ext}/suse/fileserver.conf +0 -0
- data/{conf → ext}/suse/logrotate +0 -0
- data/{conf → ext}/suse/puppet.conf +0 -0
- data/{conf → ext}/suse/puppet.spec +1 -1
- data/{conf → ext}/suse/server.init +0 -0
- data/ext/systemd/puppetagent.service +13 -0
- data/ext/systemd/puppetmaster.service +13 -0
- data/{conf → ext}/windows/eventlog/Rakefile +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.dll +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.mc +0 -0
- data/ext/windows/service/daemon.bat +6 -0
- data/ext/windows/service/daemon.rb +90 -0
- data/install.rb +22 -32
- data/lib/hiera/backend/puppet_backend.rb +102 -0
- data/lib/hiera/scope.rb +42 -0
- data/lib/hiera_puppet.rb +89 -0
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +2 -2
- data/lib/puppet/agent/locker.rb +12 -9
- data/lib/puppet/application.rb +10 -8
- data/lib/puppet/application/agent.rb +12 -8
- data/lib/puppet/application/apply.rb +2 -2
- data/lib/puppet/application/cert.rb +6 -6
- data/lib/puppet/application/certificate.rb +1 -4
- data/lib/puppet/application/describe.rb +1 -1
- data/lib/puppet/application/device.rb +5 -2
- data/lib/puppet/application/doc.rb +1 -1
- data/lib/puppet/application/face_base.rb +3 -13
- data/lib/puppet/application/filebucket.rb +1 -1
- data/lib/puppet/application/inspect.rb +1 -1
- data/lib/puppet/application/kick.rb +4 -2
- data/lib/puppet/application/master.rb +2 -2
- data/lib/puppet/application/queue.rb +3 -1
- data/lib/puppet/application/resource.rb +1 -1
- data/lib/puppet/configurer.rb +11 -7
- data/lib/puppet/configurer/downloader.rb +1 -4
- data/lib/puppet/daemon.rb +4 -4
- data/lib/puppet/defaults.rb +64 -60
- data/lib/puppet/external/dot.rb +1 -1
- data/lib/puppet/external/pson/common.rb +15 -0
- data/lib/puppet/external/pson/pure.rb +0 -62
- data/lib/puppet/external/pson/pure/generator.rb +1 -1
- data/lib/puppet/external/pson/pure/parser.rb +2 -2
- data/lib/puppet/face/ca.rb +19 -14
- data/lib/puppet/face/config.rb +2 -2
- data/lib/puppet/face/facts.rb +1 -1
- data/lib/puppet/face/help/action.erb +0 -1
- data/lib/puppet/face/help/face.erb +0 -1
- data/lib/puppet/face/help/man.erb +3 -6
- data/lib/puppet/face/module/install.rb +1 -1
- data/lib/puppet/face/module/list.rb +1 -1
- data/lib/puppet/face/module/uninstall.rb +1 -1
- data/lib/puppet/face/node.rb +1 -1
- data/lib/puppet/face/node/clean.rb +30 -25
- data/lib/puppet/feature/base.rb +0 -3
- data/lib/puppet/feature/rails.rb +2 -1
- data/lib/puppet/file_serving/terminus_selector.rb +1 -1
- data/lib/puppet/indirector/catalog/active_record.rb +5 -0
- data/lib/puppet/indirector/catalog/static_compiler.rb +2 -3
- data/lib/puppet/indirector/certificate/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_request/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/face.rb +3 -3
- data/lib/puppet/indirector/facts/active_record.rb +5 -0
- data/lib/puppet/indirector/facts/facter.rb +1 -4
- data/lib/puppet/indirector/facts/inventory_active_record.rb +6 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +2 -1
- data/lib/puppet/indirector/indirection.rb +2 -2
- data/lib/puppet/indirector/key/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/node/active_record.rb +5 -0
- data/lib/puppet/indirector/request.rb +4 -0
- data/lib/puppet/indirector/resource/active_record.rb +5 -0
- data/lib/puppet/network/authentication.rb +30 -0
- data/lib/puppet/network/http.rb +0 -13
- data/lib/puppet/network/http/connection.rb +10 -2
- data/lib/puppet/network/http/handler.rb +8 -0
- data/lib/puppet/network/http/mongrel/rest.rb +5 -0
- data/lib/puppet/network/http/rack/rest.rb +7 -0
- data/lib/puppet/network/http/webrick.rb +3 -6
- data/lib/puppet/network/http/webrick/rest.rb +4 -0
- data/lib/puppet/network/server.rb +9 -33
- data/lib/puppet/node.rb +1 -1
- data/lib/puppet/node/facts.rb +0 -1
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/functions.rb +12 -1
- data/lib/puppet/parser/functions/hiera.rb +8 -0
- data/lib/puppet/parser/functions/hiera_array.rb +8 -0
- data/lib/puppet/parser/functions/hiera_hash.rb +8 -0
- data/lib/puppet/parser/functions/hiera_include.rb +11 -0
- data/lib/puppet/parser/functions/shellquote.rb +21 -29
- data/lib/puppet/parser/lexer.rb +2 -1
- data/lib/puppet/parser/scope.rb +8 -0
- data/lib/puppet/provider/exec/windows.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +2 -3
- data/lib/puppet/provider/package/pkg.rb +37 -10
- data/lib/puppet/provider/service/daemontools.rb +1 -1
- data/lib/puppet/provider/service/launchd.rb +1 -1
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/runit.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +8 -3
- data/lib/puppet/provider/user/windows_adsi.rb +11 -0
- data/lib/puppet/provider/zfs/zfs.rb +29 -2
- data/lib/puppet/provider/zone/solaris.rb +144 -39
- data/lib/puppet/provider/zpool/zpool.rb +7 -10
- data/lib/puppet/settings.rb +50 -86
- data/lib/puppet/settings/duration_setting.rb +34 -0
- data/lib/puppet/settings/terminus_setting.rb +16 -0
- data/lib/puppet/ssl/base.rb +49 -9
- data/lib/puppet/ssl/certificate.rb +13 -9
- data/lib/puppet/ssl/certificate_authority.rb +4 -0
- data/lib/puppet/ssl/certificate_authority/interface.rb +10 -17
- data/lib/puppet/ssl/certificate_factory.rb +4 -21
- data/lib/puppet/ssl/certificate_request.rb +1 -10
- data/lib/puppet/ssl/certificate_revocation_list.rb +1 -3
- data/lib/puppet/ssl/digest.rb +20 -0
- data/lib/puppet/ssl/host.rb +31 -6
- data/lib/puppet/test/test_helper.rb +1 -1
- data/lib/puppet/transaction/report.rb +2 -1
- data/lib/puppet/type.rb +1 -1
- data/lib/puppet/type/augeas.rb +1 -1
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/exec.rb +7 -8
- data/lib/puppet/type/file.rb +1 -1
- data/lib/puppet/type/file/content.rb +2 -2
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/file/mode.rb +1 -1
- data/lib/puppet/type/file/selcontext.rb +6 -2
- data/lib/puppet/type/file/source.rb +1 -1
- data/lib/puppet/type/schedule.rb +1 -1
- data/lib/puppet/type/scheduled_task.rb +1 -1
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/zone.rb +126 -253
- data/lib/puppet/util.rb +10 -23
- data/lib/puppet/util/adsi.rb +22 -14
- data/lib/puppet/util/log/destinations.rb +7 -0
- data/lib/puppet/util/log/rate_limited_logger.rb +40 -0
- data/lib/puppet/util/metric.rb +2 -2
- data/lib/puppet/util/monkey_patches.rb +8 -0
- data/lib/puppet/util/platform.rb +7 -0
- data/lib/puppet/util/selinux.rb +31 -36
- data/lib/puppet/util/windows/error.rb +1 -1
- data/lib/puppet/util/windows/process.rb +3 -3
- data/lib/puppet/util/windows/security.rb +7 -7
- data/lib/puppet/util/windows/user.rb +65 -2
- data/lib/puppet/util/zaml.rb +90 -46
- data/lib/puppet/version.rb +1 -1
- data/spec/fixtures/hiera.yaml +9 -0
- data/spec/fixtures/manifests/site.pp +0 -0
- data/spec/integration/defaults_spec.rb +25 -11
- data/spec/integration/faces/ca_spec.rb +11 -16
- data/spec/integration/network/server/webrick_spec.rb +14 -27
- data/spec/integration/node_spec.rb +4 -1
- data/spec/integration/parser/functions/require_spec.rb +3 -3
- data/spec/integration/parser/undef_param_spec.rb +88 -0
- data/spec/integration/provider/mount_spec.rb +4 -1
- data/spec/integration/ssl/certificate_authority_spec.rb +18 -0
- data/spec/lib/puppet_spec/files.rb +3 -3
- data/spec/lib/puppet_spec/settings.rb +0 -1
- data/spec/shared_contexts/platform.rb +8 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/unit/agent/locker_spec.rb +8 -2
- data/spec/unit/application/agent_spec.rb +29 -7
- data/spec/unit/application/apply_spec.rb +1 -1
- data/spec/unit/application/device_spec.rb +18 -1
- data/spec/unit/application/face_base_spec.rb +16 -2
- data/spec/unit/application/kick_spec.rb +8 -0
- data/spec/unit/application/queue_spec.rb +5 -0
- data/spec/unit/application_spec.rb +13 -23
- data/spec/unit/configurer/downloader_spec.rb +2 -11
- data/spec/unit/configurer_spec.rb +6 -0
- data/spec/unit/face/node_spec.rb +1 -1
- data/spec/unit/hiera/backend/puppet_backend_spec.rb +140 -0
- data/spec/unit/hiera/scope_spec.rb +62 -0
- data/spec/unit/hiera_puppet_spec.rb +111 -0
- data/spec/unit/indirector/catalog/active_record_spec.rb +4 -0
- data/spec/unit/indirector/catalog/static_compiler_spec.rb +194 -0
- data/spec/unit/indirector/certificate/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_request/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_revocation_list/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/facts/active_record_spec.rb +37 -26
- data/spec/unit/indirector/facts/inventory_active_record_spec.rb +5 -0
- data/spec/unit/indirector/hiera_spec.rb +2 -1
- data/spec/unit/indirector/key/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/node/active_record_spec.rb +7 -0
- data/spec/unit/indirector/request_spec.rb +22 -0
- data/spec/unit/indirector/resource/active_record_spec.rb +5 -0
- data/spec/unit/module_tool/application_spec.rb +1 -1
- data/spec/unit/network/authentication_spec.rb +86 -0
- data/spec/unit/network/http/connection_spec.rb +21 -0
- data/spec/unit/network/http/handler_spec.rb +12 -0
- data/spec/unit/network/http/rack/rest_spec.rb +7 -0
- data/spec/unit/network/http/webrick_spec.rb +11 -26
- data/spec/unit/network/server_spec.rb +79 -192
- data/spec/unit/node/facts_spec.rb +2 -2
- data/spec/unit/parser/ast/vardef_spec.rb +4 -4
- data/spec/unit/parser/files_spec.rb +3 -0
- data/spec/unit/parser/functions/defined_spec.rb +5 -5
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_array_spec.rb +23 -0
- data/spec/unit/parser/functions/hiera_hash_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_include_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_spec.rb +21 -0
- data/spec/unit/parser/functions/include_spec.rb +3 -3
- data/spec/unit/parser/functions/realize_spec.rb +3 -3
- data/spec/unit/parser/functions/require_spec.rb +5 -5
- data/spec/unit/parser/functions/shellquote_spec.rb +0 -4
- data/spec/unit/parser/functions_spec.rb +6 -10
- data/spec/unit/parser/lexer_spec.rb +13 -0
- data/spec/unit/parser/scope_spec.rb +16 -1
- data/spec/unit/provider/exec/posix_spec.rb +7 -6
- data/spec/unit/provider/group/groupadd_spec.rb +36 -30
- data/spec/unit/provider/package/pkg_spec.rb +16 -2
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/sshkey/parsed_spec.rb +4 -0
- data/spec/unit/provider/user/user_role_add_spec.rb +125 -126
- data/spec/unit/provider/user/useradd_spec.rb +147 -118
- data/spec/unit/provider/user/windows_adsi_spec.rb +22 -0
- data/spec/unit/provider/zone/solaris_spec.rb +126 -7
- data/spec/unit/provider/zpool/zpool_spec.rb +4 -3
- data/spec/unit/puppet_spec.rb +7 -0
- data/spec/unit/settings/duration_setting_spec.rb +45 -0
- data/spec/unit/settings/terminus_setting_spec.rb +28 -0
- data/spec/unit/settings_spec.rb +21 -23
- data/spec/unit/ssl/base_spec.rb +68 -19
- data/spec/unit/ssl/certificate_authority/interface_spec.rb +19 -30
- data/spec/unit/ssl/certificate_authority_spec.rb +3 -2
- data/spec/unit/ssl/certificate_factory_spec.rb +15 -6
- data/spec/unit/ssl/certificate_request_spec.rb +80 -113
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +1 -1
- data/spec/unit/ssl/certificate_spec.rb +26 -2
- data/spec/unit/ssl/digest_spec.rb +35 -0
- data/spec/unit/ssl/host_spec.rb +73 -27
- data/spec/unit/ssl/key_spec.rb +0 -4
- data/spec/unit/type/exec_spec.rb +1 -1
- data/spec/unit/type/file_spec.rb +2 -1
- data/spec/unit/type/scheduled_task_spec.rb +2 -2
- data/spec/unit/type/zone_spec.rb +52 -10
- data/spec/unit/util/adsi_spec.rb +19 -0
- data/spec/unit/util/checksums_spec.rb +2 -3
- data/spec/unit/util/execution_spec.rb +1 -1
- data/spec/unit/util/log/destinations_spec.rb +1 -0
- data/spec/unit/util/log/rate_limited_logger_spec.rb +51 -0
- data/spec/unit/util/logging_spec.rb +6 -6
- data/spec/unit/util/selinux_spec.rb +24 -32
- data/spec/unit/util/zaml_spec.rb +94 -6
- data/spec/unit/util_spec.rb +17 -0
- data/spec/watchr.rb +2 -6
- data/tasks/{rake/manpages.rake → manpages.rake} +0 -0
- data/tasks/{rake/parser.rake → parser.rake} +0 -0
- metadata +1003 -119
- data/CHANGELOG +0 -9233
- data/conf/osx/preflight +0 -24
- data/lib/puppet/network/http/mongrel.rb +0 -35
- data/lib/puppet/util/config_timeout.rb +0 -24
- data/spec/unit/network/http/mongrel/rest_spec.rb +0 -257
- data/spec/unit/network/http/mongrel_spec.rb +0 -91
- data/spec/unit/network/http_spec.rb +0 -31
- data/spec/unit/util/config_timeout_spec.rb +0 -57
- data/tasks/rake/apple.rake +0 -176
- data/tasks/rake/changelog.rake +0 -15
- data/tasks/rake/ci.rake +0 -22
- data/tasks/rake/dailybuild.rake +0 -9
- data/tasks/rake/gem.rake +0 -63
- data/tasks/rake/git_workflow.rake +0 -134
- data/tasks/rake/metrics.rake +0 -14
- data/tasks/rake/sign.rake +0 -14
- data/tasks/rake/testbranch.rake +0 -16
- data/tasks/rake/yard.rake +0 -11
data/spec/unit/ssl/key_spec.rb
CHANGED
@@ -16,10 +16,6 @@ describe Puppet::SSL::Key do
|
|
16
16
|
@class.indirection.name.should == :key
|
17
17
|
end
|
18
18
|
|
19
|
-
it "should default to the :file terminus" do
|
20
|
-
@class.indirection.terminus_class.should == :file
|
21
|
-
end
|
22
|
-
|
23
19
|
it "should only support the text format" do
|
24
20
|
@class.supported_formats.should == [:s]
|
25
21
|
end
|
data/spec/unit/type/exec_spec.rb
CHANGED
@@ -280,7 +280,7 @@ describe Puppet::Type.type(:exec) do
|
|
280
280
|
|
281
281
|
it "should fail if the provider calls the command invalid" do
|
282
282
|
expect { test(command, false) }.
|
283
|
-
to raise_error Puppet::Error, /Parameter #{@param} failed: from a stub/
|
283
|
+
to raise_error Puppet::Error, /Parameter #{@param} failed on Exec\[.*\]: from a stub/
|
284
284
|
end
|
285
285
|
end
|
286
286
|
end
|
data/spec/unit/type/file_spec.rb
CHANGED
@@ -142,7 +142,8 @@ describe Puppet::Type.type(:file) do
|
|
142
142
|
end
|
143
143
|
|
144
144
|
it "should not allow numbers" do
|
145
|
-
expect { file[:recurse] = 10 }.to raise_error(
|
145
|
+
expect { file[:recurse] = 10 }.to raise_error(
|
146
|
+
Puppet::Error, /Parameter recurse failed on File\[[^\]]+\]: Invalid recurse value 10/)
|
146
147
|
end
|
147
148
|
|
148
149
|
[false, "false"].each do |value|
|
@@ -34,7 +34,7 @@ describe Puppet::Type.type(:scheduled_task), :if => Puppet.features.microsoft_wi
|
|
34
34
|
described_class.new(:name => 'Test Task', :command => 'notepad.exe')
|
35
35
|
}.to raise_error(
|
36
36
|
Puppet::Error,
|
37
|
-
/Parameter command failed: Must be specified using an absolute path\./
|
37
|
+
/Parameter command failed on Scheduled_task\[Test Task\]: Must be specified using an absolute path\./
|
38
38
|
)
|
39
39
|
end
|
40
40
|
end
|
@@ -77,7 +77,7 @@ describe Puppet::Type.type(:scheduled_task), :if => Puppet.features.microsoft_wi
|
|
77
77
|
)
|
78
78
|
}.to raise_error(
|
79
79
|
Puppet::Error,
|
80
|
-
/Parameter working_dir failed: Must be specified using an absolute path/
|
80
|
+
/Parameter working_dir failed on Scheduled_task\[Test Task\]: Must be specified using an absolute path/
|
81
81
|
)
|
82
82
|
end
|
83
83
|
|
data/spec/unit/type/zone_spec.rb
CHANGED
@@ -55,16 +55,6 @@ describe Puppet::Type.type(:zone) do
|
|
55
55
|
described_class.new(:name => "dummy", :path => "/dummy", :ip => "if", :iptype => :exclusive, :provider => :solaris)
|
56
56
|
end
|
57
57
|
|
58
|
-
context "state_name" do
|
59
|
-
it "should correctly fetch alias from state_aliases when available" do
|
60
|
-
zone.parameter(:ensure).class.state_name('incomplete').should == :installed
|
61
|
-
end
|
62
|
-
|
63
|
-
it "should correctly use symbol when alias is unavailable" do
|
64
|
-
zone.parameter(:ensure).class.state_name('noalias').should == :noalias
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
58
|
it "should auto-require :dataset entries" do
|
69
59
|
fs = 'random-pool/some-zfs'
|
70
60
|
|
@@ -81,4 +71,56 @@ describe Puppet::Type.type(:zone) do
|
|
81
71
|
|
82
72
|
catalog.relationship_graph.dependencies(zone).should == [zfs]
|
83
73
|
end
|
74
|
+
describe StateMachine do
|
75
|
+
let (:sm) { StateMachine.new }
|
76
|
+
before :each do
|
77
|
+
sm.insert_state :absent, :down => :destroy
|
78
|
+
sm.insert_state :configured, :up => :configure, :down => :uninstall
|
79
|
+
sm.insert_state :installed, :up => :install, :down => :stop
|
80
|
+
sm.insert_state :running, :up => :start
|
81
|
+
end
|
82
|
+
|
83
|
+
context ":insert_state" do
|
84
|
+
it "should insert state in correct order" do
|
85
|
+
sm.insert_state :dummy, :left => :right
|
86
|
+
sm.index(:dummy).should == 4
|
87
|
+
end
|
88
|
+
end
|
89
|
+
context ":alias_state" do
|
90
|
+
it "should alias state" do
|
91
|
+
sm.alias_state :dummy, :running
|
92
|
+
sm.name(:dummy).should == :running
|
93
|
+
end
|
94
|
+
end
|
95
|
+
context ":name" do
|
96
|
+
it "should get an aliased state correctly" do
|
97
|
+
sm.alias_state :dummy, :running
|
98
|
+
sm.name(:dummy).should == :running
|
99
|
+
end
|
100
|
+
it "should get an un aliased state correctly" do
|
101
|
+
sm.name(:dummy).should == :dummy
|
102
|
+
end
|
103
|
+
end
|
104
|
+
context ":index" do
|
105
|
+
it "should return the state index correctly" do
|
106
|
+
sm.insert_state :dummy, :left => :right
|
107
|
+
sm.index(:dummy).should == 4
|
108
|
+
end
|
109
|
+
end
|
110
|
+
context ":sequence" do
|
111
|
+
it "should correctly return the actions to reach state specified" do
|
112
|
+
sm.sequence(:absent, :running).map{|p|p[:up]}.should == [:configure,:install,:start]
|
113
|
+
end
|
114
|
+
it "should correctly return the actions to reach state specified(2)" do
|
115
|
+
sm.sequence(:running, :absent).map{|p|p[:down]}.should == [:stop, :uninstall, :destroy]
|
116
|
+
end
|
117
|
+
end
|
118
|
+
context ":cmp" do
|
119
|
+
it "should correctly compare state sequence values" do
|
120
|
+
sm.cmp?(:absent, :running).should == true
|
121
|
+
sm.cmp?(:running, :running).should == false
|
122
|
+
sm.cmp?(:running, :absent).should == false
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
84
126
|
end
|
data/spec/unit/util/adsi_spec.rb
CHANGED
@@ -229,4 +229,23 @@ describe Puppet::Util::ADSI do
|
|
229
229
|
Puppet::Util::ADSI::Group.delete(groupname)
|
230
230
|
end
|
231
231
|
end
|
232
|
+
|
233
|
+
describe Puppet::Util::ADSI::UserProfile do
|
234
|
+
it "should be able to delete a user profile" do
|
235
|
+
connection.expects(:Delete).with("Win32_UserProfile.SID='S-A-B-C'")
|
236
|
+
Puppet::Util::ADSI::UserProfile.delete('S-A-B-C')
|
237
|
+
end
|
238
|
+
|
239
|
+
it "should warn on 2003" do
|
240
|
+
connection.expects(:Delete).raises(RuntimeError,
|
241
|
+
"Delete (WIN32OLERuntimeError)
|
242
|
+
OLE error code:80041010 in SWbemServicesEx
|
243
|
+
Invalid class
|
244
|
+
HRESULT error code:0x80020009
|
245
|
+
Exception occurred.")
|
246
|
+
|
247
|
+
Puppet.expects(:warning).with("Cannot delete user profile for 'S-A-B-C' prior to Vista SP1")
|
248
|
+
Puppet::Util::ADSI::UserProfile.delete('S-A-B-C')
|
249
|
+
end
|
250
|
+
end
|
232
251
|
end
|
@@ -92,11 +92,10 @@ describe Puppet::Util::Checksums do
|
|
92
92
|
klass.expects(:new).returns digest
|
93
93
|
digest.expects(:hexdigest).returns :mydigest
|
94
94
|
|
95
|
-
@summer.send(sum.to_s + "_stream") do |
|
96
|
-
|
95
|
+
@summer.send(sum.to_s + "_stream") do |checksum|
|
96
|
+
checksum.should == digest
|
97
97
|
end.should == :mydigest
|
98
98
|
end
|
99
|
-
|
100
99
|
end
|
101
100
|
end
|
102
101
|
|
@@ -265,7 +265,7 @@ describe Puppet::Util::Execution do
|
|
265
265
|
Process.expects(:CloseHandle).with(thread_handle)
|
266
266
|
Process.expects(:CloseHandle).with(process_handle)
|
267
267
|
|
268
|
-
expect { Puppet::Util::Execution.execute('test command') }.
|
268
|
+
expect { Puppet::Util::Execution.execute('test command') }.to raise_error(RuntimeError)
|
269
269
|
end
|
270
270
|
end
|
271
271
|
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/usr/bin/env ruby -S rspec
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'puppet/util/log/rate_limited_logger'
|
4
|
+
|
5
|
+
describe Puppet::Util::Log::RateLimitedLogger do
|
6
|
+
|
7
|
+
subject { Puppet::Util::Log::RateLimitedLogger.new(60) }
|
8
|
+
|
9
|
+
before do
|
10
|
+
Time.stubs(:now).returns(0)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should be able to log all levels" do
|
14
|
+
Puppet::Util::Log.eachlevel do |level|
|
15
|
+
subject.should respond_to(level)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should fail if given an invalid time interval" do
|
20
|
+
expect { Puppet::Util::Log::RateLimitedLogger.new('foo') }.to raise_error(ArgumentError)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should not log the same message more than once within the given interval" do
|
24
|
+
Puppet::Util::Log.expects(:create).once
|
25
|
+
subject.info('foo')
|
26
|
+
subject.info('foo')
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should allow the same message to be logged after the given interval has passed" do
|
30
|
+
Puppet::Util::Log.expects(:create).twice
|
31
|
+
subject.info('foo')
|
32
|
+
Time.stubs(:now).returns(60)
|
33
|
+
subject.info('foo')
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should rate-limit different message strings separately" do
|
37
|
+
Puppet::Util::Log.expects(:create).times(3)
|
38
|
+
subject.info('foo')
|
39
|
+
subject.info('bar')
|
40
|
+
subject.info('baz')
|
41
|
+
subject.info('foo')
|
42
|
+
subject.info('bar')
|
43
|
+
subject.info('baz')
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should limit the same message in different log levels independently" do
|
47
|
+
Puppet::Util::Log.expects(:create).twice
|
48
|
+
subject.info('foo')
|
49
|
+
subject.warning('foo')
|
50
|
+
end
|
51
|
+
end
|
@@ -133,18 +133,18 @@ describe Puppet::Util::Logging do
|
|
133
133
|
exc1.set_backtrace(["7.rb:31:in `e'","8.rb:22:in `f'","9.rb:9"])
|
134
134
|
# whoa ugly
|
135
135
|
@logger.format_exception(exc1).should =~ /third
|
136
|
-
.*7\.rb:31
|
137
|
-
.*8\.rb:22
|
136
|
+
.*7\.rb:31:in `e'
|
137
|
+
.*8\.rb:22:in `f'
|
138
138
|
.*9\.rb:9
|
139
139
|
Wrapped exception:
|
140
140
|
second
|
141
|
-
.*4\.rb:8
|
142
|
-
.*5\.rb:1
|
141
|
+
.*4\.rb:8:in `c'
|
142
|
+
.*5\.rb:1:in `d'
|
143
143
|
.*6\.rb:3
|
144
144
|
Wrapped exception:
|
145
145
|
original
|
146
|
-
.*1\.rb:4
|
147
|
-
.*2\.rb:2
|
146
|
+
.*1\.rb:4:in `a'
|
147
|
+
.*2\.rb:2:in `b'
|
148
148
|
.*3\.rb:1/
|
149
149
|
end
|
150
150
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
#! /usr/bin/env ruby -S rspec
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
+
require 'pathname'
|
4
5
|
require 'puppet/util/selinux'
|
5
6
|
include Puppet::Util::SELinux
|
6
7
|
|
@@ -33,7 +34,7 @@ describe Puppet::Util::SELinux do
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
36
|
-
describe "
|
37
|
+
describe "read_mounts" do
|
37
38
|
before :each do
|
38
39
|
fh = stub 'fh', :close => nil
|
39
40
|
File.stubs(:open).with("/proc/mounts").returns fh
|
@@ -48,6 +49,17 @@ describe Puppet::Util::SELinux do
|
|
48
49
|
'/proc' => 'proc',
|
49
50
|
'/dev' => 'tmpfs' }
|
50
51
|
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "filesystem detection" do
|
55
|
+
before :each do
|
56
|
+
self.stubs(:read_mounts).returns({
|
57
|
+
'/' => 'ext3',
|
58
|
+
'/sys' => 'sysfs',
|
59
|
+
'/mnt/nfs' => 'nfs',
|
60
|
+
'/proc' => 'proc',
|
61
|
+
'/dev' => 'tmpfs' })
|
62
|
+
end
|
51
63
|
|
52
64
|
it "should match a path on / to ext3" do
|
53
65
|
find_fs('/etc/puppet/testfile').should == "ext3"
|
@@ -65,41 +77,21 @@ describe Puppet::Util::SELinux do
|
|
65
77
|
selinux_label_support?('/mnt/nfs/testfile').should be_false
|
66
78
|
end
|
67
79
|
|
68
|
-
it "
|
69
|
-
|
80
|
+
it "(#8714) don't follow symlinks when determining file systems", :unless => Puppet.features.microsoft_windows? do
|
81
|
+
scratch = Pathname(PuppetSpec::Files.tmpdir('selinux'))
|
70
82
|
|
71
|
-
|
72
|
-
|
83
|
+
self.stubs(:read_mounts).returns({
|
84
|
+
'/' => 'ext3',
|
85
|
+
scratch + 'nfs' => 'nfs',
|
86
|
+
})
|
73
87
|
|
74
|
-
|
88
|
+
(scratch + 'foo').make_symlink('nfs/bar')
|
89
|
+
selinux_label_support?(scratch + 'foo').should be_true
|
90
|
+
end
|
75
91
|
|
76
|
-
describe "realpath" do
|
77
92
|
it "should handle files that don't exist" do
|
78
|
-
|
79
|
-
|
80
|
-
# I need to also stub the internal calls to Pathname.new,
|
81
|
-
# which happen in Pathname.dirname and Parthname.basename
|
82
|
-
# I want those to return real Pathname objects,
|
83
|
-
# so I'm creating them before the stub is in place.
|
84
|
-
realpaths = Hash.new {|hash, path| hash[path] = Pathname.new(path) }
|
85
|
-
paths = ['symlink', '/mnt']
|
86
|
-
paths.each { |path| realpaths[path] }
|
87
|
-
|
88
|
-
realpaths['/mnt/symlink'] = stubs "Pathname"
|
89
|
-
realpaths['/mnt/symlink'].stubs(:realpath).returns(realpaths['/mnt/nfs/dest'])
|
90
|
-
realpaths['/mnt/symlink'].stubs(:exist?).returns(true)
|
91
|
-
|
92
|
-
realpaths['/mnt/symlink/nonexistant'] = stubs "Pathname"
|
93
|
-
realpaths['/mnt/symlink/nonexistant'].stubs(:realpath).raises(Errno::ENOENT)
|
94
|
-
realpaths['/mnt/symlink/nonexistant'].stubs(:exist?).returns(false)
|
95
|
-
realpaths['/mnt/symlink/nonexistant'].stubs(:dirname).returns(realpaths['/mnt/symlink'])
|
96
|
-
realpaths['/mnt/symlink/nonexistant'].stubs(:basename).returns(realpaths['nonexistant'])
|
97
|
-
|
98
|
-
realpaths.each do |path, value|
|
99
|
-
Pathname.stubs(:new).with(path).returns(value)
|
100
|
-
end
|
101
|
-
|
102
|
-
realpath('/mnt/symlink/nonexistant').should == '/mnt/nfs/dest/nonexistant'
|
93
|
+
scratch = Pathname(PuppetSpec::Files.tmpdir('selinux'))
|
94
|
+
selinux_label_support?(scratch + 'nonesuch').should be_true
|
103
95
|
end
|
104
96
|
end
|
105
97
|
|
data/spec/unit/util/zaml_spec.rb
CHANGED
@@ -25,12 +25,12 @@ describe "Pure ruby yaml implementation" do
|
|
25
25
|
"-0x123abc" => '--- "-0x123abc"',
|
26
26
|
"-0x123" => '--- "-0x123"',
|
27
27
|
"+0x123" => '--- "+0x123"',
|
28
|
-
"0x123.456" =>
|
28
|
+
"0x123.456" => '--- "0x123.456"',
|
29
29
|
'test' => "--- test",
|
30
30
|
[] => "--- []",
|
31
31
|
:symbol => "--- !ruby/sym symbol",
|
32
32
|
{:a => "A"} => "--- \n !ruby/sym a: A",
|
33
|
-
{:a => "x\ny"} => "--- \n !ruby/sym a: |-\n x\n y"
|
33
|
+
{:a => "x\ny"} => "--- \n !ruby/sym a: |-\n x\n y"
|
34
34
|
}.each { |o,y|
|
35
35
|
it "should convert the #{o.class} #{o.inspect} to yaml" do
|
36
36
|
o.to_yaml.should == y
|
@@ -108,6 +108,16 @@ end
|
|
108
108
|
describe "binary data" do
|
109
109
|
subject { "M\xC0\xDF\xE5tt\xF6" }
|
110
110
|
|
111
|
+
if String.method_defined?(:encoding)
|
112
|
+
def binary(str)
|
113
|
+
str.force_encoding('binary')
|
114
|
+
end
|
115
|
+
else
|
116
|
+
def binary(str)
|
117
|
+
str
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
111
121
|
it "should not explode encoding binary data" do
|
112
122
|
expect { subject.to_yaml }.not_to raise_error
|
113
123
|
end
|
@@ -119,12 +129,90 @@ describe "binary data" do
|
|
119
129
|
it "should round-trip the data" do
|
120
130
|
yaml = subject.to_yaml
|
121
131
|
read = YAML.load(yaml)
|
132
|
+
binary(read).should == binary(subject)
|
133
|
+
end
|
122
134
|
|
123
|
-
|
124
|
-
|
125
|
-
|
135
|
+
[
|
136
|
+
"\xC0\xAE", # over-long UTF-8 '.' character
|
137
|
+
"\xC0\x80", # over-long NULL byte
|
138
|
+
"\xC0\xFF",
|
139
|
+
"\xC1\xAE",
|
140
|
+
"\xC1\x80",
|
141
|
+
"\xC1\xFF",
|
142
|
+
"\x80", # first continuation byte
|
143
|
+
"\xbf", # last continuation byte
|
144
|
+
# all possible continuation bytes in one shot
|
145
|
+
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F" +
|
146
|
+
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F" +
|
147
|
+
"\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF" +
|
148
|
+
"\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF",
|
149
|
+
# lonely start characters - first, all possible two byte sequences
|
150
|
+
"\xC0 \xC1 \xC2 \xC3 \xC4 \xC5 \xC6 \xC7 \xC8 \xC9 \xCA \xCB \xCC \xCD \xCE \xCF " +
|
151
|
+
"\xD0 \xD1 \xD2 \xD3 \xD4 \xD5 \xD6 \xD7 \xD8 \xD9 \xDA \xDB \xDC \xDD \xDE \xDF ",
|
152
|
+
# and so for three byte sequences, four, five, and six, as follow.
|
153
|
+
"\xE0 \xE1 \xE2 \xE3 \xE4 \xE5 \xE6 \xE7 \xE8 \xE9 \xEA \xEB \xEC \xED \xEE \xEF ",
|
154
|
+
"\xF0 \xF1 \xF2 \xF3 \xF4 \xF5 \xF6 \xF7 ",
|
155
|
+
"\xF8 \xF9 \xFA \xFB ",
|
156
|
+
"\xFC \xFD ",
|
157
|
+
# sequences with the last byte missing
|
158
|
+
"\xC0", "\xE0", "\xF0\x80\x80", "\xF8\x80\x80\x80", "\xFC\x80\x80\x80\x80",
|
159
|
+
"\xDF", "\xEF\xBF", "\xF7\xBF\xBF", "\xFB\xBF\xBF\xBF", "\xFD\xBF\xBF\xBF\xBF",
|
160
|
+
# impossible bytes
|
161
|
+
"\xFE", "\xFF", "\xFE\xFE\xFF\xFF",
|
162
|
+
# over-long '/' character
|
163
|
+
"\xC0\xAF",
|
164
|
+
"\xE0\x80\xAF",
|
165
|
+
"\xF0\x80\x80\xAF",
|
166
|
+
"\xF8\x80\x80\x80\xAF",
|
167
|
+
"\xFC\x80\x80\x80\x80\xAF",
|
168
|
+
# maximum overlong sequences
|
169
|
+
"\xc1\xbf",
|
170
|
+
"\xe0\x9f\xbf",
|
171
|
+
"\xf0\x8f\xbf\xbf",
|
172
|
+
"\xf8\x87\xbf\xbf\xbf",
|
173
|
+
"\xfc\x83\xbf\xbf\xbf\xbf",
|
174
|
+
# overlong NUL
|
175
|
+
"\xc0\x80",
|
176
|
+
"\xe0\x80\x80",
|
177
|
+
"\xf0\x80\x80\x80",
|
178
|
+
"\xf8\x80\x80\x80\x80",
|
179
|
+
"\xfc\x80\x80\x80\x80\x80",
|
180
|
+
].each do |input|
|
181
|
+
# It might seem like we should more correctly reject these sequences in
|
182
|
+
# the encoder, and I would personally agree, but the sad reality is that
|
183
|
+
# we do not distinguish binary and textual data in our language, and so we
|
184
|
+
# wind up with the same thing - a string - containing both.
|
185
|
+
#
|
186
|
+
# That leads to the position where we must treat these invalid sequences,
|
187
|
+
# which are both legitimate binary content, and illegitimate potential
|
188
|
+
# attacks on the system, as something that passes through correctly in
|
189
|
+
# a string. --daniel 2012-07-14
|
190
|
+
it "binary encode highly dubious non-compliant UTF-8 input #{input.inspect}" do
|
191
|
+
encoded = ZAML.dump(binary(input))
|
192
|
+
encoded.should =~ /!binary/
|
193
|
+
YAML.load(encoded).should == input
|
126
194
|
end
|
195
|
+
end
|
196
|
+
end
|
127
197
|
|
128
|
-
|
198
|
+
describe "multi-line values" do
|
199
|
+
[
|
200
|
+
"none",
|
201
|
+
"one\n",
|
202
|
+
"two\n\n",
|
203
|
+
["one\n", "two"],
|
204
|
+
["two\n\n", "three"],
|
205
|
+
{ "\nkey" => "value" },
|
206
|
+
{ "key\n" => "value" },
|
207
|
+
{ "\nkey\n" => "value" },
|
208
|
+
{ "key\nkey" => "value" },
|
209
|
+
{ "\nkey\nkey" => "value" },
|
210
|
+
{ "key\nkey\n" => "value" },
|
211
|
+
{ "\nkey\nkey\n" => "value" },
|
212
|
+
].each do |input|
|
213
|
+
it "handles #{input.inspect} without corruption" do
|
214
|
+
zaml = ZAML.dump(input)
|
215
|
+
YAML.load(zaml).should == input
|
216
|
+
end
|
129
217
|
end
|
130
218
|
end
|