shexecutor 0.0.10 → 0.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: 3dbf10b351afc189794bb119a82b063c7c68bb90
4
- data.tar.gz: 52b64aa38d6c94ca2bd678a1a6bceb854fd5acbc
3
+ metadata.gz: c20fcf31086729f8e4556e5d72845ba9eca96fad
4
+ data.tar.gz: 29add82d49f2bc02153b2d168026bc3ed1881e19
5
5
  SHA512:
6
- metadata.gz: 8104a387512908469f7bf9d9887900c848905956e4a03fd75e6a69d30218922b2e67a49b82ff0c4353b5dd89fb4b0d1e36f23d9d9c1a6c3878378aede0caba2a
7
- data.tar.gz: 3185e4df180990e334bb2240cca83dc01423de2e40c18ad546c7ff6b4e51dfb4614f80d7511bc7607c5e0b21cdbc6fe3bebafb69363197f3f556ff1317a1227b
6
+ metadata.gz: 6768c7dc19668bff9ed214169500ec4f2928b276bd8c6c8cd550b00875c8c7358f6c2ebd7618accf94ed359d2280f9c2ae783a6a4cc2a38d72a27ebaa87d2186
7
+ data.tar.gz: ecf6b1514e1b8b2e708053699ee880b122c09c69adde139d7506086ecc2e110210400333ca1cfdd8cc902e6dc3262d4137b006a37be2a3f5b5b9b4b1cc9d4e38
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shexecutor (0.0.9)
4
+ shexecutor (0.0.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module SHExecutor
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
data/lib/shexecutor.rb CHANGED
@@ -18,6 +18,25 @@ module SHExecutor
18
18
  @@default_options
19
19
  end
20
20
 
21
+ def self.execute_blocking(application_path, params = nil)
22
+ executor = SHExecutor::Executor.new({:wait_for_completion => true, :application_path => application_path, :params => params})
23
+ result = executor.execute
24
+ executor.flush
25
+ return result, executor.stdout, executor.stderr
26
+ end
27
+
28
+ def self.execute_and_timeout_after(application_path, params = nil, timeout = -1)
29
+ executor = SHExecutor::Executor.new({:timeout => timeout, :wait_for_completion => true, :application_path => application_path, :params => params})
30
+ result = executor.execute
31
+ executor.flush
32
+ return result, executor.stdout, executor.stderr
33
+ end
34
+
35
+ def self.execute_non_blocking(application_path, params = nil)
36
+ executor = SHExecutor::Executor.new({:wait_for_completion => false, :application_path => application_path, :params => params})
37
+ executor.execute
38
+ end
39
+
21
40
  class Executor
22
41
  public
23
42
 
@@ -107,25 +126,6 @@ module SHExecutor
107
126
  stderr_to_file if (@options[:stderr_path])
108
127
  end
109
128
 
110
- def execute_blocking(application_path, params = nil)
111
- executor = SHExecutor::Executor.new({:wait_for_completion => true, :application_path => application_path, :params => params})
112
- result = executor.execute
113
- executor.flush
114
- return result, executor.stdout, executor.stderr
115
- end
116
-
117
- def execute_and_timeout_after(application_path, params = nil, timeout = -1)
118
- executor = SHExecutor::Executor.new({:timeout => timeout, :wait_for_completion => true, :application_path => application_path, :params => params})
119
- result = executor.execute
120
- executor.flush
121
- return result, executor.stdout, executor.stderr
122
- end
123
-
124
- def execute_non_blocking(application_path, params = nil)
125
- executor = SHExecutor::Executor.new({:wait_for_completion => false, :application_path => application_path, :params => params})
126
- executor.execute
127
- end
128
-
129
129
  private
130
130
 
131
131
  def possible_injection?(application_path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shexecutor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst van Graan