puppet 4.0.0.rc1-x86-mingw32 → 4.0.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 (122) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +11 -6
  3. data/Gemfile +1 -1
  4. data/conf/environment.conf +4 -2
  5. data/ext/build_defaults.yaml +3 -3
  6. data/ext/debian/control +2 -2
  7. data/ext/project_data.yaml +1 -1
  8. data/ext/rack/config.ru +1 -0
  9. data/ext/redhat/client.sysconfig +1 -1
  10. data/ext/redhat/puppet.spec.erb +2 -2
  11. data/ext/systemd/puppet.service +1 -0
  12. data/install.rb +2 -2
  13. data/lib/puppet/application/device.rb +22 -5
  14. data/lib/puppet/data_providers.rb +7 -4
  15. data/lib/puppet/data_providers/data_adapter.rb +6 -1
  16. data/lib/puppet/data_providers/data_function_support.rb +17 -4
  17. data/lib/puppet/data_providers/function_env_data_provider.rb +1 -1
  18. data/lib/puppet/data_providers/function_module_data_provider.rb +14 -19
  19. data/lib/puppet/defaults.rb +43 -16
  20. data/lib/puppet/error.rb +4 -0
  21. data/lib/puppet/pops/evaluator/evaluator_impl.rb +33 -4
  22. data/lib/puppet/pops/evaluator/runtime3_support.rb +5 -1
  23. data/lib/puppet/pops/parser/egrammar.ra +2 -0
  24. data/lib/puppet/pops/parser/eparser.rb +732 -724
  25. data/lib/puppet/pops/parser/heredoc_support.rb +1 -1
  26. data/lib/puppet/pops/parser/lexer2.rb +19 -21
  27. data/lib/puppet/provider/macauthorization/macauthorization.rb +1 -1
  28. data/lib/puppet/provider/nameservice/directoryservice.rb +1 -1
  29. data/lib/puppet/provider/package/appdmg.rb +1 -1
  30. data/lib/puppet/provider/package/gem.rb +19 -6
  31. data/lib/puppet/provider/package/pkgdmg.rb +1 -1
  32. data/lib/puppet/provider/package/puppet_gem.rb +17 -0
  33. data/lib/puppet/provider/service/launchd.rb +1 -1
  34. data/lib/puppet/provider/user/directoryservice.rb +2 -2
  35. data/lib/puppet/settings.rb +1 -1
  36. data/lib/puppet/util/errors.rb +4 -2
  37. data/lib/puppet/util/network_device/config.rb +5 -0
  38. data/lib/puppet/util/run_mode.rb +28 -11
  39. data/lib/puppet/util/windows/registry.rb +3 -3
  40. data/lib/puppet/vendor/deep_merge/PUPPET_README.md +6 -0
  41. data/lib/puppet/vendor/load_plist.rb +1 -0
  42. data/lib/puppet/vendor/plist/CHANGELOG +82 -0
  43. data/lib/puppet/vendor/plist/MIT-LICENSE +21 -0
  44. data/lib/puppet/vendor/plist/PUPPET_README.md +6 -0
  45. data/lib/puppet/vendor/plist/README +36 -0
  46. data/lib/puppet/vendor/plist/Rakefile +144 -0
  47. data/lib/puppet/vendor/plist/docs/USAGE +104 -0
  48. data/lib/puppet/vendor/plist/docs/jamis-template.rb +591 -0
  49. data/lib/puppet/vendor/plist/lib/plist.rb +22 -0
  50. data/lib/puppet/vendor/plist/lib/plist/generator.rb +224 -0
  51. data/lib/puppet/vendor/plist/lib/plist/parser.rb +225 -0
  52. data/lib/puppet/vendor/plist/test/assets/AlbumData.xml +203 -0
  53. data/lib/puppet/vendor/plist/test/assets/Cookies.plist +104 -0
  54. data/lib/puppet/vendor/plist/test/assets/commented.plist +9 -0
  55. data/lib/puppet/vendor/plist/test/assets/example_data.bin +0 -0
  56. data/lib/puppet/vendor/plist/test/assets/example_data.jpg +0 -0
  57. data/lib/puppet/vendor/plist/test/assets/example_data.plist +259 -0
  58. data/lib/puppet/vendor/plist/test/assets/test_data_elements.plist +24 -0
  59. data/lib/puppet/vendor/plist/test/assets/test_empty_key.plist +13 -0
  60. data/lib/puppet/vendor/plist/test/test_data_elements.rb +115 -0
  61. data/lib/puppet/vendor/plist/test/test_generator.rb +59 -0
  62. data/lib/puppet/vendor/plist/test/test_generator_basic_types.rb +58 -0
  63. data/lib/puppet/vendor/plist/test/test_generator_collections.rb +82 -0
  64. data/lib/puppet/vendor/plist/test/test_parser.rb +90 -0
  65. data/lib/puppet/version.rb +1 -1
  66. data/man/man5/puppet.conf.5 +5 -13
  67. data/man/man8/extlookup2hiera.8 +1 -1
  68. data/man/man8/puppet-agent.8 +1 -1
  69. data/man/man8/puppet-apply.8 +1 -1
  70. data/man/man8/puppet-ca.8 +1 -1
  71. data/man/man8/puppet-catalog.8 +1 -1
  72. data/man/man8/puppet-cert.8 +1 -1
  73. data/man/man8/puppet-certificate.8 +1 -1
  74. data/man/man8/puppet-certificate_request.8 +1 -1
  75. data/man/man8/puppet-certificate_revocation_list.8 +1 -1
  76. data/man/man8/puppet-config.8 +1 -1
  77. data/man/man8/puppet-describe.8 +1 -1
  78. data/man/man8/puppet-device.8 +1 -1
  79. data/man/man8/puppet-doc.8 +1 -1
  80. data/man/man8/puppet-epp.8 +1 -1
  81. data/man/man8/puppet-facts.8 +1 -1
  82. data/man/man8/puppet-file.8 +1 -1
  83. data/man/man8/puppet-filebucket.8 +1 -1
  84. data/man/man8/puppet-help.8 +1 -1
  85. data/man/man8/puppet-inspect.8 +1 -1
  86. data/man/man8/puppet-key.8 +1 -1
  87. data/man/man8/puppet-man.8 +1 -1
  88. data/man/man8/puppet-master.8 +1 -1
  89. data/man/man8/puppet-module.8 +1 -1
  90. data/man/man8/puppet-node.8 +1 -1
  91. data/man/man8/puppet-parser.8 +1 -1
  92. data/man/man8/puppet-plugin.8 +1 -1
  93. data/man/man8/puppet-report.8 +1 -1
  94. data/man/man8/puppet-resource.8 +1 -1
  95. data/man/man8/puppet-resource_type.8 +1 -1
  96. data/man/man8/puppet-status.8 +1 -1
  97. data/man/man8/puppet.8 +1 -1
  98. data/spec/fixtures/unit/functions/lookup/environments/production/lib/puppet/functions/environment/data.rb +8 -6
  99. data/spec/fixtures/unit/functions/lookup/environments/production/modules/abc/lib/puppet/functions/abc/data.rb +4 -4
  100. data/spec/fixtures/unit/functions/lookup/environments/production/modules/bad_data/lib/puppet/bindings/bad_data/default.rb +9 -0
  101. data/spec/fixtures/unit/functions/lookup/environments/production/modules/bad_data/lib/puppet/functions/bad_data/data.rb +6 -0
  102. data/spec/fixtures/unit/functions/lookup/environments/production/modules/bad_data/manifests/init.pp +3 -0
  103. data/spec/fixtures/unit/functions/lookup/environments/production/modules/bca/lib/puppet/bindings/bca/default.rb +9 -0
  104. data/spec/fixtures/unit/functions/lookup/environments/production/modules/bca/lib/puppet/functions/bca/data.rb +9 -0
  105. data/spec/fixtures/unit/functions/lookup/environments/production/modules/bca/manifests/init.pp +2 -0
  106. data/spec/fixtures/unit/functions/lookup/environments/production/modules/no_provider/manifests/init.pp +2 -0
  107. data/spec/integration/provider/yumrepo_spec.rb +127 -0
  108. data/spec/unit/application/device_spec.rb +52 -14
  109. data/spec/unit/functions/lookup_spec.rb +95 -55
  110. data/spec/unit/parser/functions/create_resources_spec.rb +1 -1
  111. data/spec/unit/pops/binder/injector_spec.rb +0 -18
  112. data/spec/unit/pops/parser/lexer2_spec.rb +26 -16
  113. data/spec/unit/pops/parser/parse_heredoc_spec.rb +21 -0
  114. data/spec/unit/pops/validator/validator_spec.rb +2 -3
  115. data/spec/unit/provider/macauthorization_spec.rb +1 -1
  116. data/spec/unit/provider/package/gem_spec.rb +201 -139
  117. data/spec/unit/provider/package/puppet_gem_spec.rb +67 -0
  118. data/spec/unit/provider/user/directoryservice_spec.rb +1 -1
  119. data/spec/unit/util/network_device/config_spec.rb +6 -0
  120. data/spec/unit/util/run_mode_spec.rb +26 -26
  121. data/spec/unit/util/windows/registry_spec.rb +4 -3
  122. metadata +3016 -2994
@@ -64,7 +64,7 @@ module Puppet::Pops::Parser::HeredocSupport
64
64
  # and it should start scanning after the first found \n (or if not found == error).
65
65
 
66
66
  if ctx[:newline_jump]
67
- scn.pos = lexing_context[:newline_jump]
67
+ scn.pos = ctx[:newline_jump]
68
68
  else
69
69
  scn.scan_until(/\n/) || lex_error("Heredoc without any following lines of text")
70
70
  end
@@ -161,9 +161,9 @@ class Puppet::Pops::Parser::Lexer2
161
161
  # a letter a-z and may not contain dashes (\w includes letters, digits and _).
162
162
  #
163
163
  PATTERN_CLASSREF = %r{((::){0,1}[A-Z][\w]*)+}
164
- PATTERN_NAME = %r{((::)?[a-z][\w]*)(::[a-z][\w]*)*}
164
+ PATTERN_NAME = %r{^((::)?[a-z][\w]*)(::[a-z][\w]*)*$}
165
165
 
166
- PATTERN_BARE_WORD = %r{[a-z_](?:[\w-]*[\w])?}
166
+ PATTERN_BARE_WORD = %r{((?:::){0,1}(?:[a-z_](?:[\w-]*[\w])?))+}
167
167
 
168
168
  PATTERN_DOLLAR_VAR = %r{\$(::)?(\w+::)*\w+}
169
169
  PATTERN_NUMBER = %r{\b(?:0[xX][0-9A-Fa-f]+|0?\d+(?:\.\d+)?(?:[eE]-?\d+)?)\b}
@@ -536,10 +536,13 @@ class Puppet::Pops::Parser::Lexer2
536
536
  lex_error("Illegal fully qualified class reference")
537
537
  end
538
538
  else
539
- # NAME or error
540
- value = scn.scan(PATTERN_NAME)
539
+ value = scn.scan(PATTERN_BARE_WORD)
541
540
  if value
542
- emit_completed([:NAME, value.freeze, scn.pos-before], before)
541
+ if value =~ PATTERN_NAME
542
+ emit_completed([:NAME, value.freeze, scn.pos-before], before)
543
+ else
544
+ emit_completed([:WORD, value.freeze, scn.pos - before], before)
545
+ end
543
546
  else
544
547
  # move to faulty position ('::' was ok)
545
548
  scn.pos = scn.pos + 2
@@ -581,25 +584,20 @@ class Puppet::Pops::Parser::Lexer2
581
584
 
582
585
  when 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
583
586
  'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '_'
584
- value = scn.scan(PATTERN_NAME)
585
- # NAME or false start because followed by hyphen(s), underscore or word
586
- if value && !scn.match?(/^-+\w/)
587
+
588
+ value = scn.scan(PATTERN_BARE_WORD)
589
+ if value && value =~ PATTERN_NAME
587
590
  emit_completed(KEYWORDS[value] || [:NAME, value.freeze, scn.pos - before], before)
591
+ elsif value
592
+ emit_completed([:WORD, value.freeze, scn.pos - before], before)
588
593
  else
589
- # Restart and check entire pattern (for ease of detecting non allowed trailing hyphen)
590
- scn.pos = before
591
- value = scn.scan(PATTERN_BARE_WORD)
592
- # If the WORD continues with :: it must be a correct fully qualified name
593
- if value && !(fully_qualified = scn.match?(/::/))
594
- emit_completed([:WORD, value.freeze, scn.pos - before], before)
594
+ # move to faulty position ([a-z_] was ok)
595
+ scn.pos = scn.pos + 1
596
+ fully_qualified = scn.match?(/::/)
597
+ if fully_qualified
598
+ lex_error("Illegal fully qualified name")
595
599
  else
596
- # move to faulty position ([a-z_] was ok)
597
- scn.pos = scn.pos + 1
598
- if fully_qualified
599
- lex_error("Illegal fully qualified name")
600
- else
601
- lex_error("Illegal name or bare word")
602
- end
600
+ lex_error("Illegal name or bare word")
603
601
  end
604
602
  end
605
603
 
@@ -1,5 +1,5 @@
1
1
  require 'facter'
2
- require 'facter/util/plist'
2
+ require 'plist'
3
3
  require 'puppet'
4
4
  require 'tempfile'
5
5
 
@@ -1,6 +1,6 @@
1
1
  require 'puppet'
2
2
  require 'puppet/provider/nameservice'
3
- require 'facter/util/plist'
3
+ require 'plist'
4
4
  require 'fileutils'
5
5
 
6
6
  class Puppet::Provider::NameService::DirectoryService < Puppet::Provider::NameService
@@ -50,7 +50,7 @@ Puppet::Type.type(:package).provide(:appdmg, :parent => Puppet::Provider::Packag
50
50
 
51
51
  def self.installpkgdmg(source, name)
52
52
  require 'open-uri'
53
- require 'facter/util/plist'
53
+ require 'plist'
54
54
  cached_source = source
55
55
  tmpdir = Dir.mktmpdir
56
56
  begin
@@ -8,11 +8,12 @@ Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package d
8
8
  interpreted as the path to a local gem file. If source is not present at all,
9
9
  the gem will be installed from the default gem repositories.
10
10
 
11
- This provider supports the `install_options` attribute, which allows command-line flags to be passed to the gem command.
11
+ This provider supports the `install_options` and `uninstall_options` attributes,
12
+ which allow command-line flags to be passed to the gem command.
12
13
  These options should be specified as a string (e.g. '--flag'), a hash (e.g. {'--flag' => 'value'}),
13
14
  or an array where each element is either a string or a hash."
14
15
 
15
- has_feature :versionable, :install_options
16
+ has_feature :versionable, :install_options, :uninstall_options
16
17
 
17
18
  commands :gemcmd => "gem"
18
19
 
@@ -54,12 +55,12 @@ Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package d
54
55
  # so we don't need to check for them
55
56
 
56
57
  if desc =~ /^(\S+)\s+\((.+)\)/
57
- name = $1
58
+ gem_name = $1
58
59
  versions = $2.split(/,\s*/)
59
60
  {
60
- :name => name,
61
+ :name => gem_name,
61
62
  :ensure => versions.map{|v| v.split[0]},
62
- :provider => :gem
63
+ :provider => name
63
64
  }
64
65
  else
65
66
  Puppet.warning "Could not match #{desc}" unless desc.chomp.empty?
@@ -122,7 +123,15 @@ Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package d
122
123
  end
123
124
 
124
125
  def uninstall
125
- gemcmd "uninstall", "-x", "-a", resource[:name]
126
+ command = [command(:gemcmd), "uninstall"]
127
+ command << "--executables" << "--all" << resource[:name]
128
+
129
+ command += uninstall_options if resource[:uninstall_options]
130
+
131
+ output = execute(command)
132
+
133
+ # Apparently some stupid gem versions don't exit non-0 on failure
134
+ self.fail "Could not uninstall: #{output.chomp}" if output.include?("ERROR")
126
135
  end
127
136
 
128
137
  def update
@@ -132,4 +141,8 @@ Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package d
132
141
  def install_options
133
142
  join_options(resource[:install_options])
134
143
  end
144
+
145
+ def uninstall_options
146
+ join_options(resource[:uninstall_options])
147
+ end
135
148
  end
@@ -9,7 +9,7 @@
9
9
  # in /var/db/.puppet_pkgdmg_installed_<name>
10
10
 
11
11
  require 'puppet/provider/package'
12
- require 'facter/util/plist'
12
+ require 'plist'
13
13
  require 'puppet/util/http_proxy'
14
14
 
15
15
  Puppet::Type.type(:package).provide :pkgdmg, :parent => Puppet::Provider::Package do
@@ -0,0 +1,17 @@
1
+ require 'puppet/provider/package'
2
+
3
+ Puppet::Type.type(:package).provide :puppet_gem, :parent => :gem do
4
+ desc "Puppet Ruby Gem support. This provider is useful for managing
5
+ gems needed by the ruby provided in the puppet-agent package."
6
+
7
+ has_feature :versionable, :install_options, :uninstall_options
8
+
9
+ if Puppet.features.microsoft_windows?
10
+ # On windows, we put our ruby ahead of anything that already
11
+ # existed on the system PATH. This means that we do not need to
12
+ # sort out the absolute path.
13
+ commands :gemcmd => "gem"
14
+ else
15
+ commands :gemcmd => "/opt/puppetlabs/puppet/bin/gem"
16
+ end
17
+ end
@@ -1,4 +1,4 @@
1
- require 'facter/util/plist'
1
+ require 'plist'
2
2
  Puppet::Type.type(:service).provide :launchd, :parent => :base do
3
3
  desc <<-'EOT'
4
4
  This provider manages jobs with `launchd`, which is the default service
@@ -1,5 +1,5 @@
1
1
  require 'puppet'
2
- require 'facter/util/plist'
2
+ require 'plist'
3
3
  require 'base64'
4
4
 
5
5
  Puppet::Type.type(:user).provide :directoryservice do
@@ -175,7 +175,7 @@ Puppet::Type.type(:user).provide :directoryservice do
175
175
  end
176
176
 
177
177
  # The plist embedded in the ShadowHashData key is a binary plist. The
178
- # facter/util/plist library doesn't read binary plists, so we need to
178
+ # plist library doesn't read binary plists, so we need to
179
179
  # extract the binary plist, convert it to XML, and return it.
180
180
  def self.get_embedded_binary_plist(shadow_hash_data)
181
181
  embedded_binary_plist = Array(shadow_hash_data['dsAttrTypeNative:ShadowHashData'][0].delete(' ')).pack('H*')
@@ -1014,7 +1014,7 @@ Generated on #{Time.now}.
1014
1014
  # --config)
1015
1015
  # 2. If we're running as a root process, use the system puppet.conf
1016
1016
  # (usually /etc/puppetlabs/puppet/puppet.conf)
1017
- # 3. Otherwise, use the user puppet.conf (usually ~/.puppet/puppet.conf)
1017
+ # 3. Otherwise, use the user puppet.conf (usually ~/.puppetlabs/etc/puppet/puppet.conf)
1018
1018
  #
1019
1019
  # @api private
1020
1020
  # @todo this code duplicates {Puppet::Util::RunMode#which_dir} as described
@@ -14,7 +14,7 @@ module Puppet::Util::Errors
14
14
  # Add line and file info to the supplied exception if info is available from
15
15
  # this object, is appropriately populated and the supplied exception supports
16
16
  # it. When other is supplied, the backtrace will be copied to the error
17
- # object.
17
+ # object and the 'original' will be dropped from the error.
18
18
  #
19
19
  # @param error [Exception] exception that is populated with info
20
20
  # @param other [Exception] original exception, source of backtrace info
@@ -25,7 +25,9 @@ module Puppet::Util::Errors
25
25
  error.original ||= other if error.respond_to?(:original=)
26
26
 
27
27
  error.set_backtrace(other.backtrace) if other and other.respond_to?(:backtrace)
28
-
28
+ # It is not meaningful to keep the wrapped exception since its backtrace has already
29
+ # been adopted by the error. (The instance variable is private for good reasons).
30
+ error.instance_variable_set(:@original, nil)
29
31
  error
30
32
  end
31
33
 
@@ -82,6 +82,11 @@ class Puppet::Util::NetworkDevice::Config
82
82
  when "type"
83
83
  device.provider = value
84
84
  when "url"
85
+ begin
86
+ URI.parse(value)
87
+ rescue URI::InvalidURIError
88
+ raise Puppet::Error, "#{value} is an invalid url"
89
+ end
85
90
  device.url = value
86
91
  when "debug"
87
92
  device.options[:debug] = true
@@ -1,4 +1,5 @@
1
1
  require 'etc'
2
+ require 'fileutils'
2
3
 
3
4
  module Puppet
4
5
  module Util
@@ -49,51 +50,67 @@ module Puppet
49
50
  # @todo this code duplicates {Puppet::Settings#which\_configuration\_file}
50
51
  # as described in {http://projects.puppetlabs.com/issues/16637 #16637}
51
52
  def which_dir( system, user )
52
- File.expand_path(if Puppet.features.root? then system else user end)
53
+ if Puppet.features.root?
54
+ File.expand_path(system)
55
+ else
56
+ # Starting with puppet 4 and AIO packaging, AIO introduced new paths for
57
+ # both root and non-root users. The paths used by the root user are created
58
+ # by packaging, so no special action is required in the code.
59
+ #
60
+ # However, for non-root users, these new paths introduce deep paths (see below
61
+ # in the two RunMode sub-classes). Since puppet doesn't create parent directories
62
+ # for directories in the settings catalog, we take this opportunity to create
63
+ # those parent directories. (Note that pre-AIO this code would have had to do the
64
+ # same thing, except that everything was under ~/.puppet which was confdir so was
65
+ # created.)
66
+ expanded_user = File.expand_path(user)
67
+ FileUtils.mkdir_p(File.dirname(expanded_user)) if File.exists?(File.expand_path('~'))
68
+ expanded_user
69
+ end
53
70
  end
54
71
  end
55
72
 
56
73
  class UnixRunMode < RunMode
57
74
  def conf_dir
58
- which_dir("/etc/puppetlabs/puppet", "~/.puppet")
75
+ which_dir("/etc/puppetlabs/puppet", "~/.puppetlabs/etc/puppet")
59
76
  end
60
77
 
61
78
  def code_dir
62
- which_dir("/etc/puppetlabs/code", "~/.puppet/code")
79
+ which_dir("/etc/puppetlabs/code", "~/.puppetlabs/etc/code")
63
80
  end
64
81
 
65
82
  def var_dir
66
- which_dir("/opt/puppetlabs/puppet/cache", "~/.puppet/var")
83
+ which_dir("/opt/puppetlabs/puppet/cache", "~/.puppetlabs/opt/puppet/cache")
67
84
  end
68
85
 
69
86
  def run_dir
70
- which_dir("/var/run/puppetlabs", "~/.puppet/var/run")
87
+ which_dir("/var/run/puppetlabs", "~/.puppetlabs/var/run")
71
88
  end
72
89
 
73
90
  def log_dir
74
- which_dir("/var/log/puppetlabs", "~/.puppet/var/log")
91
+ which_dir("/var/log/puppetlabs/puppet", "~/.puppetlabs/var/log")
75
92
  end
76
93
  end
77
94
 
78
95
  class WindowsRunMode < RunMode
79
96
  def conf_dir
80
- which_dir(File.join(windows_common_base("puppet/etc")), "~/.puppet")
97
+ which_dir(File.join(windows_common_base("puppet/etc")), "~/.puppetlabs/etc/puppet")
81
98
  end
82
99
 
83
100
  def code_dir
84
- which_dir(File.join(windows_common_base("code")), "~/.puppet/code")
101
+ which_dir(File.join(windows_common_base("code")), "~/.puppetlabs/etc/code")
85
102
  end
86
103
 
87
104
  def var_dir
88
- which_dir(File.join(windows_common_base("puppet/cache")), "~/.puppet/var")
105
+ which_dir(File.join(windows_common_base("puppet/cache")), "~/.puppetlabs/opt/puppet/cache")
89
106
  end
90
107
 
91
108
  def run_dir
92
- which_dir(File.join(windows_common_base("puppet/var/run")), "~/.puppet/var/run")
109
+ which_dir(File.join(windows_common_base("puppet/var/run")), "~/.puppetlabs/var/run")
93
110
  end
94
111
 
95
112
  def log_dir
96
- which_dir(File.join(windows_common_base("puppet/var/log")), "~/.puppet/var/log")
113
+ which_dir(File.join(windows_common_base("puppet/var/log")), "~/.puppetlabs/var/log")
97
114
  end
98
115
 
99
116
  private
@@ -260,7 +260,7 @@ module Puppet::Util::Windows
260
260
 
261
261
  if result != FFI::ERROR_SUCCESS
262
262
  msg = "Failed to delete registry value #{name} at #{key.keyname}"
263
- raise Puppet::Util::Windows::Error.new(msg)
263
+ raise Puppet::Util::Windows::Error.new(msg, result)
264
264
  end
265
265
  end
266
266
 
@@ -274,8 +274,8 @@ module Puppet::Util::Windows
274
274
  result = RegDeleteKeyExW(key.hkey, name_ptr, regsam, 0)
275
275
 
276
276
  if result != FFI::ERROR_SUCCESS
277
- msg = "Failed to delete registry value #{name} at #{key.keyname}"
278
- raise Puppet::Util::Windows::Error.new(msg)
277
+ msg = "Failed to delete registry key #{name} at #{key.keyname}"
278
+ raise Puppet::Util::Windows::Error.new(msg, result)
279
279
  end
280
280
  end
281
281
 
@@ -0,0 +1,6 @@
1
+ Deep_merge - Recursive Merging for Ruby Hashes
2
+ =============================================
3
+
4
+ Deep_merge 1.0.0+
5
+
6
+ Copied from https://github.com/danielsdeleo/deep_merge/tree/f9df6fdb0d0090318e8015814e68e5ca2973b493
@@ -0,0 +1 @@
1
+ $: << File.join([File.dirname(__FILE__), "plist/lib"])
@@ -0,0 +1,82 @@
1
+ = plist - All-purpose Property List manipulation library
2
+
3
+ 2006-09-20 (r80):
4
+ * tweak a comment in generator.rb to make it clear that we're not using Base64.b64encode because it's broken.
5
+
6
+ === Release version 3.0.0!
7
+
8
+ 2006-09-20 (r77 - r79):
9
+ * move IndentedString inside Plist::Emit and :nodoc: it
10
+ * Tag 3.0.0! (from rev 78)
11
+
12
+ 2006-09-19 (r73 - r75):
13
+ * Really fix the rakefile this time (apparently I deleted some code that I needed...)
14
+ * alter the fix_whitespace rake task to ignore the assets directory
15
+ * cleanup whitespace
16
+
17
+ 2006-09-18 (r70 - r72):
18
+ * Update this file ;)
19
+ * Fix Rakefile
20
+ * gem install -t now works correctly
21
+ * Remove super-sekr1t rdoc staging area from rdoc publishing task
22
+
23
+ 2006-09-15 (r64 - r69):
24
+ * Change behavior of empty collection elements to match What Apple Does
25
+ * Fix some gem packaging infrastructure
26
+
27
+ 2006-09-13 (r61 - r63):
28
+ * Merge generator injection removal branch into trunk!
29
+
30
+ 2006-09-13 (r52 - r60):
31
+ * Fix indentation/newlines in generator (finally!)
32
+ * Refix indentation to be more faithful to the way Apple emits their plists
33
+ * Remove horrific regex and replace it with proper comment parsing
34
+ * Empty plists return nil when parsed
35
+ * Sort hash keys before emitting (now we can test multi-element hashes!)
36
+ * Inject #<=> into Symbol so that sorting Symbol-keyed hashes won't freak out
37
+
38
+ 2006-09-12 (r47 - r51):
39
+ * More test rejiggering
40
+ * New tests to expose some bugs
41
+
42
+ 2006-09-10 (r33 - r46):
43
+ * Update tests for new generator code
44
+ * Rejigger some tests
45
+ * Make the generator try to call #to_plist_node on any object it tries to serialize, thus allowing class authors to define how their objects will be serialized
46
+ * Marshal.dump unrecognized objects into <data> elements
47
+ * Make the parser strip out comments and Marshal.load <data> elements if possible
48
+ * Update some rdoc
49
+
50
+ === Release version 2.1.1!
51
+
52
+ 2006-09-10 (r31 - r32):
53
+ * Added encoding / decoding for entities (&amp; etc)
54
+ * Changed parsing of <data> elements to return StringIO objects
55
+ * Fixed bug with empty <key> tags
56
+
57
+ 2006-08-24 (r25 - r30):
58
+ * Invert ownership of methods in the generator, allowing us to remove the self.extend(self)
59
+ * New branch to remove method inject from parser
60
+
61
+ 2006-08-23 (r22 - r24):
62
+ * Add rcov task to Rakefile
63
+ * Add some tests
64
+
65
+ 2006-08-20 (r9 - r21):
66
+ * Add a bunch of rdoc and rdoc infrastructure
67
+ * Add rake task to clean up errant whitespace
68
+ * Spin off a branch to remove a bunch of method injection in the generator code
69
+ * Rename some tests for clarity's sake
70
+ * Replace NARF generation code with Ben's generation code
71
+ * Update tests
72
+ * This broke indentation (will be fixed later)
73
+ * Add Plist::Emit.dump, so you can dump objects which don't include Plist::Emit, update tests to match
74
+ * Fix a bug with the method that wraps output in the plist header/footer
75
+
76
+ 2006-08-19 (r1 - r8):
77
+ * The beginnings of merging the plist project into the NARF plist library (under the plist project's name)
78
+ * fancier project infrastructure (more tests, Rakefile, the like)
79
+ * Add/update copyright notices in the source files
80
+ * Move a bunch of documentation out to README
81
+ * Split library into chunks
82
+ * Properly delete files when cleaning up from tests