rockflow 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b682fb3b2338fa9ebb7b1846778b86e9736ef499
4
- data.tar.gz: 9a80879bc9d000c23fd1a2822128b8565dce1b68
3
+ metadata.gz: 819099699ced7464dab4ee7da34befdfaabb7105
4
+ data.tar.gz: d25ff7b3b6ecf716189c66f6f75f9d3bd89f5702
5
5
  SHA512:
6
- metadata.gz: 1fdf33c5dd77e323941b3b9182b4aad95f409af4cded49750de5432d5f53ac68fdfa9700b5bed97dd0dc6495509dc11f03a53b0c14e27c6fdcc8d11664201147
7
- data.tar.gz: 09d19df5250fcc4f809d118cbdc6e19c514ec9761e66bb595c6efc1006fa71e8ceef3618304c5fda1d9eb0e92c0d90a61ff1f64d453d77c0cbef111dbbf3469c
6
+ metadata.gz: 2547a34beced3dcb0d6eeca1c3a9982f43ed8bed799fa4b6ca7857e5154ed35a2f3501504a8cf49d56d101fdffd90137dcf023976e07db61e3aec00a2e27cae4
7
+ data.tar.gz: 3d83e5122f6adb07ad979ebbac1f3df04bf9d247f234cf7b44b564689c5292874c0fa84df3a01b7da020b45d127fb8c6fd5102ad5c8b5d9b183913bf53f70b73
data/README.md CHANGED
@@ -9,7 +9,7 @@ Let's start the tour!
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'rockflow'
12
+ gem 'rockflow', '~> 1.0.1'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -30,7 +30,7 @@ To write your own flow you need two ingredients: the **flow** and your **steps**
30
30
  class AwesomeFlow < Rockflow::Flow
31
31
  def setup
32
32
  rock RockStep1
33
- rock RockStep2
33
+ rock RockStep2, params: {lorem: 'ipsum'}
34
34
  rock RockStep3, after: [RockStep1, RockStep2]
35
35
  end
36
36
  end
@@ -55,6 +55,7 @@ end
55
55
  class RockStep2 < Rockflow::Step
56
56
  def it_up
57
57
  puts "Iam RockStep2 and i am adding something to the payload"
58
+ puts "And here are my params #{params}"
58
59
  add_payload :b, 2
59
60
  end
60
61
  end
@@ -65,7 +66,7 @@ end
65
66
  class RockStep3 < Rockflow::Step
66
67
  def it_up
67
68
  puts "Iam RockStep3 and i am aggregating something from the payload"
68
- result = payload[:a] + payload[:b] + payload[:c]
69
+ result = payload[:a] + payload[:b]
69
70
  puts "Result: #{result}"
70
71
  end
71
72
  end
@@ -80,6 +81,7 @@ flow.concert! # execute all steps
80
81
  #### Summary
81
82
  Define your flow by inheriting from **RockFlow::Flow**. Inside your defined flow override the setup method and use the **rock** keyword defined by your step class. Available options for the rock method are at the moment:
82
83
  - **after** which takes a StepClass or an array of step classes.
84
+ - **params** you can specify extra params to be used in a step.
83
85
 
84
86
  After that start writing your steps by inheriting from **RockFlow::Step** and overriding the **it_up** method. Inside of your inherited class you can use following methods.
85
87
 
data/lib/rockflow/step.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  module Rockflow
2
2
  class Step
3
- attr_accessor :flow, :status
3
+ attr_accessor :flow, :status, :params
4
4
 
5
5
  def initialize(flow, opts = {})
6
6
  @flow = flow
7
7
  @after_dependencies = []
8
+ @params = opts[:params]
8
9
  @status = :not_started
9
10
  add_after_dependencies(opts[:after])
10
11
  end
@@ -1,3 +1,3 @@
1
1
  module Rockflow
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rockflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erwin Schens
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-23 00:00:00.000000000 Z
11
+ date: 2015-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel