childprocess 0.1.2 → 0.1.3
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.
- data/VERSION +1 -1
 - data/childprocess.gemspec +6 -3
 - data/lib/childprocess.rb +4 -0
 - data/lib/childprocess/windows/io.rb +1 -1
 - data/lib/childprocess/windows/process.rb +2 -1
 - data/spec/abstract_io_spec.rb +2 -2
 - data/spec/unix_spec.rb +1 -1
 - data/spec/windows_spec.rb +18 -0
 - metadata +5 -3
 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.1. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.1.3
         
     | 
    
        data/childprocess.gemspec
    CHANGED
    
    | 
         @@ -5,7 +5,7 @@ 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.name = %q{childprocess}
         
     | 
| 
       8 
     | 
    
         
            -
              s.version = "0.1. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.1.3"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.authors = ["Jari Bakken"]
         
     | 
| 
         @@ -45,11 +45,13 @@ Gem::Specification.new do |s| 
     | 
|
| 
       45 
45 
     | 
    
         
             
                 "lib/childprocess/windows/io.rb",
         
     | 
| 
       46 
46 
     | 
    
         
             
                 "lib/childprocess/windows/process.rb",
         
     | 
| 
       47 
47 
     | 
    
         
             
                 "lib/childprocess/windows/structs.rb",
         
     | 
| 
      
 48 
     | 
    
         
            +
                 "spec/abstract_io_spec.rb",
         
     | 
| 
       48 
49 
     | 
    
         
             
                 "spec/childprocess_spec.rb",
         
     | 
| 
       49 
50 
     | 
    
         
             
                 "spec/jruby_spec.rb",
         
     | 
| 
       50 
51 
     | 
    
         
             
                 "spec/spec.opts",
         
     | 
| 
       51 
52 
     | 
    
         
             
                 "spec/spec_helper.rb",
         
     | 
| 
       52 
     | 
    
         
            -
                 "spec/unix_spec.rb"
         
     | 
| 
      
 53 
     | 
    
         
            +
                 "spec/unix_spec.rb",
         
     | 
| 
      
 54 
     | 
    
         
            +
                 "spec/windows_spec.rb"
         
     | 
| 
       53 
55 
     | 
    
         
             
              ]
         
     | 
| 
       54 
56 
     | 
    
         
             
              s.homepage = %q{http://github.com/jarib/childprocess}
         
     | 
| 
       55 
57 
     | 
    
         
             
              s.rdoc_options = ["--charset=UTF-8"]
         
     | 
| 
         @@ -61,7 +63,8 @@ Gem::Specification.new do |s| 
     | 
|
| 
       61 
63 
     | 
    
         
             
                 "spec/childprocess_spec.rb",
         
     | 
| 
       62 
64 
     | 
    
         
             
                 "spec/jruby_spec.rb",
         
     | 
| 
       63 
65 
     | 
    
         
             
                 "spec/spec_helper.rb",
         
     | 
| 
       64 
     | 
    
         
            -
                 "spec/unix_spec.rb"
         
     | 
| 
      
 66 
     | 
    
         
            +
                 "spec/unix_spec.rb",
         
     | 
| 
      
 67 
     | 
    
         
            +
                 "spec/windows_spec.rb"
         
     | 
| 
       65 
68 
     | 
    
         
             
              ]
         
     | 
| 
       66 
69 
     | 
    
         | 
| 
       67 
70 
     | 
    
         
             
              if s.respond_to? :specification_version then
         
     | 
    
        data/lib/childprocess.rb
    CHANGED
    
    
    
        data/spec/abstract_io_spec.rb
    CHANGED
    
    | 
         @@ -2,10 +2,10 @@ require File.expand_path('../spec_helper', __FILE__) 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            describe ChildProcess::AbstractIO do
         
     | 
| 
       4 
4 
     | 
    
         
             
              let(:io) { ChildProcess::AbstractIO.new }
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
       6 
6 
     | 
    
         
             
              it "inherits the parent's IO streams" do
         
     | 
| 
       7 
7 
     | 
    
         
             
                io.inherit!
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       9 
9 
     | 
    
         
             
                io.stdout.should == STDOUT
         
     | 
| 
       10 
10 
     | 
    
         
             
                io.stderr.should == STDERR
         
     | 
| 
       11 
11 
     | 
    
         
             
              end
         
     | 
    
        data/spec/unix_spec.rb
    CHANGED
    
    | 
         @@ -38,7 +38,7 @@ if ChildProcess.unix? 
     | 
|
| 
       38 
38 
     | 
    
         
             
                  lambda { io.stdout = nil }.should raise_error(ArgumentError, /to respond to :to_io/)
         
     | 
| 
       39 
39 
     | 
    
         
             
                end
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
                it "raises  
     | 
| 
      
 41 
     | 
    
         
            +
                it "raises a TypeError if #to_io does not return an IO" do
         
     | 
| 
       42 
42 
     | 
    
         
             
                  fake_io = Object.new
         
     | 
| 
       43 
43 
     | 
    
         
             
                  def fake_io.to_io() StringIO.new end
         
     | 
| 
       44 
44 
     | 
    
         | 
| 
         @@ -0,0 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require File.expand_path('../spec_helper', __FILE__)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            if ChildProcess.windows?
         
     | 
| 
      
 4 
     | 
    
         
            +
              describe ChildProcess::Windows::IO do
         
     | 
| 
      
 5 
     | 
    
         
            +
                let(:io) { ChildProcess::Windows::IO.new }
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                it "raises an ArgumentError if given IO does not respond to :fileno" do
         
     | 
| 
      
 8 
     | 
    
         
            +
                  lambda { io.stdout = nil }.should raise_error(ArgumentError, /must have :fileno or :to_io/)
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                it "raises an ArgumentError if the #to_io does not return an IO " do
         
     | 
| 
      
 12 
     | 
    
         
            +
                  fake_io = Object.new
         
     | 
| 
      
 13 
     | 
    
         
            +
                  def fake_io.to_io() StringIO.new end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                  lambda { io.stdout = fake_io }.should raise_error(ArgumentError, /must have :fileno or :to_io/)
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version 
     | 
|
| 
       5 
5 
     | 
    
         
             
              segments: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              - 0
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 1
         
     | 
| 
       8 
     | 
    
         
            -
              -  
     | 
| 
       9 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 8 
     | 
    
         
            +
              - 3
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 0.1.3
         
     | 
| 
       10 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       11 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            - Jari Bakken
         
     | 
| 
         @@ -98,12 +98,13 @@ files: 
     | 
|
| 
       98 
98 
     | 
    
         
             
            - lib/childprocess/windows/io.rb
         
     | 
| 
       99 
99 
     | 
    
         
             
            - lib/childprocess/windows/process.rb
         
     | 
| 
       100 
100 
     | 
    
         
             
            - lib/childprocess/windows/structs.rb
         
     | 
| 
      
 101 
     | 
    
         
            +
            - spec/abstract_io_spec.rb
         
     | 
| 
       101 
102 
     | 
    
         
             
            - spec/childprocess_spec.rb
         
     | 
| 
       102 
103 
     | 
    
         
             
            - spec/jruby_spec.rb
         
     | 
| 
       103 
104 
     | 
    
         
             
            - spec/spec.opts
         
     | 
| 
       104 
105 
     | 
    
         
             
            - spec/spec_helper.rb
         
     | 
| 
       105 
106 
     | 
    
         
             
            - spec/unix_spec.rb
         
     | 
| 
       106 
     | 
    
         
            -
            - spec/ 
     | 
| 
      
 107 
     | 
    
         
            +
            - spec/windows_spec.rb
         
     | 
| 
       107 
108 
     | 
    
         
             
            has_rdoc: true
         
     | 
| 
       108 
109 
     | 
    
         
             
            homepage: http://github.com/jarib/childprocess
         
     | 
| 
       109 
110 
     | 
    
         
             
            licenses: []
         
     | 
| 
         @@ -142,3 +143,4 @@ test_files: 
     | 
|
| 
       142 
143 
     | 
    
         
             
            - spec/jruby_spec.rb
         
     | 
| 
       143 
144 
     | 
    
         
             
            - spec/spec_helper.rb
         
     | 
| 
       144 
145 
     | 
    
         
             
            - spec/unix_spec.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            - spec/windows_spec.rb
         
     |