justrun 1.0.3 → 1.0.4
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 +4 -4
- data/lib/justrun.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af93afa743b4e4c48ac538bdb14a3f4140bfa99d
|
4
|
+
data.tar.gz: 773c9326572fb0ee13c454d0691ee6078c1aaa50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75f9e8bc72787006fccddb42e9adb05f4c77b8b97a3f13c7b8e2899a17f45df56a78f55219ebe8174a1a7cd0a8bbd85618cbb5aded129ce734fd5835bffd7c6e
|
7
|
+
data.tar.gz: 95e9fa5de706ca94eefc3246c29d2e6fd66d4bf495fdd6afd3868375256d34238123b8b050bfa6c3cafa7f8e75c4b69b9697c5fad0204d35a60a53a432db4e28
|
data/lib/justrun.rb
CHANGED
@@ -3,7 +3,7 @@ require 'open3'
|
|
3
3
|
#TODO: Run multiple commands at the same time
|
4
4
|
|
5
5
|
class JustRun
|
6
|
-
def self.command(command, block_size: 4096*4, buffer_output: false, init: ->(writer) {}, env: ENV, &block)
|
6
|
+
def self.command(command, block_size: 4096*4, buffer_output: false, chdir: Dir.pwd, init: ->(writer) {}, env: ENV, &block)
|
7
7
|
ret_code = -1
|
8
8
|
|
9
9
|
buffers = {
|
@@ -12,7 +12,7 @@ class JustRun
|
|
12
12
|
all: []
|
13
13
|
}
|
14
14
|
|
15
|
-
Open3.popen3 env, command do |stdin, stdout, stderr, wait_thr|
|
15
|
+
Open3.popen3 env, command, chdir: chdir do |stdin, stdout, stderr, wait_thr|
|
16
16
|
writer = JustRun::Writer.new stdin
|
17
17
|
init.call writer
|
18
18
|
|
@@ -139,4 +139,4 @@ class JustRun
|
|
139
139
|
rescue IO::WaitWritable, Errno::EINTR
|
140
140
|
end
|
141
141
|
end
|
142
|
-
end
|
142
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: justrun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damian Kaczmarek
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.4.
|
85
|
+
rubygems_version: 2.4.8
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Run command and get live line by line callbacks
|