mixlib-shellout 3.3.3-universal-mingw32 → 3.3.4-universal-mingw32

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: 3ffdff3b2db45006adab99c670f2059458c840b36b678c1c342c957cbe21e6a7
4
- data.tar.gz: 1312451c4439639db479b85a6c827916b6d949c72696a055f454c605ddcf63c9
3
+ metadata.gz: 5ce03266c7c25e063524e1ea83e431a15a0bbe8613b23bc11f0f2f4d5e8e7973
4
+ data.tar.gz: de2b250d95c976d0bf057ae0a1aff77e945a4db9b02a3afc3de0d9db80ce5c1e
5
5
  SHA512:
6
- metadata.gz: b27a7b09db45fa03dc9f9aca9b39d7b1b941f155ad12c821b87d7de5ff581310bda534d211b19105a7fbdeffeefd58163e5f296944342bdf5a73933d2839bc99
7
- data.tar.gz: 0ffac4252bf8df6c13e7a0111aaf84bb3ed6e1eb2ad8a8086bd372b3ba660534a01afda812a9be180c419377e25acd775aa0b8020b775d0885bb2bfdf5203a23
6
+ metadata.gz: 067133c65ac5941022338b606481fddba6f7b98a7807a656d9d23e9a1b2ca8d6bdf8288164034ed02db294247e901f03d56f5d5a164514ee3f62cdc0511b7c04
7
+ data.tar.gz: f83b79d951da8abfa8655c8c96bdfbdffb3be738c385963926402af0d072976b1556dfa868f02c243cb2269baf9798f36189932a20e9cd2309ed8bc08616f35c
@@ -143,14 +143,17 @@ module Mixlib
143
143
 
144
144
  # Join arguments into a string.
145
145
  #
146
- # If the argument ends with a whitespace, use it as-is. Otherwise, add
147
- # a space at the end
146
+ # Strips leading/trailing spaces from each argument. If an argument contains
147
+ # a space, it is quoted. Join into a single string with spaces between each argument.
148
148
  #
149
149
  # @param args [String] variable number of string arguments
150
150
  # @return [String] merged string
151
151
  #
152
152
  def __join_whitespace(*args)
153
- args.flatten.map { |e| e + (e.rstrip == e ? " " : "") }.join
153
+ args.flatten.map do |arg|
154
+ arg.strip!
155
+ arg.include?(" ") ? sprintf('"%s"', arg) : arg
156
+ end.join(" ")
154
157
  end
155
158
 
156
159
  def __shell_out_command(*args, **options)
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class ShellOut
3
- VERSION = "3.3.3".freeze
3
+ VERSION = "3.3.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-shellout
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.4
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Chef Software Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-14 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-utils