chef-utils 16.0.275 → 16.2.50

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6359ce5fe340fd518a775e0767884dc646b5e864d4b0a5829768a8bdc9a8193
4
- data.tar.gz: 93adc0d4f9b84b81ea84b7956a0537aca4bfed8c00953e88bfb4ff3f384b5b1c
3
+ metadata.gz: f21c5bb06ab1cb1e7c8e39e78b1388dfe7d45bff7fcea538615ac1a40678d7b2
4
+ data.tar.gz: b253423a687f1ff76c2edab45921ea6c37a5db72c2c071d083dbd7956353e346
5
5
  SHA512:
6
- metadata.gz: 216b0a647873e347d45f210eedee441c3ebac8f3f1eaed089e099594a298d8de5b271e7cb0240d970fd276b3e304ab7a493545b6045ec157c157bc0362c51723
7
- data.tar.gz: a9300bbebd923200a21cfbbc82f9c5b809a277a60bf2bf1ff437569378b203bea305ed20bdf170bcb98db6ce29bacf12c1e872b7e74c608e5d92b1ba256480b6
6
+ metadata.gz: d55f3685ff13babb8064beb3085134c4b5bd3e33a1c0d30b7c8228bd9a72bab465405544dde28a520e5e52abfb94dc34c16ba24f84d874921b1f6919db0f8739
7
+ data.tar.gz: b75df2effc7b2e7fc5c429d7c77b4d5fb311c6d97a199809210136b140556d309e4dee2fbb2405ebbf81d23cc6c4f869d3ea8ae9335b0ac299f19f1f14be683c
@@ -110,17 +110,17 @@ module ChefUtils
110
110
  # @return [Boolean]
111
111
  #
112
112
  def arm?(node = __getnode)
113
- %w{armhf aarch64 arm64 arch64}.include?(node["kernel"]["machine"])
113
+ %w{armv6l armv7l armhf aarch64 arm64 arch64}.include?(node["kernel"]["machine"])
114
114
  end
115
115
 
116
- # Determine if the current architecture is 32-bit ARM.
116
+ # Determine if the current architecture is 32-bit ARM hard float.
117
117
  #
118
118
  # @since 15.5
119
119
  #
120
120
  # @return [Boolean]
121
121
  #
122
122
  def armhf?(node = __getnode)
123
- %w{armhf}.include?(node["kernel"]["machine"])
123
+ %w{armv6l armv7l armhf}.include?(node["kernel"]["machine"])
124
124
  end
125
125
 
126
126
  # Determine if the current architecture is s390x.
@@ -301,7 +301,7 @@ module ChefUtils
301
301
  end
302
302
 
303
303
  # RedHat distros -- fedora and rhel platform_families, nothing else. This is most likely not as useful as the
304
- # "fedora_dervied?" helper.
304
+ # "fedora_derived?" helper.
305
305
  #
306
306
  # @param [Chef::Node] node the node to check
307
307
  # @since 15.5
@@ -25,7 +25,7 @@ module ChefUtils
25
25
  # Lookup an executable through the systems search PATH. Allows specifying an array
26
26
  # of executables to look for. The first executable that is found, along any path entry,
27
27
  # will be the preferred one and returned first. The extra_path will override any default
28
- # extra_paths which are added (allwing the user to pass an empty array to remove them).
28
+ # extra_paths which are added (allowing the user to pass an empty array to remove them).
29
29
  #
30
30
  # When passed a block the block will be called with the full pathname of any executables
31
31
  # which are found, and the block should return truthy or falsey values to further filter
@@ -34,7 +34,7 @@ module ChefUtils
34
34
  # This is syntactic sugar for `where(...).first`
35
35
  #
36
36
  # This helper can be used in target mode in chef or with train using the appropriate
37
- # wiring extenerally.
37
+ # wiring externally.
38
38
  #
39
39
  # @example Find the most appropriate python executable, searching through the system PATH
40
40
  # plus additionally the "/usr/libexec" directory, which has the dnf libraries
@@ -55,14 +55,14 @@ module ChefUtils
55
55
  # Lookup all the instances of an an executable that can be found through the systems search PATH.
56
56
  # Allows specifying an array of executables to look for. All the instances of the first executable
57
57
  # that is found will be returned first. The extra_path will override any default extra_paths
58
- # which are added (allwing the user to pass an empty array to remove them).
58
+ # which are added (allowing the user to pass an empty array to remove them).
59
59
  #
60
60
  # When passed a block the block will be called with the full pathname of any executables
61
61
  # which are found, and the block should return truthy or falsey values to further filter
62
62
  # the executable based on arbitrary criteria.
63
63
  #
64
64
  # This helper can be used in target mode in chef or with train using the appropriate
65
- # wiring extenerally.
65
+ # wiring externally.
66
66
  #
67
67
  # @example Find all the python executables, searching through the system PATH plus additionally
68
68
  # the "/usr/libexec" directory, which have the dnf libraries installed and available.
@@ -27,7 +27,7 @@ module ChefUtils
27
27
  #
28
28
  # This gem may be used by gems like mixlib-shellout which can be consumed by external non-Chef utilities,
29
29
  # so including brittle code here which depends on the existence of the chef-client will cause broken
30
- # behavior downstream. You must practice defensive coding, and not make assumptions about runnign within chef-client.
30
+ # behavior downstream. You must practice defensive coding, and not make assumptions about running within chef-client.
31
31
  #
32
32
  # Other consumers may mix in the helper classes and then override the methods here and provide their own custom
33
33
  # wiring and override what is provided here. They are marked as private because no downstream user should ever touch
@@ -15,5 +15,5 @@
15
15
 
16
16
  module ChefUtils
17
17
  CHEFUTILS_ROOT = File.expand_path("../..", __FILE__)
18
- VERSION = "16.0.275".freeze
18
+ VERSION = "16.2.50".freeze
19
19
  end
@@ -143,7 +143,7 @@ module ChefUtils
143
143
  begin
144
144
  Gem::Requirement.create(other) =~ parsed_version
145
145
  rescue ArgumentError
146
- # one side of the comparison wasn't parseable
146
+ # one side of the comparison wasn't parsable
147
147
  super
148
148
  end
149
149
  end
@@ -131,6 +131,17 @@ RSpec.describe ChefUtils::DSL::Architecture do
131
131
 
132
132
  arch_reports_true_for(:armhf?, :_32_bit?, :arm?)
133
133
  end
134
+ context "on armv6l" do
135
+ let(:arch) { "armv6l" }
136
+
137
+ arch_reports_true_for(:armhf?, :_32_bit?, :arm?)
138
+ end
139
+ context "on armv7l" do
140
+ let(:arch) { "armv7l" }
141
+
142
+ arch_reports_true_for(:armhf?, :_32_bit?, :arm?)
143
+ end
144
+
134
145
  context "on s390" do
135
146
  let(:arch) { "s390" }
136
147
 
@@ -31,7 +31,7 @@ RSpec.describe ChefUtils::DSL::Introspection do
31
31
  let(:test_instance) { IntrospectionTestClass.new(node) }
32
32
 
33
33
  context "#docker?" do
34
- # FIXME: use a real VividMash for these tests insted of stubbing
34
+ # FIXME: use a real VividMash for these tests instead of stubbing
35
35
  it "is false by default" do
36
36
  expect(node).to receive(:read).with("virtualization", "systems", "docker").and_return(nil)
37
37
  expect(ChefUtils.docker?(node)).to be false
@@ -209,7 +209,7 @@ RSpec.describe ChefUtils::DSL::PlatformFamily do
209
209
  end
210
210
 
211
211
  context "node-independent windows APIs" do
212
- if RUBY_PLATFORM =~ /mswin|mingw32|windows/
212
+ if RUBY_PLATFORM.match?(/mswin|mingw32|windows/)
213
213
  it "reports true for :windows_ruby?" do
214
214
  expect(described_class.windows_ruby?).to be true
215
215
  end
@@ -78,7 +78,7 @@ RSpec.describe ChefUtils::DSL::Which do
78
78
  end
79
79
 
80
80
  context "with a block" do
81
- test_which("doesnt find it if its false", "foo1", others: [ "/dir1/foo1" ]) do |f|
81
+ test_which("doesn't find it if its false", "foo1", others: [ "/dir1/foo1" ]) do |f|
82
82
  false
83
83
  end
84
84
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.275
4
+ version: 16.2.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-05 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: