puppet 2.7.13 → 2.7.14
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/CHANGELOG +144 -1
- data/conf/osx/preflight +1 -1
- data/conf/redhat/puppet.spec +9 -5
- data/conf/suse/puppet.spec +4 -1
- data/conf/windows/eventlog/Rakefile +32 -0
- data/conf/windows/eventlog/puppetres.dll +0 -0
- data/conf/windows/eventlog/puppetres.mc +18 -0
- data/ext/rack/files/apache2.conf +3 -0
- data/install.rb +23 -1
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +1 -14
- data/lib/puppet/application/kick.rb +1 -1
- data/lib/puppet/application/module.rb +11 -0
- data/lib/puppet/daemon.rb +74 -3
- data/lib/puppet/defaults.rb +1 -1
- data/lib/puppet/face/certificate.rb +1 -1
- data/lib/puppet/face/help/man.erb +1 -1
- data/lib/puppet/face/module.rb +17 -0
- data/lib/puppet/face/module/build.rb +10 -4
- data/lib/puppet/face/module/changes.rb +5 -5
- data/lib/puppet/face/module/generate.rb +6 -4
- data/lib/puppet/face/module/install.rb +122 -32
- data/lib/puppet/face/module/list.rb +234 -33
- data/lib/puppet/face/module/search.rb +56 -23
- data/lib/puppet/face/module/uninstall.rb +33 -38
- data/lib/puppet/face/module/upgrade.rb +84 -0
- data/lib/puppet/feature/eventlog.rb +6 -0
- data/lib/puppet/forge.rb +67 -122
- data/lib/puppet/forge/cache.rb +1 -1
- data/lib/puppet/forge/repository.rb +6 -25
- data/lib/puppet/indirector/facts/network_device.rb +1 -1
- data/lib/puppet/interface/action.rb +1 -1
- data/lib/puppet/module.rb +79 -28
- data/lib/puppet/module_tool.rb +72 -34
- data/lib/puppet/module_tool/applications.rb +12 -14
- data/lib/puppet/module_tool/applications/application.rb +21 -19
- data/lib/puppet/module_tool/applications/builder.rb +4 -4
- data/lib/puppet/module_tool/applications/checksummer.rb +12 -3
- data/lib/puppet/module_tool/applications/generator.rb +1 -1
- data/lib/puppet/module_tool/applications/installer.rb +163 -34
- data/lib/puppet/module_tool/applications/searcher.rb +2 -3
- data/lib/puppet/module_tool/applications/uninstaller.rb +84 -36
- data/lib/puppet/module_tool/applications/unpacker.rb +4 -26
- data/lib/puppet/module_tool/applications/upgrader.rb +109 -0
- data/lib/puppet/module_tool/checksums.rb +2 -2
- data/lib/puppet/module_tool/contents_description.rb +1 -1
- data/lib/puppet/module_tool/dependency.rb +2 -2
- data/lib/puppet/module_tool/errors.rb +9 -0
- data/lib/puppet/module_tool/errors/base.rb +15 -0
- data/lib/puppet/module_tool/errors/installer.rb +90 -0
- data/lib/puppet/module_tool/errors/shared.rb +115 -0
- data/lib/puppet/module_tool/errors/uninstaller.rb +45 -0
- data/lib/puppet/module_tool/errors/upgrader.rb +72 -0
- data/lib/puppet/module_tool/metadata.rb +2 -2
- data/lib/puppet/module_tool/modulefile.rb +7 -7
- data/lib/puppet/module_tool/shared_behaviors.rb +161 -0
- data/lib/puppet/module_tool/skeleton.rb +1 -1
- data/lib/puppet/node/environment.rb +4 -2
- data/lib/puppet/parser/ast/leaf.rb +1 -1
- data/lib/puppet/parser/functions/create_resources.rb +3 -2
- data/lib/puppet/parser/scope.rb +44 -9
- data/lib/puppet/provider/augeas/augeas.rb +2 -2
- data/lib/puppet/provider/exec.rb +8 -3
- data/lib/puppet/provider/exec/shell.rb +1 -2
- data/lib/puppet/provider/nameservice/directoryservice.rb +10 -4
- data/lib/puppet/provider/package/gem.rb +1 -1
- data/lib/puppet/provider/package/pkg.rb +10 -21
- data/lib/puppet/provider/selmodule/semodule.rb +1 -2
- data/lib/puppet/provider/service/upstart.rb +33 -17
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
- data/lib/puppet/rails/inventory_node.rb +7 -7
- data/lib/puppet/reports/http.rb +4 -1
- data/lib/puppet/reports/tagmail.rb +8 -1
- data/lib/puppet/resource/type.rb +1 -1
- data/lib/puppet/test/test_helper.rb +138 -0
- data/lib/puppet/type.rb +9 -1
- data/lib/puppet/type/file.rb +18 -10
- data/lib/puppet/type/package.rb +13 -9
- data/lib/puppet/type/resources.rb +1 -1
- data/lib/puppet/type/ssh_authorized_key.rb +3 -4
- data/lib/puppet/type/sshkey.rb +4 -4
- data/lib/puppet/type/user.rb +1 -0
- data/lib/puppet/type/vlan.rb +1 -1
- data/lib/puppet/util.rb +31 -14
- data/lib/puppet/util/autoload.rb +1 -1
- data/lib/puppet/util/command_line.rb +2 -6
- data/lib/puppet/util/instrumentation/indirection_probe.rb +1 -1
- data/lib/puppet/util/instrumentation/instrumentable.rb +1 -1
- data/lib/puppet/util/instrumentation/listeners/log.rb +1 -1
- data/lib/puppet/util/instrumentation/listeners/performance.rb +1 -1
- data/lib/puppet/util/log.rb +3 -1
- data/lib/puppet/util/log/destinations.rb +38 -0
- data/lib/puppet/util/monkey_patches.rb +45 -0
- data/lib/puppet/util/network_device/base.rb +1 -1
- data/lib/puppet/util/network_device/cisco.rb +1 -1
- data/lib/puppet/util/network_device/cisco/facts.rb +1 -1
- data/lib/puppet/util/network_device/cisco/interface.rb +1 -1
- data/lib/puppet/util/network_device/config.rb +1 -1
- data/lib/puppet/util/network_device/ipcalc.rb +1 -1
- data/lib/puppet/util/network_device/transport.rb +1 -1
- data/lib/puppet/util/network_device/transport/base.rb +1 -1
- data/lib/puppet/util/network_device/transport/ssh.rb +1 -1
- data/lib/puppet/util/settings.rb +2 -11
- data/lib/puppet/util/settings/file_setting.rb +3 -5
- data/lib/puppet/util/terminal.rb +16 -0
- data/lib/puppet/util/zaml.rb +3 -1
- data/lib/semver.rb +15 -7
- data/spec/fixtures/releases/jamtur01-apache/metadata.json +1 -1
- data/spec/fixtures/unit/parser/lexer/arithmetic_expression.pp +1 -1
- data/spec/fixtures/unit/provider/package/pkg/dummy +1 -0
- data/spec/fixtures/unit/provider/package/pkg/incomplete +1 -0
- data/spec/fixtures/unit/provider/package/pkg/publisher +2 -0
- data/spec/fixtures/unit/provider/package/pkg/simple +4 -0
- data/spec/fixtures/unit/reports/tagmail/tagmail_email.conf +2 -0
- data/spec/fixtures/yaml/report0.25.x.yaml +1 -1
- data/spec/fixtures/yaml/report2.6.x.yaml +1 -1
- data/spec/integration/faces/documentation_spec.rb +1 -1
- data/spec/integration/network/rest_authconfig_spec.rb +1 -1
- data/spec/lib/puppet_spec/compiler.rb +6 -0
- data/spec/lib/puppet_spec/database.rb +30 -0
- data/spec/lib/puppet_spec/files.rb +4 -2
- data/spec/shared_behaviours/path_parameters.rb +2 -29
- data/spec/shared_contexts/platform.rb +43 -0
- data/spec/spec_helper.rb +36 -65
- data/spec/unit/agent_spec.rb +0 -32
- data/spec/unit/application/kick_spec.rb +2 -2
- data/spec/unit/daemon_spec.rb +1 -17
- data/spec/unit/face/module/install_spec.rb +158 -0
- data/spec/unit/face/module/list_spec.rb +182 -0
- data/spec/unit/face/module/search_spec.rb +163 -0
- data/spec/unit/face/module/uninstall_spec.rb +77 -0
- data/spec/unit/face/module/upgrade_spec.rb +26 -0
- data/spec/unit/forge/repository_spec.rb +0 -30
- data/spec/unit/forge_spec.rb +28 -86
- data/spec/unit/indirector/catalog/active_record_spec.rb +45 -65
- data/spec/unit/indirector/facts/inventory_active_record_spec.rb +5 -18
- data/spec/unit/indirector/resource/active_record_spec.rb +2 -11
- data/spec/unit/indirector/resource/ral_spec.rb +7 -2
- data/spec/unit/module_spec.rb +240 -107
- data/spec/unit/module_tool/application_spec.rb +3 -5
- data/spec/unit/module_tool/applications/application_spec.rb +19 -0
- data/spec/unit/module_tool/applications/installer_spec.rb +205 -0
- data/spec/unit/module_tool/applications/uninstaller_spec.rb +206 -0
- data/spec/unit/module_tool/applications/upgrader_spec.rb +37 -0
- data/spec/unit/module_tool/metadata_spec.rb +2 -2
- data/spec/unit/module_tool_spec.rb +109 -1
- data/spec/unit/node/environment_spec.rb +16 -1
- data/spec/unit/parser/ast/leaf_spec.rb +16 -1
- data/spec/unit/parser/collector_spec.rb +2 -12
- data/spec/unit/parser/functions/create_resources_spec.rb +135 -86
- data/spec/unit/parser/functions/generate_spec.rb +2 -10
- data/spec/unit/parser/scope_spec.rb +345 -16
- data/spec/unit/provider/augeas/augeas_spec.rb +19 -0
- data/spec/unit/provider/exec/shell_spec.rb +17 -14
- data/spec/unit/provider/exec/windows_spec.rb +1 -7
- data/spec/unit/provider/exec_spec.rb +35 -0
- data/spec/unit/provider/nameservice/directoryservice_spec.rb +10 -0
- data/spec/unit/provider/package/dpkg_spec.rb +2 -1
- data/spec/unit/provider/package/gem_spec.rb +15 -0
- data/spec/unit/provider/package/openbsd_spec.rb +5 -4
- data/spec/unit/provider/package/pacman_spec.rb +3 -2
- data/spec/unit/provider/package/pkg_spec.rb +56 -33
- data/spec/unit/provider/selmodule_spec.rb +11 -4
- data/spec/unit/provider/service/redhat_spec.rb +1 -3
- data/spec/unit/provider/service/smf_spec.rb +1 -3
- data/spec/unit/provider/service/upstart_spec.rb +38 -0
- data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +28 -0
- data/spec/unit/rails/host_spec.rb +6 -12
- data/spec/unit/rails/param_value_spec.rb +3 -8
- data/spec/unit/rails/resource_spec.rb +2 -8
- data/spec/unit/reports/http_spec.rb +47 -31
- data/spec/unit/reports/tagmail_spec.rb +77 -0
- data/spec/unit/resource/type_spec.rb +2 -2
- data/spec/unit/resource_spec.rb +18 -20
- data/spec/unit/semver_spec.rb +31 -13
- data/spec/unit/type/exec_spec.rb +8 -15
- data/spec/unit/type/group_spec.rb +0 -9
- data/spec/unit/type/package_spec.rb +10 -0
- data/spec/unit/type/resources_spec.rb +4 -5
- data/spec/unit/type/ssh_authorized_key_spec.rb +4 -15
- data/spec/unit/type/sshkey_spec.rb +9 -11
- data/spec/unit/type/user_spec.rb +123 -127
- data/spec/unit/type_spec.rb +20 -0
- data/spec/unit/util/command_line_spec.rb +2 -2
- data/spec/unit/util/instrumentation/data_spec.rb +1 -1
- data/spec/unit/util/instrumentation/indirection_probe_spec.rb +1 -1
- data/spec/unit/util/instrumentation/instrumentable_spec.rb +1 -1
- data/spec/unit/util/instrumentation/listener_spec.rb +1 -1
- data/spec/unit/util/instrumentation/listeners/log_spec.rb +1 -1
- data/spec/unit/util/instrumentation/listeners/performance_spec.rb +1 -1
- data/spec/unit/util/instrumentation_spec.rb +1 -1
- data/spec/unit/util/log/destinations_spec.rb +4 -8
- data/spec/unit/util/log_spec.rb +47 -0
- data/spec/unit/util/reference_spec.rb +1 -1
- data/spec/unit/util/settings/file_setting_spec.rb +9 -0
- data/spec/unit/util/settings_spec.rb +0 -53
- data/spec/unit/util/terminal_spec.rb +42 -0
- data/spec/unit/util/zaml_spec.rb +7 -0
- data/spec/unit/util_spec.rb +63 -20
- data/tasks/rake/manpages.rake +1 -1
- data/test/data/snippets/arithmetic_expression.pp +1 -1
- data/test/other/puppet.rb +0 -1
- data/test/util/log.rb +6 -6
- metadata +41 -16
- data/lib/puppet/external/event-loop.rb +0 -1
- data/lib/puppet/external/event-loop/better-definers.rb +0 -367
- data/lib/puppet/external/event-loop/event-loop.rb +0 -355
- data/lib/puppet/external/event-loop/signal-system.rb +0 -218
- data/lib/puppet/face/module/clean.rb +0 -30
- data/lib/puppet/module_tool/applications/cleaner.rb +0 -16
- data/lib/puppet/module_tool/skeleton/templates/generator/metadata.json +0 -12
- data/lib/puppet/module_tool/utils.rb +0 -5
- data/lib/puppet/module_tool/utils/interrogation.rb +0 -25
- data/spec/integration/module_tool_spec.rb +0 -475
- data/spec/unit/module_tool/uninstaller_spec.rb +0 -124
data/tasks/rake/manpages.rake
CHANGED
data/test/other/puppet.rb
CHANGED
data/test/util/log.rb
CHANGED
@@ -178,17 +178,17 @@ class TestLog < Test::Unit::TestCase
|
|
178
178
|
Puppet::Util::Log.close(:console)
|
179
179
|
Puppet::Util::Log.newdestination(file)
|
180
180
|
Puppet.warning "A test"
|
181
|
-
assert(File.read(file)
|
182
|
-
Puppet::Util::Log.flush
|
183
|
-
assert(File.read(file) =~ /A test/, "File did not flush")
|
181
|
+
assert(File.read(file) =~ /A test/)
|
184
182
|
Puppet::Util::Log.close(file)
|
185
183
|
|
186
|
-
# Now try one with autoflush
|
187
|
-
Puppet[:autoflush] =
|
184
|
+
# Now try one with autoflush disabled
|
185
|
+
Puppet[:autoflush] = false
|
188
186
|
file = tempfile
|
189
187
|
Puppet::Util::Log.newdestination(file)
|
190
188
|
Puppet.warning "A test"
|
191
|
-
assert(File.read(file)
|
189
|
+
assert(File.read(file) !~ /A test/)
|
190
|
+
Puppet::Util::Log.flush
|
191
|
+
assert(File.read(file) =~ /A test/)
|
192
192
|
Puppet::Util::Log.close(file)
|
193
193
|
end
|
194
194
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 2.7.
|
9
|
+
- 14
|
10
|
+
version: 2.7.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Puppet Labs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-05-02 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: facter
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- lib/puppet/application/kick.rb
|
92
92
|
- lib/puppet/application/man.rb
|
93
93
|
- lib/puppet/application/master.rb
|
94
|
+
- lib/puppet/application/module.rb
|
94
95
|
- lib/puppet/application/node.rb
|
95
96
|
- lib/puppet/application/parser.rb
|
96
97
|
- lib/puppet/application/plugin.rb
|
@@ -113,10 +114,6 @@ files:
|
|
113
114
|
- lib/puppet/error.rb
|
114
115
|
- lib/puppet/external/base64.rb
|
115
116
|
- lib/puppet/external/dot.rb
|
116
|
-
- lib/puppet/external/event-loop/better-definers.rb
|
117
|
-
- lib/puppet/external/event-loop/event-loop.rb
|
118
|
-
- lib/puppet/external/event-loop/signal-system.rb
|
119
|
-
- lib/puppet/external/event-loop.rb
|
120
117
|
- lib/puppet/external/lock.rb
|
121
118
|
- lib/puppet/external/nagios/base.rb
|
122
119
|
- lib/puppet/external/nagios/grammar.ry
|
@@ -151,12 +148,13 @@ files:
|
|
151
148
|
- lib/puppet/face/man.rb
|
152
149
|
- lib/puppet/face/module/build.rb
|
153
150
|
- lib/puppet/face/module/changes.rb
|
154
|
-
- lib/puppet/face/module/clean.rb
|
155
151
|
- lib/puppet/face/module/generate.rb
|
156
152
|
- lib/puppet/face/module/install.rb
|
157
153
|
- lib/puppet/face/module/list.rb
|
158
154
|
- lib/puppet/face/module/search.rb
|
159
155
|
- lib/puppet/face/module/uninstall.rb
|
156
|
+
- lib/puppet/face/module/upgrade.rb
|
157
|
+
- lib/puppet/face/module.rb
|
160
158
|
- lib/puppet/face/node/clean.rb
|
161
159
|
- lib/puppet/face/node.rb
|
162
160
|
- lib/puppet/face/parser.rb
|
@@ -168,6 +166,7 @@ files:
|
|
168
166
|
- lib/puppet/face/status.rb
|
169
167
|
- lib/puppet/face.rb
|
170
168
|
- lib/puppet/feature/base.rb
|
169
|
+
- lib/puppet/feature/eventlog.rb
|
171
170
|
- lib/puppet/feature/pson.rb
|
172
171
|
- lib/puppet/feature/rack.rb
|
173
172
|
- lib/puppet/feature/rails.rb
|
@@ -306,27 +305,31 @@ files:
|
|
306
305
|
- lib/puppet/module_tool/applications/application.rb
|
307
306
|
- lib/puppet/module_tool/applications/builder.rb
|
308
307
|
- lib/puppet/module_tool/applications/checksummer.rb
|
309
|
-
- lib/puppet/module_tool/applications/cleaner.rb
|
310
308
|
- lib/puppet/module_tool/applications/generator.rb
|
311
309
|
- lib/puppet/module_tool/applications/installer.rb
|
312
310
|
- lib/puppet/module_tool/applications/searcher.rb
|
313
311
|
- lib/puppet/module_tool/applications/uninstaller.rb
|
314
312
|
- lib/puppet/module_tool/applications/unpacker.rb
|
313
|
+
- lib/puppet/module_tool/applications/upgrader.rb
|
315
314
|
- lib/puppet/module_tool/applications.rb
|
316
315
|
- lib/puppet/module_tool/checksums.rb
|
317
316
|
- lib/puppet/module_tool/contents_description.rb
|
318
317
|
- lib/puppet/module_tool/dependency.rb
|
318
|
+
- lib/puppet/module_tool/errors/base.rb
|
319
|
+
- lib/puppet/module_tool/errors/installer.rb
|
320
|
+
- lib/puppet/module_tool/errors/shared.rb
|
321
|
+
- lib/puppet/module_tool/errors/uninstaller.rb
|
322
|
+
- lib/puppet/module_tool/errors/upgrader.rb
|
323
|
+
- lib/puppet/module_tool/errors.rb
|
319
324
|
- lib/puppet/module_tool/metadata.rb
|
320
325
|
- lib/puppet/module_tool/modulefile.rb
|
326
|
+
- lib/puppet/module_tool/shared_behaviors.rb
|
321
327
|
- lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb
|
322
|
-
- lib/puppet/module_tool/skeleton/templates/generator/metadata.json
|
323
328
|
- lib/puppet/module_tool/skeleton/templates/generator/Modulefile.erb
|
324
329
|
- lib/puppet/module_tool/skeleton/templates/generator/README.erb
|
325
330
|
- lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb
|
326
331
|
- lib/puppet/module_tool/skeleton/templates/generator/tests/init.pp.erb
|
327
332
|
- lib/puppet/module_tool/skeleton.rb
|
328
|
-
- lib/puppet/module_tool/utils/interrogation.rb
|
329
|
-
- lib/puppet/module_tool/utils.rb
|
330
333
|
- lib/puppet/module_tool.rb
|
331
334
|
- lib/puppet/network/authconfig.rb
|
332
335
|
- lib/puppet/network/authorization.rb
|
@@ -618,6 +621,7 @@ files:
|
|
618
621
|
- lib/puppet/ssl/key.rb
|
619
622
|
- lib/puppet/ssl.rb
|
620
623
|
- lib/puppet/status.rb
|
624
|
+
- lib/puppet/test/test_helper.rb
|
621
625
|
- lib/puppet/transaction/event.rb
|
622
626
|
- lib/puppet/transaction/event_manager.rb
|
623
627
|
- lib/puppet/transaction/report.rb
|
@@ -775,6 +779,7 @@ files:
|
|
775
779
|
- lib/puppet/util/suidmanager.rb
|
776
780
|
- lib/puppet/util/symbolic_file_mode.rb
|
777
781
|
- lib/puppet/util/tagging.rb
|
782
|
+
- lib/puppet/util/terminal.rb
|
778
783
|
- lib/puppet/util/user_attr.rb
|
779
784
|
- lib/puppet/util/warnings.rb
|
780
785
|
- lib/puppet/util/windows/error.rb
|
@@ -821,6 +826,9 @@ files:
|
|
821
826
|
- conf/suse/puppet.conf
|
822
827
|
- conf/suse/puppet.spec
|
823
828
|
- conf/suse/server.init
|
829
|
+
- conf/windows/eventlog/puppetres.dll
|
830
|
+
- conf/windows/eventlog/puppetres.mc
|
831
|
+
- conf/windows/eventlog/Rakefile
|
824
832
|
- man/man5/puppet.conf.5
|
825
833
|
- man/man8/filebucket.8
|
826
834
|
- man/man8/pi.8
|
@@ -1216,10 +1224,15 @@ files:
|
|
1216
1224
|
- spec/fixtures/unit/provider/package/openbsd/pkginfo.detail
|
1217
1225
|
- spec/fixtures/unit/provider/package/openbsd/pkginfo.list
|
1218
1226
|
- spec/fixtures/unit/provider/package/openbsd/pkginfo.query
|
1227
|
+
- spec/fixtures/unit/provider/package/pkg/dummy
|
1228
|
+
- spec/fixtures/unit/provider/package/pkg/incomplete
|
1229
|
+
- spec/fixtures/unit/provider/package/pkg/publisher
|
1230
|
+
- spec/fixtures/unit/provider/package/pkg/simple
|
1219
1231
|
- spec/fixtures/unit/provider/package/zypper/zypper-list-updates-SLES11sp1.out
|
1220
1232
|
- spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys
|
1221
1233
|
- spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys1
|
1222
1234
|
- spec/fixtures/unit/provider/ssh_authorized_key/parsed/authorized_keys2
|
1235
|
+
- spec/fixtures/unit/reports/tagmail/tagmail_email.conf
|
1223
1236
|
- spec/fixtures/unit/reports/tagmail/tagmail_failers.conf
|
1224
1237
|
- spec/fixtures/unit/reports/tagmail/tagmail_passers.conf
|
1225
1238
|
- spec/fixtures/unit/util/rdoc/basic.pp
|
@@ -1241,7 +1254,6 @@ files:
|
|
1241
1254
|
- spec/integration/indirector/file_content/file_server_spec.rb
|
1242
1255
|
- spec/integration/indirector/file_metadata/file_server_spec.rb
|
1243
1256
|
- spec/integration/indirector/node/ldap_spec.rb
|
1244
|
-
- spec/integration/module_tool_spec.rb
|
1245
1257
|
- spec/integration/network/formats_spec.rb
|
1246
1258
|
- spec/integration/network/handler_spec.rb
|
1247
1259
|
- spec/integration/network/rest_authconfig_spec.rb
|
@@ -1290,6 +1302,8 @@ files:
|
|
1290
1302
|
- spec/lib/puppet/face/huzzah/obsolete.rb
|
1291
1303
|
- spec/lib/puppet/face/huzzah.rb
|
1292
1304
|
- spec/lib/puppet/face/version_matching.rb
|
1305
|
+
- spec/lib/puppet_spec/compiler.rb
|
1306
|
+
- spec/lib/puppet_spec/database.rb
|
1293
1307
|
- spec/lib/puppet_spec/files.rb
|
1294
1308
|
- spec/lib/puppet_spec/fixtures.rb
|
1295
1309
|
- spec/lib/puppet_spec/matchers.rb
|
@@ -1306,6 +1320,7 @@ files:
|
|
1306
1320
|
- spec/shared_behaviours/path_parameters.rb
|
1307
1321
|
- spec/shared_behaviours/store_configs_terminus.rb
|
1308
1322
|
- spec/shared_behaviours/things_that_declare_options.rb
|
1323
|
+
- spec/shared_contexts/platform.rb
|
1309
1324
|
- spec/spec.opts
|
1310
1325
|
- spec/spec_helper.rb
|
1311
1326
|
- spec/unit/agent/locker_spec.rb
|
@@ -1350,6 +1365,11 @@ files:
|
|
1350
1365
|
- spec/unit/face/instrumentation_listener.rb
|
1351
1366
|
- spec/unit/face/instrumentation_probe.rb
|
1352
1367
|
- spec/unit/face/key_spec.rb
|
1368
|
+
- spec/unit/face/module/install_spec.rb
|
1369
|
+
- spec/unit/face/module/list_spec.rb
|
1370
|
+
- spec/unit/face/module/search_spec.rb
|
1371
|
+
- spec/unit/face/module/uninstall_spec.rb
|
1372
|
+
- spec/unit/face/module/upgrade_spec.rb
|
1353
1373
|
- spec/unit/face/module_spec.rb
|
1354
1374
|
- spec/unit/face/node_spec.rb
|
1355
1375
|
- spec/unit/face/plugin_spec.rb
|
@@ -1468,8 +1488,11 @@ files:
|
|
1468
1488
|
- spec/unit/interface_spec.rb
|
1469
1489
|
- spec/unit/module_spec.rb
|
1470
1490
|
- spec/unit/module_tool/application_spec.rb
|
1491
|
+
- spec/unit/module_tool/applications/application_spec.rb
|
1492
|
+
- spec/unit/module_tool/applications/installer_spec.rb
|
1493
|
+
- spec/unit/module_tool/applications/uninstaller_spec.rb
|
1494
|
+
- spec/unit/module_tool/applications/upgrader_spec.rb
|
1471
1495
|
- spec/unit/module_tool/metadata_spec.rb
|
1472
|
-
- spec/unit/module_tool/uninstaller_spec.rb
|
1473
1496
|
- spec/unit/module_tool_spec.rb
|
1474
1497
|
- spec/unit/network/authconfig_spec.rb
|
1475
1498
|
- spec/unit/network/authstore_spec.rb
|
@@ -1577,6 +1600,7 @@ files:
|
|
1577
1600
|
- spec/unit/provider/exec/posix_spec.rb
|
1578
1601
|
- spec/unit/provider/exec/shell_spec.rb
|
1579
1602
|
- spec/unit/provider/exec/windows_spec.rb
|
1603
|
+
- spec/unit/provider/exec_spec.rb
|
1580
1604
|
- spec/unit/provider/file/posix_spec.rb
|
1581
1605
|
- spec/unit/provider/file/windows_spec.rb
|
1582
1606
|
- spec/unit/provider/group/groupadd_spec.rb
|
@@ -1789,6 +1813,7 @@ files:
|
|
1789
1813
|
- spec/unit/util/suidmanager_spec.rb
|
1790
1814
|
- spec/unit/util/symbolic_file_mode_spec.rb
|
1791
1815
|
- spec/unit/util/tagging_spec.rb
|
1816
|
+
- spec/unit/util/terminal_spec.rb
|
1792
1817
|
- spec/unit/util/user_attr_spec.rb
|
1793
1818
|
- spec/unit/util/warnings_spec.rb
|
1794
1819
|
- spec/unit/util/zaml_spec.rb
|
@@ -1832,7 +1857,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1832
1857
|
requirements: []
|
1833
1858
|
|
1834
1859
|
rubyforge_project: puppet
|
1835
|
-
rubygems_version: 1.8.
|
1860
|
+
rubygems_version: 1.8.15
|
1836
1861
|
signing_key:
|
1837
1862
|
specification_version: 3
|
1838
1863
|
summary: Puppet, an automated configuration management tool
|
@@ -1 +0,0 @@
|
|
1
|
-
require "puppet/external/event-loop/event-loop"
|
@@ -1,367 +0,0 @@
|
|
1
|
-
## better-definers.rb --- better attribute and method definers
|
2
|
-
# Copyright (C) 2005 Daniel Brockman
|
3
|
-
|
4
|
-
# This program is free software; you can redistribute it
|
5
|
-
# and/or modify it under the terms of the GNU General Public
|
6
|
-
# License as published by the Free Software Foundation;
|
7
|
-
# either version 2 of the License, or (at your option) any
|
8
|
-
# later version.
|
9
|
-
|
10
|
-
# This file is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty
|
12
|
-
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
13
|
-
# See the GNU General Public License for more details.
|
14
|
-
|
15
|
-
# You should have received a copy of the GNU General Public
|
16
|
-
# License along with this program; if not, write to the Free
|
17
|
-
# Software Foundation, 51 Franklin Street, Fifth Floor,
|
18
|
-
# Boston, MA 02110-1301, USA.
|
19
|
-
|
20
|
-
class Symbol
|
21
|
-
def predicate?
|
22
|
-
to_s.include? "?" end
|
23
|
-
def imperative?
|
24
|
-
to_s.include? "!" end
|
25
|
-
def writer?
|
26
|
-
to_s.include? "=" end
|
27
|
-
|
28
|
-
def punctuated?
|
29
|
-
predicate? or imperative? or writer? end
|
30
|
-
def without_punctuation
|
31
|
-
to_s.delete("?!=").to_sym end
|
32
|
-
|
33
|
-
def predicate
|
34
|
-
without_punctuation.to_s + "?" end
|
35
|
-
def imperative
|
36
|
-
without_punctuation.to_s + "!" end
|
37
|
-
def writer
|
38
|
-
without_punctuation.to_s + "=" end
|
39
|
-
end
|
40
|
-
|
41
|
-
class Hash
|
42
|
-
def collect! (&block)
|
43
|
-
replace Hash[*collect(&block).flatten]
|
44
|
-
end
|
45
|
-
|
46
|
-
def flatten
|
47
|
-
to_a.flatten
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
module Kernel
|
52
|
-
def returning (value)
|
53
|
-
yield value ; value
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
class Module
|
58
|
-
def define_hard_aliases (name_pairs)
|
59
|
-
for new_aliases, existing_name in name_pairs do
|
60
|
-
new_aliases.kind_of? Array or new_aliases = [new_aliases]
|
61
|
-
for new_alias in new_aliases do
|
62
|
-
alias_method(new_alias, existing_name)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def define_soft_aliases (name_pairs)
|
68
|
-
for new_aliases, existing_name in name_pairs do
|
69
|
-
new_aliases.kind_of? Array or new_aliases = [new_aliases]
|
70
|
-
for new_alias in new_aliases do
|
71
|
-
class_eval %{def #{new_alias}(*args, &block)
|
72
|
-
#{existing_name}(*args, &block) end}
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
define_soft_aliases \
|
78
|
-
:define_hard_alias => :define_hard_aliases,
|
79
|
-
:define_soft_alias => :define_soft_aliases
|
80
|
-
|
81
|
-
# This method lets you define predicates like :foo?,
|
82
|
-
# which will be defined to return the value of @foo.
|
83
|
-
def define_readers (*names)
|
84
|
-
for name in names.map { |x| x.to_sym } do
|
85
|
-
if name.punctuated?
|
86
|
-
# There's no way to define an efficient reader whose
|
87
|
-
# name is different from the instance variable.
|
88
|
-
class_eval %{def #{name} ; @#{name.without_punctuation} end}
|
89
|
-
else
|
90
|
-
# Use `attr_reader' to define an efficient method.
|
91
|
-
attr_reader(name)
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
def writer_defined? (name)
|
97
|
-
method_defined?(name.to_sym.writer)
|
98
|
-
end
|
99
|
-
|
100
|
-
# If you pass a predicate symbol :foo? to this method, it'll first
|
101
|
-
# define a regular writer method :foo, without a question mark.
|
102
|
-
# Then it'll define an imperative writer method :foo! as a shorthand
|
103
|
-
# for setting the property to true.
|
104
|
-
def define_writers (*names, &body)
|
105
|
-
for name in names.map { |x| x.to_sym } do
|
106
|
-
if block_given?
|
107
|
-
define_method(name.writer, &body)
|
108
|
-
else
|
109
|
-
attr_writer(name.without_punctuation)
|
110
|
-
end
|
111
|
-
if name.predicate?
|
112
|
-
class_eval %{def #{name.imperative}
|
113
|
-
self.#{name.writer} true end}
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
define_soft_aliases \
|
119
|
-
:define_reader => :define_readers,
|
120
|
-
:define_writer => :define_writers
|
121
|
-
|
122
|
-
# We don't need a singular alias for `define_accessors',
|
123
|
-
# because it always defines at least two methods.
|
124
|
-
|
125
|
-
def define_accessors (*names)
|
126
|
-
define_readers(*names)
|
127
|
-
define_writers(*names)
|
128
|
-
end
|
129
|
-
|
130
|
-
def define_opposite_readers (name_pairs)
|
131
|
-
name_pairs.collect! { |k, v| [k.to_sym, v.to_sym] }
|
132
|
-
for opposite_name, name in name_pairs do
|
133
|
-
define_reader(name) unless method_defined?(name)
|
134
|
-
class_eval %{def #{opposite_name} ; not #{name} end}
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
def define_opposite_writers (name_pairs)
|
139
|
-
name_pairs.collect! { |k, v| [k.to_sym, v.to_sym] }
|
140
|
-
for opposite_name, name in name_pairs do
|
141
|
-
define_writer(name) unless writer_defined?(name)
|
142
|
-
class_eval %{def #{opposite_name.writer} x
|
143
|
-
self.#{name.writer} !x end}
|
144
|
-
class_eval %{def #{opposite_name.imperative}
|
145
|
-
self.#{name.writer} false end}
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
define_soft_aliases \
|
150
|
-
:define_opposite_reader => :define_opposite_readers,
|
151
|
-
:define_opposite_writer => :define_opposite_writers
|
152
|
-
|
153
|
-
def define_opposite_accessors (name_pairs)
|
154
|
-
define_opposite_readers name_pairs
|
155
|
-
define_opposite_writers name_pairs
|
156
|
-
end
|
157
|
-
|
158
|
-
def define_reader_with_opposite (name_pair, &body)
|
159
|
-
name, opposite_name = name_pair.flatten.collect { |x| x.to_sym }
|
160
|
-
define_method(name, &body)
|
161
|
-
define_opposite_reader(opposite_name => name)
|
162
|
-
end
|
163
|
-
|
164
|
-
def define_writer_with_opposite (name_pair, &body)
|
165
|
-
name, opposite_name = name_pair.flatten.collect { |x| x.to_sym }
|
166
|
-
define_writer(name, &body)
|
167
|
-
define_opposite_writer(opposite_name => name)
|
168
|
-
end
|
169
|
-
|
170
|
-
public :define_method
|
171
|
-
|
172
|
-
def define_methods (*names, &body)
|
173
|
-
names.each { |name| define_method(name, &body) }
|
174
|
-
end
|
175
|
-
|
176
|
-
def define_private_methods (*names, &body)
|
177
|
-
define_methods(*names, &body)
|
178
|
-
names.each { |name| private name }
|
179
|
-
end
|
180
|
-
|
181
|
-
def define_protected_methods (*names, &body)
|
182
|
-
define_methods(*names, &body)
|
183
|
-
names.each { |name| protected name }
|
184
|
-
end
|
185
|
-
|
186
|
-
def define_private_method (name, &body)
|
187
|
-
define_method(name, &body)
|
188
|
-
private name
|
189
|
-
end
|
190
|
-
|
191
|
-
def define_protected_method (name, &body)
|
192
|
-
define_method(name, &body)
|
193
|
-
protected name
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
class ImmutableAttributeError < StandardError
|
198
|
-
def initialize (attribute=nil, message=nil)
|
199
|
-
super message
|
200
|
-
@attribute = attribute
|
201
|
-
end
|
202
|
-
|
203
|
-
define_accessors :attribute
|
204
|
-
|
205
|
-
def to_s
|
206
|
-
if @attribute and @message
|
207
|
-
"cannot change the value of `#@attribute': #@message"
|
208
|
-
elsif @attribute
|
209
|
-
"cannot change the value of `#@attribute'"
|
210
|
-
elsif @message
|
211
|
-
"cannot change the value of attribute: #@message"
|
212
|
-
else
|
213
|
-
"cannot change the value of attribute"
|
214
|
-
end
|
215
|
-
end
|
216
|
-
end
|
217
|
-
|
218
|
-
class Module
|
219
|
-
# Guard each of the specified attributes by replacing the writer
|
220
|
-
# method with a proxy that asks the supplied block before proceeding
|
221
|
-
# with the change.
|
222
|
-
#
|
223
|
-
# If it's okay to change the attribute, the block should return
|
224
|
-
# either nil or the symbol :mutable. If it isn't okay, the block
|
225
|
-
# should return a string saying why the attribute can't be changed.
|
226
|
-
# If you don't want to provide a reason, you can have the block
|
227
|
-
# return just the symbol :immutable.
|
228
|
-
def guard_writers(*names, &predicate)
|
229
|
-
for name in names.map { |x| x.to_sym } do
|
230
|
-
define_hard_alias("__unguarded_#{name.writer}" => name.writer)
|
231
|
-
define_method(name.writer) do |new_value|
|
232
|
-
case result = predicate.call
|
233
|
-
when :mutable, nil
|
234
|
-
__send__("__unguarded_#{name.writer}", new_value)
|
235
|
-
when :immutable
|
236
|
-
raise ImmutableAttributeError.new(name)
|
237
|
-
else
|
238
|
-
raise ImmutableAttributeError.new(name, result)
|
239
|
-
end
|
240
|
-
end
|
241
|
-
end
|
242
|
-
end
|
243
|
-
|
244
|
-
def define_guarded_writers (*names, &block)
|
245
|
-
define_writers(*names)
|
246
|
-
guard_writers(*names, &block)
|
247
|
-
end
|
248
|
-
|
249
|
-
define_soft_alias :guard_writer => :guard_writers
|
250
|
-
define_soft_alias :define_guarded_writer => :define_guarded_writers
|
251
|
-
end
|
252
|
-
|
253
|
-
if __FILE__ == $0
|
254
|
-
require "test/unit"
|
255
|
-
|
256
|
-
class DefineAccessorsTest < Test::Unit::TestCase
|
257
|
-
def setup
|
258
|
-
@X = Class.new
|
259
|
-
@Y = Class.new @X
|
260
|
-
@x = @X.new
|
261
|
-
@y = @Y.new
|
262
|
-
end
|
263
|
-
|
264
|
-
def test_define_hard_aliases
|
265
|
-
@X.define_method(:foo) { 123 }
|
266
|
-
@X.define_method(:baz) { 321 }
|
267
|
-
@X.define_hard_aliases :bar => :foo, :quux => :baz
|
268
|
-
assert_equal @x.foo, 123
|
269
|
-
assert_equal @x.bar, 123
|
270
|
-
assert_equal @y.foo, 123
|
271
|
-
assert_equal @y.bar, 123
|
272
|
-
assert_equal @x.baz, 321
|
273
|
-
assert_equal @x.quux, 321
|
274
|
-
assert_equal @y.baz, 321
|
275
|
-
assert_equal @y.quux, 321
|
276
|
-
@Y.define_method(:foo) { 456 }
|
277
|
-
assert_equal @y.foo, 456
|
278
|
-
assert_equal @y.bar, 123
|
279
|
-
@Y.define_method(:quux) { 654 }
|
280
|
-
assert_equal @y.baz, 321
|
281
|
-
assert_equal @y.quux, 654
|
282
|
-
end
|
283
|
-
|
284
|
-
def test_define_soft_aliases
|
285
|
-
@X.define_method(:foo) { 123 }
|
286
|
-
@X.define_method(:baz) { 321 }
|
287
|
-
@X.define_soft_aliases :bar => :foo, :quux => :baz
|
288
|
-
assert_equal @x.foo, 123
|
289
|
-
assert_equal @x.bar, 123
|
290
|
-
assert_equal @y.foo, 123
|
291
|
-
assert_equal @y.bar, 123
|
292
|
-
assert_equal @x.baz, 321
|
293
|
-
assert_equal @x.quux, 321
|
294
|
-
assert_equal @y.baz, 321
|
295
|
-
assert_equal @y.quux, 321
|
296
|
-
@Y.define_method(:foo) { 456 }
|
297
|
-
assert_equal @y.foo, @y.bar, 456
|
298
|
-
@Y.define_method(:quux) { 654 }
|
299
|
-
assert_equal @y.baz, 321
|
300
|
-
assert_equal @y.quux, 654
|
301
|
-
end
|
302
|
-
|
303
|
-
def test_define_readers
|
304
|
-
@X.define_readers :foo, :bar
|
305
|
-
assert !@x.respond_to?(:foo=)
|
306
|
-
assert !@x.respond_to?(:bar=)
|
307
|
-
@x.instance_eval { @foo = 123 ; @bar = 456 }
|
308
|
-
assert_equal @x.foo, 123
|
309
|
-
assert_equal @x.bar, 456
|
310
|
-
@X.define_readers :baz?, :quux?
|
311
|
-
assert !@x.respond_to?(:baz=)
|
312
|
-
assert !@x.respond_to?(:quux=)
|
313
|
-
@x.instance_eval { @baz = false ; @quux = true }
|
314
|
-
assert !@x.baz?
|
315
|
-
assert @x.quux?
|
316
|
-
end
|
317
|
-
|
318
|
-
def test_define_writers
|
319
|
-
assert !@X.writer_defined?(:foo)
|
320
|
-
assert !@X.writer_defined?(:bar)
|
321
|
-
@X.define_writers :foo, :bar
|
322
|
-
assert @X.writer_defined?(:foo)
|
323
|
-
assert @X.writer_defined?(:bar)
|
324
|
-
assert @X.writer_defined?(:foo=)
|
325
|
-
assert @X.writer_defined?(:bar=)
|
326
|
-
assert @X.writer_defined?(:foo?)
|
327
|
-
assert @X.writer_defined?(:bar?)
|
328
|
-
assert !@x.respond_to?(:foo)
|
329
|
-
assert !@x.respond_to?(:bar)
|
330
|
-
@x.foo = 123
|
331
|
-
@x.bar = 456
|
332
|
-
assert_equal @x.instance_eval { @foo }, 123
|
333
|
-
assert_equal @x.instance_eval { @bar }, 456
|
334
|
-
@X.define_writers :baz?, :quux?
|
335
|
-
assert !@x.respond_to?(:baz?)
|
336
|
-
assert !@x.respond_to?(:quux?)
|
337
|
-
@x.baz = true
|
338
|
-
@x.quux = false
|
339
|
-
assert_equal @x.instance_eval { @baz }, true
|
340
|
-
assert_equal @x.instance_eval { @quux }, false
|
341
|
-
end
|
342
|
-
|
343
|
-
def test_define_accessors
|
344
|
-
@X.define_accessors :foo, :bar
|
345
|
-
@x.foo = 123 ; @x.bar = 456
|
346
|
-
assert_equal @x.foo, 123
|
347
|
-
assert_equal @x.bar, 456
|
348
|
-
end
|
349
|
-
|
350
|
-
def test_define_opposite_readers
|
351
|
-
@X.define_opposite_readers :foo? => :bar?, :baz? => :quux?
|
352
|
-
assert !@x.respond_to?(:foo=)
|
353
|
-
assert !@x.respond_to?(:bar=)
|
354
|
-
assert !@x.respond_to?(:baz=)
|
355
|
-
assert !@x.respond_to?(:quux=)
|
356
|
-
@x.instance_eval { @bar = true ; @quux = false }
|
357
|
-
assert !@x.foo?
|
358
|
-
assert @x.bar?
|
359
|
-
assert @x.baz?
|
360
|
-
assert !@x.quux?
|
361
|
-
end
|
362
|
-
|
363
|
-
def test_define_opposite_writers
|
364
|
-
@X.define_opposite_writers :foo? => :bar?, :baz => :quux
|
365
|
-
end
|
366
|
-
end
|
367
|
-
end
|