command-runner 0.9.2 → 0.9.3

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: 9b5636d13fb538ac969b67e6eb4fdc7ad5ddaa27
4
- data.tar.gz: fa207be281ffb8b56279bbe7d50e76c1f52ef225
3
+ metadata.gz: 3c20f34462627d31302dcacf69edce7b78a2cb81
4
+ data.tar.gz: 958e8dc065b871e47d76df18597a84adcac64dab
5
5
  SHA512:
6
- metadata.gz: 037f29024cedc32f6b469288a2c7229f7d74d9035df02894b9b8685834f867eab990fc3c9f69a9ba305ae38eb33a7a141b284dbb46396603fde613083aaddaf3
7
- data.tar.gz: 5804940205201d61ab9ff50164e75dc9e5b18c415d46a38747345b9a990e52c3d731f3e0754eb1f60253df69373cde1a514f9644f09605c6d34d7d61f6fbf3fc
6
+ metadata.gz: 06239f22d7746a931ca3bfd2bffbc56c5e98978b12c11cd81108b180177f1e2e303b3dc144761fcbf7e334068a48c9d34fb3f49d58a588ede22d8dee727240b9
7
+ data.tar.gz: 9ad17133e451fe696cbeb8b71e1609159079a7b2491face0a5b7a532ff73ca9edba62e51d66953ea4de7b4b426d4412576021290ff1b3c2f24215dbf764064b8
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Command Runner
2
- [![Build Status](https://travis-ci.org/medcat/command-runner.png?branch=master)](https://travis-ci.org/medcat/command-runner) [![Code Climate](https://codeclimate.com/github/medcat/command-runner.png)](https://codeclimate.com/github/medcat/command-runner)
2
+ [![Build Status](https://travis-ci.org/medcat/command-runner.png?branch=master)](https://travis-ci.org/medcat/command-runner) [![Code Climate](https://codeclimate.com/github/medcat/command-runner.png)](https://codeclimate.com/github/medcat/command-runner) [![Gem Version](https://badge.fury.io/rb/command-runner.svg)](http://badge.fury.io/rb/command-runner)
3
3
 
4
4
  Runs commands.
5
5
 
@@ -65,7 +65,7 @@ module Command
65
65
  # @see Runner.backend
66
66
  # @return [#call] a backend to use.
67
67
  def backend
68
- @backend || self.class.backend
68
+ @backend ||= self.class.backend
69
69
  end
70
70
 
71
71
  # Sets the backend to be used by the messenger. This is local to the
@@ -79,9 +79,11 @@ module Command
79
79
  # may contain interpolated values, like +{key}+ or +{{key}}+.
80
80
  # @param options [Hash] the options for the messenger.
81
81
  def initialize(command, arguments, options = {})
82
- @command = command
82
+ @command = command
83
83
  @arguments = arguments
84
- @options = options
84
+ @options = options
85
+ @unsafe = false
86
+ @backend = nil
85
87
  end
86
88
 
87
89
  # Runs the command and arguments with the given interpolations;
@@ -17,7 +17,7 @@ module Command
17
17
  @_available ||= begin
18
18
  require 'posix/spawn'
19
19
  super
20
- rescue LoadError => e
20
+ rescue LoadError
21
21
  false
22
22
  end
23
23
  end
@@ -34,7 +34,6 @@ module Command
34
34
  stderr_r, stderr_w = IO.pipe
35
35
  stdout_r, stdout_w = IO.pipe
36
36
  stdin_r, stdin_w = IO.pipe
37
- clean_exceptions = options.delete(:clean_exceptions) || false
38
37
 
39
38
  if options[:input]
40
39
  stdin_w.write(options.delete(:input))
@@ -3,7 +3,7 @@ module Command
3
3
  class Runner
4
4
 
5
5
  # The current version of Runner.
6
- VERSION = "0.9.2".freeze
6
+ VERSION = "0.9.3".freeze
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Rodi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-05 00:00:00.000000000 Z
11
+ date: 2015-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: promise