rasti-app 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rasti/app.rb +3 -1
- data/lib/rasti/app/asynchronic_interaction.rb +2 -2
- data/lib/rasti/app/facade.rb +6 -7
- data/lib/rasti/app/job.rb +1 -1
- data/lib/rasti/app/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: e4f2db12da04fe938cae06a4fcc21be864f51360
|
4
|
+
data.tar.gz: fd222481eac3215eede0ac340b752eaa88a8ae57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a87adb49c0ed43bd1c8ee7f0d6fcb3ae0063729a54135ec53e429b4becd16f1320c9091d4e19977e245657c7439901f6c4c67f2a02d81729d17748c1f70e2a4
|
7
|
+
data.tar.gz: '097d5f2f1947db3e80540cf251c4d8a01300a51ee2583b5770c53e32cdacc44996c8b66de17ab9ca431dd523a817c099a3c9be7e18cf4fb978f9655cf7d2403d'
|
data/lib/rasti/app.rb
CHANGED
@@ -67,9 +67,11 @@ module Rasti
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def enqueue(name, permission, params={})
|
70
|
+
queue = params.delete(:queue)
|
71
|
+
|
70
72
|
form = self.class.facade.build_form name, params
|
71
73
|
authorize! permission, form
|
72
|
-
self.class.facade.enqueue name, context, form
|
74
|
+
self.class.facade.enqueue name, context, form, queue
|
73
75
|
end
|
74
76
|
|
75
77
|
def authorize!(permission, form)
|
@@ -12,14 +12,14 @@ module Rasti
|
|
12
12
|
@job ||= Asynchronic[context.fetch(:job_id)].job
|
13
13
|
end
|
14
14
|
|
15
|
-
def enqueue(interaction,
|
15
|
+
def enqueue(interaction, params)
|
16
16
|
job.send :async, Job, queue: params.delete(:queue) || Asynchronic.default_queue,
|
17
17
|
alias: params.delete(:alias) || interaction,
|
18
18
|
dependency: params.delete(:dependency),
|
19
19
|
dependencies: params.delete(:dependencies),
|
20
20
|
interaction: interaction,
|
21
21
|
context: context,
|
22
|
-
params:
|
22
|
+
params: params
|
23
23
|
end
|
24
24
|
|
25
25
|
def result_of(reference)
|
data/lib/rasti/app/facade.rb
CHANGED
@@ -80,14 +80,13 @@ module Rasti
|
|
80
80
|
interaction_class(name).new(container, context).call(form)
|
81
81
|
end
|
82
82
|
|
83
|
-
def enqueue(name, context, form)
|
83
|
+
def enqueue(name, context, form, queue=nil)
|
84
84
|
interaction = interaction_class name
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
params: form.attributes
|
85
|
+
Job.enqueue queue: queue || Asynchronic.default_queue,
|
86
|
+
alias: interaction,
|
87
|
+
interaction: interaction,
|
88
|
+
context: context,
|
89
|
+
params: form.attributes
|
91
90
|
end
|
92
91
|
|
93
92
|
def synchronic_interactions
|
data/lib/rasti/app/job.rb
CHANGED
@@ -11,7 +11,7 @@ module Rasti
|
|
11
11
|
|
12
12
|
context = params[:context].merge(job_id: @process.id)
|
13
13
|
interaction = params[:interaction].new self.class.container, context
|
14
|
-
interaction.call params[:params]
|
14
|
+
interaction.call params[:interaction].build_form params[:params]
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
data/lib/rasti/app/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rasti-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inflecto
|