bio-commandeer 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 4dafee4b620f94ea378960ad13088211729ca259
4
- data.tar.gz: a8452c98ec7a4714dbe27fa67e05fdd1786257c9
3
+ metadata.gz: c544cb54f4692c602acb4c3b7b4ed6b433abe8d1
4
+ data.tar.gz: 4f46eee196608fa65fb2a3d8bfcf246615ddea1a
5
5
  SHA512:
6
- metadata.gz: c980f3c8c40054a6a0fcaff69365cbd2490c9e8dd22feabc82d7c816d7301d6d406d2a9fa3606dcd65f6f8f69886f57a40482164b5b52b53a043c594d21af848
7
- data.tar.gz: 5d98992130120ff74358594b4bb608766af3af808a06c309de5c4db3332571ed55d645e04b195e150eaa494cc6d471d9b1d2a32086f7537670803a87e4eda627
6
+ metadata.gz: 5e66f6b0c25450feb81a939758ef9fb761f6deba44ecf03f7e23aee62f26fdaf0f735a9ac084cc6a2dd309ef3b2c56238a9d58bd17f7c6315cb318822cae7c5e
7
+ data.tar.gz: 013a8046ced4623cb65e86afd180898a9f43d2c275f83cdafe54279033e096a2c73263602286d6dca0325774ba8b628d1baccca14f5b56c2388754a0575964a6
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ gem 'systemu', '~>2.6'
8
8
  # Add dependencies to develop your gem here.
9
9
  # Include everything needed to run rake, tests, features, etc.
10
10
  group :development do
11
- gem "rspec", "~> 2.8"
11
+ gem "rspec", "~> 3.2"
12
12
  gem "rdoc", "~> 3.12"
13
13
  gem "jeweler", "~> 2.0"
14
14
  gem "bundler", "~> 1.3"
data/README.md CHANGED
@@ -37,8 +37,8 @@ puts Bio::Commandeer.run 'echo 5', :log=>true
37
37
  ```
38
38
  On stderr this gives
39
39
  ```
40
- INFO bio-commandeer: Running command: echo 5\n"+
41
- INFO bio-commandeer: Command finished with exitstatus 0"
40
+ INFO bio-commandeer: Running command: echo 5
41
+ INFO bio-commandeer: Command finished with exitstatus 0
42
42
  ```
43
43
  Or a logging can be given directly, so long as it has an `info` method:
44
44
  ```ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -32,7 +32,7 @@ module Bio
32
32
  end
33
33
 
34
34
  if status.exitstatus != 0
35
- raise Bio::CommandFailedException, "Command returned non-zero exit status (#{status.exitstatus}), likely indicating failure. Command run was #{command} and the STDERR was:\n#{stderr}"
35
+ raise Bio::CommandFailedException, "Command returned non-zero exit status (#{status.exitstatus}), likely indicating failure. Command run was #{command} and the STDERR was:\n#{stderr}\nSTDOUTT was: #{stdout}"
36
36
  end
37
37
 
38
38
  return stdout
@@ -3,15 +3,15 @@ require 'tempfile'
3
3
 
4
4
  describe "BioCommandeer" do
5
5
  it "should return stdout" do
6
- Bio::Commandeer.run("echo 1 3").should == "1 3\n"
6
+ expect(Bio::Commandeer.run("echo 1 3")).to eq "1 3\n"
7
7
  end
8
8
 
9
9
  it 'should raise when exit status the command fails' do
10
- expect {Bio::Commandeer.run("cat /definitelyNotAFile")}.to raise_error
10
+ expect{Bio::Commandeer.run("cat /definitelyNotAFile")}.to raise_error(Bio::CommandFailedException)
11
11
  end
12
12
 
13
13
  it 'should accept stdin' do
14
- Bio::Commandeer.run('cat', :stdin => 'dog').should == "dog"
14
+ expect(Bio::Commandeer.run('cat', :stdin => 'dog')).to eq "dog"
15
15
  end
16
16
 
17
17
  it 'should do logging with bio-logger' do
@@ -26,9 +26,9 @@ describe "BioCommandeer" do
26
26
 
27
27
  status, stdout, stderr = systemu "RUBYLIB=$RUBYLIB:#{lib} ruby #{f.path}"
28
28
 
29
- stderr.should == " INFO bio-commandeer: Running command: echo 5\n"+
29
+ expect(stderr).to eq " INFO bio-commandeer: Running command: echo 5\n"+
30
30
  " INFO bio-commandeer: Command finished with exitstatus 0\n"
31
- stdout.should == "5\n"
31
+ expect(stdout).to eq "5\n"
32
32
  end
33
33
  end
34
34
 
@@ -46,9 +46,9 @@ describe "BioCommandeer" do
46
46
  status, stdout, stderr = systemu "RUBYLIB=$RUBYLIB:#{lib} ruby #{f.path}"
47
47
 
48
48
  # Note the source of the log
49
- stderr.should == " INFO anotherlog: Running command: echo 50\n"+
49
+ expect(stderr).to eq " INFO anotherlog: Running command: echo 50\n"+
50
50
  " INFO anotherlog: Command finished with exitstatus 0\n"
51
- stdout.should == "50\n"
51
+ expect(stdout).to eq "50\n"
52
52
  end
53
53
  end
54
54
  end
data/spec/spec_helper.rb CHANGED
@@ -8,5 +8,5 @@ require 'bio-commandeer'
8
8
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
9
 
10
10
  RSpec.configure do |config|
11
-
11
+
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-commandeer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben J. Woodcroft
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-13 00:00:00.000000000 Z
11
+ date: 2015-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bio-logger
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.8'
47
+ version: '3.2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.8'
54
+ version: '3.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rdoc
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.2.0.rc.1
138
+ rubygems_version: 2.2.2
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: dead simple method of running shell commands from within Ruby