w_flow 0.12.0 → 0.13.0

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: 4c6971610a0278716309118842acdfd7532ed202
4
- data.tar.gz: bbda595555d7dcc881280bd7369d1456c8561ff6
3
+ metadata.gz: 235135c7812d63f436af147b79f205431907df25
4
+ data.tar.gz: a59d5c4633721eb41f8d15d20aaf23126d55db51
5
5
  SHA512:
6
- metadata.gz: 2012a6ea13452f2dc30418ea861fe8f54b5dcb30723cf8aa4a372835b25a9713670695ec4efee5a187b70885f40830e15fe9ddf62c0d85d9ff8c994915c4404d
7
- data.tar.gz: fca65b36b9966e01f743fe9619b9477e5200ff96ddf2b23100749d2101b6a26a15a1550cac133067c3a843a52dc9ec81e5782a120e88b3b86480055e52a1f575
6
+ metadata.gz: b75bee8e85673094a030890ae0cbdfc1fc84e27877a272f85425ecd7941583fbc8397b25570fdc9141deb50ce2f476226d4370d652619db8ae9215bff65af44b
7
+ data.tar.gz: d24a7550b75e50a392154a214b8a687bd29f6b2cf11b0b753fca8af960b49fa50840278b50771891a2d2e5ab7d70bada82f72c2405213401cf94b195ee7abd1e
data/README.md CHANGED
@@ -89,7 +89,7 @@ report = SendWelcomeEmail.run(user_id: 10)
89
89
  Processes passed to execute will be called before the perform method. You can
90
90
  have as any execute as you want and as many Processes (and method nomes and Procs) in a execute.
91
91
  This means that when you run SendWelcomeEmail process, it will first execute FindUser which will
92
- set the user under flow.data, and than you can use that user to get the email address
92
+ set the user under flow.data, and then you can use that user to get the email address
93
93
  for where to send the email.
94
94
 
95
95
  So far so good, but lets go back to FindUser. Looking at it, we are currently not accounting for
@@ -168,7 +168,7 @@ going on? First we try to find the user, which will raise a flow failure if no u
168
168
  is found. In this case we want to inform the admin that something went wrong, so instead of allowing
169
169
  the flow to be interrupted right away, we return false in the failure handler to cancel failure.
170
170
  After that, the second execute chain will be executed, because @no_user_found is set to true. This
171
- execution chain will invoke the method compose_email, SendMessageToAdmin, and than
171
+ execution chain will invoke the method compose_email, SendMessageToAdmin, and
172
172
  call proc that reraises failure.
173
173
 
174
174
  This is some of the features of WFlow, please check [wiki](https://github.com/junhanamaki/w_flow/wiki) for more details.
@@ -1,7 +1,7 @@
1
1
  module WFlow
2
2
  class Flow
3
3
 
4
- attr_reader :data
4
+ attr_reader :data, :failure_log
5
5
 
6
6
  def initialize(params)
7
7
  @data = Data.new(params)
@@ -63,7 +63,7 @@ module WFlow
63
63
 
64
64
  FlowReport.new(flow)
65
65
  rescue ::StandardError => e
66
- raise if e.is_a?(StandardError) || !Configuration.supress_errors?
66
+ raise unless Configuration.supress_errors?
67
67
 
68
68
  set_failure_and_log(message: e.message, backtrace: e.backtrace)
69
69
 
@@ -52,8 +52,8 @@ module WFlow
52
52
  end
53
53
 
54
54
  def run
55
- @process.setup
56
55
  @setup_completed = true
56
+ @process.setup
57
57
 
58
58
  @process_class.wflow_nodes.each do |node_class|
59
59
  node_worker = NodeWorker.new(@process, node_class)
@@ -1,3 +1,3 @@
1
1
  module WFlow
2
- VERSION = "0.12.0"
2
+ VERSION = "0.13.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - junhanamaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-07 00:00:00.000000000 Z
11
+ date: 2015-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler