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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a3d68bed67e69a49b6b61e8f0c7058c1f3e4927
4
- data.tar.gz: 10e1c6c3e9f64c6616d7987359ea81bfc35bce16
3
+ metadata.gz: e4f2db12da04fe938cae06a4fcc21be864f51360
4
+ data.tar.gz: fd222481eac3215eede0ac340b752eaa88a8ae57
5
5
  SHA512:
6
- metadata.gz: 19a7db76e43ece80e16417fc0bffff50d0e50286eed9bf3c4ede22463d041bcdcb4c7a7f7de911b58a332d991a3f690c391c80e2cdb5de366130659a8d4996ec
7
- data.tar.gz: 7bc3303502c93460d852747dd9edfeaf514c0a64951d0640dff2f7d5f733473b1c7507c250db7c6589814eb2536cbdd8ed7cba3c149197771e15d0c951f08a87
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, form)
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: form.attributes
22
+ params: params
23
23
  end
24
24
 
25
25
  def result_of(reference)
@@ -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
- Job.enqueue queue: params.delete(:queue) || Asynchronic.default_queue,
87
- alias: interaction,
88
- interaction: interaction,
89
- context: context,
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
@@ -1,5 +1,5 @@
1
1
  module Rasti
2
2
  class App
3
- VERSION = '0.0.8'
3
+ VERSION = '0.0.9'
4
4
  end
5
5
  end
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.8
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: 2017-11-28 00:00:00.000000000 Z
11
+ date: 2018-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inflecto