puppet 2.7.1 → 2.7.3

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 (171) hide show
  1. data/CHANGELOG +225 -1
  2. data/CONTRIBUTING.md +299 -0
  3. data/README.md +0 -1
  4. data/conf/redhat/puppet.spec +132 -25
  5. data/conf/solaris/pkginfo +1 -1
  6. data/conf/suse/puppet.spec +5 -2
  7. data/ext/envpuppet +56 -3
  8. data/ext/vim/README +2 -1
  9. data/ext/vim/ftplugin/puppet.vim +94 -0
  10. data/ext/vim/indent/puppet.vim +76 -0
  11. data/lib/puppet.rb +2 -3
  12. data/lib/puppet/application/agent.rb +7 -7
  13. data/lib/puppet/application/apply.rb +20 -8
  14. data/lib/puppet/application/ca.rb +5 -0
  15. data/lib/puppet/application/cert.rb +2 -1
  16. data/lib/puppet/application/certificate.rb +0 -5
  17. data/lib/puppet/application/device.rb +4 -4
  18. data/lib/puppet/application/doc.rb +23 -12
  19. data/lib/puppet/application/face_base.rb +2 -1
  20. data/lib/puppet/application/inspect.rb +5 -2
  21. data/lib/puppet/configurer.rb +60 -56
  22. data/lib/puppet/configurer/fact_handler.rb +6 -1
  23. data/lib/puppet/defaults.rb +20 -1
  24. data/lib/puppet/face/ca.rb +233 -0
  25. data/lib/puppet/face/certificate.rb +15 -11
  26. data/lib/puppet/face/certificate_request.rb +9 -11
  27. data/lib/puppet/face/certificate_revocation_list.rb +5 -7
  28. data/lib/puppet/face/node/clean.rb +154 -0
  29. data/lib/puppet/face/status.rb +1 -0
  30. data/lib/puppet/file_serving/configuration/parser.rb +6 -13
  31. data/lib/puppet/indirector/exec.rb +3 -3
  32. data/lib/puppet/indirector/face.rb +17 -7
  33. data/lib/puppet/indirector/report/processor.rb +29 -16
  34. data/lib/puppet/indirector/rest.rb +42 -7
  35. data/lib/puppet/indirector/yaml.rb +5 -0
  36. data/lib/puppet/interface.rb +7 -2
  37. data/lib/puppet/interface/action.rb +57 -23
  38. data/lib/puppet/interface/action_manager.rb +10 -5
  39. data/lib/puppet/interface/face_collection.rb +43 -52
  40. data/lib/puppet/interface/option.rb +19 -0
  41. data/lib/puppet/interface/option_builder.rb +13 -0
  42. data/lib/puppet/interface/option_manager.rb +2 -1
  43. data/lib/puppet/metatype/manager.rb +7 -20
  44. data/lib/puppet/module.rb +4 -1
  45. data/lib/puppet/network/authconfig.rb +3 -1
  46. data/lib/puppet/network/authstore.rb +14 -5
  47. data/lib/puppet/network/handler/fileserver.rb +3 -0
  48. data/lib/puppet/network/http/webrick.rb +1 -1
  49. data/lib/puppet/network/rest_authconfig.rb +6 -1
  50. data/lib/puppet/network/rest_authorization.rb +1 -1
  51. data/lib/puppet/parser/compiler.rb +8 -11
  52. data/lib/puppet/parser/functions.rb +1 -6
  53. data/lib/puppet/parser/functions/create_resources.rb +6 -5
  54. data/lib/puppet/parser/functions/regsubst.rb +26 -0
  55. data/lib/puppet/parser/functions/shellquote.rb +26 -0
  56. data/lib/puppet/parser/functions/sprintf.rb +26 -0
  57. data/lib/puppet/parser/grammar.ra +34 -60
  58. data/lib/puppet/parser/lexer.rb +5 -5
  59. data/lib/puppet/parser/parser.rb +913 -1196
  60. data/lib/puppet/parser/resource.rb +18 -1
  61. data/lib/puppet/parser/scope.rb +2 -2
  62. data/lib/puppet/provider/augeas/augeas.rb +42 -17
  63. data/lib/puppet/provider/mount/parsed.rb +19 -1
  64. data/lib/puppet/provider/naginator.rb +9 -1
  65. data/lib/puppet/provider/nameservice/directoryservice.rb +11 -8
  66. data/lib/puppet/provider/network_device.rb +1 -1
  67. data/lib/puppet/provider/package/aptitude.rb +1 -0
  68. data/lib/puppet/provider/package/pacman.rb +94 -0
  69. data/lib/puppet/provider/ssh_authorized_key/parsed.rb +0 -6
  70. data/lib/puppet/rails/host.rb +7 -0
  71. data/lib/puppet/reports/store.rb +15 -0
  72. data/lib/puppet/resource/catalog.rb +15 -6
  73. data/lib/puppet/ssl/certificate.rb +6 -0
  74. data/lib/puppet/ssl/inventory.rb +2 -0
  75. data/lib/puppet/transaction.rb +9 -17
  76. data/lib/puppet/transaction/report.rb +3 -3
  77. data/lib/puppet/type.rb +13 -24
  78. data/lib/puppet/type/file.rb +8 -2
  79. data/lib/puppet/type/file/source.rb +2 -2
  80. data/lib/puppet/type/service.rb +20 -24
  81. data/lib/puppet/type/ssh_authorized_key.rb +12 -0
  82. data/lib/puppet/type/user.rb +8 -0
  83. data/lib/puppet/util.rb +0 -1
  84. data/lib/puppet/util/network_device.rb +3 -3
  85. data/lib/puppet/util/settings.rb +1 -1
  86. data/lib/puppet/util/settings/file_setting.rb +1 -0
  87. data/lib/semver.rb +65 -0
  88. data/spec/integration/defaults_spec.rb +23 -1
  89. data/spec/integration/network/rest_authconfig_spec.rb +145 -0
  90. data/spec/integration/node/facts_spec.rb +1 -1
  91. data/spec/integration/parser/functions_spec.rb +1 -1
  92. data/spec/integration/parser/parser_spec.rb +31 -0
  93. data/spec/integration/provider/ssh_authorized_key_spec.rb +207 -0
  94. data/spec/integration/type_spec.rb +11 -0
  95. data/spec/lib/puppet/face/1.0.0/huzzah.rb +8 -0
  96. data/spec/lib/puppet/face/huzzah.rb +1 -0
  97. data/spec/lib/puppet/face/huzzah/obsolete.rb +6 -0
  98. data/spec/shared_behaviours/things_that_declare_options.rb +115 -3
  99. data/spec/unit/application/agent_spec.rb +2 -2
  100. data/spec/unit/application/apply_spec.rb +74 -56
  101. data/spec/unit/application/cert_spec.rb +10 -0
  102. data/spec/unit/application/device_spec.rb +2 -3
  103. data/spec/unit/application/face_base_spec.rb +1 -0
  104. data/spec/unit/application/facts_spec.rb +1 -0
  105. data/spec/unit/application/inspect_spec.rb +5 -0
  106. data/spec/unit/configurer/fact_handler_spec.rb +45 -37
  107. data/spec/unit/configurer_spec.rb +405 -327
  108. data/spec/unit/face/ca_spec.rb +355 -0
  109. data/spec/unit/face/certificate_spec.rb +16 -4
  110. data/spec/unit/face/node_spec.rb +261 -1
  111. data/spec/unit/file_serving/configuration/parser_spec.rb +8 -0
  112. data/spec/unit/indirector/certificate/rest_spec.rb +1 -0
  113. data/spec/unit/indirector/certificate_status/file_spec.rb +4 -0
  114. data/spec/unit/indirector/exec_spec.rb +4 -4
  115. data/spec/unit/indirector/face_spec.rb +3 -1
  116. data/spec/unit/indirector/facts/couch_spec.rb +2 -2
  117. data/spec/unit/indirector/facts/network_device_spec.rb +2 -6
  118. data/spec/unit/indirector/node/exec_spec.rb +1 -1
  119. data/spec/unit/indirector/report/processor_spec.rb +31 -8
  120. data/spec/unit/indirector/rest_spec.rb +53 -5
  121. data/spec/unit/indirector/yaml_spec.rb +18 -0
  122. data/spec/unit/interface/action_spec.rb +112 -8
  123. data/spec/unit/interface/face_collection_spec.rb +46 -36
  124. data/spec/unit/interface/option_spec.rb +44 -0
  125. data/spec/unit/interface_spec.rb +11 -6
  126. data/spec/unit/module_spec.rb +38 -9
  127. data/spec/unit/network/authconfig_spec.rb +23 -0
  128. data/spec/unit/network/authstore_spec.rb +36 -4
  129. data/spec/unit/network/handler/fileserver_spec.rb +32 -0
  130. data/spec/unit/network/rest_authconfig_spec.rb +1 -1
  131. data/spec/unit/node_spec.rb +1 -0
  132. data/spec/unit/parser/compiler_spec.rb +8 -46
  133. data/spec/unit/parser/lexer_spec.rb +27 -17
  134. data/spec/unit/parser/resource_spec.rb +61 -3
  135. data/spec/unit/parser/scope_spec.rb +5 -1
  136. data/spec/unit/provider/augeas/augeas_spec.rb +106 -1
  137. data/spec/unit/provider/cisco_spec.rb +3 -4
  138. data/spec/unit/provider/interface/cisco_spec.rb +1 -2
  139. data/spec/unit/provider/mount/parsed_spec.rb +41 -0
  140. data/spec/unit/provider/nameservice/directoryservice_spec.rb +60 -0
  141. data/spec/unit/provider/network_device_spec.rb +1 -2
  142. data/spec/unit/provider/package/pacman_spec.rb +237 -0
  143. data/spec/unit/provider/package/pkgutil_spec.rb +2 -3
  144. data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +21 -32
  145. data/spec/unit/provider/vlan/cisco_spec.rb +1 -2
  146. data/spec/unit/rails/host_spec.rb +8 -0
  147. data/spec/unit/resource/catalog_spec.rb +55 -8
  148. data/spec/unit/semver_spec.rb +187 -0
  149. data/spec/unit/ssl/certificate_spec.rb +25 -0
  150. data/spec/unit/transaction/report_spec.rb +3 -3
  151. data/spec/unit/transaction_spec.rb +8 -2
  152. data/spec/unit/type/file_spec.rb +57 -0
  153. data/spec/unit/type/interface_spec.rb +1 -2
  154. data/spec/unit/type/schedule_spec.rb +73 -42
  155. data/spec/unit/type/ssh_authorized_key_spec.rb +180 -70
  156. data/spec/unit/type/user_spec.rb +8 -0
  157. data/spec/unit/type/vlan_spec.rb +1 -2
  158. data/spec/unit/type_spec.rb +66 -0
  159. data/spec/unit/util/network_device/cisco/device_spec.rb +1 -2
  160. data/spec/unit/util/network_device/cisco/facts_spec.rb +2 -3
  161. data/spec/unit/util/network_device/cisco/interface_spec.rb +1 -2
  162. data/spec/unit/util/network_device/config_spec.rb +3 -4
  163. data/spec/unit/util/network_device/ipcalc_spec.rb +1 -2
  164. data/spec/unit/util/network_device/transport/base_spec.rb +1 -2
  165. data/spec/unit/util/network_device/transport/ssh_spec.rb +1 -2
  166. data/spec/unit/util/network_device/transport/telnet_spec.rb +1 -2
  167. data/spec/unit/util/network_device_spec.rb +2 -2
  168. data/spec/unit/util/settings/file_setting_spec.rb +4 -0
  169. data/spec/unit/util/settings_spec.rb +11 -0
  170. data/test/lib/puppettest/railstesting.rb +0 -34
  171. metadata +19 -4
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
-
3
- require File.dirname(__FILE__) + '/../../../spec_helper'
2
+ require 'spec_helper'
4
3
 
5
4
  require 'puppet/util/network_device/ipcalc'
6
5
 
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
-
3
- require File.dirname(__FILE__) + '/../../../../spec_helper'
2
+ require 'spec_helper'
4
3
 
5
4
  require 'puppet/util/network_device/transport/base'
6
5
 
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
-
3
- require File.dirname(__FILE__) + '/../../../../spec_helper'
2
+ require 'spec_helper'
4
3
 
5
4
  require 'puppet/util/network_device/transport/ssh'
6
5
 
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
-
3
- require File.dirname(__FILE__) + '/../../../../spec_helper'
2
+ require 'spec_helper'
4
3
 
5
4
  require 'puppet/util/network_device/transport/telnet'
6
5
 
@@ -11,7 +11,7 @@ describe Puppet::Util::NetworkDevice do
11
11
  end
12
12
 
13
13
  after(:each) do
14
- Puppet::Util::NetworkDevice.clear
14
+ Puppet::Util::NetworkDevice.teardown
15
15
  end
16
16
 
17
17
  class Puppet::Util::NetworkDevice::Test
@@ -47,4 +47,4 @@ describe Puppet::Util::NetworkDevice do
47
47
  Puppet::Util::NetworkDevice.current.should == device
48
48
  end
49
49
  end
50
- end
50
+ end
@@ -248,6 +248,10 @@ describe Puppet::Util::Settings::FileSetting do
248
248
  it "should tag the resource with 'settings'" do
249
249
  @file.to_resource.should be_tagged("settings")
250
250
  end
251
+
252
+ it "should set links to 'follow'" do
253
+ @file.to_resource[:links].should == :follow
254
+ end
251
255
  end
252
256
  end
253
257
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env rspec
2
2
  require 'spec_helper'
3
+ require 'ostruct'
3
4
 
4
5
  describe Puppet::Util::Settings do
5
6
  describe "when specifying defaults" do
@@ -1104,4 +1105,14 @@ describe Puppet::Util::Settings do
1104
1105
 
1105
1106
  it "should cache the result"
1106
1107
  end
1108
+
1109
+ describe "#writesub" do
1110
+ it "should only pass valid arguments to File.open" do
1111
+ settings = Puppet::Util::Settings.new
1112
+ settings.stubs(:get_config_file_default).with(:privatekeydir).returns(OpenStruct.new(:mode => "750"))
1113
+
1114
+ File.expects(:open).with("/path/to/keydir", "w", 750).returns true
1115
+ settings.writesub(:privatekeydir, "/path/to/keydir")
1116
+ end
1117
+ end
1107
1118
  end
@@ -14,39 +14,5 @@ module PuppetTest::RailsTesting
14
14
  def railsinit
15
15
  Puppet::Rails.init
16
16
  end
17
-
18
- def railsteardown
19
- Puppet::Rails.teardown if Puppet[:dbadapter] != "sqlite3"
20
- end
21
-
22
- def railsresource(type = "file", title = "/tmp/testing", params = {})
23
- railsteardown
24
- railsinit
25
-
26
- # We need a host for resources
27
- #host = Puppet::Rails::Host.new(:name => Facter.value("hostname"))
28
-
29
- # Now build a resource
30
- resources = []
31
-
32
- resources << mkresource(
33
- :type => type, :title => title, :exported => true,
34
-
35
- :parameters => params)
36
-
37
- # Now collect our facts
38
- facts = Facter.to_hash
39
-
40
- # Now try storing our crap
41
- host = nil
42
- node = mknode(facts["hostname"])
43
- node.parameters = facts
44
- assert_nothing_raised {
45
- host = Puppet::Rails::Host.store(node, resources)
46
- }
47
-
48
- # Now save the whole thing
49
- host.save
50
- end
51
17
  end
52
18
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 7
9
- - 1
10
- version: 2.7.1
9
+ - 3
10
+ version: 2.7.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Puppet Labs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-22 00:00:00 -07:00
18
+ date: 2011-08-15 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -53,6 +53,7 @@ extra_rdoc_files: []
53
53
 
54
54
  files:
55
55
  - CHANGELOG
56
+ - CONTRIBUTING.md
56
57
  - LICENSE
57
58
  - Rakefile
58
59
  - README.md
@@ -66,6 +67,7 @@ files:
66
67
  - lib/puppet/agent.rb
67
68
  - lib/puppet/application/agent.rb
68
69
  - lib/puppet/application/apply.rb
70
+ - lib/puppet/application/ca.rb
69
71
  - lib/puppet/application/catalog.rb
70
72
  - lib/puppet/application/cert.rb
71
73
  - lib/puppet/application/certificate.rb
@@ -123,6 +125,7 @@ files:
123
125
  - lib/puppet/external/pson/pure/parser.rb
124
126
  - lib/puppet/external/pson/pure.rb
125
127
  - lib/puppet/external/pson/version.rb
128
+ - lib/puppet/face/ca.rb
126
129
  - lib/puppet/face/catalog/select.rb
127
130
  - lib/puppet/face/catalog.rb
128
131
  - lib/puppet/face/certificate.rb
@@ -140,6 +143,7 @@ files:
140
143
  - lib/puppet/face/help.rb
141
144
  - lib/puppet/face/key.rb
142
145
  - lib/puppet/face/man.rb
146
+ - lib/puppet/face/node/clean.rb
143
147
  - lib/puppet/face/node.rb
144
148
  - lib/puppet/face/parser.rb
145
149
  - lib/puppet/face/plugin.rb
@@ -455,6 +459,7 @@ files:
455
459
  - lib/puppet/provider/package/macports.rb
456
460
  - lib/puppet/provider/package/nim.rb
457
461
  - lib/puppet/provider/package/openbsd.rb
462
+ - lib/puppet/provider/package/pacman.rb
458
463
  - lib/puppet/provider/package/pip.rb
459
464
  - lib/puppet/provider/package/pkg.rb
460
465
  - lib/puppet/provider/package/pkgdmg.rb
@@ -711,6 +716,7 @@ files:
711
716
  - lib/puppet/util/zaml.rb
712
717
  - lib/puppet/util.rb
713
718
  - lib/puppet.rb
719
+ - lib/semver.rb
714
720
  - conf/auth.conf
715
721
  - conf/epm.list
716
722
  - conf/freebsd/puppetd
@@ -853,6 +859,8 @@ files:
853
859
  - ext/regexp_nodes/parameters/environment/qa
854
860
  - ext/regexp_nodes/regexp_nodes.rb
855
861
  - ext/vim/ftdetect/puppet.vim
862
+ - ext/vim/ftplugin/puppet.vim
863
+ - ext/vim/indent/puppet.vim
856
864
  - ext/vim/README
857
865
  - ext/vim/syntax/puppet.vim
858
866
  - ext/yaml_nodes.rb
@@ -1151,6 +1159,7 @@ files:
1151
1159
  - spec/integration/network/client_spec.rb
1152
1160
  - spec/integration/network/formats_spec.rb
1153
1161
  - spec/integration/network/handler_spec.rb
1162
+ - spec/integration/network/rest_authconfig_spec.rb
1154
1163
  - spec/integration/network/server/mongrel_spec.rb
1155
1164
  - spec/integration/network/server/webrick_spec.rb
1156
1165
  - spec/integration/node/environment_spec.rb
@@ -1166,6 +1175,7 @@ files:
1166
1175
  - spec/integration/provider/mount_spec.rb
1167
1176
  - spec/integration/provider/package_spec.rb
1168
1177
  - spec/integration/provider/service/init_spec.rb
1178
+ - spec/integration/provider/ssh_authorized_key_spec.rb
1169
1179
  - spec/integration/reference/providers_spec.rb
1170
1180
  - spec/integration/reports_spec.rb
1171
1181
  - spec/integration/resource/catalog_spec.rb
@@ -1186,7 +1196,9 @@ files:
1186
1196
  - spec/integration/util/rdoc/parser_spec.rb
1187
1197
  - spec/integration/util/settings_spec.rb
1188
1198
  - spec/lib/matchers/json.rb
1199
+ - spec/lib/puppet/face/1.0.0/huzzah.rb
1189
1200
  - spec/lib/puppet/face/basetest.rb
1201
+ - spec/lib/puppet/face/huzzah/obsolete.rb
1190
1202
  - spec/lib/puppet/face/huzzah.rb
1191
1203
  - spec/lib/puppet/face/version_matching.rb
1192
1204
  - spec/lib/puppet_spec/files.rb
@@ -1233,6 +1245,7 @@ files:
1233
1245
  - spec/unit/daemon_spec.rb
1234
1246
  - spec/unit/dsl/resource_api_spec.rb
1235
1247
  - spec/unit/dsl/resource_type_api_spec.rb
1248
+ - spec/unit/face/ca_spec.rb
1236
1249
  - spec/unit/face/catalog_spec.rb
1237
1250
  - spec/unit/face/certificate_request_spec.rb
1238
1251
  - spec/unit/face/certificate_revocation_list_spec.rb
@@ -1470,6 +1483,7 @@ files:
1470
1483
  - spec/unit/provider/package/hpux_spec.rb
1471
1484
  - spec/unit/provider/package/macports_spec.rb
1472
1485
  - spec/unit/provider/package/nim_spec.rb
1486
+ - spec/unit/provider/package/pacman_spec.rb
1473
1487
  - spec/unit/provider/package/pip_spec.rb
1474
1488
  - spec/unit/provider/package/pkg_spec.rb
1475
1489
  - spec/unit/provider/package/pkgdmg_spec.rb
@@ -1521,6 +1535,7 @@ files:
1521
1535
  - spec/unit/resource/type_spec.rb
1522
1536
  - spec/unit/resource_spec.rb
1523
1537
  - spec/unit/run_spec.rb
1538
+ - spec/unit/semver_spec.rb
1524
1539
  - spec/unit/simple_graph_spec.rb
1525
1540
  - spec/unit/ssl/base_spec.rb
1526
1541
  - spec/unit/ssl/certificate_authority/interface_spec.rb