puppet 3.6.2-x86-mingw32 → 3.7.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (751) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +2 -3
  3. data/Gemfile +14 -10
  4. data/README.md +1 -1
  5. data/ext/build_defaults.yaml +16 -1
  6. data/ext/debian/control +3 -2
  7. data/ext/debian/puppet-common.dirs +1 -0
  8. data/ext/debian/puppet-common.postinst +8 -8
  9. data/ext/debian/puppet-common.postrm +2 -1
  10. data/ext/project_data.yaml +16 -12
  11. data/ext/rack/example-passenger-vhost.conf +2 -2
  12. data/ext/redhat/puppet.spec.erb +6 -3
  13. data/ext/windows/service/daemon.rb +47 -41
  14. data/install.rb +1 -1
  15. data/lib/puppet.rb +34 -24
  16. data/lib/puppet/application.rb +34 -1
  17. data/lib/puppet/application/agent.rb +9 -8
  18. data/lib/puppet/application/apply.rb +14 -5
  19. data/lib/puppet/application/doc.rb +4 -11
  20. data/lib/puppet/application/master.rb +19 -17
  21. data/lib/puppet/application/queue.rb +1 -1
  22. data/lib/puppet/application/resource.rb +0 -1
  23. data/lib/puppet/configurer.rb +39 -2
  24. data/lib/puppet/configurer/downloader.rb +5 -10
  25. data/lib/puppet/configurer/downloader_factory.rb +34 -0
  26. data/lib/puppet/configurer/plugin_handler.rb +11 -17
  27. data/lib/puppet/defaults.rb +244 -119
  28. data/lib/puppet/environments.rb +8 -0
  29. data/lib/puppet/external/nagios/base.rb +1 -1
  30. data/lib/puppet/external/pson/pure/generator.rb +1 -8
  31. data/lib/puppet/face/ca.rb +7 -0
  32. data/lib/puppet/face/file/download.rb +5 -2
  33. data/lib/puppet/face/file/store.rb +1 -1
  34. data/lib/puppet/face/instrumentation_data.rb +2 -1
  35. data/lib/puppet/face/instrumentation_listener.rb +2 -1
  36. data/lib/puppet/face/instrumentation_probe.rb +2 -1
  37. data/lib/puppet/face/module/build.rb +2 -2
  38. data/lib/puppet/face/module/generate.rb +20 -12
  39. data/lib/puppet/face/module/install.rb +4 -3
  40. data/lib/puppet/face/module/uninstall.rb +7 -0
  41. data/lib/puppet/face/module/upgrade.rb +11 -3
  42. data/lib/puppet/face/node/clean.rb +1 -1
  43. data/lib/puppet/face/parser.rb +99 -7
  44. data/lib/puppet/feature/base.rb +18 -12
  45. data/lib/puppet/feature/cfacter.rb +14 -0
  46. data/lib/puppet/feature/pe_license.rb +4 -0
  47. data/lib/puppet/file_bucket/dipper.rb +19 -12
  48. data/lib/puppet/file_bucket/file.rb +73 -10
  49. data/lib/puppet/file_serving/configuration/parser.rb +3 -3
  50. data/lib/puppet/file_system.rb +1 -1
  51. data/lib/puppet/file_system/file19.rb +41 -0
  52. data/lib/puppet/file_system/file19windows.rb +0 -1
  53. data/lib/puppet/file_system/uniquefile.rb +190 -0
  54. data/lib/puppet/forge.rb +34 -7
  55. data/lib/puppet/forge/errors.rb +5 -6
  56. data/lib/puppet/forge/repository.rb +14 -2
  57. data/lib/puppet/functions.rb +19 -12
  58. data/lib/puppet/functions/assert_type.rb +27 -10
  59. data/lib/puppet/functions/each.rb +111 -0
  60. data/lib/puppet/functions/epp.rb +54 -0
  61. data/lib/puppet/functions/filter.rb +113 -0
  62. data/lib/puppet/functions/inline_epp.rb +88 -0
  63. data/lib/puppet/functions/map.rb +97 -0
  64. data/lib/puppet/functions/match.rb +102 -0
  65. data/lib/puppet/functions/reduce.rb +94 -0
  66. data/lib/puppet/functions/slice.rb +126 -0
  67. data/lib/puppet/functions/with.rb +23 -0
  68. data/lib/puppet/indirector/catalog/compiler.rb +4 -4
  69. data/lib/puppet/indirector/data_binding/hiera.rb +2 -45
  70. data/lib/puppet/indirector/facts/couch.rb +3 -1
  71. data/lib/puppet/indirector/facts/facter.rb +52 -65
  72. data/lib/puppet/indirector/file_bucket_file/file.rb +6 -3
  73. data/lib/puppet/indirector/hiera.rb +48 -0
  74. data/lib/puppet/indirector/indirection.rb +1 -1
  75. data/lib/puppet/indirector/request.rb +9 -3
  76. data/lib/puppet/indirector/resource/ral.rb +1 -1
  77. data/lib/puppet/indirector/rest.rb +7 -3
  78. data/lib/puppet/loaders.rb +0 -1
  79. data/lib/puppet/module.rb +2 -1
  80. data/lib/puppet/module_tool.rb +2 -0
  81. data/lib/puppet/module_tool/applications/application.rb +4 -5
  82. data/lib/puppet/module_tool/applications/builder.rb +64 -5
  83. data/lib/puppet/module_tool/applications/uninstaller.rb +3 -2
  84. data/lib/puppet/module_tool/applications/unpacker.rb +14 -0
  85. data/lib/puppet/module_tool/applications/upgrader.rb +23 -13
  86. data/lib/puppet/module_tool/dependency.rb +12 -0
  87. data/lib/puppet/module_tool/errors/shared.rb +1 -1
  88. data/lib/puppet/module_tool/errors/upgrader.rb +20 -0
  89. data/lib/puppet/module_tool/installed_modules.rb +6 -1
  90. data/lib/puppet/module_tool/metadata.rb +53 -3
  91. data/lib/puppet/module_tool/modulefile.rb +1 -1
  92. data/lib/puppet/module_tool/skeleton/templates/generator/Gemfile +7 -0
  93. data/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb +1 -1
  94. data/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb +1 -17
  95. data/lib/puppet/module_tool/tar/mini.rb +20 -2
  96. data/lib/puppet/network/http.rb +5 -0
  97. data/lib/puppet/network/http/api/v1.rb +2 -2
  98. data/lib/puppet/network/http/api/v2/environments.rb +15 -1
  99. data/lib/puppet/network/http/connection.rb +54 -68
  100. data/lib/puppet/network/http/factory.rb +44 -0
  101. data/lib/puppet/network/http/handler.rb +12 -6
  102. data/lib/puppet/network/http/nocache_pool.rb +21 -0
  103. data/lib/puppet/network/http/pool.rb +120 -0
  104. data/lib/puppet/network/http/rack/rest.rb +3 -1
  105. data/lib/puppet/network/http/session.rb +17 -0
  106. data/lib/puppet/network/http/site.rb +39 -0
  107. data/lib/puppet/network/http/webrick/rest.rb +3 -1
  108. data/lib/puppet/network/http_pool.rb +3 -4
  109. data/lib/puppet/node.rb +19 -6
  110. data/lib/puppet/node/environment.rb +34 -8
  111. data/lib/puppet/parser/ast/collection.rb +4 -0
  112. data/lib/puppet/parser/ast/collexpr.rb +1 -1
  113. data/lib/puppet/parser/ast/node.rb +5 -0
  114. data/lib/puppet/parser/ast/pops_bridge.rb +49 -6
  115. data/lib/puppet/parser/compiler.rb +66 -38
  116. data/lib/puppet/parser/e4_parser_adapter.rb +2 -2
  117. data/lib/puppet/parser/files.rb +76 -33
  118. data/lib/puppet/parser/functions.rb +1 -7
  119. data/lib/puppet/parser/functions/assert_type.rb +31 -0
  120. data/lib/puppet/parser/functions/contain.rb +15 -5
  121. data/lib/puppet/parser/functions/create_resources.rb +5 -1
  122. data/lib/puppet/parser/functions/digest.rb +5 -0
  123. data/lib/puppet/parser/functions/each.rb +46 -107
  124. data/lib/puppet/parser/functions/epp.rb +13 -9
  125. data/lib/puppet/parser/functions/file.rb +20 -12
  126. data/lib/puppet/parser/functions/filter.rb +32 -88
  127. data/lib/puppet/parser/functions/include.rb +12 -24
  128. data/lib/puppet/parser/functions/inline_epp.rb +9 -12
  129. data/lib/puppet/parser/functions/lookup.rb +1 -1
  130. data/lib/puppet/parser/functions/map.rb +30 -83
  131. data/lib/puppet/parser/functions/match.rb +28 -0
  132. data/lib/puppet/parser/functions/reduce.rb +69 -98
  133. data/lib/puppet/parser/functions/require.rb +13 -5
  134. data/lib/puppet/parser/functions/search.rb +6 -1
  135. data/lib/puppet/parser/functions/slice.rb +35 -103
  136. data/lib/puppet/parser/functions/template.rb +12 -5
  137. data/lib/puppet/parser/functions/with.rb +21 -0
  138. data/lib/puppet/parser/lexer.rb +1 -1
  139. data/lib/puppet/parser/parser_factory.rb +21 -33
  140. data/lib/puppet/parser/resource.rb +2 -3
  141. data/lib/puppet/parser/scope.rb +85 -15
  142. data/lib/puppet/pops.rb +9 -11
  143. data/lib/puppet/pops/adapters.rb +2 -1
  144. data/lib/puppet/pops/binder/bindings_checker.rb +4 -4
  145. data/lib/puppet/pops/binder/bindings_factory.rb +6 -6
  146. data/lib/puppet/pops/binder/bindings_label_provider.rb +1 -1
  147. data/lib/puppet/pops/binder/bindings_loader.rb +2 -2
  148. data/lib/puppet/pops/binder/bindings_model.rb +58 -191
  149. data/lib/puppet/pops/binder/bindings_model_dumper.rb +1 -1
  150. data/lib/puppet/pops/binder/bindings_model_meta.rb +215 -0
  151. data/lib/puppet/pops/binder/injector.rb +9 -9
  152. data/lib/puppet/pops/binder/key_factory.rb +2 -2
  153. data/lib/puppet/pops/binder/lookup.rb +14 -6
  154. data/lib/puppet/pops/binder/producers.rb +9 -12
  155. data/lib/puppet/pops/evaluator/access_operator.rb +35 -29
  156. data/lib/puppet/pops/evaluator/callable_mismatch_describer.rb +175 -0
  157. data/lib/puppet/pops/evaluator/callable_signature.rb +1 -2
  158. data/lib/puppet/pops/evaluator/closure.rb +151 -35
  159. data/lib/puppet/pops/evaluator/compare_operator.rb +26 -22
  160. data/lib/puppet/pops/evaluator/epp_evaluator.rb +16 -15
  161. data/lib/puppet/pops/evaluator/evaluator_impl.rb +277 -229
  162. data/lib/puppet/pops/evaluator/relationship_operator.rb +3 -2
  163. data/lib/puppet/pops/evaluator/runtime3_support.rb +86 -53
  164. data/lib/puppet/pops/functions/dispatch.rb +9 -4
  165. data/lib/puppet/pops/functions/dispatcher.rb +2 -169
  166. data/lib/puppet/pops/issue_reporter.rb +14 -6
  167. data/lib/puppet/pops/issues.rb +96 -21
  168. data/lib/puppet/pops/loader/base_loader.rb +3 -3
  169. data/lib/puppet/pops/loader/loader.rb +1 -1
  170. data/lib/puppet/pops/loader/loader_paths.rb +2 -21
  171. data/lib/puppet/pops/loader/ruby_function_instantiator.rb +1 -1
  172. data/lib/puppet/pops/loader/static_loader.rb +12 -2
  173. data/lib/puppet/pops/model/ast_transformer.rb +4 -24
  174. data/lib/puppet/pops/model/factory.rb +72 -10
  175. data/lib/puppet/pops/model/model.rb +82 -574
  176. data/lib/puppet/pops/model/model_label_provider.rb +4 -2
  177. data/lib/puppet/pops/model/model_meta.rb +576 -0
  178. data/lib/puppet/pops/model/model_tree_dumper.rb +27 -5
  179. data/lib/puppet/pops/parser/egrammar.ra +209 -221
  180. data/lib/puppet/pops/parser/eparser.rb +1459 -1431
  181. data/lib/puppet/pops/parser/evaluating_parser.rb +15 -75
  182. data/lib/puppet/pops/parser/lexer2.rb +14 -10
  183. data/lib/puppet/pops/parser/lexer_support.rb +6 -0
  184. data/lib/puppet/pops/parser/locator.rb +1 -1
  185. data/lib/puppet/pops/parser/parser_support.rb +31 -49
  186. data/lib/puppet/pops/patterns.rb +10 -10
  187. data/lib/puppet/pops/semantic_error.rb +1 -1
  188. data/lib/puppet/pops/types/class_loader.rb +24 -13
  189. data/lib/puppet/pops/types/type_calculator.rb +188 -87
  190. data/lib/puppet/pops/types/type_factory.rb +79 -53
  191. data/lib/puppet/pops/types/type_parser.rb +22 -16
  192. data/lib/puppet/pops/types/types.rb +283 -392
  193. data/lib/puppet/pops/types/types_meta.rb +223 -0
  194. data/lib/puppet/pops/utils.rb +16 -14
  195. data/lib/puppet/pops/validation/checker4_0.rb +264 -18
  196. data/lib/puppet/pops/validation/validator_factory_4_0.rb +0 -1
  197. data/lib/puppet/pops/visitor.rb +0 -103
  198. data/lib/puppet/provider/exec.rb +10 -1
  199. data/lib/puppet/provider/file/windows.rb +3 -4
  200. data/lib/puppet/provider/group/windows_adsi.rb +10 -10
  201. data/lib/puppet/provider/nameservice/directoryservice.rb +3 -4
  202. data/lib/puppet/provider/package/apt.rb +5 -1
  203. data/lib/puppet/provider/package/gem.rb +7 -3
  204. data/lib/puppet/provider/package/openbsd.rb +84 -7
  205. data/lib/puppet/provider/package/pacman.rb +29 -4
  206. data/lib/puppet/provider/package/rpm.rb +5 -7
  207. data/lib/puppet/provider/package/sun.rb +5 -1
  208. data/lib/puppet/provider/package/windows.rb +6 -1
  209. data/lib/puppet/provider/package/windows/exe_package.rb +1 -1
  210. data/lib/puppet/provider/package/windows/msi_package.rb +1 -1
  211. data/lib/puppet/provider/package/windows/package.rb +13 -1
  212. data/lib/puppet/provider/package/yum.rb +7 -3
  213. data/lib/puppet/provider/package/zypper.rb +5 -1
  214. data/lib/puppet/provider/parsedfile.rb +17 -1
  215. data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +6 -12
  216. data/lib/puppet/provider/service/freebsd.rb +12 -12
  217. data/lib/puppet/provider/service/init.rb +5 -0
  218. data/lib/puppet/provider/service/launchd.rb +0 -3
  219. data/lib/puppet/provider/service/openbsd.rb +8 -7
  220. data/lib/puppet/provider/ssh_authorized_key/parsed.rb +2 -2
  221. data/lib/puppet/provider/sshkey/parsed.rb +5 -0
  222. data/lib/puppet/provider/user/user_role_add.rb +5 -4
  223. data/lib/puppet/provider/user/windows_adsi.rb +8 -8
  224. data/lib/puppet/provider/zone/solaris.rb +1 -1
  225. data/lib/puppet/reference/metaparameter.rb +8 -6
  226. data/lib/puppet/reports/store.rb +4 -9
  227. data/lib/puppet/resource.rb +75 -11
  228. data/lib/puppet/resource/catalog.rb +9 -7
  229. data/lib/puppet/resource/type.rb +27 -0
  230. data/lib/puppet/settings.rb +61 -41
  231. data/lib/puppet/settings/base_setting.rb +9 -3
  232. data/lib/puppet/settings/environment_conf.rb +32 -4
  233. data/lib/puppet/settings/file_setting.rb +9 -1
  234. data/lib/puppet/settings/priority_setting.rb +5 -5
  235. data/lib/puppet/ssl.rb +1 -0
  236. data/lib/puppet/ssl/certificate_authority.rb +15 -6
  237. data/lib/puppet/ssl/certificate_authority/autosign_command.rb +2 -1
  238. data/lib/puppet/ssl/host.rb +3 -2
  239. data/lib/puppet/ssl/inventory.rb +11 -6
  240. data/lib/puppet/ssl/validator/default_validator.rb +1 -0
  241. data/lib/puppet/ssl/validator/no_validator.rb +3 -0
  242. data/lib/puppet/transaction.rb +29 -0
  243. data/lib/puppet/transaction/resource_harness.rb +16 -3
  244. data/lib/puppet/type.rb +71 -49
  245. data/lib/puppet/type/exec.rb +36 -8
  246. data/lib/puppet/type/file.rb +56 -16
  247. data/lib/puppet/type/file/content.rb +3 -3
  248. data/lib/puppet/type/file/mode.rb +12 -3
  249. data/lib/puppet/type/file/source.rb +4 -1
  250. data/lib/puppet/type/group.rb +1 -1
  251. data/lib/puppet/type/mount.rb +1 -3
  252. data/lib/puppet/type/resources.rb +59 -35
  253. data/lib/puppet/type/ssh_authorized_key.rb +54 -16
  254. data/lib/puppet/type/sshkey.rb +1 -1
  255. data/lib/puppet/type/user.rb +17 -11
  256. data/lib/puppet/type/yumrepo.rb +59 -8
  257. data/lib/puppet/type/zone.rb +3 -6
  258. data/lib/puppet/util.rb +64 -55
  259. data/lib/puppet/util/autoload.rb +2 -2
  260. data/lib/puppet/util/colors.rb +61 -19
  261. data/lib/puppet/util/command_line.rb +21 -4
  262. data/lib/puppet/util/execution.rb +41 -29
  263. data/lib/puppet/util/feature.rb +15 -4
  264. data/lib/puppet/util/filetype.rb +6 -2
  265. data/lib/puppet/util/http_proxy.rb +29 -2
  266. data/lib/puppet/util/lockfile.rb +1 -1
  267. data/lib/puppet/util/log/destinations.rb +7 -3
  268. data/lib/puppet/util/logging.rb +44 -14
  269. data/lib/puppet/util/pidlock.rb +11 -5
  270. data/lib/puppet/util/posix.rb +21 -31
  271. data/lib/puppet/util/profiler.rb +17 -9
  272. data/lib/puppet/util/profiler/aggregate.rb +85 -0
  273. data/lib/puppet/util/profiler/around_profiler.rb +67 -0
  274. data/lib/puppet/util/profiler/logging.rb +12 -11
  275. data/lib/puppet/util/profiler/wall_clock.rb +7 -6
  276. data/lib/puppet/util/rdoc.rb +8 -1
  277. data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +1 -1
  278. data/lib/puppet/util/suidmanager.rb +1 -8
  279. data/lib/puppet/util/windows.rb +14 -3
  280. data/lib/puppet/util/windows/access_control_list.rb +4 -4
  281. data/lib/puppet/util/{adsi.rb → windows/adsi.rb} +99 -37
  282. data/lib/puppet/util/windows/api_types.rb +255 -0
  283. data/lib/puppet/util/windows/com.rb +224 -0
  284. data/lib/puppet/util/windows/error.rb +72 -5
  285. data/lib/puppet/util/windows/file.rb +254 -132
  286. data/lib/puppet/util/windows/process.rb +293 -177
  287. data/lib/puppet/util/windows/registry.rb +12 -2
  288. data/lib/puppet/util/windows/root_certs.rb +16 -9
  289. data/lib/puppet/util/windows/security.rb +501 -232
  290. data/lib/puppet/util/windows/sid.rb +80 -36
  291. data/lib/puppet/util/windows/string.rb +2 -0
  292. data/lib/puppet/util/windows/taskscheduler.rb +1241 -0
  293. data/lib/puppet/util/windows/user.rb +241 -57
  294. data/lib/puppet/vendor.rb +3 -1
  295. data/lib/puppet/vendor/load_pathspec.rb +1 -0
  296. data/lib/puppet/vendor/load_rgen.rb +1 -0
  297. data/lib/puppet/vendor/pathspec/CHANGELOG.md +2 -0
  298. data/lib/puppet/vendor/pathspec/LICENSE +201 -0
  299. data/lib/puppet/vendor/pathspec/PUPPET_README.md +6 -0
  300. data/lib/puppet/vendor/pathspec/README.md +53 -0
  301. data/lib/puppet/vendor/pathspec/lib/pathspec.rb +121 -0
  302. data/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +275 -0
  303. data/lib/puppet/vendor/pathspec/lib/pathspec/regexspec.rb +17 -0
  304. data/lib/puppet/vendor/pathspec/lib/pathspec/spec.rb +14 -0
  305. data/lib/puppet/vendor/require_vendored.rb +2 -0
  306. data/lib/puppet/vendor/rgen/CHANGELOG +197 -0
  307. data/lib/puppet/vendor/rgen/MIT-LICENSE +20 -0
  308. data/lib/puppet/vendor/rgen/PUPPET_README.md +6 -0
  309. data/lib/puppet/vendor/rgen/README.rdoc +78 -0
  310. data/lib/puppet/vendor/rgen/Rakefile +41 -0
  311. data/lib/puppet/vendor/rgen/TODO +41 -0
  312. data/lib/puppet/vendor/rgen/anounce.txt +61 -0
  313. data/lib/puppet/vendor/rgen/design_rationale.txt +71 -0
  314. data/lib/puppet/vendor/rgen/lib/ea_support/ea_support.rb +54 -0
  315. data/lib/puppet/vendor/rgen/lib/ea_support/id_store.rb +32 -0
  316. data/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel.rb +562 -0
  317. data/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel_ext.rb +45 -0
  318. data/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel_generator.rb +43 -0
  319. data/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_to_uml13.rb +103 -0
  320. data/lib/puppet/vendor/rgen/lib/ea_support/uml13_to_uml13_ea.rb +89 -0
  321. data/lib/puppet/vendor/rgen/lib/metamodels/uml13_metamodel.rb +559 -0
  322. data/lib/puppet/vendor/rgen/lib/metamodels/uml13_metamodel_ext.rb +26 -0
  323. data/lib/puppet/vendor/rgen/lib/mmgen/metamodel_generator.rb +20 -0
  324. data/lib/puppet/vendor/rgen/lib/mmgen/mm_ext/ecore_mmgen_ext.rb +91 -0
  325. data/lib/puppet/vendor/rgen/lib/mmgen/mmgen.rb +28 -0
  326. data/lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl +37 -0
  327. data/lib/puppet/vendor/rgen/lib/mmgen/templates/metamodel_generator.tpl +172 -0
  328. data/lib/puppet/vendor/rgen/lib/rgen/array_extensions.rb +45 -0
  329. data/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore.rb +218 -0
  330. data/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_builder_methods.rb +81 -0
  331. data/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_ext.rb +69 -0
  332. data/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_interface.rb +47 -0
  333. data/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_to_ruby.rb +167 -0
  334. data/lib/puppet/vendor/rgen/lib/rgen/ecore/ruby_to_ecore.rb +91 -0
  335. data/lib/puppet/vendor/rgen/lib/rgen/environment.rb +129 -0
  336. data/lib/puppet/vendor/rgen/lib/rgen/fragment/dump_file_cache.rb +63 -0
  337. data/lib/puppet/vendor/rgen/lib/rgen/fragment/fragmented_model.rb +140 -0
  338. data/lib/puppet/vendor/rgen/lib/rgen/fragment/model_fragment.rb +289 -0
  339. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/abstract_instantiator.rb +66 -0
  340. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/abstract_xml_instantiator.rb +66 -0
  341. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/default_xml_instantiator.rb +117 -0
  342. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/ecore_xml_instantiator.rb +169 -0
  343. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_instantiator.rb +126 -0
  344. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_parser.rb +331 -0
  345. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_parser.y +94 -0
  346. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/nodebased_xml_instantiator.rb +137 -0
  347. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/qualified_name_resolver.rb +97 -0
  348. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/reference_resolver.rb +128 -0
  349. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/resolution_helper.rb +47 -0
  350. data/lib/puppet/vendor/rgen/lib/rgen/instantiator/xmi11_instantiator.rb +168 -0
  351. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder.rb +224 -0
  352. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/builder_extensions.rb +556 -0
  353. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/builder_runtime.rb +174 -0
  354. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/constant_order_helper.rb +89 -0
  355. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/data_types.rb +77 -0
  356. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/intermediate/annotation.rb +30 -0
  357. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/intermediate/feature.rb +168 -0
  358. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/mm_multiple.rb +23 -0
  359. data/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb +42 -0
  360. data/lib/puppet/vendor/rgen/lib/rgen/model_builder.rb +32 -0
  361. data/lib/puppet/vendor/rgen/lib/rgen/model_builder/builder_context.rb +334 -0
  362. data/lib/puppet/vendor/rgen/lib/rgen/model_builder/model_serializer.rb +225 -0
  363. data/lib/puppet/vendor/rgen/lib/rgen/model_builder/reference_resolver.rb +156 -0
  364. data/lib/puppet/vendor/rgen/lib/rgen/serializer/json_serializer.rb +121 -0
  365. data/lib/puppet/vendor/rgen/lib/rgen/serializer/opposite_reference_filter.rb +18 -0
  366. data/lib/puppet/vendor/rgen/lib/rgen/serializer/qualified_name_provider.rb +47 -0
  367. data/lib/puppet/vendor/rgen/lib/rgen/serializer/xmi11_serializer.rb +116 -0
  368. data/lib/puppet/vendor/rgen/lib/rgen/serializer/xmi20_serializer.rb +71 -0
  369. data/lib/puppet/vendor/rgen/lib/rgen/serializer/xml_serializer.rb +98 -0
  370. data/lib/puppet/vendor/rgen/lib/rgen/template_language.rb +297 -0
  371. data/lib/puppet/vendor/rgen/lib/rgen/template_language/directory_template_container.rb +83 -0
  372. data/lib/puppet/vendor/rgen/lib/rgen/template_language/output_handler.rb +87 -0
  373. data/lib/puppet/vendor/rgen/lib/rgen/template_language/template_container.rb +234 -0
  374. data/lib/puppet/vendor/rgen/lib/rgen/template_language/template_helper.rb +26 -0
  375. data/lib/puppet/vendor/rgen/lib/rgen/transformer.rb +475 -0
  376. data/lib/puppet/vendor/rgen/lib/rgen/util/auto_class_creator.rb +61 -0
  377. data/lib/puppet/vendor/rgen/lib/rgen/util/cached_glob.rb +67 -0
  378. data/lib/puppet/vendor/rgen/lib/rgen/util/file_cache_map.rb +124 -0
  379. data/lib/puppet/vendor/rgen/lib/rgen/util/file_change_detector.rb +84 -0
  380. data/lib/puppet/vendor/rgen/lib/rgen/util/method_delegation.rb +114 -0
  381. data/lib/puppet/vendor/rgen/lib/rgen/util/model_comparator.rb +68 -0
  382. data/lib/puppet/vendor/rgen/lib/rgen/util/model_comparator_base.rb +142 -0
  383. data/lib/puppet/vendor/rgen/lib/rgen/util/model_dumper.rb +29 -0
  384. data/lib/puppet/vendor/rgen/lib/rgen/util/name_helper.rb +42 -0
  385. data/lib/puppet/vendor/rgen/lib/rgen/util/pattern_matcher.rb +329 -0
  386. data/lib/puppet/vendor/rgen/lib/transformers/ecore_to_uml13.rb +79 -0
  387. data/lib/puppet/vendor/rgen/lib/transformers/uml13_to_ecore.rb +127 -0
  388. data/lib/puppet/vendor/rgen/test/array_extensions_test.rb +64 -0
  389. data/lib/puppet/vendor/rgen/test/ea_instantiator_test.rb +35 -0
  390. data/lib/puppet/vendor/rgen/test/ea_serializer_test.rb +23 -0
  391. data/lib/puppet/vendor/rgen/test/ecore_self_test.rb +54 -0
  392. data/lib/puppet/vendor/rgen/test/environment_test.rb +90 -0
  393. data/lib/puppet/vendor/rgen/test/json_test.rb +171 -0
  394. data/lib/puppet/vendor/rgen/test/metamodel_builder_test.rb +1482 -0
  395. data/lib/puppet/vendor/rgen/test/metamodel_from_ecore_test.rb +57 -0
  396. data/lib/puppet/vendor/rgen/test/metamodel_order_test.rb +131 -0
  397. data/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test.rb +98 -0
  398. data/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/TestModel.rb +70 -0
  399. data/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/houseMetamodel.ecore +42 -0
  400. data/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/houseMetamodel_from_ecore.rb +44 -0
  401. data/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/using_builtin_types.ecore +9 -0
  402. data/lib/puppet/vendor/rgen/test/method_delegation_test.rb +178 -0
  403. data/lib/puppet/vendor/rgen/test/model_builder/builder_context_test.rb +59 -0
  404. data/lib/puppet/vendor/rgen/test/model_builder/builder_test.rb +242 -0
  405. data/lib/puppet/vendor/rgen/test/model_builder/ecore_original.rb +163 -0
  406. data/lib/puppet/vendor/rgen/test/model_builder/ecore_original_regenerated.rb +163 -0
  407. data/lib/puppet/vendor/rgen/test/model_builder/reference_resolver_test.rb +156 -0
  408. data/lib/puppet/vendor/rgen/test/model_builder/serializer_test.rb +94 -0
  409. data/lib/puppet/vendor/rgen/test/model_builder/statemachine_metamodel.rb +42 -0
  410. data/lib/puppet/vendor/rgen/test/model_builder/test_model/statemachine1.rb +23 -0
  411. data/lib/puppet/vendor/rgen/test/model_builder_test.rb +6 -0
  412. data/lib/puppet/vendor/rgen/test/model_fragment_test.rb +30 -0
  413. data/lib/puppet/vendor/rgen/test/output_handler_test.rb +58 -0
  414. data/lib/puppet/vendor/rgen/test/qualified_name_provider_test.rb +48 -0
  415. data/lib/puppet/vendor/rgen/test/qualified_name_resolver_test.rb +102 -0
  416. data/lib/puppet/vendor/rgen/test/reference_resolver_test.rb +117 -0
  417. data/lib/puppet/vendor/rgen/test/rgen_test.rb +26 -0
  418. data/lib/puppet/vendor/rgen/test/template_language_test.rb +163 -0
  419. data/lib/puppet/vendor/rgen/test/template_language_test/expected_result1.txt +29 -0
  420. data/lib/puppet/vendor/rgen/test/template_language_test/expected_result2.txt +9 -0
  421. data/lib/puppet/vendor/rgen/test/template_language_test/expected_result3.txt +4 -0
  422. data/lib/puppet/vendor/rgen/test/template_language_test/indentStringTestDefaultIndent.out +1 -0
  423. data/lib/puppet/vendor/rgen/test/template_language_test/indentStringTestTabIndent.out +1 -0
  424. data/lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/a.tpl +12 -0
  425. data/lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/b.tpl +5 -0
  426. data/lib/puppet/vendor/rgen/test/template_language_test/templates/code/array.tpl +11 -0
  427. data/lib/puppet/vendor/rgen/test/template_language_test/templates/content/author.tpl +7 -0
  428. data/lib/puppet/vendor/rgen/test/template_language_test/templates/content/chapter.tpl +5 -0
  429. data/lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/local.tpl +8 -0
  430. data/lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/test.tpl +8 -0
  431. data/lib/puppet/vendor/rgen/test/template_language_test/templates/evaluate_test/test.tpl +7 -0
  432. data/lib/puppet/vendor/rgen/test/template_language_test/templates/indent_string_test.tpl +12 -0
  433. data/lib/puppet/vendor/rgen/test/template_language_test/templates/index/c/cmod.tpl +1 -0
  434. data/lib/puppet/vendor/rgen/test/template_language_test/templates/index/chapter.tpl +3 -0
  435. data/lib/puppet/vendor/rgen/test/template_language_test/templates/no_backslash_r_test.tpl +5 -0
  436. data/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/no_indent.tpl +3 -0
  437. data/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/sub1/no_indent.tpl +3 -0
  438. data/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test.tpl +24 -0
  439. data/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test2.tpl +13 -0
  440. data/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test3.tpl +10 -0
  441. data/lib/puppet/vendor/rgen/test/template_language_test/templates/null_context_test.tpl +17 -0
  442. data/lib/puppet/vendor/rgen/test/template_language_test/templates/root.tpl +31 -0
  443. data/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1.tpl +9 -0
  444. data/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1/sub1.tpl +3 -0
  445. data/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/test.tpl +4 -0
  446. data/lib/puppet/vendor/rgen/test/template_language_test/testout.txt +29 -0
  447. data/lib/puppet/vendor/rgen/test/testmodel/class_model_checker.rb +119 -0
  448. data/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.eap +0 -0
  449. data/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.xml +1029 -0
  450. data/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel_partial.xml +317 -0
  451. data/lib/puppet/vendor/rgen/test/testmodel/ecore_model_checker.rb +101 -0
  452. data/lib/puppet/vendor/rgen/test/testmodel/manual_testmodel.xml +22 -0
  453. data/lib/puppet/vendor/rgen/test/testmodel/object_model_checker.rb +67 -0
  454. data/lib/puppet/vendor/rgen/test/transformer_test.rb +254 -0
  455. data/lib/puppet/vendor/rgen/test/util/file_cache_map_test.rb +99 -0
  456. data/lib/puppet/vendor/rgen/test/util/pattern_matcher_test.rb +97 -0
  457. data/lib/puppet/vendor/rgen/test/util_test.rb +5 -0
  458. data/lib/puppet/vendor/rgen/test/xml_instantiator_test.rb +160 -0
  459. data/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_ecore_model_checker.rb +94 -0
  460. data/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_ecore_instantiator.rb +53 -0
  461. data/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_metamodel.rb +49 -0
  462. data/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_to_ecore.rb +75 -0
  463. data/lib/puppet/vendor/safe_yaml/PUPPET_README.md +6 -0
  464. data/lib/puppet/vendor/semantic/PUPPET_README.md +6 -0
  465. data/lib/puppet/version.rb +1 -1
  466. data/spec/fixtures/integration/node/environment/sitedir2/00_a.pp +2 -0
  467. data/spec/fixtures/integration/node/environment/sitedir2/02_folder/01_b.pp +6 -0
  468. data/spec/fixtures/integration/node/environment/sitedir2/03_c.pp +1 -0
  469. data/spec/fixtures/integration/node/environment/sitedir2/04_include.pp +2 -0
  470. data/spec/fixtures/releases/jamtur01-apache/manifests/vhost.pp +1 -1
  471. data/spec/fixtures/unit/indirector/hiera/global.yaml +10 -0
  472. data/spec/fixtures/unit/indirector/hiera/invalid.yaml +1 -0
  473. data/spec/fixtures/unit/parser/functions/create_resources/foo/manifests/init.pp +3 -0
  474. data/spec/fixtures/unit/parser/functions/create_resources/foo/manifests/wrongdefine.pp +3 -0
  475. data/spec/fixtures/unit/parser/lexer/argumentdefaults.pp +2 -2
  476. data/spec/fixtures/unit/parser/lexer/casestatement.pp +14 -14
  477. data/spec/fixtures/unit/parser/lexer/classheirarchy.pp +3 -3
  478. data/spec/fixtures/unit/parser/lexer/classincludes.pp +3 -3
  479. data/spec/fixtures/unit/parser/lexer/classpathtest.pp +1 -1
  480. data/spec/fixtures/unit/parser/lexer/collection_override.pp +1 -1
  481. data/spec/fixtures/unit/parser/lexer/componentrequire.pp +2 -2
  482. data/spec/fixtures/unit/parser/lexer/deepclassheirarchy.pp +5 -5
  483. data/spec/fixtures/unit/parser/lexer/defineoverrides.pp +2 -2
  484. data/spec/fixtures/unit/parser/lexer/filecreate.pp +2 -2
  485. data/spec/fixtures/unit/parser/lexer/ifexpression.pp +1 -1
  486. data/spec/fixtures/unit/parser/lexer/implicititeration.pp +4 -4
  487. data/spec/fixtures/unit/parser/lexer/multipleinstances.pp +3 -3
  488. data/spec/fixtures/unit/parser/lexer/multisubs.pp +2 -2
  489. data/spec/fixtures/unit/parser/lexer/namevartest.pp +2 -2
  490. data/spec/fixtures/unit/parser/lexer/simpledefaults.pp +1 -1
  491. data/spec/fixtures/unit/pops/parser/lexer/argumentdefaults.pp +1 -1
  492. data/spec/fixtures/unit/pops/parser/lexer/casestatement.pp +14 -14
  493. data/spec/fixtures/unit/pops/parser/lexer/classheirarchy.pp +3 -3
  494. data/spec/fixtures/unit/pops/parser/lexer/classincludes.pp +3 -3
  495. data/spec/fixtures/unit/pops/parser/lexer/classpathtest.pp +1 -1
  496. data/spec/fixtures/unit/pops/parser/lexer/collection_override.pp +1 -1
  497. data/spec/fixtures/unit/pops/parser/lexer/componentrequire.pp +2 -2
  498. data/spec/fixtures/unit/pops/parser/lexer/deepclassheirarchy.pp +5 -5
  499. data/spec/fixtures/unit/pops/parser/lexer/defineoverrides.pp +2 -2
  500. data/spec/fixtures/unit/pops/parser/lexer/filecreate.pp +2 -2
  501. data/spec/fixtures/unit/pops/parser/lexer/ifexpression.pp +1 -1
  502. data/spec/fixtures/unit/pops/parser/lexer/implicititeration.pp +4 -4
  503. data/spec/fixtures/unit/pops/parser/lexer/multipleinstances.pp +3 -3
  504. data/spec/fixtures/unit/pops/parser/lexer/multisubs.pp +2 -2
  505. data/spec/fixtures/unit/pops/parser/lexer/namevartest.pp +2 -2
  506. data/spec/fixtures/unit/pops/parser/lexer/simpledefaults.pp +1 -1
  507. data/spec/fixtures/unit/provider/package/gem/gem-list-single-package +4 -0
  508. data/spec/fixtures/unit/type/user/authorized_keys +1 -1
  509. data/spec/integration/agent/logging_spec.rb +4 -0
  510. data/spec/integration/application/doc_spec.rb +4 -3
  511. data/spec/integration/configurer_spec.rb +0 -14
  512. data/spec/integration/defaults_spec.rb +26 -0
  513. data/spec/integration/environments/default_manifest_spec.rb +274 -0
  514. data/spec/integration/faces/documentation_spec.rb +0 -4
  515. data/spec/integration/file_bucket/file_spec.rb +21 -0
  516. data/spec/integration/indirector/catalog/compiler_spec.rb +0 -2
  517. data/spec/integration/indirector/catalog/queue_spec.rb +0 -2
  518. data/spec/integration/indirector/facts/facter_spec.rb +1 -1
  519. data/spec/integration/indirector/file_content/file_server_spec.rb +2 -2
  520. data/spec/integration/node/environment_spec.rb +24 -8
  521. data/spec/integration/parser/catalog_spec.rb +10 -10
  522. data/spec/integration/parser/class_spec.rb +37 -0
  523. data/spec/integration/parser/collector_spec.rb +234 -75
  524. data/spec/integration/parser/compiler_spec.rb +385 -401
  525. data/spec/integration/parser/conditionals_spec.rb +117 -0
  526. data/spec/integration/parser/future_compiler_spec.rb +359 -8
  527. data/spec/integration/parser/node_spec.rb +185 -0
  528. data/spec/integration/parser/resource_expressions_spec.rb +286 -0
  529. data/spec/integration/parser/ruby_manifest_spec.rb +0 -4
  530. data/spec/integration/parser/scope_spec.rb +94 -151
  531. data/spec/integration/provider/cron/crontab_spec.rb +137 -148
  532. data/spec/integration/ssl/certificate_authority_spec.rb +26 -0
  533. data/spec/integration/ssl/certificate_request_spec.rb +0 -6
  534. data/spec/integration/ssl/certificate_revocation_list_spec.rb +0 -2
  535. data/spec/integration/ssl/host_spec.rb +0 -2
  536. data/spec/integration/transaction_spec.rb +16 -0
  537. data/spec/integration/type/file_spec.rb +14 -13
  538. data/spec/integration/type/nagios_spec.rb +6 -15
  539. data/spec/integration/type/sshkey_spec.rb +22 -0
  540. data/spec/integration/type/tidy_spec.rb +3 -0
  541. data/spec/integration/type/user_spec.rb +8 -3
  542. data/spec/integration/util/autoload_spec.rb +6 -6
  543. data/spec/integration/util/rdoc/parser_spec.rb +7 -0
  544. data/spec/integration/util/windows/process_spec.rb +12 -0
  545. data/spec/integration/util/windows/security_spec.rb +36 -35
  546. data/spec/integration/util/windows/user_spec.rb +75 -9
  547. data/spec/integration/util_spec.rb +2 -2
  548. data/spec/lib/matchers/resource.rb +1 -0
  549. data/spec/lib/puppet_spec/compiler.rb +15 -2
  550. data/spec/lib/puppet_spec/files.rb +10 -0
  551. data/spec/lib/puppet_spec/language.rb +74 -0
  552. data/spec/lib/puppet_spec/matchers.rb +59 -32
  553. data/spec/lib/puppet_spec/module_tool/stub_source.rb +3 -0
  554. data/spec/shared_behaviours/hiera_indirections.rb +99 -0
  555. data/spec/shared_behaviours/iterative_functions.rb +69 -0
  556. data/spec/unit/application/apply_spec.rb +4 -2
  557. data/spec/unit/application/doc_spec.rb +17 -13
  558. data/spec/unit/application/master_spec.rb +35 -27
  559. data/spec/unit/application/resource_spec.rb +0 -5
  560. data/spec/unit/configurer/downloader_factory_spec.rb +96 -0
  561. data/spec/unit/configurer/downloader_spec.rb +3 -24
  562. data/spec/unit/configurer/plugin_handler_spec.rb +22 -22
  563. data/spec/unit/configurer_spec.rb +0 -4
  564. data/spec/unit/defaults_spec.rb +30 -0
  565. data/spec/unit/face/config_spec.rb +2 -1
  566. data/spec/unit/face/module/build_spec.rb +2 -2
  567. data/spec/unit/face/module/install_spec.rb +8 -8
  568. data/spec/unit/face/parser_spec.rb +71 -33
  569. data/spec/unit/file_bucket/file_spec.rb +2 -2
  570. data/spec/unit/file_system/uniquefile_spec.rb +184 -0
  571. data/spec/unit/forge/errors_spec.rb +4 -6
  572. data/spec/unit/forge/module_release_spec.rb +178 -89
  573. data/spec/unit/forge/repository_spec.rb +110 -2
  574. data/spec/unit/forge_spec.rb +39 -3
  575. data/spec/unit/functions/assert_type_spec.rb +22 -3
  576. data/spec/unit/{parser/methods → functions}/each_spec.rb +21 -1
  577. data/spec/unit/{parser/functions → functions}/epp_spec.rb +61 -9
  578. data/spec/unit/{parser/methods → functions}/filter_spec.rb +34 -38
  579. data/spec/unit/{parser/functions → functions}/inline_epp_spec.rb +18 -3
  580. data/spec/unit/functions/map_spec.rb +169 -0
  581. data/spec/unit/functions/match_spec.rb +57 -0
  582. data/spec/unit/{parser/methods → functions}/reduce_spec.rb +23 -5
  583. data/spec/unit/{parser/methods → functions}/slice_spec.rb +34 -21
  584. data/spec/unit/functions/with_spec.rb +35 -0
  585. data/spec/unit/functions4_spec.rb +7 -8
  586. data/spec/unit/indirector/catalog/compiler_spec.rb +0 -2
  587. data/spec/unit/indirector/catalog/static_compiler_spec.rb +11 -0
  588. data/spec/unit/indirector/data_binding/hiera_spec.rb +1 -96
  589. data/spec/unit/indirector/facts/facter_spec.rb +69 -102
  590. data/spec/unit/indirector/hiera_spec.rb +17 -0
  591. data/spec/unit/indirector/request_spec.rb +2 -4
  592. data/spec/unit/indirector/resource/ral_spec.rb +5 -0
  593. data/spec/unit/indirector/resource_type/parser_spec.rb +17 -12
  594. data/spec/unit/indirector/rest_spec.rb +36 -6
  595. data/spec/unit/interface/face_collection_spec.rb +2 -2
  596. data/spec/unit/module_tool/applications/builder_spec.rb +364 -14
  597. data/spec/unit/module_tool/applications/uninstaller_spec.rb +22 -0
  598. data/spec/unit/module_tool/applications/unpacker_spec.rb +40 -0
  599. data/spec/unit/module_tool/applications/upgrader_spec.rb +22 -0
  600. data/spec/unit/module_tool/installed_modules_spec.rb +49 -0
  601. data/spec/unit/module_tool/metadata_spec.rb +72 -4
  602. data/spec/unit/module_tool/tar/mini_spec.rb +2 -1
  603. data/spec/unit/network/authentication_spec.rb +4 -0
  604. data/spec/unit/network/http/api/v2/environments_spec.rb +24 -3
  605. data/spec/unit/network/http/connection_spec.rb +127 -92
  606. data/spec/unit/network/http/factory_spec.rb +82 -0
  607. data/spec/unit/network/http/handler_spec.rb +23 -13
  608. data/spec/unit/network/http/nocache_pool_spec.rb +43 -0
  609. data/spec/unit/network/http/pool_spec.rb +269 -0
  610. data/spec/unit/network/http/rack/rest_spec.rb +1 -1
  611. data/spec/unit/network/http/session_spec.rb +43 -0
  612. data/spec/unit/network/http/site_spec.rb +90 -0
  613. data/spec/unit/network/http/webrick_spec.rb +1 -1
  614. data/spec/unit/network/http_pool_spec.rb +9 -6
  615. data/spec/unit/network/http_spec.rb +10 -0
  616. data/spec/unit/node/environment_spec.rb +54 -0
  617. data/spec/unit/node_spec.rb +3 -5
  618. data/spec/unit/parser/compiler_spec.rb +9 -2
  619. data/spec/unit/parser/files_spec.rb +19 -0
  620. data/spec/unit/parser/functions/contain_spec.rb +51 -0
  621. data/spec/unit/parser/functions/create_resources_spec.rb +8 -1
  622. data/spec/unit/parser/functions/digest_spec.rb +31 -0
  623. data/spec/unit/parser/functions/file_spec.rb +48 -5
  624. data/spec/unit/parser/functions/include_spec.rb +15 -1
  625. data/spec/unit/parser/functions/realize_spec.rb +43 -35
  626. data/spec/unit/parser/functions/require_spec.rb +19 -5
  627. data/spec/unit/parser/functions/search_spec.rb +5 -0
  628. data/spec/unit/parser/functions/shared.rb +82 -0
  629. data/spec/unit/parser/functions_spec.rb +1 -1
  630. data/spec/unit/parser/lexer_spec.rb +10 -1
  631. data/spec/unit/parser/type_loader_spec.rb +0 -1
  632. data/spec/unit/pops/benchmark_spec.rb +1 -1
  633. data/spec/unit/pops/binder/bindings_composer_spec.rb +24 -22
  634. data/spec/unit/pops/binder/injector_spec.rb +8 -6
  635. data/spec/unit/pops/evaluator/access_ops_spec.rb +3 -3
  636. data/spec/unit/pops/evaluator/comparison_ops_spec.rb +7 -4
  637. data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +250 -30
  638. data/spec/unit/pops/evaluator/logical_ops_spec.rb +2 -2
  639. data/spec/unit/pops/evaluator/variables_spec.rb +0 -105
  640. data/spec/unit/pops/issues_spec.rb +170 -0
  641. data/spec/unit/pops/loaders/dependency_loader_spec.rb +17 -0
  642. data/spec/unit/pops/loaders/loader_paths_spec.rb +4 -15
  643. data/spec/unit/pops/loaders/loaders_spec.rb +31 -11
  644. data/spec/unit/pops/loaders/module_loaders_spec.rb +0 -29
  645. data/spec/unit/pops/loaders/static_loader_spec.rb +6 -0
  646. data/spec/unit/pops/parser/epp_parser_spec.rb +38 -9
  647. data/spec/unit/pops/parser/evaluating_parser_spec.rb +0 -1
  648. data/spec/unit/pops/parser/lexer2_spec.rb +21 -4
  649. data/spec/unit/pops/parser/parse_basic_expressions_spec.rb +5 -0
  650. data/spec/unit/pops/parser/parse_calls_spec.rb +6 -3
  651. data/spec/unit/pops/parser/parse_conditionals_spec.rb +12 -5
  652. data/spec/unit/pops/parser/parse_containers_spec.rb +62 -7
  653. data/spec/unit/pops/parser/parse_resource_spec.rb +155 -73
  654. data/spec/unit/pops/parser/parser_spec.rb +16 -0
  655. data/spec/unit/pops/parser/parsing_typed_parameters_spec.rb +72 -0
  656. data/spec/unit/pops/transformer/transform_calls_spec.rb +1 -1
  657. data/spec/unit/pops/types/type_calculator_spec.rb +254 -57
  658. data/spec/unit/pops/types/type_factory_spec.rb +8 -3
  659. data/spec/unit/pops/types/type_parser_spec.rb +26 -5
  660. data/spec/unit/pops/validator/validator_spec.rb +143 -27
  661. data/spec/unit/provider/exec/posix_spec.rb +22 -14
  662. data/spec/unit/provider/exec/shell_spec.rb +2 -2
  663. data/spec/unit/provider/file/windows_spec.rb +7 -7
  664. data/spec/unit/provider/group/windows_adsi_spec.rb +17 -17
  665. data/spec/unit/provider/package/gem_spec.rb +10 -0
  666. data/spec/unit/provider/package/openbsd_spec.rb +66 -9
  667. data/spec/unit/provider/package/pacman_spec.rb +90 -71
  668. data/spec/unit/provider/package/windows/package_spec.rb +21 -6
  669. data/spec/unit/provider/package/yum_spec.rb +1 -0
  670. data/spec/unit/provider/parsedfile_spec.rb +1 -1
  671. data/spec/unit/provider/scheduled_task/win32_taskscheduler_spec.rb +9 -9
  672. data/spec/unit/provider/service/openbsd_spec.rb +26 -2
  673. data/spec/unit/provider/service/upstart_spec.rb +12 -1
  674. data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +6 -0
  675. data/spec/unit/provider/user/user_role_add_spec.rb +23 -1
  676. data/spec/unit/provider/user/windows_adsi_spec.rb +17 -17
  677. data/spec/unit/reports/store_spec.rb +0 -16
  678. data/spec/unit/resource/catalog_spec.rb +0 -5
  679. data/spec/unit/resource_spec.rb +2 -2
  680. data/spec/unit/settings/autosign_setting_spec.rb +2 -2
  681. data/spec/unit/settings/environment_conf_spec.rb +77 -10
  682. data/spec/unit/settings/file_setting_spec.rb +5 -4
  683. data/spec/unit/settings/priority_setting_spec.rb +4 -4
  684. data/spec/unit/settings_spec.rb +41 -3
  685. data/spec/unit/ssl/certificate_authority_spec.rb +25 -2
  686. data/spec/unit/ssl/inventory_spec.rb +13 -0
  687. data/spec/unit/ssl/validator_spec.rb +0 -1
  688. data/spec/unit/transaction/resource_harness_spec.rb +64 -0
  689. data/spec/unit/transaction_spec.rb +98 -47
  690. data/spec/unit/type/cron_spec.rb +3 -3
  691. data/spec/unit/type/exec_spec.rb +9 -0
  692. data/spec/unit/type/file/content_spec.rb +54 -71
  693. data/spec/unit/type/file/mode_spec.rb +26 -1
  694. data/spec/unit/type/file/source_spec.rb +26 -4
  695. data/spec/unit/type/file_spec.rb +3 -3
  696. data/spec/unit/type/nagios_spec.rb +12 -3
  697. data/spec/unit/type/resources_spec.rb +64 -30
  698. data/spec/unit/type/user_spec.rb +1 -1
  699. data/spec/unit/type/yumrepo_spec.rb +136 -0
  700. data/spec/unit/type/zone_spec.rb +44 -1
  701. data/spec/unit/type_spec.rb +20 -0
  702. data/spec/unit/util/colors_spec.rb +14 -8
  703. data/spec/unit/util/command_line_spec.rb +11 -7
  704. data/spec/unit/util/execution_spec.rb +35 -42
  705. data/spec/unit/util/feature_spec.rb +12 -0
  706. data/spec/unit/util/http_proxy_spec.rb +43 -1
  707. data/spec/unit/util/log/destinations_spec.rb +45 -1
  708. data/spec/unit/util/logging_spec.rb +38 -0
  709. data/spec/unit/util/pidlock_spec.rb +37 -1
  710. data/spec/unit/util/profiler/aggregate_spec.rb +59 -0
  711. data/spec/unit/util/profiler/around_profiler_spec.rb +61 -0
  712. data/spec/unit/util/profiler/logging_spec.rb +18 -29
  713. data/spec/unit/util/profiler/wall_clock_spec.rb +1 -1
  714. data/spec/unit/util/profiler_spec.rb +55 -0
  715. data/spec/unit/util/queue_spec.rb +0 -1
  716. data/spec/unit/util/rdoc/parser_spec.rb +14 -6
  717. data/spec/unit/util/tagging_spec.rb +1 -1
  718. data/spec/unit/util/windows/access_control_entry_spec.rb +1 -1
  719. data/spec/unit/util/{adsi_spec.rb → windows/adsi_spec.rb} +111 -108
  720. data/spec/unit/util/windows/api_types_spec.rb +28 -0
  721. data/spec/unit/util/windows/registry_spec.rb +7 -6
  722. data/spec/unit/util/windows/sid_spec.rb +3 -6
  723. data/spec/unit/util/windows/string_spec.rb +4 -0
  724. data/spec/unit/util/zaml_spec.rb +5 -1
  725. data/tasks/benchmark.rake +40 -5
  726. data/tasks/parser.rake +16 -2
  727. data/tasks/yard.rake +1 -1
  728. metadata +308 -150
  729. data/lib/puppet/file_system/tempfile.rb +0 -20
  730. data/lib/puppet/parser/e_parser_adapter.rb +0 -119
  731. data/lib/puppet/parser/functions/collect.rb +0 -15
  732. data/lib/puppet/parser/functions/select.rb +0 -15
  733. data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +0 -109
  734. data/lib/puppet/pops/parser/lexer.rb +0 -753
  735. data/lib/puppet/pops/parser/makefile +0 -6
  736. data/lib/puppet/pops/validation/checker3_1.rb +0 -558
  737. data/lib/puppet/pops/validation/validator_factory_3_1.rb +0 -31
  738. data/lib/puppet/util/profiler/none.rb +0 -8
  739. data/spec/unit/face/certificate_request_spec.rb +0 -7
  740. data/spec/unit/face/certificate_revocation_list_spec.rb +0 -7
  741. data/spec/unit/face/key_spec.rb +0 -7
  742. data/spec/unit/face/report_spec.rb +0 -7
  743. data/spec/unit/face/resource_spec.rb +0 -7
  744. data/spec/unit/face/resource_type_spec.rb +0 -7
  745. data/spec/unit/file_system/tempfile_spec.rb +0 -48
  746. data/spec/unit/parser/eparser_adapter_spec.rb +0 -407
  747. data/spec/unit/parser/methods/map_spec.rb +0 -184
  748. data/spec/unit/parser/methods/shared.rb +0 -45
  749. data/spec/unit/pops/parser/lexer_spec.rb +0 -840
  750. data/spec/unit/pops/transformer/transform_resource_spec.rb +0 -185
  751. data/spec/unit/util/profiler/none_spec.rb +0 -12
@@ -16,6 +16,21 @@ module Puppet
16
16
  AS_DURATION = %q{This setting can be a time interval in seconds (30 or 30s), minutes (30m), hours (6h), days (2d), or years (5y).}
17
17
  STORECONFIGS_ONLY = %q{This setting is only used by the ActiveRecord storeconfigs and inventory backends, which are deprecated.}
18
18
 
19
+ # This is defined first so that the facter implementation is replaced before other setting defaults are evaluated.
20
+ define_settings(:main,
21
+ :cfacter => {
22
+ :default => false,
23
+ :type => :boolean,
24
+ :desc => 'Whether or not to use the native facter (cfacter) implementation instead of the Ruby one (facter). Defaults to false.',
25
+ :hook => proc do |value|
26
+ return unless value
27
+ raise ArgumentError, 'facter has already evaluated facts.' if Facter.instance_variable_get(:@collection)
28
+ raise ArgumentError, 'cfacter version 0.2.0 or later is not installed.' unless Puppet.features.cfacter?
29
+ CFacter.initialize
30
+ end
31
+ }
32
+ )
33
+
19
34
  define_settings(:main,
20
35
  :confdir => {
21
36
  :default => nil,
@@ -48,7 +63,7 @@ module Puppet
48
63
  :logdir => {
49
64
  :default => nil,
50
65
  :type => :directory,
51
- :mode => 0750,
66
+ :mode => "0750",
52
67
  :owner => "service",
53
68
  :group => "service",
54
69
  :desc => "The directory in which to store log files",
@@ -57,13 +72,31 @@ module Puppet
57
72
  :default => 'notice',
58
73
  :type => :enum,
59
74
  :values => ["debug","info","notice","warning","err","alert","emerg","crit"],
60
- :desc => "Default logging level",
75
+ :desc => "Default logging level for messages from Puppet. Allowed values are:
76
+
77
+ * debug
78
+ * info
79
+ * notice
80
+ * warning
81
+ * err
82
+ * alert
83
+ * emerg
84
+ * crit
85
+ ",
61
86
  },
62
87
  :disable_warnings => {
63
88
  :default => [],
64
89
  :type => :array,
65
- :desc => "A list of warning types to disable. Currently the only warning type that can be
66
- disabled are deprecations, but more warning types may be added later.",
90
+ :desc => "A comma-separated list of warning types to suppress. If large numbers
91
+ of warnings are making Puppet's logs too large or difficult to use, you
92
+ can temporarily silence them with this setting.
93
+
94
+ If you are preparing to upgrade Puppet to a new major version, you
95
+ should re-enable all warnings for a while.
96
+
97
+ Valid values for this setting are:
98
+
99
+ * `deprecations` --- disables deprecation warnings.",
67
100
  :hook => proc do |value|
68
101
  values = munge(value)
69
102
  valid = %w[deprecations]
@@ -110,7 +143,7 @@ module Puppet
110
143
  :statedir => {
111
144
  :default => "$vardir/state",
112
145
  :type => :directory,
113
- :mode => 01755,
146
+ :mode => "01755",
114
147
  :desc => "The directory where Puppet state is stored. Generally,
115
148
  this directory can be removed without causing harm (although it
116
149
  might result in spurious service restarts)."
@@ -118,7 +151,7 @@ module Puppet
118
151
  :rundir => {
119
152
  :default => nil,
120
153
  :type => :directory,
121
- :mode => 0755,
154
+ :mode => "0755",
122
155
  :owner => "service",
123
156
  :group => "service",
124
157
  :desc => "Where Puppet PID files are kept."
@@ -227,8 +260,27 @@ module Puppet
227
260
  http://docs.puppetlabs.com/puppet/latest/reference/environments.html",
228
261
  :type => :path,
229
262
  },
263
+ :always_cache_features => {
264
+ :type => :boolean,
265
+ :default => false,
266
+ :desc => <<-'EOT'
267
+ Affects how we cache attempts to load Puppet 'features'. If false, then
268
+ calls to `Puppet.features.<feature>?` will always attempt to load the
269
+ feature (which can be an expensive operation) unless it has already been
270
+ loaded successfully. This makes it possible for a single agent run to,
271
+ e.g., install a package that provides the underlying capabilities for
272
+ a feature, and then later load that feature during the same run (even if
273
+ the feature had been tested earlier and had not been available).
274
+
275
+ If this setting is set to true, then features will only be checked once,
276
+ and if they are not available, the negative result is cached and returned
277
+ for all subsequent attempts to load the feature. This behavior is almost
278
+ always appropriate for the server, and can result in a significant performance
279
+ improvement for features that are checked frequently.
280
+ EOT
281
+ },
230
282
  :diff_args => {
231
- :default => default_diffargs,
283
+ :default => lambda { default_diffargs },
232
284
  :desc => "Which arguments to pass to the diff command when printing differences between
233
285
  files. The command to use can be chosen with the `diff` setting.",
234
286
  },
@@ -350,18 +402,48 @@ module Puppet
350
402
  :default => "$logdir/http.log",
351
403
  :type => :file,
352
404
  :owner => "root",
353
- :mode => 0640,
405
+ :mode => "0640",
354
406
  :desc => "Where the puppet agent web server logs.",
355
407
  },
356
408
  :http_proxy_host => {
357
409
  :default => "none",
358
410
  :desc => "The HTTP proxy host to use for outgoing connections. Note: You
359
- may need to use a FQDN for the server hostname when using a proxy.",
411
+ may need to use a FQDN for the server hostname when using a proxy. Environment variable
412
+ http_proxy or HTTP_PROXY will override this value",
360
413
  },
361
414
  :http_proxy_port => {
362
415
  :default => 3128,
363
416
  :desc => "The HTTP proxy port to use for outgoing connections",
364
417
  },
418
+ :http_proxy_user => {
419
+ :default => "none",
420
+ :desc => "The user name for an authenticated HTTP proxy. Requires the `http_proxy_host` setting.",
421
+ },
422
+ :http_proxy_password =>{
423
+ :default => "none",
424
+ :hook => proc do |value|
425
+ if Puppet.settings[:http_proxy_password] =~ /[@!# \/]/
426
+ raise "Passwords set in the http_proxy_password setting must be valid as part of a URL, and any reserved characters must be URL-encoded. We received: #{value}"
427
+ end
428
+ end,
429
+ :desc => "The password for the user of an authenticated HTTP proxy.
430
+ Requires the `http_proxy_user` setting.
431
+
432
+ Note that passwords must be valid when used as part of a URL. If a password
433
+ contains any characters with special meanings in URLs (as specified by RFC 3986
434
+ section 2.2), they must be URL-encoded. (For example, `#` would become `%23`.)",
435
+ },
436
+ :http_keepalive_timeout => {
437
+ :default => "4s",
438
+ :type => :duration,
439
+ :desc => "The maximum amount of time a persistent HTTP connection can remain idle in the connection pool, before it is closed. This timeout should be shorter than the keepalive timeout used on the HTTP server, e.g. Apache KeepAliveTimeout directive.
440
+ #{AS_DURATION}"
441
+ },
442
+ :http_debug => {
443
+ :default => false,
444
+ :type => :boolean,
445
+ :desc => "Whether to write HTTP request and responses to stderr. This should never be used in a production environment."
446
+ },
365
447
  :filetimeout => {
366
448
  :default => "15s",
367
449
  :type => :duration,
@@ -372,8 +454,10 @@ module Puppet
372
454
  :environment_timeout => {
373
455
  :default => "3m",
374
456
  :type => :ttl,
375
- :desc => "The time to live for a cached environment. The time is either given #{AS_DURATION}, or
376
- the word 'unlimited' which causes the environment to be cached until the master is restarted."
457
+ :desc => "The time to live for a cached environment.
458
+ #{AS_DURATION}
459
+ This setting can also be set to `unlimited`, which causes the environment to
460
+ be cached until the master is restarted."
377
461
  },
378
462
  :queue_type => {
379
463
  :default => "stomp",
@@ -457,7 +541,7 @@ module Puppet
457
541
  :default => true,
458
542
  :type => :boolean,
459
543
  :desc => "Flatten fact values to strings using #to_s. Means you can't have arrays or
460
- hashes as fact values.",
544
+ hashes as fact values. (DEPRECATED) This option will be removed in Puppet 4.0.",
461
545
  },
462
546
  :trusted_node_data => {
463
547
  :default => false,
@@ -483,6 +567,14 @@ module Puppet
483
567
  :module_skeleton_dir => {
484
568
  :default => '$module_working_dir/skeleton',
485
569
  :desc => "The directory which the skeleton for module tool generate is stored.",
570
+ },
571
+ :forge_authorization => {
572
+ :default => nil,
573
+ :desc => "The authorization key to connect to the Puppet Forge. Leave blank for unauthorized or license based connections",
574
+ },
575
+ :module_groups => {
576
+ :default => nil,
577
+ :desc => "Extra module groups to request from the Puppet Forge",
486
578
  }
487
579
  )
488
580
 
@@ -492,9 +584,30 @@ module Puppet
492
584
  # We have to downcase the fqdn, because the current ssl stuff (as oppsed to in master) doesn't have good facilities for
493
585
  # manipulating naming.
494
586
  :certname => {
495
- :default => Puppet::Settings.default_certname.downcase, :desc => "The name to use when handling certificates. Defaults
496
- to the fully qualified domain name.",
497
- :call_hook => :on_define_and_write, # Call our hook with the default value, so we're always downcased
587
+ :default => lambda { Puppet::Settings.default_certname.downcase },
588
+ :desc => "The name to use when handling certificates. When a node
589
+ requests a certificate from the CA puppet master, it uses the value of the
590
+ `certname` setting as its requested Subject CN.
591
+
592
+ This is the name used when managing a node's permissions in
593
+ [auth.conf](http://docs.puppetlabs.com/puppet/latest/reference/config_file_auth.html).
594
+ In most cases, it is also used as the node's name when matching
595
+ [node definitions](http://docs.puppetlabs.com/puppet/latest/reference/lang_node_definitions.html)
596
+ and requesting data from an ENC. (This can be changed with the `node_name_value`
597
+ and `node_name_fact` settings, although you should only do so if you have
598
+ a compelling reason.)
599
+
600
+ A node's certname is available in Puppet manifests as `$trusted['certname']`. (See
601
+ [Facts and Built-In Variables](http://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html)
602
+ for more details.)
603
+
604
+ * For best compatibility, you should limit the value of `certname` to
605
+ only use letters, numbers, periods, underscores, and dashes. (That is,
606
+ it should match `/\A[a-z0-9._-]+\Z/`.)
607
+ * The special value `ca` is reserved, and can't be used as the certname
608
+ for a normal node.
609
+
610
+ Defaults to the node's fully qualified domain name.",
498
611
  :hook => proc { |value| raise(ArgumentError, "Certificate names must be lower case; see #1168") unless value == value.downcase }},
499
612
  :certdnsnames => {
500
613
  :default => '',
@@ -581,7 +694,7 @@ EOT
581
694
  :certdir => {
582
695
  :default => "$ssldir/certs",
583
696
  :type => :directory,
584
- :mode => 0755,
697
+ :mode => "0755",
585
698
  :owner => "service",
586
699
  :group => "service",
587
700
  :desc => "The certificate directory."
@@ -589,7 +702,7 @@ EOT
589
702
  :ssldir => {
590
703
  :default => "$confdir/ssl",
591
704
  :type => :directory,
592
- :mode => 0771,
705
+ :mode => "0771",
593
706
  :owner => "service",
594
707
  :group => "service",
595
708
  :desc => "Where SSL certificates are kept."
@@ -597,7 +710,7 @@ EOT
597
710
  :publickeydir => {
598
711
  :default => "$ssldir/public_keys",
599
712
  :type => :directory,
600
- :mode => 0755,
713
+ :mode => "0755",
601
714
  :owner => "service",
602
715
  :group => "service",
603
716
  :desc => "The public key directory."
@@ -605,7 +718,7 @@ EOT
605
718
  :requestdir => {
606
719
  :default => "$ssldir/certificate_requests",
607
720
  :type => :directory,
608
- :mode => 0755,
721
+ :mode => "0755",
609
722
  :owner => "service",
610
723
  :group => "service",
611
724
  :desc => "Where host certificate requests are stored."
@@ -613,7 +726,7 @@ EOT
613
726
  :privatekeydir => {
614
727
  :default => "$ssldir/private_keys",
615
728
  :type => :directory,
616
- :mode => 0750,
729
+ :mode => "0750",
617
730
  :owner => "service",
618
731
  :group => "service",
619
732
  :desc => "The private key directory."
@@ -621,7 +734,7 @@ EOT
621
734
  :privatedir => {
622
735
  :default => "$ssldir/private",
623
736
  :type => :directory,
624
- :mode => 0750,
737
+ :mode => "0750",
625
738
  :owner => "service",
626
739
  :group => "service",
627
740
  :desc => "Where the client stores private certificate information."
@@ -629,7 +742,7 @@ EOT
629
742
  :passfile => {
630
743
  :default => "$privatedir/password",
631
744
  :type => :file,
632
- :mode => 0640,
745
+ :mode => "0640",
633
746
  :owner => "service",
634
747
  :group => "service",
635
748
  :desc => "Where puppet agent stores the password for its private key.
@@ -638,7 +751,7 @@ EOT
638
751
  :hostcsr => {
639
752
  :default => "$ssldir/csr_$certname.pem",
640
753
  :type => :file,
641
- :mode => 0644,
754
+ :mode => "0644",
642
755
  :owner => "service",
643
756
  :group => "service",
644
757
  :desc => "Where individual hosts store and look for their certificate requests."
@@ -646,7 +759,7 @@ EOT
646
759
  :hostcert => {
647
760
  :default => "$certdir/$certname.pem",
648
761
  :type => :file,
649
- :mode => 0644,
762
+ :mode => "0644",
650
763
  :owner => "service",
651
764
  :group => "service",
652
765
  :desc => "Where individual hosts store and look for their certificates."
@@ -654,7 +767,7 @@ EOT
654
767
  :hostprivkey => {
655
768
  :default => "$privatekeydir/$certname.pem",
656
769
  :type => :file,
657
- :mode => 0640,
770
+ :mode => "0640",
658
771
  :owner => "service",
659
772
  :group => "service",
660
773
  :desc => "Where individual hosts store and look for their private key."
@@ -662,7 +775,7 @@ EOT
662
775
  :hostpubkey => {
663
776
  :default => "$publickeydir/$certname.pem",
664
777
  :type => :file,
665
- :mode => 0644,
778
+ :mode => "0644",
666
779
  :owner => "service",
667
780
  :group => "service",
668
781
  :desc => "Where individual hosts store and look for their public key."
@@ -670,14 +783,14 @@ EOT
670
783
  :localcacert => {
671
784
  :default => "$certdir/ca.pem",
672
785
  :type => :file,
673
- :mode => 0644,
786
+ :mode => "0644",
674
787
  :owner => "service",
675
788
  :group => "service",
676
789
  :desc => "Where each client stores the CA certificate."
677
790
  },
678
791
  :ssl_client_ca_auth => {
679
792
  :type => :file,
680
- :mode => 0644,
793
+ :mode => "0644",
681
794
  :owner => "service",
682
795
  :group => "service",
683
796
  :desc => "Certificate authorities who issue server certificates. SSL servers will not be
@@ -687,7 +800,7 @@ EOT
687
800
  },
688
801
  :ssl_server_ca_auth => {
689
802
  :type => :file,
690
- :mode => 0644,
803
+ :mode => "0644",
691
804
  :owner => "service",
692
805
  :group => "service",
693
806
  :desc => "Certificate authorities who issue client certificates. SSL clients will not be
@@ -698,7 +811,7 @@ EOT
698
811
  :hostcrl => {
699
812
  :default => "$ssldir/crl.pem",
700
813
  :type => :file,
701
- :mode => 0644,
814
+ :mode => "0644",
702
815
  :owner => "service",
703
816
  :group => "service",
704
817
  :desc => "Where the host's certificate revocation list can be found.
@@ -737,7 +850,7 @@ EOT
737
850
  :type => :directory,
738
851
  :owner => "service",
739
852
  :group => "service",
740
- :mode => 0755,
853
+ :mode => "0755",
741
854
  :desc => "The root directory for the certificate authority."
742
855
  },
743
856
  :cacert => {
@@ -745,7 +858,7 @@ EOT
745
858
  :type => :file,
746
859
  :owner => "service",
747
860
  :group => "service",
748
- :mode => 0644,
861
+ :mode => "0644",
749
862
  :desc => "The CA certificate."
750
863
  },
751
864
  :cakey => {
@@ -753,7 +866,7 @@ EOT
753
866
  :type => :file,
754
867
  :owner => "service",
755
868
  :group => "service",
756
- :mode => 0640,
869
+ :mode => "0640",
757
870
  :desc => "The CA private key."
758
871
  },
759
872
  :capub => {
@@ -761,7 +874,7 @@ EOT
761
874
  :type => :file,
762
875
  :owner => "service",
763
876
  :group => "service",
764
- :mode => 0644,
877
+ :mode => "0644",
765
878
  :desc => "The CA public key."
766
879
  },
767
880
  :cacrl => {
@@ -769,7 +882,7 @@ EOT
769
882
  :type => :file,
770
883
  :owner => "service",
771
884
  :group => "service",
772
- :mode => 0644,
885
+ :mode => "0644",
773
886
  :desc => "The certificate revocation list (CRL) for the CA. Will be used if present but otherwise ignored.",
774
887
  },
775
888
  :caprivatedir => {
@@ -777,7 +890,7 @@ EOT
777
890
  :type => :directory,
778
891
  :owner => "service",
779
892
  :group => "service",
780
- :mode => 0750,
893
+ :mode => "0750",
781
894
  :desc => "Where the CA stores private certificate information."
782
895
  },
783
896
  :csrdir => {
@@ -785,7 +898,7 @@ EOT
785
898
  :type => :directory,
786
899
  :owner => "service",
787
900
  :group => "service",
788
- :mode => 0755,
901
+ :mode => "0755",
789
902
  :desc => "Where the CA stores certificate requests"
790
903
  },
791
904
  :signeddir => {
@@ -793,7 +906,7 @@ EOT
793
906
  :type => :directory,
794
907
  :owner => "service",
795
908
  :group => "service",
796
- :mode => 0755,
909
+ :mode => "0755",
797
910
  :desc => "Where the CA stores signed certificates."
798
911
  },
799
912
  :capass => {
@@ -801,7 +914,7 @@ EOT
801
914
  :type => :file,
802
915
  :owner => "service",
803
916
  :group => "service",
804
- :mode => 0640,
917
+ :mode => "0640",
805
918
  :desc => "Where the CA stores the password for the private key."
806
919
  },
807
920
  :serial => {
@@ -809,7 +922,7 @@ EOT
809
922
  :type => :file,
810
923
  :owner => "service",
811
924
  :group => "service",
812
- :mode => 0644,
925
+ :mode => "0644",
813
926
  :desc => "Where the serial number for certificates is stored."
814
927
  },
815
928
  :autosign => {
@@ -863,7 +976,7 @@ EOT
863
976
  :cert_inventory => {
864
977
  :default => "$cadir/inventory.txt",
865
978
  :type => :file,
866
- :mode => 0644,
979
+ :mode => "0644",
867
980
  :owner => "service",
868
981
  :group => "service",
869
982
  :desc => "The inventory file. This is a text file to which the CA writes a
@@ -929,6 +1042,44 @@ EOT
929
1042
  http://docs.puppetlabs.com/puppet/latest/reference/environments.html",
930
1043
  :deprecated => :allowed_on_commandline,
931
1044
  },
1045
+ :default_manifest => {
1046
+ :default => "./manifests",
1047
+ :type => :string,
1048
+ :desc => "The default main manifest for directory environments. Any environment that
1049
+ doesn't set the `manifest` setting in its `environment.conf` file will use
1050
+ this manifest.
1051
+
1052
+ This setting's value can be an absolute or relative path. An absolute path
1053
+ will make all environments default to the same main manifest; a relative
1054
+ path will allow each environment to use its own manifest, and Puppet will
1055
+ resolve the path relative to each environment's main directory.
1056
+
1057
+ In either case, the path can point to a single file or to a directory of
1058
+ manifests to be evaluated in alphabetical order.",
1059
+ :hook => proc do |value|
1060
+ uninterpolated_value = self.value(true)
1061
+ if uninterpolated_value =~ /\$environment/ || value =~ /\$environment/ then
1062
+ raise(Puppet::Settings::ValidationError,
1063
+ "You cannot interpolate '$environment' within the 'default_manifest' setting.")
1064
+ end
1065
+ end
1066
+ },
1067
+ :disable_per_environment_manifest => {
1068
+ :default => false,
1069
+ :type => :boolean,
1070
+ :desc => "Whether to disallow an environment-specific main manifest. When set
1071
+ to `true`, Puppet will use the manifest specified in the `default_manifest` setting
1072
+ for all environments. If an environment specifies a different main manifest in its
1073
+ `environment.conf` file, catalog requests for that environment will fail with an error.
1074
+
1075
+ This setting requires `default_manifest` to be set to an absolute path.",
1076
+ :hook => proc do |value|
1077
+ if value && !Pathname.new(Puppet[:default_manifest]).absolute?
1078
+ raise(Puppet::Settings::ValidationError,
1079
+ "The 'default_manifest' setting must be set to an absolute path when 'disable_per_environment_manifest' is true")
1080
+ end
1081
+ end,
1082
+ },
932
1083
  :code => {
933
1084
  :default => "",
934
1085
  :desc => "Code to parse directly. This is essentially only used
@@ -940,18 +1091,25 @@ EOT
940
1091
  :type => :file,
941
1092
  :owner => "service",
942
1093
  :group => "service",
943
- :mode => 0660,
944
- :desc => "Where puppet master logs. This is generally not used,
945
- since syslog is the default log destination."
1094
+ :mode => "0660",
1095
+ :desc => "This file is literally never used, although Puppet may create it
1096
+ as an empty file. For more context, see the `puppetdlog` setting and
1097
+ puppet master's `--logdest` command line option.
1098
+
1099
+ This setting is deprecated and will be removed in a future version of Puppet.",
1100
+ :deprecated => :completely
946
1101
  },
947
1102
  :masterhttplog => {
948
1103
  :default => "$logdir/masterhttp.log",
949
1104
  :type => :file,
950
1105
  :owner => "service",
951
1106
  :group => "service",
952
- :mode => 0660,
1107
+ :mode => "0660",
953
1108
  :create => true,
954
- :desc => "Where the puppet master web server logs."
1109
+ :desc => "Where the puppet master web server saves its access log. This is
1110
+ only used when running a WEBrick puppet master. When puppet master is
1111
+ running under a Rack server like Passenger, that web server will have
1112
+ its own logging behavior."
955
1113
  },
956
1114
  :masterport => {
957
1115
  :default => 8140,
@@ -971,7 +1129,7 @@ EOT
971
1129
  :bucketdir => {
972
1130
  :default => "$vardir/bucket",
973
1131
  :type => :directory,
974
- :mode => 0750,
1132
+ :mode => "0750",
975
1133
  :owner => "service",
976
1134
  :group => "service",
977
1135
  :desc => "Where FileBucket files are stored."
@@ -1049,14 +1207,14 @@ EOT
1049
1207
  :type => :directory,
1050
1208
  :owner => "service",
1051
1209
  :group => "service",
1052
- :mode => "750",
1210
+ :mode => "0750",
1053
1211
  :desc => "The directory in which YAML data is stored, usually in a subdirectory."},
1054
1212
  :server_datadir => {
1055
1213
  :default => "$vardir/server_data",
1056
1214
  :type => :directory,
1057
1215
  :owner => "service",
1058
1216
  :group => "service",
1059
- :mode => "750",
1217
+ :mode => "0750",
1060
1218
  :desc => "The directory in which serialized data is stored, usually in a subdirectory."},
1061
1219
  :reports => {
1062
1220
  :default => "store",
@@ -1077,7 +1235,7 @@ EOT
1077
1235
  :reportdir => {
1078
1236
  :default => "$vardir/reports",
1079
1237
  :type => :directory,
1080
- :mode => 0750,
1238
+ :mode => "0750",
1081
1239
  :owner => "service",
1082
1240
  :group => "service",
1083
1241
  :desc => "The directory in which to store reports. Each node gets
@@ -1107,7 +1265,7 @@ EOT
1107
1265
  :rrddir => {
1108
1266
  :type => :directory,
1109
1267
  :default => "$vardir/rrd",
1110
- :mode => 0750,
1268
+ :mode => "0750",
1111
1269
  :owner => "service",
1112
1270
  :group => "service",
1113
1271
  :desc => "The directory where RRD database files are stored.
@@ -1126,7 +1284,7 @@ EOT
1126
1284
  :devicedir => {
1127
1285
  :default => "$vardir/devices",
1128
1286
  :type => :directory,
1129
- :mode => "750",
1287
+ :mode => "0750",
1130
1288
  :desc => "The root directory of devices' $vardir.",
1131
1289
  },
1132
1290
  :deviceconfig => {
@@ -1161,13 +1319,13 @@ EOT
1161
1319
  :default => "$statedir/localconfig",
1162
1320
  :type => :file,
1163
1321
  :owner => "root",
1164
- :mode => 0660,
1322
+ :mode => "0660",
1165
1323
  :desc => "Where puppet agent caches the local configuration. An
1166
1324
  extension indicating the cache format is added automatically."},
1167
1325
  :statefile => {
1168
1326
  :default => "$statedir/state.yaml",
1169
1327
  :type => :file,
1170
- :mode => 0660,
1328
+ :mode => "0660",
1171
1329
  :desc => "Where puppet agent and puppet master store state associated
1172
1330
  with the running configuration. In the case of puppet master,
1173
1331
  this file reflects the state discovered through interacting
@@ -1176,20 +1334,20 @@ EOT
1176
1334
  :clientyamldir => {
1177
1335
  :default => "$vardir/client_yaml",
1178
1336
  :type => :directory,
1179
- :mode => "750",
1337
+ :mode => "0750",
1180
1338
  :desc => "The directory in which client-side YAML data is stored."
1181
1339
  },
1182
1340
  :client_datadir => {
1183
1341
  :default => "$vardir/client_data",
1184
1342
  :type => :directory,
1185
- :mode => "750",
1343
+ :mode => "0750",
1186
1344
  :desc => "The directory in which serialized data is stored on the client."
1187
1345
  },
1188
1346
  :classfile => {
1189
1347
  :default => "$statedir/classes.txt",
1190
1348
  :type => :file,
1191
1349
  :owner => "root",
1192
- :mode => 0640,
1350
+ :mode => "0640",
1193
1351
  :desc => "The file in which puppet agent stores a list of the classes
1194
1352
  associated with the retrieved configuration. Can be loaded in
1195
1353
  the separate `puppet` executable using the `--loadclasses`
@@ -1198,15 +1356,26 @@ EOT
1198
1356
  :default => "$statedir/resources.txt",
1199
1357
  :type => :file,
1200
1358
  :owner => "root",
1201
- :mode => 0640,
1359
+ :mode => "0640",
1202
1360
  :desc => "The file in which puppet agent stores a list of the resources
1203
1361
  associated with the retrieved configuration." },
1204
1362
  :puppetdlog => {
1205
1363
  :default => "$logdir/puppetd.log",
1206
1364
  :type => :file,
1207
1365
  :owner => "root",
1208
- :mode => 0640,
1209
- :desc => "The log file for puppet agent. This is generally not used."
1366
+ :mode => "0640",
1367
+ :desc => "The fallback log file. This is only used when the `--logdest` option
1368
+ is not specified AND Puppet is running on an operating system where both
1369
+ the POSIX syslog service and the Windows Event Log are unavailable. (Currently,
1370
+ no supported operating systems match that description.)
1371
+
1372
+ Despite the name, both puppet agent and puppet master will use this file
1373
+ as the fallback logging destination.
1374
+
1375
+ For control over logging destinations, see the `--logdest` command line
1376
+ option in the manual pages for puppet master, puppet agent, and puppet
1377
+ apply. You can see man pages by running `puppet <SUBCOMMAND> --help`,
1378
+ or read them online at http://docs.puppetlabs.com/references/latest/man/."
1210
1379
  },
1211
1380
  :server => {
1212
1381
  :default => "puppet",
@@ -1218,7 +1387,7 @@ EOT
1218
1387
  :desc => "Whether the server will search for SRV records in DNS for the current domain.",
1219
1388
  },
1220
1389
  :srv_domain => {
1221
- :default => "#{Puppet::Settings.domain_fact}",
1390
+ :default => lambda { Puppet::Settings.domain_fact },
1222
1391
  :desc => "The domain which will be queried to find the SRV records of servers to use.",
1223
1392
  },
1224
1393
  :ignoreschedules => {
@@ -1407,7 +1576,7 @@ EOT
1407
1576
  :clientbucketdir => {
1408
1577
  :default => "$vardir/clientbucket",
1409
1578
  :type => :directory,
1410
- :mode => 0750,
1579
+ :mode => "0750",
1411
1580
  :desc => "Where FileBucket files are stored locally."
1412
1581
  },
1413
1582
  :configtimeout => {
@@ -1441,13 +1610,13 @@ EOT
1441
1610
  :lastrunfile => {
1442
1611
  :default => "$statedir/last_run_summary.yaml",
1443
1612
  :type => :file,
1444
- :mode => 0644,
1613
+ :mode => "0644",
1445
1614
  :desc => "Where puppet agent stores the last run report summary in yaml format."
1446
1615
  },
1447
1616
  :lastrunreport => {
1448
1617
  :default => "$statedir/last_run_report.yaml",
1449
1618
  :type => :file,
1450
- :mode => 0640,
1619
+ :mode => "0640",
1451
1620
  :desc => "Where puppet agent stores the last run report in yaml format."
1452
1621
  },
1453
1622
  :graph => {
@@ -1593,7 +1762,7 @@ EOT
1593
1762
  },
1594
1763
 
1595
1764
  :reportfrom => {
1596
- :default => "report@" + [Facter["hostname"].value,Facter["domain"].value].join("."),
1765
+ :default => lambda { "report@#{Puppet::Settings.default_certname.downcase}" },
1597
1766
  :desc => "The 'from' email address for the reports.",
1598
1767
  },
1599
1768
 
@@ -1606,7 +1775,7 @@ EOT
1606
1775
  :desc => "The TCP port through which to send email reports.",
1607
1776
  },
1608
1777
  :smtphelo => {
1609
- :default => Facter["fqdn"].value,
1778
+ :default => lambda { Facter.value 'fqdn' },
1610
1779
  :desc => "The name by which we identify ourselves in SMTP HELO for reports.
1611
1780
  If you send to a smtpserver which does strict HELO checking (as with Postfix's
1612
1781
  `smtpd_helo_restrictions` access controls), you may need to ensure this resolves.",
@@ -1618,7 +1787,7 @@ EOT
1618
1787
  :dblocation => {
1619
1788
  :default => "$statedir/clientconfigs.sqlite3",
1620
1789
  :type => :file,
1621
- :mode => 0660,
1790
+ :mode => "0660",
1622
1791
  :owner => "service",
1623
1792
  :group => "service",
1624
1793
  :desc => "The sqlite database file. #{STORECONFIGS_ONLY}"
@@ -1669,7 +1838,7 @@ EOT
1669
1838
  :railslog => {
1670
1839
  :default => "$logdir/rails.log",
1671
1840
  :type => :file,
1672
- :mode => 0600,
1841
+ :mode => "0600",
1673
1842
  :owner => "service",
1674
1843
  :group => "service",
1675
1844
  :desc => "Where Rails-specific logs are sent. #{STORECONFIGS_ONLY}"
@@ -1868,7 +2037,7 @@ EOT
1868
2037
  language/'.pp' files). Available choices are `current` (the default)
1869
2038
  and `future`.
1870
2039
 
1871
- The `curent` parser means that the released version of the parser should
2040
+ The `current` parser means that the released version of the parser should
1872
2041
  be used.
1873
2042
 
1874
2043
  The `future` parser is a "time travel to the future" allowing early
@@ -1878,72 +2047,28 @@ EOT
1878
2047
  Available Since Puppet 3.2.
1879
2048
  EOT
1880
2049
  },
1881
- :evaluator => {
1882
- :default => "future",
1883
- :hook => proc do |value|
1884
- if !['future', 'current'].include?(value)
1885
- raise "evaluator can only be set to 'future' or 'current', got '#{value}'"
1886
- end
1887
- end,
1888
- :desc => <<-'EOT'
1889
- Which evaluator to use when compiling Puppet manifests. Valid values
1890
- are `current` and `future` (the default).
1891
-
1892
- **Note:** This setting is only used when `parser = future`. It allows
1893
- testers to turn off the `future` evaluator when doing detailed tests and
1894
- comparisons of the new compilation system.
1895
-
1896
- Evaluation is the second stage of catalog compilation. After the parser
1897
- converts a manifest to a model of expressions, the evaluator processes
1898
- each expression. (For example, a resource declaration signals the
1899
- evaluator to add a resource to the catalog).
1900
-
1901
- The `future` parser and evaluator are slated to become default in Puppet
1902
- 4. Their purpose is to add new features and improve consistency
1903
- and reliability.
1904
-
1905
- Available Since Puppet 3.5.
1906
- EOT
1907
- },
1908
- :biff => {
1909
- :default => false,
1910
- :type => :boolean,
1911
- :hook => proc do |value|
1912
- if Puppet.settings[:parser] != 'future'
1913
- Puppet.settings.override_default(:parser, 'future')
1914
- end
1915
- if Puppet.settings[:evaluator] != 'future'
1916
- Puppet.settings.override_default(:evaluator, 'future')
1917
- end
1918
- end,
1919
- :desc => <<-EOT
1920
- Turns on Biff the catalog builder, future parser, and future evaluator.
1921
- This is an experimental feature - and this setting may go away before
1922
- release of Pupet 3.6.
1923
- EOT
1924
- },
1925
2050
  :max_errors => {
1926
2051
  :default => 10,
1927
2052
  :desc => <<-'EOT'
1928
2053
  Sets the max number of logged/displayed parser validation errors in case
1929
- multiple errors have been detected. A value of 0 is the same as value 1.
1930
- The count is per manifest.
2054
+ multiple errors have been detected. A value of 0 is the same as a value of 1; a
2055
+ minimum of one error is always raised. The count is per manifest.
1931
2056
  EOT
1932
2057
  },
1933
2058
  :max_warnings => {
1934
2059
  :default => 10,
1935
2060
  :desc => <<-'EOT'
1936
2061
  Sets the max number of logged/displayed parser validation warnings in
1937
- case multiple errors have been detected. A value of 0 is the same as
1938
- value 1. The count is per manifest.
2062
+ case multiple warnings have been detected. A value of 0 blocks logging of
2063
+ warnings. The count is per manifest.
1939
2064
  EOT
1940
2065
  },
1941
2066
  :max_deprecations => {
1942
2067
  :default => 10,
1943
2068
  :desc => <<-'EOT'
1944
2069
  Sets the max number of logged/displayed parser validation deprecation
1945
- warnings in case multiple errors have been detected. A value of 0 is the
1946
- same as value 1. The count is per manifest.
2070
+ warnings in case multiple deprecation warnings have been detected. A value of 0
2071
+ blocks the logging of deprecation warnings. The count is per manifest.
1947
2072
  EOT
1948
2073
  },
1949
2074
  :strict_variables => {