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/conf/osx/preflight
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
#
|
3
|
-
# Make sure that old puppet cruft is removed
|
4
|
-
# This also allows us to downgrade puppet as
|
5
|
-
# it's more likely that installing old versions
|
6
|
-
# over new will cause issues.
|
7
|
-
#
|
8
|
-
# ${3} is the destination volume so that this works correctly
|
9
|
-
# when being installed to volumes other than the current OS.
|
10
|
-
|
11
|
-
/bin/rm -Rf "${3}{SITELIBDIR}/puppet"
|
12
|
-
/bin/rm -Rf "${3}{SITELIBDIR}/puppet.rb"
|
13
|
-
|
14
|
-
# remove old doc files
|
15
|
-
|
16
|
-
/bin/rm -Rf "${3}/usr/share/doc/puppet"
|
17
|
-
|
18
|
-
# In puppet 0.24.x these executables lived in bindir, but in 0.25.x they
|
19
|
-
# have been moved to sbindir. This cleans out old ones before installing.
|
20
|
-
/bin/rm -Rf "${3}{BINDIR}/puppetca"
|
21
|
-
/bin/rm -Rf "${3}{BINDIR}/puppetd"
|
22
|
-
/bin/rm -Rf "${3}{BINDIR}/puppetmasterd"
|
23
|
-
/bin/rm -Rf "${3}{BINDIR}/puppetqd"
|
24
|
-
/bin/rm -Rf "${3}{BINDIR}/puppetrun"
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'mongrel' if Puppet.features.mongrel?
|
2
|
-
|
3
|
-
require 'puppet/network/http/mongrel/rest'
|
4
|
-
|
5
|
-
class Puppet::Network::HTTP::Mongrel
|
6
|
-
def initialize(args = {})
|
7
|
-
@listening = false
|
8
|
-
end
|
9
|
-
|
10
|
-
def listen(args = {})
|
11
|
-
raise ArgumentError, ":address must be specified." unless args[:address]
|
12
|
-
raise ArgumentError, ":port must be specified." unless args[:port]
|
13
|
-
raise "Mongrel server is already listening" if listening?
|
14
|
-
|
15
|
-
@server = Mongrel::HttpServer.new(args[:address], args[:port])
|
16
|
-
@server.register('/', Puppet::Network::HTTP::MongrelREST.new(:server => @server))
|
17
|
-
|
18
|
-
@listening = true
|
19
|
-
@server.run
|
20
|
-
end
|
21
|
-
|
22
|
-
def unlisten
|
23
|
-
raise "Mongrel server is not listening" unless listening?
|
24
|
-
# We wait until the running process has terminated, rather than letting
|
25
|
-
# the shutdown happen in the background. This might delay exit, but is
|
26
|
-
# nicer than the alternative of killing something horribly. --daniel 2012-03-12
|
27
|
-
@server.stop(true)
|
28
|
-
@server = nil
|
29
|
-
@listening = false
|
30
|
-
end
|
31
|
-
|
32
|
-
def listening?
|
33
|
-
@listening
|
34
|
-
end
|
35
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Puppet::Util::ConfigTimeout
|
2
|
-
# NOTE: in the future it might be a good idea to add an explicit "integer" type to
|
3
|
-
# the settings types, in which case this would no longer be necessary.
|
4
|
-
|
5
|
-
# Get the value of puppet's "configtimeout" setting, as an integer. Raise an
|
6
|
-
# ArgumentError if the setting does not contain a valid integer value.
|
7
|
-
# @return Puppet config timeout setting value, as an integer
|
8
|
-
def timeout_interval
|
9
|
-
timeout = Puppet[:configtimeout]
|
10
|
-
case timeout
|
11
|
-
when String
|
12
|
-
if timeout =~ /^\d+$/
|
13
|
-
timeout = Integer(timeout)
|
14
|
-
else
|
15
|
-
raise ArgumentError, "Configuration timeout must be an integer"
|
16
|
-
end
|
17
|
-
when Integer # nothing
|
18
|
-
else
|
19
|
-
raise ArgumentError, "Configuration timeout must be an integer"
|
20
|
-
end
|
21
|
-
|
22
|
-
timeout
|
23
|
-
end
|
24
|
-
end
|
@@ -1,257 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby -S rspec
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
require 'puppet/network/http'
|
5
|
-
|
6
|
-
describe "Puppet::Network::HTTP::MongrelREST", :if => Puppet.features.mongrel? do
|
7
|
-
before do
|
8
|
-
require 'puppet/network/http/mongrel/rest'
|
9
|
-
end
|
10
|
-
|
11
|
-
|
12
|
-
it "should include the Puppet::Network::HTTP::Handler module" do
|
13
|
-
Puppet::Network::HTTP::MongrelREST.ancestors.should be_include(Puppet::Network::HTTP::Handler)
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "when initializing" do
|
17
|
-
it "should call the Handler's initialization hook with its provided arguments as the server and handler" do
|
18
|
-
Puppet::Network::HTTP::MongrelREST.any_instance.expects(:initialize_for_puppet).with(:server => "my", :handler => "arguments")
|
19
|
-
Puppet::Network::HTTP::MongrelREST.new(:server => "my", :handler => "arguments")
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
describe "when receiving a request" do
|
24
|
-
before do
|
25
|
-
@params = {}
|
26
|
-
@request = stub('mongrel http request', :params => @params)
|
27
|
-
|
28
|
-
@head = stub('response head')
|
29
|
-
@body = stub('response body', :write => true)
|
30
|
-
@response = stub('mongrel http response')
|
31
|
-
@response.stubs(:start).yields(@head, @body)
|
32
|
-
@model_class = stub('indirected model class')
|
33
|
-
@mongrel = stub('mongrel http server', :register => true)
|
34
|
-
Puppet::Indirector::Indirection.stubs(:model).with(:foo).returns(@model_class)
|
35
|
-
@handler = Puppet::Network::HTTP::MongrelREST.new(:server => @mongrel, :handler => :foo)
|
36
|
-
end
|
37
|
-
|
38
|
-
describe "and using the HTTP Handler interface" do
|
39
|
-
it "should return the HTTP_ACCEPT parameter as the accept header" do
|
40
|
-
@params.expects(:[]).with("HTTP_ACCEPT").returns "myaccept"
|
41
|
-
@handler.accept_header(@request).should == "myaccept"
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should return the Content-Type parameter as the Content-Type header" do
|
45
|
-
@params.expects(:[]).with("HTTP_CONTENT_TYPE").returns "mycontent"
|
46
|
-
@handler.content_type_header(@request).should == "mycontent"
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should use the REQUEST_METHOD as the http method" do
|
50
|
-
@params.expects(:[]).with(Mongrel::Const::REQUEST_METHOD).returns "mymethod"
|
51
|
-
@handler.http_method(@request).should == "mymethod"
|
52
|
-
end
|
53
|
-
|
54
|
-
it "should return the request path as the path" do
|
55
|
-
@params.expects(:[]).with(Mongrel::Const::REQUEST_PATH).returns "/foo/bar"
|
56
|
-
@handler.path(@request).should == "/foo/bar"
|
57
|
-
end
|
58
|
-
|
59
|
-
it "should return the request body as the body" do
|
60
|
-
@request.stubs(:body).returns StringIO.new("mybody")
|
61
|
-
@handler.body(@request).should == "mybody"
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should set the response's content-type header when setting the content type" do
|
65
|
-
@header = mock 'header'
|
66
|
-
@response.expects(:header).returns @header
|
67
|
-
@header.expects(:[]=).with('Content-Type', "mytype")
|
68
|
-
|
69
|
-
@handler.set_content_type(@response, "mytype")
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should set the status and write the body when setting the response for a successful request" do
|
73
|
-
head = mock 'head'
|
74
|
-
body = mock 'body'
|
75
|
-
@response.expects(:start).with(200).yields(head, body)
|
76
|
-
|
77
|
-
body.expects(:write).with("mybody")
|
78
|
-
|
79
|
-
@handler.set_response(@response, "mybody", 200)
|
80
|
-
end
|
81
|
-
|
82
|
-
describe "when the result is a File" do
|
83
|
-
it "should use response send_file" do
|
84
|
-
head = mock 'head'
|
85
|
-
body = mock 'body'
|
86
|
-
stat = stub 'stat', :size => 100
|
87
|
-
file = stub 'file', :stat => stat, :path => "/tmp/path"
|
88
|
-
file.stubs(:is_a?).with(File).returns(true)
|
89
|
-
|
90
|
-
@response.expects(:start).with(200).yields(head, body)
|
91
|
-
@response.expects(:send_status).with(100)
|
92
|
-
@response.expects(:send_header)
|
93
|
-
@response.expects(:send_file).with("/tmp/path")
|
94
|
-
|
95
|
-
@handler.set_response(@response, file, 200)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
it "should set the status and reason and write the body when setting the response for a successful request" do
|
100
|
-
head = mock 'head'
|
101
|
-
body = mock 'body'
|
102
|
-
@response.expects(:start).with(400, false, "mybody").yields(head, body)
|
103
|
-
|
104
|
-
body.expects(:write).with("mybody")
|
105
|
-
|
106
|
-
@handler.set_response(@response, "mybody", 400)
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
describe "and determining the request parameters" do
|
111
|
-
before do
|
112
|
-
@params = {'REQUEST_METHOD' => 'GET'}
|
113
|
-
@request.stubs(:params).returns(@params)
|
114
|
-
end
|
115
|
-
|
116
|
-
it "should skip empty parameter values" do
|
117
|
-
@params['QUERY_STRING'] = "&="
|
118
|
-
lambda { @handler.params(@request) }.should_not raise_error
|
119
|
-
end
|
120
|
-
|
121
|
-
it "should include the HTTP request parameters, with the keys as symbols" do
|
122
|
-
@params['QUERY_STRING'] = 'foo=baz&bar=xyzzy'
|
123
|
-
result = @handler.params(@request)
|
124
|
-
result[:foo].should == "baz"
|
125
|
-
result[:bar].should == "xyzzy"
|
126
|
-
end
|
127
|
-
|
128
|
-
it "should CGI-decode the HTTP parameters" do
|
129
|
-
escaped = CGI.escape("foo bar")
|
130
|
-
@params['QUERY_STRING'] = "foo=#{escaped}"
|
131
|
-
result = @handler.params(@request)
|
132
|
-
result[:foo].should == "foo bar"
|
133
|
-
end
|
134
|
-
|
135
|
-
it "should include parameters from the body of a POST request" do
|
136
|
-
@params.merge!(
|
137
|
-
'QUERY_STRING' => nil,
|
138
|
-
'REQUEST_METHOD' => 'POST'
|
139
|
-
)
|
140
|
-
body = StringIO.new('foo=bar&baz=qux')
|
141
|
-
@request.stubs(:body).returns(body)
|
142
|
-
|
143
|
-
@handler.params(@request).should include(
|
144
|
-
:foo => 'bar',
|
145
|
-
:baz => 'qux'
|
146
|
-
)
|
147
|
-
end
|
148
|
-
|
149
|
-
it "should convert the string 'true' to the boolean" do
|
150
|
-
@params['QUERY_STRING'] = 'foo=true'
|
151
|
-
result = @handler.params(@request)
|
152
|
-
result[:foo].should be_true
|
153
|
-
end
|
154
|
-
|
155
|
-
it "should convert the string 'false' to the boolean" do
|
156
|
-
@params['QUERY_STRING'] = 'foo=false'
|
157
|
-
result = @handler.params(@request)
|
158
|
-
result[:foo].should be_false
|
159
|
-
end
|
160
|
-
|
161
|
-
it "should convert integer arguments to Integers" do
|
162
|
-
@params['QUERY_STRING'] = 'foo=15'
|
163
|
-
result = @handler.params(@request)
|
164
|
-
result[:foo].should == 15
|
165
|
-
end
|
166
|
-
|
167
|
-
it "should convert floating point arguments to Floats" do
|
168
|
-
@params['QUERY_STRING'] = 'foo=1.5'
|
169
|
-
result = @handler.params(@request)
|
170
|
-
result[:foo].should == 1.5
|
171
|
-
end
|
172
|
-
|
173
|
-
it "should YAML-load and URI-decode values that are YAML-encoded" do
|
174
|
-
escaping = CGI.escape(YAML.dump(%w{one two}))
|
175
|
-
@params['QUERY_STRING'] = "foo=#{escaping}"
|
176
|
-
result = @handler.params(@request)
|
177
|
-
result[:foo].should == %w{one two}
|
178
|
-
end
|
179
|
-
|
180
|
-
it "should not allow the client to set the node via the query string" do
|
181
|
-
@params['QUERY_STRING'] = "node=foo"
|
182
|
-
@handler.params(@request)[:node].should be_nil
|
183
|
-
end
|
184
|
-
|
185
|
-
it "should not allow the client to set the IP address via the query string" do
|
186
|
-
@params['QUERY_STRING'] = "ip=foo"
|
187
|
-
@handler.params(@request)[:ip].should be_nil
|
188
|
-
end
|
189
|
-
|
190
|
-
it "should pass the client's ip address to model find" do
|
191
|
-
@params['REMOTE_ADDR'] = "ipaddress"
|
192
|
-
@handler.params(@request)[:ip].should == "ipaddress"
|
193
|
-
end
|
194
|
-
|
195
|
-
it "should pass the client's provided X-Forwared-For value as the ip" do
|
196
|
-
@params["HTTP_X_FORWARDED_FOR"] = "ipaddress"
|
197
|
-
@handler.params(@request)[:ip].should == "ipaddress"
|
198
|
-
end
|
199
|
-
|
200
|
-
it "should pass the client's provided X-Forwared-For first value as the ip" do
|
201
|
-
@params["HTTP_X_FORWARDED_FOR"] = "ipproxy1,ipproxy2,ipaddress"
|
202
|
-
@handler.params(@request)[:ip].should == "ipaddress"
|
203
|
-
end
|
204
|
-
|
205
|
-
it "should pass the client's provided X-Forwared-For value as the ip instead of the REMOTE_ADDR" do
|
206
|
-
@params.merge!(
|
207
|
-
"REMOTE_ADDR" => "remote_addr",
|
208
|
-
"HTTP_X_FORWARDED_FOR" => "ipaddress"
|
209
|
-
)
|
210
|
-
@handler.params(@request)[:ip].should == "ipaddress"
|
211
|
-
end
|
212
|
-
|
213
|
-
it "should retrieve the hostname by matching the certificate parameter from the header in :ssl_client_header" do
|
214
|
-
Puppet[:ssl_client_header] = "myheader"
|
215
|
-
@params["myheader"] = "/CN=host.domain.com"
|
216
|
-
@handler.params(@request)[:node].should == "host.domain.com"
|
217
|
-
end
|
218
|
-
|
219
|
-
it "should use :ssl_client_header and :ssl_client_verify_header to determine the parameter for checking whether the host certificate is valid" do
|
220
|
-
Puppet[:ssl_client_header] = "certheader"
|
221
|
-
Puppet[:ssl_client_verify_header] = "myheader"
|
222
|
-
@params.merge!(
|
223
|
-
"myheader" => "SUCCESS",
|
224
|
-
"certheader" => "/CN=host.domain.com"
|
225
|
-
)
|
226
|
-
@handler.params(@request)[:authenticated].should be_true
|
227
|
-
end
|
228
|
-
|
229
|
-
it "should consider the host unauthenticated if the validity parameter does not contain 'SUCCESS'" do
|
230
|
-
Puppet[:ssl_client_header] = "certheader"
|
231
|
-
Puppet[:ssl_client_verify_header] = "myheader"
|
232
|
-
@params.merge!(
|
233
|
-
"myheader" => "whatever",
|
234
|
-
"certheader" => "/CN=host.domain.com"
|
235
|
-
)
|
236
|
-
@handler.params(@request)[:authenticated].should be_false
|
237
|
-
end
|
238
|
-
|
239
|
-
it "should consider the host unauthenticated if no certificate information is present" do
|
240
|
-
Puppet[:ssl_client_header] = "certheader"
|
241
|
-
Puppet[:ssl_client_verify_header] = "myheader"
|
242
|
-
@params.merge!(
|
243
|
-
"myheader" => nil,
|
244
|
-
"certheader" => "SUCCESS"
|
245
|
-
)
|
246
|
-
@handler.params(@request)[:authenticated].should be_false
|
247
|
-
end
|
248
|
-
|
249
|
-
it "should resolve the node name with an ip address look-up if no certificate is present" do
|
250
|
-
Puppet[:ssl_client_header] = "myheader"
|
251
|
-
@params["myheader"] = nil
|
252
|
-
@handler.expects(:resolve_node).returns("host.domain.com")
|
253
|
-
@handler.params(@request)[:node].should == "host.domain.com"
|
254
|
-
end
|
255
|
-
end
|
256
|
-
end
|
257
|
-
end
|
@@ -1,91 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby -S rspec
|
2
|
-
require 'spec_helper'
|
3
|
-
require 'puppet/network/http'
|
4
|
-
|
5
|
-
describe "Puppet::Network::HTTP::Mongrel", "after initializing", :if => Puppet.features.mongrel? do
|
6
|
-
it "should not be listening" do
|
7
|
-
require 'puppet/network/http/mongrel'
|
8
|
-
|
9
|
-
Puppet::Network::HTTP::Mongrel.new.should_not be_listening
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "Puppet::Network::HTTP::Mongrel", "when turning on listening", :if => Puppet.features.mongrel? do
|
14
|
-
before do
|
15
|
-
require 'puppet/network/http/mongrel'
|
16
|
-
|
17
|
-
@server = Puppet::Network::HTTP::Mongrel.new
|
18
|
-
@mock_mongrel = mock('mongrel')
|
19
|
-
@mock_mongrel.stubs(:run)
|
20
|
-
@mock_mongrel.stubs(:register)
|
21
|
-
Mongrel::HttpServer.stubs(:new).returns(@mock_mongrel)
|
22
|
-
|
23
|
-
@listen_params = { :address => "127.0.0.1", :port => 31337 }
|
24
|
-
end
|
25
|
-
|
26
|
-
it "should fail if already listening" do
|
27
|
-
@server.listen(@listen_params)
|
28
|
-
Proc.new { @server.listen(@listen_params) }.should raise_error(RuntimeError)
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should require a listening address to be specified" do
|
32
|
-
Proc.new { @server.listen(@listen_params.delete_if {|k,v| :address == k})}.should raise_error(ArgumentError)
|
33
|
-
end
|
34
|
-
|
35
|
-
it "should require a listening port to be specified" do
|
36
|
-
Proc.new { @server.listen(@listen_params.delete_if {|k,v| :port == k})}.should raise_error(ArgumentError)
|
37
|
-
end
|
38
|
-
|
39
|
-
it "should order a mongrel server to start" do
|
40
|
-
@mock_mongrel.expects(:run)
|
41
|
-
@server.listen(@listen_params)
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should tell mongrel to listen on the specified address and port" do
|
45
|
-
Mongrel::HttpServer.expects(:new).with("127.0.0.1", 31337).returns(@mock_mongrel)
|
46
|
-
@server.listen(@listen_params)
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should be listening" do
|
50
|
-
Mongrel::HttpServer.expects(:new).returns(@mock_mongrel)
|
51
|
-
@server.listen(@listen_params)
|
52
|
-
@server.should be_listening
|
53
|
-
end
|
54
|
-
|
55
|
-
describe "when providing REST services" do
|
56
|
-
it "should instantiate a handler at / for handling REST calls" do
|
57
|
-
Puppet::Network::HTTP::MongrelREST.expects(:new).returns "myhandler"
|
58
|
-
@mock_mongrel.expects(:register).with("/", "myhandler")
|
59
|
-
|
60
|
-
@server.listen(@listen_params)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
describe "Puppet::Network::HTTP::Mongrel", "when turning off listening", :if => Puppet.features.mongrel? do
|
66
|
-
before do
|
67
|
-
@mock_mongrel = mock('mongrel httpserver')
|
68
|
-
@mock_mongrel.stubs(:run)
|
69
|
-
@mock_mongrel.stubs(:register)
|
70
|
-
Mongrel::HttpServer.stubs(:new).returns(@mock_mongrel)
|
71
|
-
@server = Puppet::Network::HTTP::Mongrel.new
|
72
|
-
@listen_params = { :address => "127.0.0.1", :port => 31337, :handlers => [ :node, :catalog ]}
|
73
|
-
end
|
74
|
-
|
75
|
-
it "should fail unless listening" do
|
76
|
-
Proc.new { @server.unlisten }.should raise_error(RuntimeError)
|
77
|
-
end
|
78
|
-
|
79
|
-
it "should order mongrel server to stop" do
|
80
|
-
@server.listen(@listen_params)
|
81
|
-
@mock_mongrel.expects(:stop)
|
82
|
-
@server.unlisten
|
83
|
-
end
|
84
|
-
|
85
|
-
it "should not be listening" do
|
86
|
-
@server.listen(@listen_params)
|
87
|
-
@mock_mongrel.stubs(:stop)
|
88
|
-
@server.unlisten
|
89
|
-
@server.should_not be_listening
|
90
|
-
end
|
91
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby -S rspec
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
require 'puppet/network/http'
|
5
|
-
|
6
|
-
describe Puppet::Network::HTTP do
|
7
|
-
it "should return the webrick HTTP server class when asked for a webrick server" do
|
8
|
-
Puppet::Network::HTTP.server_class_by_type(:webrick).should be(Puppet::Network::HTTP::WEBrick)
|
9
|
-
end
|
10
|
-
|
11
|
-
describe "when asked for a mongrel server" do
|
12
|
-
if Puppet.features.mongrel?
|
13
|
-
it "should return the mongrel server class" do
|
14
|
-
Puppet::Network::HTTP.server_class_by_type(:mongrel).should be(Puppet::Network::HTTP::Mongrel)
|
15
|
-
end
|
16
|
-
else
|
17
|
-
it "should fail" do
|
18
|
-
lambda { Puppet::Network::HTTP.server_class_by_type(:mongrel) }.should raise_error(ArgumentError)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should fail to return the mongrel HTTP server class if mongrel is not available " do
|
24
|
-
Puppet.features.expects(:mongrel?).returns(false)
|
25
|
-
Proc.new { Puppet::Network::HTTP.server_class_by_type(:mongrel) }.should raise_error(ArgumentError)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should return an error when asked for an unknown server" do
|
29
|
-
Proc.new { Puppet::Network::HTTP.server_class_by_type :foo }.should raise_error(ArgumentError)
|
30
|
-
end
|
31
|
-
end
|