dirty_pipeline 0.6.3 → 0.6.4

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
  SHA256:
3
- metadata.gz: 6871bd0a1aaa3608ff81749b66157171ea26d1881774fa8ba221cd0ce3f88b4b
4
- data.tar.gz: 81c5a14ab2bb2f4437175171e7afe65dbe75006d7f4a48bf2fd8fc3b2e947721
3
+ metadata.gz: 39b6905344a3e533c084d66709bc992996351b5ca52b1a49bd995ab5159ea7eb
4
+ data.tar.gz: 19176034e183e583454c99ddb72309ef1ee7b7e2db05de9d9affadae5d652dfe
5
5
  SHA512:
6
- metadata.gz: f896cc7c517490b1f0a942f17f7df16a0e27ff67bb87f64e46dd0665c3b6444aebd58e0ca7d0d882af5ab7708f411b1caf1904ab229693b5785690ab97779aa1
7
- data.tar.gz: 5ff0a159e5b00963a1685ff94c425090d4f8aecaf855fff6e588e85f40e6aadbb199b41be26adcab512027727839ad968c3355a9302dd6709d8b75b5f34cc1da
6
+ metadata.gz: 7e4ed6d5dbfc6f015ad05065a2e571481f979d7d70265da262a8a7d8a650a09a6e6c8d99671fdd3f07ab320442022075d90db51c148f1b5d1e9fd172047a8fba
7
+ data.tar.gz: d1e2a3f6a925add414c6935448986c272d618a2d5f9783016406385d30d3e566b455ea5c66d054df16900b23bfe9f0c567a2fe758884c64aadb2d3eb42bf4ed2
@@ -85,7 +85,7 @@ module DirtyPipeline
85
85
  execute(load_event(enqueued_event), attempt_retry: true)
86
86
  end
87
87
 
88
- def schedule(operation, delay = nil)
88
+ def schedule(operation = "call", delay = nil)
89
89
  job_args = {
90
90
  "transaction_id" => @uuid,
91
91
  "enqueued_pipeline" => self.class.to_s,
@@ -1,16 +1,16 @@
1
1
  module DirtyPipeline
2
2
  class Transition
3
3
  def Failure(error)
4
- railway.switch_to(:undo)
4
+ railway&.switch_to(:undo)
5
5
  throw :fail_transition, error
6
6
  end
7
7
 
8
8
  def Success(changes = nil)
9
- case railway.active
9
+ case railway&.active
10
10
  when "call"
11
- railway.switch_to(:finalize) if respond_to?(:finalize)
11
+ railway&.switch_to(:finalize) if respond_to?(:finalize)
12
12
  when "finalize"
13
- railway.switch_to(:call)
13
+ railway&.switch_to(:call)
14
14
  end
15
15
  throw :success, changes.to_h
16
16
  end
@@ -31,8 +31,8 @@ module DirtyPipeline
31
31
  def self.call(*args, **kwargs)
32
32
  event, pipeline, *args = args
33
33
  instance = new(event, pipeline.railway, *args, **kwargs)
34
- pipeline.railway[:undo] << event
35
- pipeline.railway[:finalize] << event
34
+ pipeline&.railway&.send(:[], :undo)&.send(:<<, event)
35
+ pipeline&.railway&.send(:[], :finalize)&.send(:<<, event)
36
36
  instance.call(pipeline.subject)
37
37
  end
38
38
 
@@ -1,3 +1,3 @@
1
1
  module DirtyPipeline
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dirty_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Dolganov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2018-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq