magritte 0.5.7 → 0.5.8

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.
Files changed (3) hide show
  1. data/lib/magritte/pipe.rb +1 -1
  2. data/spec/pipe_spec.rb +5 -0
  3. metadata +6 -6
@@ -15,7 +15,7 @@ module Magritte
15
15
  end
16
16
 
17
17
  def self.from_input_file(infile)
18
- self.from_input_stream(File.open(infile))
18
+ self.from_input_stream(File.open(File.expand_path(infile)))
19
19
  end
20
20
 
21
21
  def self.from_input_stream(io)
@@ -30,6 +30,11 @@ describe 'Magritte::Pipe' do
30
30
  it 'handles nil input strings' do
31
31
  expect { Magritte::Pipe.from_input_string(nil).out_to { |x| x.size }.filtering_with('cat') }.not_to raise_error
32
32
  end
33
+
34
+ it 'correctly expands paths for input files' do
35
+ File.should_receive(:expand_path).and_return(infile)
36
+ Magritte::Pipe.from_input_file(infile)
37
+ end
33
38
  end
34
39
 
35
40
  context 'handling output' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magritte
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-07 00:00:00.000000000 Z
12
+ date: 2013-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &2152647480 !ruby/object:Gem::Requirement
16
+ requirement: &70110927953920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2152647480
24
+ version_requirements: *70110927953920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &2152640880 !ruby/object:Gem::Requirement
27
+ requirement: &70110927952880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 2.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2152640880
35
+ version_requirements: *70110927952880
36
36
  description: ! ' Magritte is a simple but powerful wrapper to Open3 pipes that makes
37
37
  it easy to handle two-way piping of data into and out of a sub-process. Various
38
38
  input IO wrappers are supported and output can either be to an IO or to a block.