Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | chefstyle | Lamont Granquist | 2020-08-24 | 1 | -2/+3 |
| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | fix the helper spec test | Lamont Granquist | 2020-08-24 | 1 | -0/+11 |
| | | | | | | | not pulling in mixlib-log as a test dep, but just monkeypatching a trace level into the ruby logger Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | Fix a few typosspelling | Tim Smith | 2020-07-28 | 1 | -1/+1 |
| | | | | Signed-off-by: Tim Smith <tsmith@chef.io> | ||||
* | chefstyle | Lamont Granquist | 2020-07-16 | 1 | -1/+1 |
| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | this API isn't supported in 2.2 | Lamont Granquist | 2020-07-16 | 1 | -1/+1 |
| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | add a simple smoke testlcg/extract-mixlib-shellout | Lamont Granquist | 2020-07-16 | 1 | -0/+30 |
| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | Support array args on windowslcg/win-array-args | Lamont Granquist | 2019-06-06 | 1 | -0/+84 |
| | | | | | | | | | | | | | | | | | | | | | | Implements correct quoting and escaping of arguments on windows. That means that this works right now: ```ruby filename = "c:\program files" shell_out("dir", filename); ``` So all the defensive coding around quotes-around-filepaths -- which were all actually buggy even when they worked (trailing backslashes would fail) -- are unnecessary and arguments can just be passed in as an array and this code will sort it out. We rely on the existing determination of if metacharacters mean it needs to run under cmd and if it needs the ^ quoting which seems to be well tested, and which all runs after this does. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | Update the github links in comments | Tim Smith | 2018-10-23 | 1 | -5/+5 |
| | | | | Signed-off-by: Tim Smith <tsmith@chef.io> | ||||
* | spec cleanup and some light refactoringlcg/cleanup2 | Lamont Granquist | 2017-02-01 | 1 | -176/+131 |
| | | | | | | | | | | | | | | | - mostly cleans up the windows specs so its easier to read the API out of them and removes some of the very brittle internal testing - refactors the 'which' logic a bit. trying to converge towards the chef/chef version and eventually extracting common code so that do not have to maintain 10+ slightly different copies everywhere. - adds the Mixlib::ShellOut::EmptyWindowsCommand exception because letting CreateProcessW throw a generic SystemCallError is pretty much useless to everyone. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | remove largely useless Utils class | Lamont Granquist | 2017-01-27 | 1 | -11/+10 |
| | | | | | | | | its just a collection of private methods, they should be private methods retain a method in the class that was being used externally. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | Resolve most chefstyle warnings | Tim Smith | 2016-10-07 | 1 | -72/+72 |
| | | | | Signed-off-by: Tim Smith <tsmith@chef.io> | ||||
* | add logging message if attempting to kill critical processsmurawski/agressive_termination | Steven Murawski | 2016-06-06 | 1 | -5/+7 |
| | |||||
* | Keep `kill_process_tree` from killing protected system processes. | Steven Murawski | 2016-05-24 | 1 | -3/+43 |
| | |||||
* | prevent shellout from attempting to execute a directory on windows | Matt Wrock | 2015-09-11 | 1 | -0/+2 |
| | |||||
* | have failing test | Matt Wrock | 2015-09-11 | 1 | -0/+29 |
| | |||||
* | rspec3ification | Lamont Granquist | 2015-05-15 | 1 | -105/+105 |
| | |||||
* | Add tests for running as different user in windows | Moser, Kevin | 2013-01-22 | 1 | -1/+1 |
| | |||||
* | [RSPEC] Use Rspec 3 metadata | Ho-Sheng Hsiao | 2012-05-10 | 1 | -1/+1 |
| | |||||
* | [CHEF-2994][WINDOWS] Added edge cases to specs for Utils.should_run_under_cmd?() | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+50 |
| | |||||
* | [CHEF-2994][WINDOWS] Expanded Utils.should_run_under_cmd?() to work like ↵ | Ho-Sheng Hsiao | 2012-05-10 | 1 | -16/+44 |
| | | | | Ruby system() | ||||
* | [CHEF-2994][WINDOWS] Fixed Utils.which() | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+30 |
| | | | | - Factored out Utils.should_run_under_cmd? (simple case) | ||||
* | [CHEF-2994][RSPEC] Fixed specs to run under Unix | Ho-Sheng Hsiao | 2012-05-10 | 1 | -1/+1 |
| | | | | Ignore Windows unit test | ||||
* | [CHEF-2994][WINDOWS] Factored out utility methods to ↵ | Ho-Sheng Hsiao | 2012-05-10 | 1 | -2/+3 |
| | | | | Mixlib::ShellOut::Windows::Utils | ||||
* | [CHEF-2994][WINDOWS] Added specs for valid exe at location with unquoted exe | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+25 |
| | |||||
* | [CHEF-2994][WINDOWS] Added specs for empty command | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+9 |
| | |||||
* | [CHEF-2994][WINDOWS] Added unit tests for invalid batch files | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+10 |
| | |||||
* | [CHEF-2994][WINDOWS] Added unit tests for valid batch files | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+17 |
| | |||||
* | [CHEF-2994][WINDOWS] Added unit tests for private method #command_to_run | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+113 |
| | | | | | | Fixed bug with quoted .cmd files Fixed bug with finding .bat in the middle of the filename | ||||
* | [RSPEC] Moved shellout_spec up to make room for unit tests | Ho-Sheng Hsiao | 2012-05-10 | 1 | -922/+0 |
| | |||||
* | [CHEF-2994][WINDOWS] Fixed multiple quotes for non batch files | Ho-Sheng Hsiao | 2012-05-10 | 1 | -0/+18 |
| | |||||
* | [CHEF-2994][WINDOWS] Fixed multiple quotes in command | Ho-Sheng Hsiao | 2012-05-10 | 1 | -9/+23 |
| | | | | | | | CMD.exe does not parse multiple quotes well unless the whole thing is wrapped up in quotes. Workaround: https://github.com/opscode/mixlib-shellout/pull/2#issuecomment-4837859 http://ss64.com/nt/syntax-esc.html | ||||
* | [CHEF-2994][WINDOWS] Disable stdin specs for windows platform | Ho-Sheng Hsiao | 2012-03-28 | 1 | -5/+5 |
| | |||||
* | [CHEF-2994][RB192] Turn off rubygems for child ruby processes | Ho-Sheng Hsiao | 2012-03-28 | 1 | -4/+8 |
| | | | | Sometimes, gems are not sane and trigger deprecation notice. Rather than dealing with that, we disable gems completely. | ||||
* | [CHEF-2994][RB187] Got specs passing for Ruby 1.8.7 (Linux) | Ho-Sheng Hsiao | 2012-03-27 | 1 | -4/+6 |
| | |||||
* | [CHEF-2994][RSPEC] ShellOut#run_command when subprocess pauses before ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+12 |
| | | | | reading input should not hang or lose output | ||||
* | [CHEF-2994][RSPEC] ShellOut#run_command when subprocess closes prematurely ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+13 |
| | | | | with input should raise broken pipe exception | ||||
* | [CHEF-2994][RSPEC] ShellOut#run_command when exiting with invalid code with ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+13 |
| | | | | input data shuld handle exit code gracefully | ||||
* | [CHEF-2994][RSPEC] ShellOut#run_command when execution fails with input ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+9 |
| | | | | should recover the error message | ||||
* | [CHEF-2994][RSPEC] ShellOut#run_command with subprocess that pipes lots of ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+24 |
| | | | | data through stdin, stdout, and stderr should not hang | ||||
* | [CHEF-2994][RSPEC] ShellOut#run_command with subprocess that reads lots of ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+12 |
| | | | | data from stdin should not hang | ||||
* | [CHEF-2994][RSPEC] ShellOut#run_command with subprocess that closes stdin ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+9 |
| | | | | and continues writing to stdout should not hang or lose output | ||||
* | [CHEF-2994][STDIN] Child process should accept stdin input if input is specified | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+13 |
| | |||||
* | [CHEF-2994][STDIN] ShellOut.new should accept input as an option | Ho-Sheng Hsiao | 2012-03-26 | 1 | -2/+7 |
| | |||||
* | [CHEF-2994][STDIN] ShellOut#input should set the input option | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+10 |
| | |||||
* | [CHEF-2994][STDIN] Option :input should be set to nil by default | Ho-Sheng Hsiao | 2012-03-26 | 1 | -0/+1 |
| | |||||
* | [CHEF-2994][RSPEC] ShellOut should be able to handle commands with stdin ↵ | Ho-Sheng Hsiao | 2012-03-26 | 1 | -1/+22 |
| | | | | file pipes | ||||
* | [RSPEC] Consolidated mini-dsl globally | Ho-Sheng Hsiao | 2012-03-23 | 1 | -32/+41 |
| | | | | Made things more consistent. | ||||
* | [RSPEC] Consolidated / dry up let(:ruby_code) | Ho-Sheng Hsiao | 2012-03-23 | 1 | -20/+14 |
| | |||||
* | [RSPEC/DOC] Clarified comments about windows evironmental locale | Ho-Sheng Hsiao | 2012-03-23 | 1 | -3/+1 |
| | |||||
* | [RSPEC] Refactored spec for #format_for_exception | Ho-Sheng Hsiao | 2012-03-23 | 1 | -11/+18 |
| |