easy_app_helper 3.0.10 → 3.0.11

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: a5ee9cd9085c7591cf6f9236f5bf87e6951650e0
4
- data.tar.gz: 306f6625368c4099ef29a4fe8b848b164125a84f
3
+ metadata.gz: a488c4b13d1ae0192ffdae793fb3f1c71059e140
4
+ data.tar.gz: e39877b319cbeb23614c14b3a5b4862bc948c67c
5
5
  SHA512:
6
- metadata.gz: e4dc80fbcfc39da331c9d4d648151db88ef1cd84ff1d8eb6facaa7f1d2d675f27284b3b02c4a787ca236c473dea6ee91ef44e5a2ceaba8c747fda0f5221ef9f3
7
- data.tar.gz: 34f990845fa94fc258d897e98871750b109f2f78a37a9736d63d5e507b27ed3dc1fd28621d3396aaccc7239edb1f75962a7f8ff1c44416935e35c77553b39056
6
+ metadata.gz: 80aa58fe09f891f0f233dbd2bcafe83731260a34215298fffb3f41825d995e6bf34967646aa4067079fd11edcacac863fabb65ddf0b5afd0c03c53a491d40924
7
+ data.tar.gz: 6313a6718df5f9297c5f23c0eb4da535fc281cda6544d3d0b34455eb5da3869a7ca48f20018a84e0136c41383f1b1deb057ecaae18a85f94cac534fc5252b6db
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EasyAppHelper
2
- VERSION = '3.0.10'
2
+ VERSION = '3.0.11'
3
3
  end
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.10
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-04-29 00:00:00.000000000 Z
11
+ date: 2016-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler