easy_app_helper 3.0.10 → 3.0.11
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/easy_app_helper.rb +2 -2
- data/lib/easy_app_helper/processes/synchronous.rb +2 -1
- data/lib/easy_app_helper/version.rb +1 -1
- 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: a488c4b13d1ae0192ffdae793fb3f1c71059e140
|
4
|
+
data.tar.gz: e39877b319cbeb23614c14b3a5b4862bc948c67c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80aa58fe09f891f0f233dbd2bcafe83731260a34215298fffb3f41825d995e6bf34967646aa4067079fd11edcacac863fabb65ddf0b5afd0c03c53a491d40924
|
7
|
+
data.tar.gz: 6313a6718df5f9297c5f23c0eb4da535fc281cda6544d3d0b34455eb5da3869a7ca48f20018a84e0136c41383f1b1deb057ecaae18a85f94cac534fc5252b6db
|
data/lib/easy_app_helper.rb
CHANGED
@@ -28,12 +28,12 @@ module EasyAppHelper
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
def safely_exec_command(message, command, show_output = false, log_output = true)
|
31
|
+
def safely_exec_command(message, command, show_output = false, log_output = true, &log_processor)
|
32
32
|
safely_exec_code message, command, show_output, log_output do |command, show_output, log_output|
|
33
33
|
process = EasyAppHelper::Processes::Base.new command
|
34
34
|
process.show_output = show_output
|
35
35
|
process.log_output = log_output
|
36
|
-
process.execute
|
36
|
+
process.execute &log_processor
|
37
37
|
process
|
38
38
|
end
|
39
39
|
end
|
@@ -3,7 +3,7 @@ module EasyAppHelper
|
|
3
3
|
|
4
4
|
module Synchronous
|
5
5
|
|
6
|
-
def execute
|
6
|
+
def execute(&log_processor)
|
7
7
|
self.exit_status = nil
|
8
8
|
self.last_pid = nil
|
9
9
|
self.process_state = :running
|
@@ -22,6 +22,7 @@ module EasyAppHelper
|
|
22
22
|
begin
|
23
23
|
buffer = ''
|
24
24
|
buffer << io.read_nonblock(1) while buffer[-1] != "\n"
|
25
|
+
log_processor.call buffer if block_given?
|
25
26
|
report buffer, io == stdout
|
26
27
|
rescue IO::WaitReadable
|
27
28
|
next
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_app_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L.Briais
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|