shexecutor 0.0.10 → 0.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/Gemfile.lock +1 -1
- data/lib/shexecutor/version.rb +1 -1
- data/lib/shexecutor.rb +19 -19
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c20fcf31086729f8e4556e5d72845ba9eca96fad
|
4
|
+
data.tar.gz: 29add82d49f2bc02153b2d168026bc3ed1881e19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6768c7dc19668bff9ed214169500ec4f2928b276bd8c6c8cd550b00875c8c7358f6c2ebd7618accf94ed359d2280f9c2ae783a6a4cc2a38d72a27ebaa87d2186
|
7
|
+
data.tar.gz: ecf6b1514e1b8b2e708053699ee880b122c09c69adde139d7506086ecc2e110210400333ca1cfdd8cc902e6dc3262d4137b006a37be2a3f5b5b9b4b1cc9d4e38
|
data/Gemfile.lock
CHANGED
data/lib/shexecutor/version.rb
CHANGED
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)
|