mixlib-shellout 2.4.0 → 2.4.2

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: 34f526a03059905501955463836ce6f43ab76eaa2799dc6740aff79fc788eec7
4
- data.tar.gz: dde2d362f7c116b9bdb79221564267298b393e1d0c07e1c73ae8d57c35b04f68
3
+ metadata.gz: 0e0c6cb730c0c9cfc43686a81eef255c86b46477b9a437c183bf829425eecf3d
4
+ data.tar.gz: 3166f3294d2231427d7deb4edf8d775c642a20133364bc14b7c884dab9842db2
5
5
  SHA512:
6
- metadata.gz: 578e979246612a5806ca6b558d753faa735497a7c1249d93d364d2fd08192b956b7f9d65a10b8f47744547b7b842b342c725454a3a6a04a7edab6073840d31a1
7
- data.tar.gz: abcc46c86320c68d9dd82f930c4f47257305be0faa08e51682c4762eb1dfa94e061311974d614305dba1c10f424a8881e9717020695e4dfb8ffdf1b89253603a
6
+ metadata.gz: 72fbd08fa09792e9861352521f78c80f38b0bd393848df41cd46617a9aea038cc1b62818a37ed05f5bf3c4c4660ba9c4925979713a10048d55c881eb5e969107
7
+ data.tar.gz: 176ed3669af978c2062cda7697ca176a896ad9478e1e53ab0b36f8e47014db0d97919e72d73c4109c03900950a73b0b78db0136417a459a1d6ece335c865c8b4
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class ShellOut
3
- VERSION = "2.4.0".freeze
3
+ VERSION = "2.4.2".freeze
4
4
  end
5
5
  end
@@ -221,7 +221,7 @@ module Mixlib
221
221
  end
222
222
 
223
223
  # cmd does not parse multiple quotes well unless the whole thing is wrapped up in quotes.
224
- # https://github.com/opscode/mixlib-shellout/pull/2#issuecomment-4837859
224
+ # https://github.com/chef/mixlib-shellout/pull/2#issuecomment-4837859
225
225
  # http://ss64.com/nt/syntax-esc.html
226
226
  def run_under_cmd(command)
227
227
  [ ENV["COMSPEC"], "cmd /c \"#{command}\"" ]
@@ -229,12 +229,11 @@ module Mixlib
229
229
 
230
230
  # FIXME: this extracts ARGV[0] but is it correct?
231
231
  def candidate_executable_for_command(command)
232
- if command =~ /^\s*"(.*?)"/
233
- # If we have quotes, do an exact match
232
+ if command =~ /^\s*"(.*?)"/ || command =~ /^\s*([^\s]+)/
233
+ # If we have quotes, do an exact match, else pick the first word ignoring the leading spaces
234
234
  $1
235
235
  else
236
- # Otherwise check everything up to the first space
237
- command[0, command.index(/\s/) || command.length].strip
236
+ ""
238
237
  end
239
238
  end
240
239
 
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-shellout
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.2
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: 2018-07-23 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rspec
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '3.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '3.0'
27
- - !ruby/object:Gem::Dependency
28
- name: chefstyle
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
11
+ date: 2018-12-06 00:00:00.000000000 Z
12
+ dependencies: []
41
13
  description: Run external commands on Unix or Windows
42
14
  email: info@chef.io
43
15
  executables: []
@@ -46,19 +18,15 @@ extra_rdoc_files:
46
18
  - README.md
47
19
  - LICENSE
48
20
  files:
49
- - Gemfile
50
21
  - LICENSE
51
22
  - README.md
52
- - Rakefile
53
23
  - lib/mixlib/shellout.rb
54
24
  - lib/mixlib/shellout/exceptions.rb
55
25
  - lib/mixlib/shellout/unix.rb
56
26
  - lib/mixlib/shellout/version.rb
57
27
  - lib/mixlib/shellout/windows.rb
58
28
  - lib/mixlib/shellout/windows/core_ext.rb
59
- - mixlib-shellout-windows.gemspec
60
- - mixlib-shellout.gemspec
61
- homepage: https://www.chef.io/
29
+ homepage: https://github.com/chef/mixlib-shellout
62
30
  licenses: []
63
31
  metadata: {}
64
32
  post_install_message:
@@ -77,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
45
  version: '0'
78
46
  requirements: []
79
47
  rubyforge_project:
80
- rubygems_version: 2.7.5
48
+ rubygems_version: 2.7.6
81
49
  signing_key:
82
50
  specification_version: 4
83
51
  summary: Run external commands on Unix or Windows
data/Gemfile DELETED
@@ -1,16 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec name: "mixlib-shellout"
4
-
5
- group(:test) do
6
- gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
7
- gem "rspec_junit_formatter"
8
- gem "rake"
9
- end
10
-
11
- group(:development) do
12
- gem "pry"
13
- gem "pry-byebug"
14
- gem "pry-stack_explorer"
15
- gem "rb-readline"
16
- end
data/Rakefile DELETED
@@ -1,16 +0,0 @@
1
- require "bundler"
2
- require "rspec/core/rake_task"
3
-
4
- Bundler::GemHelper.install_tasks name: "mixlib-shellout"
5
-
6
- require "chefstyle"
7
- require "rubocop/rake_task"
8
- desc "Run Ruby style checks"
9
- RuboCop::RakeTask.new(:style)
10
-
11
- desc "Run all specs in spec directory"
12
- RSpec::Core::RakeTask.new(:spec) do |t|
13
- t.pattern = FileList["spec/**/*_spec.rb"]
14
- end
15
-
16
- task default: [:spec, :style]
@@ -1,8 +0,0 @@
1
- gemspec = instance_eval(File.read(File.expand_path("../mixlib-shellout.gemspec", __FILE__)))
2
-
3
- gemspec.platform = Gem::Platform.new(%w{universal mingw32})
4
-
5
- gemspec.add_dependency "win32-process", "~> 0.8.2"
6
- gemspec.add_dependency "wmi-lite", "~> 1.0"
7
-
8
- gemspec
@@ -1,25 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__) + "/lib")
2
- require "mixlib/shellout/version"
3
-
4
- Gem::Specification.new do |s|
5
- s.name = "mixlib-shellout"
6
- s.version = Mixlib::ShellOut::VERSION
7
- s.platform = Gem::Platform::RUBY
8
- s.extra_rdoc_files = ["README.md", "LICENSE" ]
9
- s.summary = "Run external commands on Unix or Windows"
10
- s.description = s.summary
11
- s.author = "Chef Software Inc."
12
- s.email = "info@chef.io"
13
- s.homepage = "https://www.chef.io/"
14
-
15
- s.required_ruby_version = ">= 2.2"
16
-
17
- s.add_development_dependency "rspec", "~> 3.0"
18
- s.add_development_dependency "chefstyle"
19
-
20
- s.bindir = "bin"
21
- s.executables = []
22
- s.require_path = "lib"
23
- s.files = %w{Gemfile Rakefile LICENSE README.md} + Dir.glob("*.gemspec") +
24
- Dir.glob("lib/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
25
- end