chef-dk 1.2.22 → 1.3.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +8 -12
  3. data/Gemfile.lock +120 -116
  4. data/README.md +4 -3
  5. data/Rakefile +54 -0
  6. data/acceptance/Gemfile.lock +36 -47
  7. data/bin/chef +1 -1
  8. data/chef-dk.gemspec +9 -9
  9. data/lib/chef-dk/authenticated_http.rb +6 -7
  10. data/lib/chef-dk/builtin_commands.rb +3 -4
  11. data/lib/chef-dk/chef_runner.rb +7 -8
  12. data/lib/chef-dk/cli.rb +11 -11
  13. data/lib/chef-dk/command/base.rb +4 -4
  14. data/lib/chef-dk/command/clean_policy_cookbooks.rb +4 -5
  15. data/lib/chef-dk/command/clean_policy_revisions.rb +4 -6
  16. data/lib/chef-dk/command/delete_policy.rb +4 -6
  17. data/lib/chef-dk/command/delete_policy_group.rb +6 -8
  18. data/lib/chef-dk/command/diff.rb +9 -10
  19. data/lib/chef-dk/command/env.rb +26 -27
  20. data/lib/chef-dk/command/exec.rb +5 -6
  21. data/lib/chef-dk/command/export.rb +8 -10
  22. data/lib/chef-dk/command/gem.rb +5 -5
  23. data/lib/chef-dk/command/generate.rb +19 -19
  24. data/lib/chef-dk/command/generator_commands.rb +8 -8
  25. data/lib/chef-dk/command/generator_commands/app.rb +2 -3
  26. data/lib/chef-dk/command/generator_commands/attribute.rb +2 -3
  27. data/lib/chef-dk/command/generator_commands/base.rb +13 -13
  28. data/lib/chef-dk/command/generator_commands/build_cookbook.rb +2 -2
  29. data/lib/chef-dk/command/generator_commands/chef_exts/generator_desc_resource.rb +2 -2
  30. data/lib/chef-dk/command/generator_commands/chef_exts/quieter_doc_formatter.rb +1 -2
  31. data/lib/chef-dk/command/generator_commands/chef_exts/recipe_dsl_ext.rb +1 -2
  32. data/lib/chef-dk/command/generator_commands/cookbook.rb +2 -2
  33. data/lib/chef-dk/command/generator_commands/cookbook_code_file.rb +3 -3
  34. data/lib/chef-dk/command/generator_commands/cookbook_file.rb +2 -2
  35. data/lib/chef-dk/command/generator_commands/generator_generator.rb +4 -7
  36. data/lib/chef-dk/command/generator_commands/lwrp.rb +2 -2
  37. data/lib/chef-dk/command/generator_commands/policyfile.rb +2 -3
  38. data/lib/chef-dk/command/generator_commands/recipe.rb +2 -2
  39. data/lib/chef-dk/command/generator_commands/repo.rb +1 -3
  40. data/lib/chef-dk/command/generator_commands/template.rb +2 -2
  41. data/lib/chef-dk/command/install.rb +4 -5
  42. data/lib/chef-dk/command/provision.rb +12 -14
  43. data/lib/chef-dk/command/push.rb +5 -6
  44. data/lib/chef-dk/command/push_archive.rb +4 -5
  45. data/lib/chef-dk/command/shell_init.rb +15 -16
  46. data/lib/chef-dk/command/show_policy.rb +5 -7
  47. data/lib/chef-dk/command/undelete.rb +6 -7
  48. data/lib/chef-dk/command/update.rb +5 -6
  49. data/lib/chef-dk/command/verify.rb +30 -31
  50. data/lib/chef-dk/commands_map.rb +1 -3
  51. data/lib/chef-dk/component_test.rb +13 -13
  52. data/lib/chef-dk/configurable.rb +2 -2
  53. data/lib/chef-dk/cookbook_metadata.rb +2 -2
  54. data/lib/chef-dk/cookbook_omnifetch.rb +7 -8
  55. data/lib/chef-dk/cookbook_profiler/git.rb +8 -8
  56. data/lib/chef-dk/cookbook_profiler/identifiers.rb +7 -7
  57. data/lib/chef-dk/cookbook_profiler/null_scm.rb +0 -1
  58. data/lib/chef-dk/exceptions.rb +1 -1
  59. data/lib/chef-dk/generator.rb +9 -7
  60. data/lib/chef-dk/helpers.rb +15 -15
  61. data/lib/chef-dk/pager.rb +2 -3
  62. data/lib/chef-dk/policyfile/chef_repo_cookbook_source.rb +4 -4
  63. data/lib/chef-dk/policyfile/chef_server_cookbook_source.rb +6 -6
  64. data/lib/chef-dk/policyfile/community_cookbook_source.rb +4 -5
  65. data/lib/chef-dk/policyfile/comparison_base.rb +3 -4
  66. data/lib/chef-dk/policyfile/cookbook_location_specification.rb +6 -6
  67. data/lib/chef-dk/policyfile/cookbook_locks.rb +11 -11
  68. data/lib/chef-dk/policyfile/cookbook_sources.rb +5 -5
  69. data/lib/chef-dk/policyfile/delivery_supermarket_source.rb +8 -9
  70. data/lib/chef-dk/policyfile/differ.rb +7 -10
  71. data/lib/chef-dk/policyfile/dsl.rb +10 -11
  72. data/lib/chef-dk/policyfile/lister.rb +3 -6
  73. data/lib/chef-dk/policyfile/null_cookbook_source.rb +3 -3
  74. data/lib/chef-dk/policyfile/read_cookbook_for_compat_mode_upload.rb +3 -3
  75. data/lib/chef-dk/policyfile/reports/install.rb +3 -4
  76. data/lib/chef-dk/policyfile/reports/table_printer.rb +0 -1
  77. data/lib/chef-dk/policyfile/reports/upload.rb +4 -4
  78. data/lib/chef-dk/policyfile/solution_dependencies.rb +22 -22
  79. data/lib/chef-dk/policyfile/source_uri.rb +2 -2
  80. data/lib/chef-dk/policyfile/storage_config.rb +4 -5
  81. data/lib/chef-dk/policyfile/undo_record.rb +6 -9
  82. data/lib/chef-dk/policyfile/undo_stack.rb +5 -7
  83. data/lib/chef-dk/policyfile/uploader.rb +8 -8
  84. data/lib/chef-dk/policyfile_compiler.rb +16 -20
  85. data/lib/chef-dk/policyfile_lock.rb +10 -11
  86. data/lib/chef-dk/policyfile_services/clean_policies.rb +3 -3
  87. data/lib/chef-dk/policyfile_services/clean_policy_cookbooks.rb +3 -5
  88. data/lib/chef-dk/policyfile_services/export_repo.rb +13 -14
  89. data/lib/chef-dk/policyfile_services/install.rb +6 -6
  90. data/lib/chef-dk/policyfile_services/push.rb +6 -8
  91. data/lib/chef-dk/policyfile_services/push_archive.rb +6 -10
  92. data/lib/chef-dk/policyfile_services/rm_policy.rb +4 -5
  93. data/lib/chef-dk/policyfile_services/rm_policy_group.rb +4 -5
  94. data/lib/chef-dk/policyfile_services/show_policy.rb +5 -6
  95. data/lib/chef-dk/policyfile_services/undelete.rb +3 -3
  96. data/lib/chef-dk/policyfile_services/update_attributes.rb +4 -6
  97. data/lib/chef-dk/service_exception_inspectors.rb +2 -3
  98. data/lib/chef-dk/service_exception_inspectors/base.rb +0 -1
  99. data/lib/chef-dk/service_exception_inspectors/http.rb +1 -3
  100. data/lib/chef-dk/service_exceptions.rb +1 -2
  101. data/lib/chef-dk/shell_out.rb +1 -1
  102. data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/.kitchen.yml +2 -2
  103. data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/README.md +2 -2
  104. data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/test-fixture-recipe.rb +1 -0
  105. data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb +1 -1
  106. data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +1 -1
  107. data/lib/chef-dk/skeletons/code_generator/metadata.rb +0 -1
  108. data/lib/chef-dk/skeletons/code_generator/recipes/app.rb +6 -6
  109. data/lib/chef-dk/skeletons/code_generator/recipes/attribute.rb +3 -3
  110. data/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb +43 -39
  111. data/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb +31 -22
  112. data/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb +5 -5
  113. data/lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb +4 -4
  114. data/lib/chef-dk/skeletons/code_generator/recipes/policyfile.rb +1 -1
  115. data/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb +8 -8
  116. data/lib/chef-dk/skeletons/code_generator/recipes/repo.rb +15 -15
  117. data/lib/chef-dk/skeletons/code_generator/recipes/template.rb +6 -6
  118. data/lib/chef-dk/skeletons/code_generator/templates/default/build_cookbook/Berksfile.erb +0 -2
  119. data/lib/chef-dk/skeletons/code_generator/templates/default/build_cookbook/metadata.rb.erb +1 -0
  120. data/lib/chef-dk/skeletons/code_generator/templates/default/inspec_default_test.rb.erb +4 -4
  121. data/lib/chef-dk/skeletons/code_generator/templates/default/kitchen.yml.erb +1 -1
  122. data/lib/chef-dk/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb +1 -1
  123. data/lib/chef-dk/skeletons/code_generator/templates/default/metadata.rb.erb +4 -3
  124. data/lib/chef-dk/skeletons/code_generator/templates/default/recipe_spec.rb.erb +4 -2
  125. data/lib/chef-dk/ui.rb +0 -1
  126. data/lib/chef-dk/version.rb +1 -1
  127. data/lib/kitchen/provisioner/policyfile_zero.rb +7 -7
  128. data/omnibus_overrides.rb +3 -3
  129. data/spec/shared/a_file_generator.rb +3 -3
  130. data/spec/shared/custom_generator_cookbook.rb +6 -6
  131. data/spec/shared/fixture_cookbook_checksums.rb +2 -3
  132. data/spec/shared/setup_git_committer_config.rb +1 -1
  133. data/spec/shared/setup_git_cookbooks.rb +2 -2
  134. data/spec/spec_helper.rb +5 -5
  135. data/spec/test_helpers.rb +2 -2
  136. data/spec/unit/chef_runner_spec.rb +5 -7
  137. data/spec/unit/cli_spec.rb +36 -37
  138. data/spec/unit/command/base_spec.rb +4 -5
  139. data/spec/unit/command/clean_policy_cookbooks_spec.rb +8 -9
  140. data/spec/unit/command/clean_policy_revisions_spec.rb +8 -9
  141. data/spec/unit/command/delete_policy_group_spec.rb +11 -12
  142. data/spec/unit/command/delete_policy_spec.rb +11 -12
  143. data/spec/unit/command/diff_spec.rb +5 -6
  144. data/spec/unit/command/env_spec.rb +5 -5
  145. data/spec/unit/command/exec_spec.rb +18 -19
  146. data/spec/unit/command/export_spec.rb +5 -6
  147. data/spec/unit/command/generate_spec.rb +10 -10
  148. data/spec/unit/command/generator_commands/app_spec.rb +6 -6
  149. data/spec/unit/command/generator_commands/attribute_spec.rb +3 -4
  150. data/spec/unit/command/generator_commands/base_spec.rb +46 -46
  151. data/spec/unit/command/generator_commands/build_cookbook_spec.rb +50 -16
  152. data/spec/unit/command/generator_commands/chef_exts/generator_desc_resource_spec.rb +9 -9
  153. data/spec/unit/command/generator_commands/chef_exts/recipe_dsl_ext_spec.rb +16 -16
  154. data/spec/unit/command/generator_commands/cookbook_file_spec.rb +3 -4
  155. data/spec/unit/command/generator_commands/cookbook_spec.rb +23 -26
  156. data/spec/unit/command/generator_commands/generator_generator_spec.rb +4 -6
  157. data/spec/unit/command/generator_commands/lwrp_spec.rb +3 -4
  158. data/spec/unit/command/generator_commands/policyfile_spec.rb +3 -5
  159. data/spec/unit/command/generator_commands/recipe_spec.rb +4 -4
  160. data/spec/unit/command/generator_commands/repo_spec.rb +11 -11
  161. data/spec/unit/command/generator_commands/template_spec.rb +3 -4
  162. data/spec/unit/command/install_spec.rb +6 -6
  163. data/spec/unit/command/provision_spec.rb +27 -30
  164. data/spec/unit/command/push_archive_spec.rb +3 -3
  165. data/spec/unit/command/push_spec.rb +5 -6
  166. data/spec/unit/command/shell_init_spec.rb +17 -19
  167. data/spec/unit/command/show_policy_spec.rb +11 -12
  168. data/spec/unit/command/undelete_spec.rb +12 -14
  169. data/spec/unit/command/update_spec.rb +8 -8
  170. data/spec/unit/command/verify_spec.rb +10 -10
  171. data/spec/unit/commands_map_spec.rb +4 -4
  172. data/spec/unit/component_test_spec.rb +3 -3
  173. data/spec/unit/configurable_spec.rb +7 -7
  174. data/spec/unit/cookbook_metadata_spec.rb +5 -7
  175. data/spec/unit/cookbook_profiler/git_spec.rb +6 -7
  176. data/spec/unit/cookbook_profiler/identifiers_spec.rb +5 -7
  177. data/spec/unit/fixtures/command/cli_test_command.rb +2 -2
  178. data/spec/unit/fixtures/configurable/test_configurable.rb +1 -1
  179. data/spec/unit/fixtures/cookbooks_api/update_fixtures.rb +13 -16
  180. data/spec/unit/fixtures/eg_omnibus_dir/valid/embedded/apps/berkshelf/verify_me +1 -1
  181. data/spec/unit/gemfile_util_spec.rb +4 -4
  182. data/spec/unit/generator_spec.rb +10 -10
  183. data/spec/unit/helpers_spec.rb +31 -31
  184. data/spec/unit/pager_spec.rb +5 -7
  185. data/spec/unit/policyfile/chef_repo_cookbook_source_spec.rb +11 -11
  186. data/spec/unit/policyfile/chef_server_cookbook_source_spec.rb +13 -13
  187. data/spec/unit/policyfile/community_cookbook_source_spec.rb +3 -4
  188. data/spec/unit/policyfile/comparison_base_spec.rb +3 -6
  189. data/spec/unit/policyfile/cookbook_location_specification_spec.rb +3 -3
  190. data/spec/unit/policyfile/cookbook_locks_spec.rb +7 -9
  191. data/spec/unit/policyfile/delivery_supermarket_source_spec.rb +16 -17
  192. data/spec/unit/policyfile/differ_spec.rb +4 -5
  193. data/spec/unit/policyfile/lister_spec.rb +31 -35
  194. data/spec/unit/policyfile/null_cookbook_source_spec.rb +2 -3
  195. data/spec/unit/policyfile/read_cookbook_for_compat_mode_upload_spec.rb +3 -3
  196. data/spec/unit/policyfile/reports/install_spec.rb +4 -5
  197. data/spec/unit/policyfile/reports/upload_spec.rb +4 -6
  198. data/spec/unit/policyfile/solution_dependencies_spec.rb +13 -13
  199. data/spec/unit/policyfile/source_uri_spec.rb +5 -5
  200. data/spec/unit/policyfile/storage_config_spec.rb +3 -7
  201. data/spec/unit/policyfile/undo_record_spec.rb +21 -23
  202. data/spec/unit/policyfile/undo_stack_spec.rb +5 -6
  203. data/spec/unit/policyfile/uploader_spec.rb +73 -75
  204. data/spec/unit/policyfile_demands_spec.rb +93 -99
  205. data/spec/unit/policyfile_evaluation_spec.rb +14 -14
  206. data/spec/unit/policyfile_lock_build_spec.rb +64 -65
  207. data/spec/unit/policyfile_lock_install_spec.rb +5 -6
  208. data/spec/unit/policyfile_lock_serialization_spec.rb +14 -15
  209. data/spec/unit/policyfile_lock_validation_spec.rb +17 -20
  210. data/spec/unit/policyfile_services/clean_policies_spec.rb +16 -16
  211. data/spec/unit/policyfile_services/clean_policy_cookbooks_spec.rb +26 -29
  212. data/spec/unit/policyfile_services/export_repo_spec.rb +3 -6
  213. data/spec/unit/policyfile_services/install_spec.rb +5 -7
  214. data/spec/unit/policyfile_services/push_archive_spec.rb +4 -8
  215. data/spec/unit/policyfile_services/push_spec.rb +3 -3
  216. data/spec/unit/policyfile_services/rm_policy_group_spec.rb +16 -20
  217. data/spec/unit/policyfile_services/rm_policy_spec.rb +14 -17
  218. data/spec/unit/policyfile_services/show_policy_spec.rb +78 -80
  219. data/spec/unit/policyfile_services/undelete_spec.rb +5 -7
  220. data/spec/unit/policyfile_services/update_attributes_spec.rb +34 -35
  221. data/spec/unit/service_exception_inspectors/base_spec.rb +2 -4
  222. data/spec/unit/service_exception_inspectors/http_spec.rb +9 -11
  223. data/spec/unit/shell_out_spec.rb +2 -2
  224. data/spec/unit/tasks/helpers_spec.rb +2 -2
  225. data/tasks/bin/bundle-platform +1 -1
  226. data/tasks/bundle_util.rb +1 -1
  227. data/tasks/dependencies.rb +21 -7
  228. data/tasks/gemfile_util.rb +1 -1
  229. data/tasks/helpers.rb +2 -2
  230. data/tasks/version.rb +26 -1
  231. data/version_policy.rb +6 -6
  232. metadata +3 -3
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Build Status Master](https://travis-ci.org/chef/chef-dk.svg?branch=master)](https://travis-ci.org/chef/chef-dk)
4
4
  [![Build Status Master](https://ci.appveyor.com/api/projects/status/github/chef/chef-dk?branch=master&svg=true&passingText=master%20-%20Ok&pendingText=master%20-%20Pending&failingText=master%20-%20Failing)](https://ci.appveyor.com/project/Chef/chef-dk/branch/master)
5
+ [![](https://img.shields.io/badge/Release%20Policy-Cadence%20Release-brightgreen.svg)](https://github.com/chef/chef-rfc/blob/master/rfc086-chef-oss-project-policies.md#cadence-release)
5
6
 
6
7
  Chef Development Kit (ChefDK) brings Chef and the development tools developed by the Chef Community together and acts as the consistent interface to this awesomeness. This awesomeness is composed of:
7
8
 
@@ -30,7 +31,7 @@ system bin directory, ready to use.
30
31
 
31
32
  ### Pre-release Candidates
32
33
 
33
- The following commands will download the latest ChefDK package from the `current` channel. The `current` channel holds builds that have passed testing and are candidates for release.
34
+ The following commands will download the latest ChefDK package from the `current` channel. The `current` channel holds builds that have passed testing and are candidates for release.
34
35
  More information about flags supported by install.sh available here: https://docs.chef.io/api_omnitruck.html
35
36
 
36
37
  #### Linux and OS/X:
@@ -318,11 +319,11 @@ packaging, and building works.
318
319
 
319
320
  - - -
320
321
 
321
- [Berkshelf]: http://berkshelf.com "Berkshelf"
322
+ [Berkshelf]: https://docs.chef.io/berkshelf.html "Berkshelf"
322
323
  [Chef]: https://www.chef.io "Chef"
323
324
  [ChefDK]: https://downloads.chef.io/chef-dk "Chef Development Kit"
324
325
  [Chef Documentation]: https://docs.chef.io "Chef Documentation"
325
- [ChefSpec]: http://chefspec.org "ChefSpec"
326
+ [ChefSpec]: http://sethvargo.github.io/chefspec/ "ChefSpec"
326
327
  [Foodcritic]: http://foodcritic.io "Foodcritic"
327
328
  [Learn Chef]: https://learn.chef.io "Learn Chef"
328
329
  [Test Kitchen]: http://kitchen.ci "Test Kitchen"
data/Rakefile CHANGED
@@ -30,3 +30,57 @@ task :update_dockerfile do
30
30
  new_text = text.gsub(/^ARG VERSION=[\d\.]+$/, "ARG VERSION=#{latest_stable_version}")
31
31
  File.open("Dockerfile", "w+") { |f| f.write(new_text) }
32
32
  end
33
+
34
+ namespace :style do
35
+ begin
36
+ require "rubocop/rake_task"
37
+
38
+ desc "Run Cookbook Ruby style checks"
39
+ RuboCop::RakeTask.new(:cookstyle) do |t|
40
+ t.requires = ["cookstyle"]
41
+ t.patterns = ["lib/chef-dk/skeletons/code_generator"]
42
+ t.options = ["--display-cop-names"]
43
+ end
44
+ rescue LoadError => e
45
+ puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV["CI"]
46
+ end
47
+
48
+ begin
49
+ require "rubocop/rake_task"
50
+
51
+ ignore_dirs = Regexp.union(%w{
52
+ lib/chef-dk/skeletons/code_generator
53
+ spec/unit/fixtures/chef-runner-cookbooks
54
+ spec/unit/fixtures/cookbook_cache
55
+ spec/unit/fixtures/example_cookbook
56
+ spec/unit/fixtures/example_cookbook_metadata_json_only
57
+ spec/unit/fixtures/example_cookbook_no_metadata
58
+ spec/unit/fixtures/local_path_cookbooks
59
+ })
60
+
61
+ desc "Run Chef Ruby style checks"
62
+ RuboCop::RakeTask.new(:chefstyle) do |t|
63
+ t.requires = ["chefstyle"]
64
+ t.patterns = `rubocop --list-target-files`.split("\n").reject { |f| f =~ ignore_dirs }
65
+ t.options = ["--display-cop-names"]
66
+ end
67
+ rescue LoadError => e
68
+ puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV["CI"]
69
+ end
70
+
71
+ begin
72
+ require "foodcritic"
73
+
74
+ desc "Run Chef Cookbook (Foodcritic) style checks"
75
+ FoodCritic::Rake::LintTask.new(:foodcritic) do |t|
76
+ t.options = {
77
+ fail_tags: ["any"],
78
+ tags: ["~FC011", "~FC066", "~supermarket"],
79
+ cookbook_paths: ["lib/chef-dk/skeletons/code_generator"],
80
+ progress: true,
81
+ }
82
+ end
83
+ rescue LoadError => e
84
+ puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV["CI"]
85
+ end
86
+ end
@@ -1,6 +1,6 @@
1
1
  GIT
2
2
  remote: git://github.com/chef/chef-acceptance.git
3
- revision: e92ddae46d2126864698b9c8e4fc4ec2dcc46c55
3
+ revision: 3877c344098021ac66134e8edb5eb805d14d4643
4
4
  specs:
5
5
  chef-acceptance (0.2.0)
6
6
  mixlib-shellout (~> 2.0)
@@ -9,18 +9,18 @@ GIT
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.5.0)
12
+ addressable (2.5.1)
13
13
  public_suffix (~> 2.0, >= 2.0.2)
14
- artifactory (2.6.0)
15
- aws-sdk (2.7.3)
16
- aws-sdk-resources (= 2.7.3)
17
- aws-sdk-core (2.7.3)
14
+ artifactory (2.8.1)
15
+ aws-sdk (2.9.3)
16
+ aws-sdk-resources (= 2.9.3)
17
+ aws-sdk-core (2.9.3)
18
18
  aws-sigv4 (~> 1.0)
19
19
  jmespath (~> 1.0)
20
- aws-sdk-resources (2.7.3)
21
- aws-sdk-core (= 2.7.3)
20
+ aws-sdk-resources (2.9.3)
21
+ aws-sdk-core (= 2.9.3)
22
22
  aws-sigv4 (1.0.0)
23
- berkshelf (5.6.0)
23
+ berkshelf (5.6.4)
24
24
  addressable (~> 2.3, >= 2.3.4)
25
25
  berkshelf-api-client (>= 2.0.2, < 4.0)
26
26
  buff-config (~> 2.0)
@@ -40,6 +40,7 @@ GEM
40
40
  faraday (~> 0.9)
41
41
  httpclient (~> 2.7)
42
42
  ridley (>= 4.5, < 6.0)
43
+ blankslate (2.1.2.4)
43
44
  buff-config (2.0.0)
44
45
  buff-extensions (~> 2.0)
45
46
  varia_model (~> 0.6)
@@ -54,7 +55,7 @@ GEM
54
55
  celluloid-io (0.16.2)
55
56
  celluloid (>= 0.16.0)
56
57
  nio4r (>= 1.1.0)
57
- chef-config (12.18.31)
58
+ chef-config (12.19.36)
58
59
  addressable
59
60
  fuzzyurl
60
61
  mixlib-config (~> 2.0)
@@ -62,36 +63,26 @@ GEM
62
63
  cleanroom (1.0.0)
63
64
  coderay (1.1.1)
64
65
  diff-lcs (1.3)
65
- docker-api (1.33.2)
66
+ docker-api (1.33.3)
66
67
  excon (>= 0.38.0)
67
68
  json
68
- domain_name (0.5.20161129)
69
- unf (>= 0.0.5, < 1.0.0)
70
69
  erubis (2.7.0)
71
- excon (0.54.0)
70
+ excon (0.55.0)
72
71
  faraday (0.9.2)
73
72
  multipart-post (>= 1.2, < 3)
74
- ffi (1.9.17)
73
+ ffi (1.9.18)
75
74
  fuzzyurl (0.9.0)
76
75
  gssapi (1.2.0)
77
76
  ffi (>= 1.0.1)
78
77
  gyoku (1.3.1)
79
78
  builder (>= 2.1.2)
80
- hashie (3.5.1)
79
+ hashie (3.5.5)
81
80
  hitimes (1.2.4)
82
- http (2.1.0)
83
- addressable (~> 2.3)
84
- http-cookie (~> 1.0)
85
- http-form_data (~> 1.0.1)
86
- http_parser.rb (~> 0.6.0)
87
- http-cookie (1.0.3)
88
- domain_name (~> 0.5)
89
- http-form_data (1.0.1)
90
- http_parser.rb (0.6.0)
91
81
  httpclient (2.8.3)
92
- inspec (1.11.0)
82
+ inspec (1.19.1)
83
+ addressable (~> 2.4)
84
+ faraday (>= 0.9.0)
93
85
  hashie (~> 3.4)
94
- http (~> 2.1.0)
95
86
  json (>= 1.8, < 3.0)
96
87
  method_source (~> 0.8)
97
88
  mixlib-log
@@ -100,14 +91,14 @@ GEM
100
91
  rainbow (~> 2)
101
92
  rspec (~> 3)
102
93
  rspec-its (~> 1.2)
103
- rspec_junit_formatter (~> 0.2.3)
104
94
  rubyzip (~> 1.1)
105
95
  sslshake (~> 1)
106
96
  thor (~> 0.19)
97
+ toml (~> 0.1)
107
98
  train (>= 0.22.0, < 1.0)
108
99
  jmespath (1.3.1)
109
100
  json (2.0.3)
110
- kitchen-ec2 (1.2.0)
101
+ kitchen-ec2 (1.3.2)
111
102
  aws-sdk (~> 2)
112
103
  excon
113
104
  multi_json
@@ -117,14 +108,14 @@ GEM
117
108
  hashie (~> 3.4)
118
109
  inspec (>= 0.34.0, < 2.0.0)
119
110
  test-kitchen (~> 1.6)
120
- kitchen-vagrant (1.0.0)
111
+ kitchen-vagrant (1.1.0)
121
112
  test-kitchen (~> 1.4)
122
113
  little-plugger (1.1.4)
123
- logging (2.1.0)
114
+ logging (2.2.0)
124
115
  little-plugger (~> 1.1)
125
116
  multi_json (~> 1.10)
126
117
  method_source (0.8.2)
127
- minitar (0.5.4)
118
+ minitar (0.6.1)
128
119
  mixlib-archive (0.4.1)
129
120
  mixlib-log
130
121
  mixlib-authentication (1.4.1)
@@ -137,19 +128,21 @@ GEM
137
128
  mixlib-log (1.7.1)
138
129
  mixlib-shellout (2.2.7)
139
130
  mixlib-versioning (1.1.0)
140
- molinillo (0.5.5)
131
+ molinillo (0.5.7)
141
132
  multi_json (1.12.1)
142
133
  multipart-post (2.0.0)
143
134
  net-scp (1.2.1)
144
135
  net-ssh (>= 2.6.5)
145
- net-ssh (4.0.1)
136
+ net-ssh (4.1.0)
146
137
  net-ssh-gateway (1.3.0)
147
138
  net-ssh (>= 2.6.5)
148
139
  nio4r (2.0.0)
149
140
  nori (2.6.0)
150
141
  octokit (4.6.2)
151
142
  sawyer (~> 0.8.0, >= 0.5.3)
152
- parallel (1.10.0)
143
+ parallel (1.11.1)
144
+ parslet (1.5.0)
145
+ blankslate (~> 2.0)
153
146
  pry (0.10.4)
154
147
  coderay (~> 1.1.0)
155
148
  method_source (~> 0.8.1)
@@ -191,11 +184,8 @@ GEM
191
184
  diff-lcs (>= 1.2.0, < 2.0)
192
185
  rspec-support (~> 3.4.0)
193
186
  rspec-support (3.4.1)
194
- rspec_junit_formatter (0.2.3)
195
- builder (< 4)
196
- rspec-core (>= 2, < 4, != 2.12.0)
197
187
  rubyntlm (0.6.1)
198
- rubyzip (1.2.0)
188
+ rubyzip (1.2.1)
199
189
  safe_yaml (1.0.4)
200
190
  sawyer (0.8.1)
201
191
  addressable (>= 2.3.5, < 2.6)
@@ -205,19 +195,21 @@ GEM
205
195
  solve (3.1.0)
206
196
  molinillo (>= 0.5)
207
197
  semverse (>= 1.1, < 3.0)
208
- sslshake (1.0.13)
209
- test-kitchen (1.15.0)
198
+ sslshake (1.1.0)
199
+ test-kitchen (1.16.0)
210
200
  mixlib-install (>= 1.2, < 3.0)
211
201
  mixlib-shellout (>= 1.2, < 3.0)
212
202
  net-scp (~> 1.1)
213
203
  net-ssh (>= 2.9, < 5.0)
214
204
  net-ssh-gateway (~> 1.2)
215
205
  safe_yaml (~> 1.0)
216
- thor (~> 0.18)
206
+ thor (~> 0.19, < 0.19.2)
217
207
  thor (0.19.1)
218
208
  timers (4.0.4)
219
209
  hitimes
220
- train (0.22.1)
210
+ toml (0.1.2)
211
+ parslet (~> 1.5.0)
212
+ train (0.23.0)
221
213
  docker-api (~> 1.26)
222
214
  json (>= 1.8, < 3.0)
223
215
  mixlib-shellout (~> 2.0)
@@ -225,15 +217,12 @@ GEM
225
217
  net-ssh (>= 2.9, < 5.0)
226
218
  winrm (~> 2.0)
227
219
  winrm-fs (~> 1.0)
228
- unf (0.1.4)
229
- unf_ext
230
- unf_ext (0.0.7.2)
231
220
  varia_model (0.6.0)
232
221
  buff-extensions (~> 2.0)
233
222
  hashie (>= 2.0.2, < 4.0.0)
234
223
  windows_chef_zero (2.0.0)
235
224
  test-kitchen (>= 1.2.1)
236
- winrm (2.1.2)
225
+ winrm (2.2.1)
237
226
  builder (>= 2.1.2)
238
227
  erubis (~> 2.7)
239
228
  gssapi (~> 1.2)
data/bin/chef CHANGED
@@ -20,6 +20,6 @@
20
20
  Kernel.trap(:INT) { print("\n"); exit 1 }
21
21
 
22
22
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
23
- require 'chef-dk/cli'
23
+ require "chef-dk/cli"
24
24
 
25
25
  ChefDK::CLI.new(ARGV.clone).run
@@ -15,9 +15,9 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- lib = File.expand_path('../lib', __FILE__)
18
+ lib = File.expand_path("../lib", __FILE__)
19
19
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
20
- require 'chef-dk/version'
20
+ require "chef-dk/version"
21
21
 
22
22
  Gem::Specification.new do |gem|
23
23
  gem.name = "chef-dk"
@@ -28,14 +28,14 @@ Gem::Specification.new do |gem|
28
28
  gem.summary = gem.description
29
29
  gem.homepage = "https://www.chef.io/"
30
30
 
31
- gem.required_ruby_version = '>= 2.2'
31
+ gem.required_ruby_version = ">= 2.2"
32
32
 
33
33
  gem.files = %w{Rakefile LICENSE README.md warning.txt} +
34
- %w{version_policy.rb omnibus_overrides.rb} +
35
- Dir.glob("Gemfile*") + # Includes Gemfile and locks
36
- Dir.glob("*.gemspec") +
37
- Dir.glob("{lib,spec,acceptance,tasks}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
38
- gem.executables = %w( chef )
34
+ %w{version_policy.rb omnibus_overrides.rb} +
35
+ Dir.glob("Gemfile*") + # Includes Gemfile and locks
36
+ Dir.glob("*.gemspec") +
37
+ Dir.glob("{lib,spec,acceptance,tasks}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
38
+ gem.executables = %w{ chef }
39
39
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
40
40
  gem.require_paths = ["lib"]
41
41
 
@@ -53,7 +53,7 @@ Gem::Specification.new do |gem|
53
53
 
54
54
  gem.add_development_dependency "rake"
55
55
 
56
- %w(rspec-core rspec-expectations rspec-mocks).each do |dev_gem|
56
+ %w{rspec-core rspec-expectations rspec-mocks}.each do |dev_gem|
57
57
  gem.add_development_dependency dev_gem, "~> 3.0"
58
58
  end
59
59
 
@@ -15,12 +15,12 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'chef/http'
19
- require 'chef/http/authenticator'
20
- require 'chef/http/json_input'
21
- require 'chef/http/json_output'
22
- require 'chef/http/decompressor'
23
- require 'chef/http/validate_content_length'
18
+ require "chef/http"
19
+ require "chef/http/authenticator"
20
+ require "chef/http/json_input"
21
+ require "chef/http/json_output"
22
+ require "chef/http/decompressor"
23
+ require "chef/http/validate_content_length"
24
24
 
25
25
  module ChefDK
26
26
  class AuthenticatedHTTP < Chef::HTTP
@@ -37,4 +37,3 @@ module ChefDK
37
37
 
38
38
  end
39
39
  end
40
-
@@ -15,16 +15,15 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
-
19
18
  ChefDK.commands do |c|
20
19
  c.builtin "exec", :Exec, require_path: "chef-dk/command/exec",
21
- desc: "Runs the command in context of the embedded ruby"
20
+ desc: "Runs the command in context of the embedded ruby"
22
21
 
23
22
  c.builtin "env", :Env, require_path: "chef-dk/command/env",
24
- desc: "Prints environment variables used by ChefDK"
23
+ desc: "Prints environment variables used by ChefDK"
25
24
 
26
25
  c.builtin "gem", :GemForwarder, require_path: "chef-dk/command/gem",
27
- desc: "Runs the `gem` command in context of the embedded ruby"
26
+ desc: "Runs the `gem` command in context of the embedded ruby"
28
27
 
29
28
  c.builtin "generate", :Generate, desc: "Generate a new app, cookbook, or component"
30
29
 
@@ -15,13 +15,13 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'chef-dk/exceptions'
19
- require 'chef-dk/service_exceptions'
20
- require 'chef/policy_builder/dynamic'
21
- require 'chef'
18
+ require "chef-dk/exceptions"
19
+ require "chef-dk/service_exceptions"
20
+ require "chef/policy_builder/dynamic"
21
+ require "chef"
22
22
 
23
- require 'chef-dk/command/generator_commands/chef_exts/quieter_doc_formatter'
24
- require 'chef-dk/command/generator_commands/chef_exts/recipe_dsl_ext'
23
+ require "chef-dk/command/generator_commands/chef_exts/quieter_doc_formatter"
24
+ require "chef-dk/command/generator_commands/chef_exts/recipe_dsl_ext"
25
25
 
26
26
  module ChefDK
27
27
 
@@ -98,7 +98,7 @@ module ChefDK
98
98
  return @ohai if @ohai
99
99
 
100
100
  @ohai = Ohai::System.new
101
- @ohai.all_plugins(["platform", "platform_version"])
101
+ @ohai.all_plugins(%w{platform platform_version})
102
102
  @ohai
103
103
  end
104
104
 
@@ -112,4 +112,3 @@ module ChefDK
112
112
 
113
113
  end
114
114
  end
115
-
@@ -15,15 +15,15 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'mixlib/cli'
19
- require 'chef-dk/version'
20
- require 'chef-dk/commands_map'
21
- require 'chef-dk/builtin_commands'
22
- require 'chef-dk/helpers'
23
- require 'chef-dk/ui'
24
- require 'chef/util/path_helper'
25
- require 'chef/mixin/shell_out'
26
- require 'bundler'
18
+ require "mixlib/cli"
19
+ require "chef-dk/version"
20
+ require "chef-dk/commands_map"
21
+ require "chef-dk/builtin_commands"
22
+ require "chef-dk/helpers"
23
+ require "chef-dk/ui"
24
+ require "chef/util/path_helper"
25
+ require "chef/mixin/shell_out"
26
+ require "bundler"
27
27
 
28
28
  module ChefDK
29
29
  class CLI
@@ -149,7 +149,7 @@ BANNER
149
149
  private
150
150
 
151
151
  def normalized_exit_code(maybe_integer)
152
- if maybe_integer.kind_of?(Integer) and (0..255).include?(maybe_integer)
152
+ if maybe_integer.kind_of?(Integer) && (0..255).cover?(maybe_integer)
153
153
  maybe_integer
154
154
  else
155
155
  0
@@ -163,7 +163,7 @@ BANNER
163
163
 
164
164
  # upcase drive letters for comparison since ruby has a String#capitalize function
165
165
  def drive_upcase(path)
166
- if Chef::Platform.windows? && path[0] =~ /^[A-Za-z]$/ && path[1,2] == ":\\"
166
+ if Chef::Platform.windows? && path[0] =~ /^[A-Za-z]$/ && path[1, 2] == ":\\"
167
167
  path.capitalize
168
168
  else
169
169
  path