mixlib-shellout 2.0.0-x86-mingw32 → 2.0.1-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +13 -5
 - data/lib/mixlib/shellout.rb +11 -0
 - data/lib/mixlib/shellout/version.rb +1 -1
 - data/lib/mixlib/shellout/windows.rb +7 -1
 - metadata +11 -11
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
      
 2 
     | 
    
         
            +
            !binary "U0hBMQ==":
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: !binary |-
         
     | 
| 
      
 4 
     | 
    
         
            +
                ZjEyODM2ZTdlYzU2OTIwOTMxYWQyY2IyMjAwNTBiMjU5M2FhY2I5Nw==
         
     | 
| 
      
 5 
     | 
    
         
            +
              data.tar.gz: !binary |-
         
     | 
| 
      
 6 
     | 
    
         
            +
                ZmQ5NDI4Nzc0MzJiOGYxNzQ1NDZkODYwZTRhZmQ4OTQ1YjYxMmVhYQ==
         
     | 
| 
       5 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
      
 8 
     | 
    
         
            +
              metadata.gz: !binary |-
         
     | 
| 
      
 9 
     | 
    
         
            +
                ZmI5YWJlM2I0NzU5ZGYzN2YzNjQ3M2Y2YWE3MjNjYmE2NTY4YTAyNjZhODU1
         
     | 
| 
      
 10 
     | 
    
         
            +
                YThlYjFhMjg1ZWQyMWM4Yjc1YjBhZGNiOGY2NmJiYjU1ZjNhNmIxNDQ3YjQx
         
     | 
| 
      
 11 
     | 
    
         
            +
                MmE2MTdmNmViNDFkZGY1NjBhMDA4MTIwODZmMTA4ZmNjM2IxZDQ=
         
     | 
| 
      
 12 
     | 
    
         
            +
              data.tar.gz: !binary |-
         
     | 
| 
      
 13 
     | 
    
         
            +
                MmE4ZjAxOGU0ZGM3OTY3M2EyZmExMjJkODI1ZDE0YmQwZDU4ZGY0YzQyYThh
         
     | 
| 
      
 14 
     | 
    
         
            +
                MzI1NDdkMTc3MGFkNGQwZDA5NmJjMzg2NmFhNWQzOWExMDczZTFkZWQ5NzVh
         
     | 
| 
      
 15 
     | 
    
         
            +
                YWVlNjRlNTEyN2VlMDU1YTY3M2I5NDFlZDI3NTk2OTU5ZTk1YWQ=
         
     | 
    
        data/lib/mixlib/shellout.rb
    CHANGED
    
    | 
         @@ -130,6 +130,17 @@ module Mixlib 
     | 
|
| 
       130 
130 
     | 
    
         
             
                #   total amount of time that ShellOut waited on the child process without
         
     | 
| 
       131 
131 
     | 
    
         
             
                #   receiving any output (i.e., IO.select returned nil). Default is 60
         
     | 
| 
       132 
132 
     | 
    
         
             
                #   seconds. Note: the stdlib Timeout library is not used.
         
     | 
| 
      
 133 
     | 
    
         
            +
                # * +input+: A String of data to be passed to the subcommand. This is
         
     | 
| 
      
 134 
     | 
    
         
            +
                #   written to the child process' stdin stream before the process is
         
     | 
| 
      
 135 
     | 
    
         
            +
                #   launched. The child's stdin stream will be a pipe, so the size of input
         
     | 
| 
      
 136 
     | 
    
         
            +
                #   data should not exceed the system's default pipe capacity (4096 bytes
         
     | 
| 
      
 137 
     | 
    
         
            +
                #   is a safe value, though on newer Linux systems the capacity is 64k by
         
     | 
| 
      
 138 
     | 
    
         
            +
                #   default).
         
     | 
| 
      
 139 
     | 
    
         
            +
                # * +live_stream+: An IO or Logger-like object (must respond to the append
         
     | 
| 
      
 140 
     | 
    
         
            +
                #   operator +<<+) that will receive data as ShellOut reads it from the
         
     | 
| 
      
 141 
     | 
    
         
            +
                #   child process. Generally this is used to copy data from the child to
         
     | 
| 
      
 142 
     | 
    
         
            +
                #   the parent's stdout so that users may observe the progress of
         
     | 
| 
      
 143 
     | 
    
         
            +
                #   long-running commands.
         
     | 
| 
       133 
144 
     | 
    
         
             
                # === Examples:
         
     | 
| 
       134 
145 
     | 
    
         
             
                # Invoke find(1) to search for .rb files:
         
     | 
| 
       135 
146 
     | 
    
         
             
                #   find = Mixlib::ShellOut.new("find . -name '*.rb'")
         
     | 
| 
         @@ -111,6 +111,12 @@ module Mixlib 
     | 
|
| 
       111 
111 
     | 
    
         
             
                          when WAIT_TIMEOUT
         
     | 
| 
       112 
112 
     | 
    
         
             
                            # Kill the process
         
     | 
| 
       113 
113 
     | 
    
         
             
                            if (Time.now - start_wait) > timeout
         
     | 
| 
      
 114 
     | 
    
         
            +
                              begin
         
     | 
| 
      
 115 
     | 
    
         
            +
                                Process.kill(:KILL, process.process_id)
         
     | 
| 
      
 116 
     | 
    
         
            +
                              rescue Errno::EIO
         
     | 
| 
      
 117 
     | 
    
         
            +
                                logger.warn("Failed to kill timed out process #{process.process_id}") if logger
         
     | 
| 
      
 118 
     | 
    
         
            +
                              end
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
       114 
120 
     | 
    
         
             
                              raise Mixlib::ShellOut::CommandTimeout, "command timed out:\n#{format_for_exception}"
         
     | 
| 
       115 
121 
     | 
    
         
             
                            end
         
     | 
| 
       116 
122 
     | 
    
         | 
| 
         @@ -156,7 +162,7 @@ module Mixlib 
     | 
|
| 
       156 
162 
     | 
    
         
             
                      begin
         
     | 
| 
       157 
163 
     | 
    
         
             
                        next_chunk = stdout_read.readpartial(READ_SIZE)
         
     | 
| 
       158 
164 
     | 
    
         
             
                        @stdout << next_chunk
         
     | 
| 
       159 
     | 
    
         
            -
                        @ 
     | 
| 
      
 165 
     | 
    
         
            +
                        @live_stdout << next_chunk if @live_stdout
         
     | 
| 
       160 
166 
     | 
    
         
             
                      rescue EOFError
         
     | 
| 
       161 
167 
     | 
    
         
             
                        stdout_read.close
         
     | 
| 
       162 
168 
     | 
    
         
             
                        open_streams.delete(stdout_read)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,55 +1,55 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: mixlib-shellout
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: x86-mingw32
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Opscode
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-12-19 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rspec
         
     | 
| 
       15 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
     | 
    
         
            -
                - -  
     | 
| 
      
 17 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
19 
     | 
    
         
             
                    version: '2.0'
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :development
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
     | 
    
         
            -
                - -  
     | 
| 
      
 24 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
26 
     | 
    
         
             
                    version: '2.0'
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: win32-process
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       31 
     | 
    
         
            -
                - -  
     | 
| 
      
 31 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       32 
32 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
33 
     | 
    
         
             
                    version: 0.7.1
         
     | 
| 
       34 
34 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       35 
35 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
36 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
37 
     | 
    
         
             
                requirements:
         
     | 
| 
       38 
     | 
    
         
            -
                - -  
     | 
| 
      
 38 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
40 
     | 
    
         
             
                    version: 0.7.1
         
     | 
| 
       41 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
42 
     | 
    
         
             
              name: windows-pr
         
     | 
| 
       43 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       44 
44 
     | 
    
         
             
                requirements:
         
     | 
| 
       45 
     | 
    
         
            -
                - -  
     | 
| 
      
 45 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       46 
46 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
47 
     | 
    
         
             
                    version: 1.2.2
         
     | 
| 
       48 
48 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       49 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       50 
50 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
     | 
    
         
            -
                - -  
     | 
| 
      
 52 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       53 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
54 
     | 
    
         
             
                    version: 1.2.2
         
     | 
| 
       55 
55 
     | 
    
         
             
            description: Run external commands on Unix or Windows
         
     | 
| 
         @@ -77,17 +77,17 @@ require_paths: 
     | 
|
| 
       77 
77 
     | 
    
         
             
            - lib
         
     | 
| 
       78 
78 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       79 
79 
     | 
    
         
             
              requirements:
         
     | 
| 
       80 
     | 
    
         
            -
              - -  
     | 
| 
      
 80 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
       81 
81 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       82 
82 
     | 
    
         
             
                  version: 1.9.3
         
     | 
| 
       83 
83 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       84 
84 
     | 
    
         
             
              requirements:
         
     | 
| 
       85 
     | 
    
         
            -
              - -  
     | 
| 
      
 85 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
       86 
86 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       87 
87 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       88 
88 
     | 
    
         
             
            requirements: []
         
     | 
| 
       89 
89 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       90 
     | 
    
         
            -
            rubygems_version: 2.4. 
     | 
| 
      
 90 
     | 
    
         
            +
            rubygems_version: 2.4.1
         
     | 
| 
       91 
91 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       92 
92 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       93 
93 
     | 
    
         
             
            summary: Run external commands on Unix or Windows
         
     |