chef 12.17.44-universal-mingw32 → 12.18.31-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/README.md +3 -2
  4. data/Rakefile +9 -0
  5. data/VERSION +1 -1
  6. data/acceptance/Gemfile.lock +17 -17
  7. data/distro/common/html/knife_environment.html +4 -8
  8. data/distro/common/man/man1/knife-environment.1 +4 -16
  9. data/distro/powershell/chef/chef.psm1 +139 -24
  10. data/lib/chef/application.rb +5 -4
  11. data/lib/chef/application/windows_service_manager.rb +6 -4
  12. data/lib/chef/chef_fs/chef_fs_data_store.rb +1 -1
  13. data/lib/chef/chef_fs/command_line.rb +1 -1
  14. data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +8 -1
  15. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +1 -1
  16. data/lib/chef/chef_fs/file_system/repository/nodes_dir.rb +1 -1
  17. data/lib/chef/cookbook/chefignore.rb +1 -1
  18. data/lib/chef/cookbook/cookbook_version_loader.rb +4 -4
  19. data/lib/chef/cookbook/metadata.rb +2 -2
  20. data/lib/chef/cookbook_loader.rb +1 -1
  21. data/lib/chef/data_collector.rb +24 -13
  22. data/lib/chef/data_collector/messages.rb +8 -6
  23. data/lib/chef/data_collector/messages/helpers.rb +1 -1
  24. data/lib/chef/deprecated.rb +30 -0
  25. data/lib/chef/dsl/platform_introspection.rb +2 -2
  26. data/lib/chef/encrypted_data_bag_item.rb +1 -1
  27. data/lib/chef/encrypted_data_bag_item/decryptor.rb +2 -2
  28. data/lib/chef/environment.rb +1 -1
  29. data/lib/chef/exceptions.rb +5 -5
  30. data/lib/chef/file_access_control/unix.rb +5 -5
  31. data/lib/chef/formatters/error_description.rb +1 -1
  32. data/lib/chef/http/basic_client.rb +1 -1
  33. data/lib/chef/http/json_input.rb +2 -2
  34. data/lib/chef/knife.rb +1 -1
  35. data/lib/chef/knife/cookbook_site_install.rb +1 -1
  36. data/lib/chef/knife/core/cookbook_scm_repo.rb +1 -1
  37. data/lib/chef/knife/core/ui.rb +1 -1
  38. data/lib/chef/mixin/command.rb +1 -0
  39. data/lib/chef/mixin/deep_merge.rb +1 -1
  40. data/lib/chef/mixin/shell_out.rb +58 -3
  41. data/lib/chef/mixin/which.rb +5 -9
  42. data/lib/chef/mixin/wide_string.rb +1 -1
  43. data/lib/chef/node.rb +1 -1
  44. data/lib/chef/node/attribute.rb +4 -5
  45. data/lib/chef/node_map.rb +18 -2
  46. data/lib/chef/platform/provider_handler_map.rb +2 -2
  47. data/lib/chef/platform/provider_mapping.rb +5 -0
  48. data/lib/chef/platform/resource_handler_map.rb +2 -2
  49. data/lib/chef/provider/env/windows.rb +1 -1
  50. data/lib/chef/provider/git.rb +1 -1
  51. data/lib/chef/provider/group.rb +41 -46
  52. data/lib/chef/provider/group/aix.rb +12 -19
  53. data/lib/chef/provider/group/dscl.rb +46 -43
  54. data/lib/chef/provider/group/gpasswd.rb +7 -7
  55. data/lib/chef/provider/group/groupadd.rb +29 -34
  56. data/lib/chef/provider/group/groupmod.rb +26 -31
  57. data/lib/chef/provider/group/pw.rb +28 -31
  58. data/lib/chef/provider/group/suse.rb +9 -9
  59. data/lib/chef/provider/group/usermod.rb +10 -11
  60. data/lib/chef/provider/group/windows.rb +18 -20
  61. data/lib/chef/provider/ifconfig.rb +52 -63
  62. data/lib/chef/provider/ifconfig/aix.rb +23 -28
  63. data/lib/chef/provider/ifconfig/debian.rb +23 -22
  64. data/lib/chef/provider/ifconfig/redhat.rb +12 -12
  65. data/lib/chef/provider/mount/mount.rb +1 -1
  66. data/lib/chef/provider/osx_profile.rb +4 -2
  67. data/lib/chef/provider/package.rb +16 -7
  68. data/lib/chef/provider/package/chocolatey.rb +3 -1
  69. data/lib/chef/provider/package/dnf.rb +183 -0
  70. data/lib/chef/provider/package/dnf/dnf_helper.py +91 -0
  71. data/lib/chef/provider/package/dnf/python_helper.rb +120 -0
  72. data/lib/chef/provider/package/dnf/version.rb +56 -0
  73. data/lib/chef/provider/package/easy_install.rb +1 -1
  74. data/lib/chef/provider/package/freebsd/base.rb +1 -1
  75. data/lib/chef/provider/package/freebsd/pkgng.rb +1 -1
  76. data/lib/chef/provider/package/powershell.rb +3 -3
  77. data/lib/chef/provider/package/windows.rb +1 -1
  78. data/lib/chef/provider/package/zypper.rb +1 -1
  79. data/lib/chef/provider/route.rb +186 -184
  80. data/lib/chef/provider/service/arch.rb +2 -2
  81. data/lib/chef/provider/service/freebsd.rb +1 -1
  82. data/lib/chef/provider/service/gentoo.rb +2 -2
  83. data/lib/chef/provider/service/insserv.rb +2 -2
  84. data/lib/chef/provider/service/macosx.rb +2 -2
  85. data/lib/chef/provider/service/openbsd.rb +1 -1
  86. data/lib/chef/provider/service/redhat.rb +2 -2
  87. data/lib/chef/provider/support/yum_repo.erb +10 -3
  88. data/lib/chef/provider/user.rb +17 -20
  89. data/lib/chef/provider/user/aix.rb +23 -24
  90. data/lib/chef/provider/user/dscl.rb +56 -53
  91. data/lib/chef/provider/user/linux.rb +13 -16
  92. data/lib/chef/provider/user/pw.rb +26 -30
  93. data/lib/chef/provider/user/solaris.rb +11 -12
  94. data/lib/chef/provider/user/useradd.rb +20 -22
  95. data/lib/chef/provider/user/windows.rb +19 -22
  96. data/lib/chef/provider_resolver.rb +4 -2
  97. data/lib/chef/providers.rb +1 -0
  98. data/lib/chef/resource.rb +7 -0
  99. data/lib/chef/resource/chocolatey_package.rb +1 -0
  100. data/lib/chef/resource/dnf_package.rb +64 -0
  101. data/lib/chef/resource/file/verification.rb +6 -4
  102. data/lib/chef/resource/yum_package.rb +18 -14
  103. data/lib/chef/resource/yum_repository.rb +1 -1
  104. data/lib/chef/resource_reporter.rb +11 -0
  105. data/lib/chef/resources.rb +1 -0
  106. data/lib/chef/scan_access_control.rb +4 -4
  107. data/lib/chef/util/dsc/resource_store.rb +1 -1
  108. data/lib/chef/version.rb +1 -1
  109. data/lib/chef/win32/memory.rb +1 -1
  110. data/lib/chef/win32/security.rb +2 -2
  111. data/lib/chef/win32/security/sid.rb +2 -2
  112. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.fc24.i686.rpm +0 -0
  113. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.fc24.src.rpm +0 -0
  114. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.fc24.x86_64.rpm +0 -0
  115. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.fc24.i686.rpm +0 -0
  116. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.fc24.src.rpm +0 -0
  117. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.fc24.x86_64.rpm +0 -0
  118. data/spec/functional/assets/yumrepo/repodata/313329137b55fd333b2dc66394a6661a2befa6cc535d8460d92a4a78a9c581f0-primary.sqlite.bz2 +0 -0
  119. data/spec/functional/assets/yumrepo/repodata/31ac4db5d5ac593728fcc26aef82b7b93c4cc4dbec843786b1845b939b658553-other.xml.gz +0 -0
  120. data/spec/functional/assets/yumrepo/repodata/4ac40fa3c6728c1401318e2e20a997436624e83dcf7a5f952b851ef422637773-filelists.sqlite.bz2 +0 -0
  121. data/spec/functional/assets/yumrepo/repodata/66391e53f0510b98b3f0b79f40ba1048026d9a1ef20905d9c40ba6f5411f3243-primary.xml.gz +0 -0
  122. data/spec/functional/assets/yumrepo/repodata/8b34697595fcc87928e12d24644dda9462c3857bd932861e28bc77ae1f31be16-filelists.xml.gz +0 -0
  123. data/spec/functional/assets/yumrepo/repodata/b97cca3fe14bcf06c52be4449b6108f7731239ff221111dcce8aada5467f60dc-other.sqlite.bz2 +0 -0
  124. data/spec/functional/assets/yumrepo/repodata/repomd.xml +55 -0
  125. data/spec/functional/resource/dnf_package_spec.rb +686 -0
  126. data/spec/functional/resource/dsc_script_spec.rb +1 -0
  127. data/spec/functional/resource/user/useradd_spec.rb +10 -1
  128. data/spec/integration/knife/chef_repo_path_spec.rb +2 -2
  129. data/spec/integration/recipes/recipe_dsl_spec.rb +3 -0
  130. data/spec/integration/recipes/resource_load_spec.rb +3 -3
  131. data/spec/spec_helper.rb +5 -3
  132. data/spec/support/lib/chef/provider/snakeoil.rb +1 -0
  133. data/spec/support/lib/chef/resource/cat.rb +1 -0
  134. data/spec/support/lib/chef/resource/one_two_three_four.rb +1 -0
  135. data/spec/support/lib/chef/resource/openldap_includer.rb +2 -0
  136. data/spec/support/lib/chef/resource/with_state.rb +2 -0
  137. data/spec/support/lib/chef/resource/zen_master.rb +1 -0
  138. data/spec/unit/cookbook/metadata_spec.rb +3 -3
  139. data/spec/unit/data_collector/messages/helpers_spec.rb +7 -0
  140. data/spec/unit/data_collector_spec.rb +56 -0
  141. data/spec/unit/decorator/lazy_spec.rb +1 -1
  142. data/spec/unit/environment_spec.rb +1 -1
  143. data/spec/unit/lwrp_spec.rb +3 -4
  144. data/spec/unit/node_spec.rb +23 -2
  145. data/spec/unit/platform_spec.rb +1 -0
  146. data/spec/unit/provider/group/dscl_spec.rb +29 -29
  147. data/spec/unit/provider/group/gpasswd_spec.rb +10 -10
  148. data/spec/unit/provider/group/groupadd_spec.rb +31 -30
  149. data/spec/unit/provider/group/groupmod_spec.rb +16 -16
  150. data/spec/unit/provider/group/pw_spec.rb +11 -11
  151. data/spec/unit/provider/group/suse_spec.rb +5 -5
  152. data/spec/unit/provider/group/usermod_spec.rb +15 -15
  153. data/spec/unit/provider/ifconfig/aix_spec.rb +14 -14
  154. data/spec/unit/provider/ifconfig/debian_spec.rb +10 -22
  155. data/spec/unit/provider/ifconfig/redhat_spec.rb +4 -4
  156. data/spec/unit/provider/ifconfig_spec.rb +18 -19
  157. data/spec/unit/provider/package/chocolatey_spec.rb +21 -21
  158. data/spec/unit/provider/package/msu_spec.rb +1 -1
  159. data/spec/unit/provider/route_spec.rb +21 -21
  160. data/spec/unit/provider/user/dscl_spec.rb +54 -57
  161. data/spec/unit/provider/user/linux_spec.rb +5 -5
  162. data/spec/unit/provider/user/pw_spec.rb +26 -22
  163. data/spec/unit/provider/user/windows_spec.rb +4 -4
  164. data/spec/unit/provider/user_spec.rb +19 -21
  165. data/spec/unit/provider_resolver_spec.rb +1 -0
  166. data/spec/unit/resource/chocolatey_package_spec.rb +12 -0
  167. data/spec/unit/resource/dnf_package_spec.rb +99 -0
  168. data/spec/unit/resource/remote_file_spec.rb +2 -2
  169. data/spec/unit/resource/yum_package_spec.rb +20 -0
  170. data/spec/unit/resource_reporter_spec.rb +24 -0
  171. data/spec/unit/resource_spec.rb +2 -0
  172. data/spec/unit/runner_spec.rb +1 -0
  173. data/tasks/bin/bundle-platform +1 -1
  174. data/tasks/gemfile_util.rb +2 -2
  175. data/tasks/templates/prerelease.md.erb +1 -10
  176. data/tasks/templates/release.md.erb +1 -9
  177. metadata +24 -5
  178. data/lib/chef/platform/handler_map.rb +0 -40
@@ -101,6 +101,7 @@ describe Chef::Runner do
101
101
  context "when we fall through to old Chef::Platform resolution" do
102
102
  let(:provider_resolver) { Chef::ProviderResolver.new(node, first_resource, nil) }
103
103
  before do
104
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
104
105
  # set up old Chef::Platform resolution instead of provider_resolver
105
106
  Chef::Platform.set(
106
107
  :resource => :cat,
@@ -6,7 +6,7 @@ platforms = platforms.split(" ").map { |p| Gem::Platform.new(p) }
6
6
  Gem::Platform.instance_eval { @local = platforms.last }
7
7
  old_platforms = Gem.platforms
8
8
  Gem.platforms = platforms
9
- puts "bundle-platform set Gem.platforms to #{Gem.platforms.map { |p| p.to_s }} (was #{old_platforms.map { |p| p.to_s } })"
9
+ puts "bundle-platform set Gem.platforms to #{Gem.platforms.map { |p| p.to_s }} (was #{old_platforms.map { |p| p.to_s }})"
10
10
 
11
11
  desired_version = ARGV.shift.delete("_")
12
12
 
@@ -255,8 +255,8 @@ module GemfileUtil
255
255
  result = {}
256
256
  gems.each do |name, g|
257
257
  dep_groups = g[:declared_groups] - [ :only_a_runtime_dependency_of_other_gems ]
258
- dep_groups = dep_groups & groups if groups
259
- dep_groups = dep_groups - without_groups if without_groups
258
+ dep_groups &= groups if groups
259
+ dep_groups -= without_groups if without_groups
260
260
  if dep_groups.any?
261
261
  result[name] ||= g
262
262
  g[:dependencies].each do |dep|
@@ -9,7 +9,7 @@ We have selected <%= @version %> as our Chef v<%= @maj_minor %> release candidat
9
9
  Please see the [CHANGELOG](https://github.com/chef/chef/blob/master/CHANGELOG.md) for the complete list of changes.
10
10
 
11
11
  # Get the Build
12
- As always, you can download binaries directly from [downloads.chef.io](https://downloads.chef.io/chef-client) or by using the new `mixlib-install` command line utility available in ChefDK 0.19.6 or greater.
12
+ As always, you can download binaries directly from [downloads.chef.io](https://downloads.chef.io/chef/current/<%= @version %>) or by using the new `mixlib-install` command line utility available in ChefDK 0.19.6 or greater.
13
13
 
14
14
  ```shell
15
15
  $ mixlib-install download chef -v <%= @version %> -c current
@@ -24,12 +24,3 @@ $ curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef -v <%= @ve
24
24
  # In Windows Powershell
25
25
  . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project chef -version <%= @version %> -channel current
26
26
  ```
27
-
28
- If you want to give this version a spin in Test Kitchen, create or add the following to a `.kitchen.local.yml` file:
29
-
30
- ```yaml
31
- provisioner:
32
- product_name: chef
33
- channel: current
34
- product_version: <%= @version %>
35
- ```
@@ -9,7 +9,7 @@ We're happy to announce the release of Chef v<%= @maj_minor %>!
9
9
  Please see the [CHANGELOG](https://github.com/chef/chef/blob/master/CHANGELOG.md) for the complete list of changes.
10
10
 
11
11
  # Get the Build
12
- As always, you can download binaries directly from [downloads.chef.io](https://downloads.chef.io/chef-client) or by using the new `mixlib-install` command line utility available in ChefDK 0.19.6 or greater.
12
+ As always, you can download binaries directly from [downloads.chef.io](https://downloads.chef.io/chef/<%= @version %>) or by using the new `mixlib-install` command line utility available in ChefDK 0.19.6 or greater.
13
13
 
14
14
  ```shell
15
15
  $ mixlib-install download chef -v <%= @version %>
@@ -24,11 +24,3 @@ $ curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef -v <%= @ve
24
24
  # In Windows Powershell
25
25
  . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project chef -version <%= @version %>
26
26
  ```
27
-
28
- If you want to give this version a spin in Test Kitchen, create or add the following to a `.kitchen.local.yml` file:
29
-
30
- ```yaml
31
- provisioner:
32
- product_name: chef
33
- product_version: <%= @version %>
34
- ```
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.17.44
4
+ version: 12.18.31
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-07 00:00:00.000000000 Z
11
+ date: 2017-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 12.17.44
19
+ version: 12.18.31
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 12.17.44
26
+ version: 12.18.31
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-cli
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -1353,7 +1353,6 @@ files:
1353
1353
  - lib/chef/null_logger.rb
1354
1354
  - lib/chef/org.rb
1355
1355
  - lib/chef/platform.rb
1356
- - lib/chef/platform/handler_map.rb
1357
1356
  - lib/chef/platform/priority_map.rb
1358
1357
  - lib/chef/platform/provider_handler_map.rb
1359
1358
  - lib/chef/platform/provider_mapping.rb
@@ -1425,6 +1424,10 @@ files:
1425
1424
  - lib/chef/provider/package/apt.rb
1426
1425
  - lib/chef/provider/package/cab.rb
1427
1426
  - lib/chef/provider/package/chocolatey.rb
1427
+ - lib/chef/provider/package/dnf.rb
1428
+ - lib/chef/provider/package/dnf/dnf_helper.py
1429
+ - lib/chef/provider/package/dnf/python_helper.rb
1430
+ - lib/chef/provider/package/dnf/version.rb
1428
1431
  - lib/chef/provider/package/dpkg.rb
1429
1432
  - lib/chef/provider/package/easy_install.rb
1430
1433
  - lib/chef/provider/package/freebsd/base.rb
@@ -1530,6 +1533,7 @@ files:
1530
1533
  - lib/chef/resource/deploy.rb
1531
1534
  - lib/chef/resource/deploy_revision.rb
1532
1535
  - lib/chef/resource/directory.rb
1536
+ - lib/chef/resource/dnf_package.rb
1533
1537
  - lib/chef/resource/dpkg_package.rb
1534
1538
  - lib/chef/resource/dsc_resource.rb
1535
1539
  - lib/chef/resource/dsc_script.rb
@@ -2025,6 +2029,19 @@ files:
2025
2029
  - spec/functional/assets/mytest-1.0-1.noarch.rpm
2026
2030
  - spec/functional/assets/mytest-2.0-1.noarch.rpm
2027
2031
  - spec/functional/assets/testchefsubsys
2032
+ - spec/functional/assets/yumrepo/chef_rpm-1.10-1.fc24.i686.rpm
2033
+ - spec/functional/assets/yumrepo/chef_rpm-1.10-1.fc24.src.rpm
2034
+ - spec/functional/assets/yumrepo/chef_rpm-1.10-1.fc24.x86_64.rpm
2035
+ - spec/functional/assets/yumrepo/chef_rpm-1.2-1.fc24.i686.rpm
2036
+ - spec/functional/assets/yumrepo/chef_rpm-1.2-1.fc24.src.rpm
2037
+ - spec/functional/assets/yumrepo/chef_rpm-1.2-1.fc24.x86_64.rpm
2038
+ - spec/functional/assets/yumrepo/repodata/313329137b55fd333b2dc66394a6661a2befa6cc535d8460d92a4a78a9c581f0-primary.sqlite.bz2
2039
+ - spec/functional/assets/yumrepo/repodata/31ac4db5d5ac593728fcc26aef82b7b93c4cc4dbec843786b1845b939b658553-other.xml.gz
2040
+ - spec/functional/assets/yumrepo/repodata/4ac40fa3c6728c1401318e2e20a997436624e83dcf7a5f952b851ef422637773-filelists.sqlite.bz2
2041
+ - spec/functional/assets/yumrepo/repodata/66391e53f0510b98b3f0b79f40ba1048026d9a1ef20905d9c40ba6f5411f3243-primary.xml.gz
2042
+ - spec/functional/assets/yumrepo/repodata/8b34697595fcc87928e12d24644dda9462c3857bd932861e28bc77ae1f31be16-filelists.xml.gz
2043
+ - spec/functional/assets/yumrepo/repodata/b97cca3fe14bcf06c52be4449b6108f7731239ff221111dcce8aada5467f60dc-other.sqlite.bz2
2044
+ - spec/functional/assets/yumrepo/repodata/repomd.xml
2028
2045
  - spec/functional/audit/rspec_formatter_spec.rb
2029
2046
  - spec/functional/audit/runner_spec.rb
2030
2047
  - spec/functional/dsl/reboot_pending_spec.rb
@@ -2055,6 +2072,7 @@ files:
2055
2072
  - spec/functional/resource/cron_spec.rb
2056
2073
  - spec/functional/resource/deploy_revision_spec.rb
2057
2074
  - spec/functional/resource/directory_spec.rb
2075
+ - spec/functional/resource/dnf_package_spec.rb
2058
2076
  - spec/functional/resource/dpkg_package_spec.rb
2059
2077
  - spec/functional/resource/dsc_resource_spec.rb
2060
2078
  - spec/functional/resource/dsc_script_spec.rb
@@ -2620,6 +2638,7 @@ files:
2620
2638
  - spec/unit/resource/deploy_revision_spec.rb
2621
2639
  - spec/unit/resource/deploy_spec.rb
2622
2640
  - spec/unit/resource/directory_spec.rb
2641
+ - spec/unit/resource/dnf_package_spec.rb
2623
2642
  - spec/unit/resource/dpkg_package_spec.rb
2624
2643
  - spec/unit/resource/dsc_resource_spec.rb
2625
2644
  - spec/unit/resource/dsc_script_spec.rb
@@ -1,40 +0,0 @@
1
- #
2
- # Author:: John Keiser (<jkeiser@chef.io>)
3
- # Copyright:: Copyright 2015-2016, Chef Software Inc.
4
- # License:: Apache License, Version 2.0
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
- require "chef/node_map"
20
-
21
- class Chef
22
- class Platform
23
- class HandlerMap < Chef::NodeMap
24
- #
25
- # "provides" lines with identical filters sort by class name (ascending).
26
- #
27
- def compare_matchers(key, new_matcher, matcher)
28
- cmp = super
29
- if cmp == 0
30
- # Sort by class name (ascending) as well, if all other properties
31
- # are exactly equal
32
- if new_matcher[:value].is_a?(Class) && !new_matcher[:override]
33
- cmp = compare_matcher_properties(new_matcher, matcher) { |m| m[:value].name }
34
- end
35
- end
36
- cmp
37
- end
38
- end
39
- end
40
- end