chef 15.2.20 → 15.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -2
  3. data/chef.gemspec +3 -2
  4. data/lib/chef/application.rb +1 -1
  5. data/lib/chef/application/base.rb +7 -0
  6. data/lib/chef/application/client.rb +6 -2
  7. data/lib/chef/application/solo.rb +7 -1
  8. data/lib/chef/cookbook/gem_installer.rb +7 -2
  9. data/lib/chef/exceptions.rb +12 -0
  10. data/lib/chef/knife/bootstrap.rb +8 -1
  11. data/lib/chef/knife/bootstrap/templates/chef-full.erb +1 -1
  12. data/lib/chef/knife/bootstrap/train_connector.rb +3 -3
  13. data/lib/chef/knife/cookbook_metadata_from_file.rb +1 -1
  14. data/lib/chef/node.rb +0 -2
  15. data/lib/chef/policy_builder/expand_node_object.rb +1 -1
  16. data/lib/chef/policy_builder/policyfile.rb +4 -3
  17. data/lib/chef/provider.rb +4 -2
  18. data/lib/chef/provider/ifconfig.rb +5 -3
  19. data/lib/chef/provider/package/chocolatey.rb +12 -22
  20. data/lib/chef/provider/user.rb +1 -1
  21. data/lib/chef/provider/user/dscl.rb +2 -2
  22. data/lib/chef/provider/user/mac.rb +628 -0
  23. data/lib/chef/providers.rb +1 -0
  24. data/lib/chef/resource.rb +28 -20
  25. data/lib/chef/resource/chocolatey_feature.rb +1 -1
  26. data/lib/chef/resource/chocolatey_package.rb +2 -2
  27. data/lib/chef/resource/cron_d.rb +1 -1
  28. data/lib/chef/resource/ohai.rb +1 -1
  29. data/lib/chef/resource/resource_notification.rb +17 -13
  30. data/lib/chef/resource/ruby_block.rb +1 -1
  31. data/lib/chef/resource/service.rb +1 -1
  32. data/lib/chef/resource/user.rb +1 -0
  33. data/lib/chef/resource/user/dscl_user.rb +1 -1
  34. data/lib/chef/resource/user/mac_user.rb +119 -0
  35. data/lib/chef/resource/windows_ad_join.rb +1 -1
  36. data/lib/chef/resource_collection.rb +6 -0
  37. data/lib/chef/resources.rb +1 -0
  38. data/lib/chef/run_context.rb +61 -27
  39. data/lib/chef/runner.rb +50 -12
  40. data/lib/chef/version.rb +1 -1
  41. data/spec/functional/resource/chocolatey_package_spec.rb +19 -1
  42. data/spec/functional/resource/user/mac_user_spec.rb +207 -0
  43. data/spec/integration/client/client_spec.rb +22 -0
  44. data/spec/integration/knife/raw_spec.rb +39 -19
  45. data/spec/integration/knife/redirection_spec.rb +22 -13
  46. data/spec/integration/knife/serve_spec.rb +1 -2
  47. data/spec/integration/recipes/unified_mode_spec.rb +876 -0
  48. data/spec/spec_helper.rb +1 -0
  49. data/spec/support/platform_helpers.rb +10 -0
  50. data/spec/support/shared/integration/integration_helper.rb +1 -2
  51. data/spec/unit/application/client_spec.rb +5 -6
  52. data/spec/unit/application/solo_spec.rb +3 -8
  53. data/spec/unit/application_spec.rb +1 -1
  54. data/spec/unit/cookbook/gem_installer_spec.rb +22 -1
  55. data/spec/unit/knife/bootstrap/train_connector_spec.rb +20 -7
  56. data/spec/unit/knife/bootstrap_spec.rb +13 -5
  57. data/spec/unit/provider/ifconfig_spec.rb +11 -0
  58. data/spec/unit/provider/package/chocolatey_spec.rb +34 -30
  59. data/spec/unit/provider/user/dscl_spec.rb +1 -0
  60. data/spec/unit/provider/user/mac_spec.rb +38 -0
  61. data/spec/unit/provider/user_spec.rb +38 -22
  62. data/tasks/docs.rb +14 -10
  63. metadata +25 -41
  64. data/lib/.DS_Store +0 -0
  65. data/lib/chef/.DS_Store +0 -0
  66. data/lib/chef/dsl/.DS_Store +0 -0
  67. data/lib/chef/knife/.DS_Store +0 -0
  68. data/lib/chef/mixin/.DS_Store +0 -0
  69. data/lib/chef/provider/.DS_Store +0 -0
  70. data/lib/chef/provider/package/.DS_Store +0 -0
  71. data/lib/chef/provider/package/freebsd/.DS_Store +0 -0
  72. data/lib/chef/resource/.DS_Store +0 -0
  73. data/lib/chef/resource/file/.DS_Store +0 -0
  74. data/spec/.DS_Store +0 -0
  75. data/spec/data/.DS_Store +0 -0
  76. data/spec/data/cookbooks/.DS_Store +0 -0
  77. data/spec/data/cookbooks/java/.DS_Store +0 -0
  78. data/spec/data/cookbooks/java/files/.DS_Store +0 -0
  79. data/spec/data/mac_users/.DS_Store +0 -0
  80. data/spec/data/nodes/Tim.local.json +0 -3
  81. data/spec/data/nodes/Tims-MBP.local.json +0 -3
  82. data/spec/data/run_context/.DS_Store +0 -0
  83. data/spec/data/run_context/cookbooks/.DS_Store +0 -0
  84. data/spec/functional/.DS_Store +0 -0
  85. data/spec/functional/resource/.DS_Store +0 -0
  86. data/spec/functional/util/.DS_Store +0 -0
  87. data/spec/integration/.DS_Store +0 -0
  88. data/spec/stress/.DS_Store +0 -0
  89. data/spec/support/.DS_Store +0 -0
  90. data/spec/support/shared/integration/app_server_support.rb +0 -39
  91. data/spec/unit/.DS_Store +0 -0
  92. data/tasks/.DS_Store +0 -0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +0,0 @@
1
- {
2
- "name": "Tim.local"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "name": "Tims-MBP.local"
3
- }
Binary file
Binary file
Binary file
Binary file
@@ -1,39 +0,0 @@
1
- #
2
- # Author:: John Keiser (<jkeiser@chef.io>)
3
- # Author:: Ho-Sheng Hsiao (<hosh@chef.io>)
4
- # Copyright:: Copyright 2012-2018, Chef Software Inc.
5
- # License:: Apache License, Version 2.0
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
-
20
- require "rack"
21
- require "stringio"
22
-
23
- module AppServerSupport
24
- def start_app_server(app, port)
25
- server = nil
26
- thread = Thread.new do
27
- Rack::Handler::WEBrick.run(app,
28
- Port: 9018,
29
- AccessLog: [],
30
- Logger: WEBrick::Log.new(StringIO.new, 7)) do |found_server|
31
- server = found_server
32
- end
33
- end
34
- Timeout.timeout(30) do
35
- sleep(0.01) until server && server.status == :Running
36
- end
37
- thread
38
- end
39
- end
Binary file
Binary file