taskinator 0.0.9 → 0.0.10

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: 75ca53362ea028543eae463a901056c08049ecd7
4
- data.tar.gz: 7971999d4c6c962c057329ba215394af3830ac5f
3
+ metadata.gz: 620c8ca7a67e65cbefa9afdcbda7b5f0d1488dbf
4
+ data.tar.gz: 2afa5217745d65926c9ec9c301bdb307d54b8a38
5
5
  SHA512:
6
- metadata.gz: ae31ec1d8ce1ca9c16aa38425150525c3b7c9e51cc2991935ea42522e63f05e217b3e179403eebcd9fc2d48d8c512375074dc53fd3ee2c262aeb19effd146179
7
- data.tar.gz: aa3e70be0f952329ce8857d1e74aac32395f27c72848af95aad81a61e6adbd8098933d8ee38ec6b9e8f792e5f82684c02afddf9a51b91ffcc63b2408f64b1783
6
+ metadata.gz: 3e175cd7c5836e8a20f4d03fe7c57acfa098388edeff543e184d000181f3e1df36fd5083f6b5968ebd7977daa91a8e41d1664758caf559db49c1d328b0fb3e58
7
+ data.tar.gz: 954389c2d44e70db697b7d81b1ef2bd2e337a227669009083278da063369bfeca0c3d2bb6eef920759a66cc3f91cb961db3a18c74e7f8531b82a6e6f8910c769
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- taskinator (0.0.9)
11
+ taskinator (0.0.10)
12
12
  connection_pool (>= 2.0.0)
13
13
  json (>= 1.8.1)
14
14
  redis (>= 3.0.6)
@@ -17,39 +17,40 @@ PATH
17
17
  GEM
18
18
  remote: https://rubygems.org/
19
19
  specs:
20
- activesupport (4.1.7)
21
- i18n (~> 0.6, >= 0.6.9)
20
+ activesupport (4.2.0)
21
+ i18n (~> 0.7)
22
22
  json (~> 1.7, >= 1.7.7)
23
23
  minitest (~> 5.1)
24
- thread_safe (~> 0.1)
24
+ thread_safe (~> 0.3, >= 0.3.4)
25
25
  tzinfo (~> 1.1)
26
26
  byebug (2.7.0)
27
27
  columnize (~> 0.3)
28
28
  debugger-linecache (~> 1.2)
29
- celluloid (0.15.2)
30
- timers (~> 1.1.0)
29
+ celluloid (0.16.0)
30
+ timers (~> 4.0.0)
31
31
  coderay (1.1.0)
32
- columnize (0.8.9)
33
- connection_pool (2.0.0)
34
- coveralls (0.7.1)
35
- multi_json (~> 1.3)
36
- rest-client
37
- simplecov (>= 0.7)
38
- term-ansicolor
39
- thor
32
+ columnize (0.9.0)
33
+ connection_pool (2.1.1)
34
+ coveralls (0.7.11)
35
+ multi_json (~> 1.10)
36
+ rest-client (>= 1.6.8, < 2)
37
+ simplecov (~> 0.9.1)
38
+ term-ansicolor (~> 1.3)
39
+ thor (~> 0.19.1)
40
40
  debugger-linecache (1.2.0)
41
- delayed_job (4.0.4)
42
- activesupport (>= 3.0, < 4.2)
41
+ delayed_job (4.0.6)
42
+ activesupport (>= 3.0, < 5.0)
43
43
  diff-lcs (1.2.5)
44
44
  docile (1.1.5)
45
- i18n (0.6.11)
46
- json (1.8.1)
45
+ hitimes (1.2.2)
46
+ i18n (0.7.0)
47
+ json (1.8.2)
47
48
  method_source (0.8.2)
48
49
  mime-types (2.4.3)
49
- minitest (5.4.2)
50
+ minitest (5.5.1)
50
51
  mono_logger (1.1.0)
51
52
  multi_json (1.10.1)
52
- netrc (0.8.0)
53
+ netrc (0.10.3)
53
54
  pry (0.9.12.6)
54
55
  coderay (~> 1.0)
55
56
  method_source (~> 0.8)
@@ -57,11 +58,11 @@ GEM
57
58
  pry-byebug (1.3.2)
58
59
  byebug (~> 2.7)
59
60
  pry (~> 0.9.12)
60
- rack (1.5.2)
61
+ rack (1.6.0)
61
62
  rack-protection (1.5.3)
62
63
  rack
63
64
  rake (10.3.2)
64
- redis (3.1.0)
65
+ redis (3.2.1)
65
66
  redis-namespace (1.5.1)
66
67
  redis (~> 3.0, >= 3.0.4)
67
68
  resque (1.25.2)
@@ -75,32 +76,33 @@ GEM
75
76
  rspec-core (>= 3.0.0)
76
77
  rspec-expectations (>= 3.0.0)
77
78
  rspec-mocks (>= 3.0.0)
78
- rest-client (1.7.2)
79
+ rest-client (1.7.3)
79
80
  mime-types (>= 1.16, < 3.0)
80
81
  netrc (~> 0.7)
81
- rspec (3.1.0)
82
- rspec-core (~> 3.1.0)
83
- rspec-expectations (~> 3.1.0)
84
- rspec-mocks (~> 3.1.0)
85
- rspec-core (3.1.7)
86
- rspec-support (~> 3.1.0)
87
- rspec-expectations (3.1.2)
82
+ rspec (3.2.0)
83
+ rspec-core (~> 3.2.0)
84
+ rspec-expectations (~> 3.2.0)
85
+ rspec-mocks (~> 3.2.0)
86
+ rspec-core (3.2.1)
87
+ rspec-support (~> 3.2.0)
88
+ rspec-expectations (3.2.0)
88
89
  diff-lcs (>= 1.2.0, < 2.0)
89
- rspec-support (~> 3.1.0)
90
- rspec-mocks (3.1.3)
91
- rspec-support (~> 3.1.0)
92
- rspec-support (3.1.2)
93
- sidekiq (3.2.6)
94
- celluloid (= 0.15.2)
95
- connection_pool (>= 2.0.0)
90
+ rspec-support (~> 3.2.0)
91
+ rspec-mocks (3.2.1)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.2.0)
94
+ rspec-support (3.2.2)
95
+ sidekiq (3.3.2)
96
+ celluloid (>= 0.16.0)
97
+ connection_pool (>= 2.1.1)
96
98
  json
97
99
  redis (>= 3.0.6)
98
100
  redis-namespace (>= 1.3.1)
99
- simplecov (0.9.1)
101
+ simplecov (0.9.2)
100
102
  docile (~> 1.1.0)
101
103
  multi_json (~> 1.0)
102
- simplecov-html (~> 0.8.0)
103
- simplecov-html (0.8.0)
104
+ simplecov-html (~> 0.9.0)
105
+ simplecov-html (0.9.0)
104
106
  sinatra (1.4.5)
105
107
  rack (~> 1.4)
106
108
  rack-protection (~> 1.4)
@@ -111,8 +113,9 @@ GEM
111
113
  thor (0.19.1)
112
114
  thread_safe (0.3.4)
113
115
  tilt (1.4.1)
114
- timers (1.1.0)
115
- tins (1.3.3)
116
+ timers (4.0.1)
117
+ hitimes
118
+ tins (1.3.4)
116
119
  tzinfo (1.2.2)
117
120
  thread_safe (~> 0.1)
118
121
  vegas (0.1.11)
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Dependency Status](https://gemnasium.com/virtualstaticvoid/taskinator.svg)](https://gemnasium.com/virtualstaticvoid/taskinator)
8
8
 
9
9
  A simple orchestration library for running complex processes or workflows in Ruby. Processes are defined using a simple DSL, where the sequences and
10
- tasks are defined. Processes can then queued for execution. Sequences can be sychronous or asynchronous, and the overall process can be monitored
10
+ tasks are defined. Processes can then be queued for execution. Sequences can be synchronous or asynchronous, and the overall process can be monitored
11
11
  for completion or failure.
12
12
 
13
13
  Processes and tasks are executed by background workers and you can use any one of the following gems:
@@ -26,7 +26,7 @@ Redis 2.4 or greater is required.
26
26
 
27
27
  One of the following background worker queue gems: `resque`, `sidekiq` or `delayed_job`.
28
28
 
29
- _Note:_ `resque` or `sidekiq` is recommended since they use Redis as a backing store as well.
29
+ _NOTE:_ `resque` or `sidekiq` is recommended since they use Redis as a backing store as well.
30
30
 
31
31
  ## Installation
32
32
 
@@ -56,7 +56,7 @@ module MyProcess
56
56
  end
57
57
  ```
58
58
 
59
- Define the process, using the `define_process` method.
59
+ Define the process using the `define_process` method.
60
60
 
61
61
  ```ruby
62
62
  module MyProcess
@@ -69,8 +69,8 @@ module MyProcess
69
69
  end
70
70
  ```
71
71
 
72
- The `define_process` method optionally takes the list of expected arguments which are used to validate the
73
- arguments supplied when creating a new process. These should be specified with symbols.
72
+ The `define_process` method optionally takes the list of expected arguments which are used to validate the arguments supplied when creating a new process.
73
+ These should be specified with symbols.
74
74
 
75
75
  ```ruby
76
76
  module MyProcess
@@ -86,11 +86,9 @@ end
86
86
  process = MyProcess.create_process Date.today, :option_1 => true
87
87
  ```
88
88
 
89
- NOTE: The current implementation performs a naive check on the count of arguments, but this will be
90
- improved in subsequent versions.
89
+ _NOTE:_ The current implementation performs a naive check on the count of arguments.
91
90
 
92
- Next, specify the tasks with their corresponding implementation methods, that make up the process,
93
- using the `task` method and providing the `method` to execute for the task.
91
+ Next, specify the tasks with their corresponding implementation methods, that make up the process, using the `task` method and providing the `method` to execute for the task.
94
92
 
95
93
  ```ruby
96
94
  module MyProcess
@@ -144,11 +142,10 @@ module MyProcess
144
142
  end
145
143
  ```
146
144
 
147
- It is likely that you have already have worker classes for one of the queueing libraries, such as resque or delayed_job, and wish to
148
- reuse them for executing them in the sequence defined by the process definition.
145
+ It is likely that you already have worker classes for one of the queueing libraries, such as resque or delayed_job, and wish to reuse them for executing them in the sequence defined by the process definition.
149
146
 
150
- You define a `job` step, providing the class of the worker, and them taskinator will execute that worker as part of the process definition.
151
- The `job` step will be queued and executed on the configured queue for `delayed_job`, or that of the worker for `resque` and `sidekiq`.
147
+ Define a `job` step, providing the class of the worker, and then taskinator will execute that worker as part of the process definition.
148
+ The `job` step will be queued and executed on same queue as configured by `delayed_job`, or that of the worker for `resque` and `sidekiq`.
152
149
 
153
150
  ```ruby
154
151
  # E.g. A resque worker
@@ -173,8 +170,7 @@ end
173
170
  ```
174
171
 
175
172
  You can also define data driven tasks using the `for_each` method, which takes an iterator method name as an argument.
176
- The iterator method yields the items to produce a parameterized task for that item. Notice that the task method
177
- takes a parameter in this case, which will be the item provided by the iterator.
173
+ The iterator method yields the parameters necessary for the task or job. Notice that the task method takes a parameter in this case, which will be the return values provided by the iterator.
178
174
 
179
175
  ```ruby
180
176
  module MyProcess
@@ -198,8 +194,7 @@ end
198
194
  ```
199
195
 
200
196
  It is possible to branch the process logic based on the options hash passed in when creating a process.
201
- The `options?` method takes the options key as an argument and calls the supplied block if the option
202
- is present and it's value is truthy.
197
+ The `options?` method takes the options key as an argument and calls the supplied block if the option is present and it's value is truthy.
203
198
 
204
199
  ```ruby
205
200
  module MyProcess
@@ -234,7 +229,7 @@ process2.tasks.count #=> 1
234
229
  ```
235
230
 
236
231
  In addition, it is possible to transform the arguments used by a task or job, by including a `transform` step in the definition.
237
- Similarly to the `for_each` method, `transform` takes a method name as an argument. The transformer method must yield the new arguments as required.
232
+ Similarly for the `for_each` method, `transform` takes a method name as an argument. The transformer method must yield the new arguments as required.
238
233
 
239
234
  ```ruby
240
235
  module MyProcess
@@ -370,8 +365,7 @@ To best understand how arguments are handled, you need to break it down into 3 p
370
365
  * Creation and
371
366
  * Execution
372
367
 
373
- Firstly, a process definition is declarative in that the `define_process` and a mix of `sequential`, `concurrent`, `for_each`,
374
- `task` and `job` directives provide the way to specify the sequencing of the steps for the process.
368
+ Firstly, a process definition is declarative in that the `define_process` and a mix of `sequential`, `concurrent`, `for_each`, `task` and `job` directives provide the way to specify the sequencing of the steps for the process.
375
369
  Taskinator will interprete this definition and execute each step in the desired sequence or concurrency.
376
370
 
377
371
  Consider the following process definition:
@@ -418,11 +412,9 @@ end
418
412
 
419
413
  There are three tasks; namely `:work_step_1`, `:work_step_2` and `:work_step_3`.
420
414
 
421
- The third task, `:work_step_3`, is built up using the `for_each` iterator, which means that the number of `:work_step_3` tasks
422
- will depend on how many times the `additional_step` iterator method yields to the definition.
415
+ The third task, `:work_step_3`, is built up using the `for_each` iterator, which means that the number of `:work_step_3` tasks will depend on how many times the `additional_step` iterator method yields to the definition.
423
416
 
424
- This brings us to the creation part. When `create_process` is called on the given module, you provide arguments to it, which will get
425
- passed onto the respective `task` and `for_each` iterator methods.
417
+ This brings us to the creation part. When `create_process` is called on the given module, you provide arguments to it, which will get passed onto the respective `task` and `for_each` iterator methods.
426
418
 
427
419
  So, considering the `MySimpleProcess` module shown above, `work_step_1`, `work_step_2` and `work_step_3` methods each expect arguments.
428
420
  These will ultimately come from the arguments passed into the `create_process` method.
@@ -544,9 +536,7 @@ process.execute
544
536
 
545
537
  ```
546
538
 
547
- In reality, each task is executed by a worker process, possibly on another host, so the execution process isn't as simple,
548
- but this example should help you to understand conceptually how the process is executed, and how the arguments are propagated
549
- through.
539
+ In reality, each task is executed by a worker process, possibly on another host, so the execution process isn't as simple, but this example should help you to understand conceptually how the process is executed, and how the arguments are propagated through.
550
540
 
551
541
  ### Monitoring
552
542
 
@@ -564,9 +554,8 @@ end
564
554
 
565
555
  ### Redis
566
556
 
567
- By default Taskinator assumes Redis is located at `localhost:6397`. This is fine for development, but for many production environments
568
- you will need to poiint to an external Redis server. You may also what to use a namespace for the Redis keys.
569
- NOTE: The configuration hash _must_ have symbolized keys.
557
+ By default Taskinator assumes Redis is located at `localhost:6397`. This is fine for development, but for many production environments you will need to point to an external Redis server. You may also what to use a namespace for the Redis keys.
558
+ _NOTE:_ The configuration hash _must_ have symbolized keys.
570
559
 
571
560
  ```ruby
572
561
  Taskinator.configure do |config|
@@ -580,13 +569,11 @@ end
580
569
  Or, alternatively, via an `ENV` variable
581
570
 
582
571
  Set the `REDIS_PROVIDER` environment variable to the Redis server url.
583
- E.g. On Heroku, with RedisGreen: set REDIS_PROVIDER=REDISGREEN_URL and Taskinator will use the value of the `REDISGREEN_URL`
584
- environment variable when connecting to Redis.
572
+ E.g. On Heroku, with RedisGreen: set REDIS_PROVIDER=REDISGREEN_URL and Taskinator will use the value of the `REDISGREEN_URL` environment variable when connecting to Redis.
585
573
 
586
574
  You may also use the generic `REDIS_URL` which may be set to your own private Redis server.
587
575
 
588
- The Redis configuration leverages the same setup as `sidekiq`. For advanced options, checkout the
589
- [Sidekiq Advanced Options](https://github.com/mperham/sidekiq/wiki/Advanced-Options#complete-control) wiki for more information.
576
+ The Redis configuration leverages the same setup as `sidekiq`. For advanced options, checkout the [Sidekiq Advanced Options](https://github.com/mperham/sidekiq/wiki/Advanced-Options#complete-control) wiki for more information.
590
577
 
591
578
  ### Queues
592
579
 
@@ -622,6 +609,4 @@ Portions of code are from the Sidekiq project, Copyright (c) Contributed Systems
622
609
 
623
610
  Inspired by the [sidekiq](https://github.com/mperham/sidekiq) and [workflow](https://github.com/geekq/workflow) gems.
624
611
 
625
- For other workflow solutions, checkout [Stonepath](https://github.com/bokmann/stonepath), the now deprecated
626
- [ruote](https://github.com/jmettraux/ruote) gem and [workflow](https://github.com/geekq/workflow). Alternatively, for a robust
627
- enterprise ready solution checkout the [AWS Flow Framework for Ruby](http://docs.aws.amazon.com/amazonswf/latest/awsrbflowguide/welcome.html).
612
+ For other workflow solutions, checkout [Stonepath](https://github.com/bokmann/stonepath), the now deprecated [ruote](https://github.com/jmettraux/ruote) gem and [workflow](https://github.com/geekq/workflow). Alternatively, for a robust enterprise ready solution checkout the [AWS Flow Framework for Ruby](http://docs.aws.amazon.com/amazonswf/latest/awsrbflowguide/welcome.html).
@@ -1,3 +1,3 @@
1
1
  module Taskinator
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taskinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Stefano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2015-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -245,6 +245,7 @@ files:
245
245
  - lib/taskinator/tasks.rb
246
246
  - lib/taskinator/version.rb
247
247
  - lib/taskinator/visitor.rb
248
+ - processes_workflow.png
248
249
  - sequence.txt
249
250
  - spec/examples/process_examples.rb
250
251
  - spec/examples/queue_adapter_examples.rb
@@ -273,6 +274,7 @@ files:
273
274
  - spec/taskinator/tasks_spec.rb
274
275
  - spec/taskinator/visitor_spec.rb
275
276
  - taskinator.gemspec
277
+ - tasks_workflow.png
276
278
  homepage: https://github.com/virtualstaticvoid/taskinator
277
279
  licenses:
278
280
  - MIT