sinatra-hexacta 0.8.1 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/handlers/processes.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ede22a821385a22e70895f2e4983779a24b40018bcae60a04bb0041be745fda1
|
4
|
+
data.tar.gz: f3e1be8a928f82adc9b053e86625e7f525c84ca752992ebdf557b050a2da1c36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e7be98dc8b45776c71eab44679cd6f86e6fea7b59d8d905f8957c5370e0f9758a6ceb407501d56702c4185e9b33957d0c4c0266c91bf383e9be724a9284e5cb
|
7
|
+
data.tar.gz: 8d6eaaae0a76bed3ddc5431f1c592ad9a68407ae9bd9ecd1b52302ea68feaf89198c6ed38691e8a5b93ab4aa374cfe742cc8b15ced4d724410c263f949aa68bd
|
@@ -9,16 +9,17 @@ module Sinatra
|
|
9
9
|
get '/processes' do
|
10
10
|
return "" if ProcessManager.instance.find(params[:class]).nil?
|
11
11
|
content_type :json
|
12
|
-
return {
|
12
|
+
return { 'name' => ProcessManager.instance.find(params[:class]).name, 'progress' => ProcessManager.instance.find(params[:class]).progress }.to_json
|
13
13
|
end
|
14
14
|
|
15
15
|
post '/processes/:clazz' do |clazz|
|
16
16
|
ProcessManager.instance.clean(clazz)
|
17
|
+
200
|
17
18
|
end
|
18
19
|
|
19
20
|
post '/process' do
|
20
21
|
klass = Object.const_get("#{params[:class]}")
|
21
|
-
a_handler = ProcessManager.instance.run(klass)
|
22
|
+
a_handler = ProcessManager.instance.run(klass,params)
|
22
23
|
a_handler.to_json
|
23
24
|
end
|
24
25
|
end
|