stepped 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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -3
  3. data/lib/stepped/version.rb +1 -1
  4. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0687ebc619500dd18bf435c8fb6a67a5523590b811bb51c6f8532f1411ebd93a'
4
- data.tar.gz: 68d54113a3ef201aad85b083378848bfa633c5f5bbe41cdcd52e2a63a6b10f03
3
+ metadata.gz: ff94819a694c7f49934e378c8952edbe7383ddcf53f9ee9da4ee6c6669e5c483
4
+ data.tar.gz: 4feb8d60c62b314bbace0c33bfa78a7850c52adbef3add0c9cc19794bff627a1
5
5
  SHA512:
6
- metadata.gz: f975911ec89661747af26a32e98063e0e7c567a18c0d08e9f7113f7623cdba777a32a9e98af656612418a2e7640a9bbbe8bef3e415eb3f0189cd97bfbc54175e
7
- data.tar.gz: 90064479821a90ff7d2c13c2925f6903e962987092b25ae23985d525e1e79acd2b63a4a28a12b5b9024913e1898918ade9f0c2c2c8870c6ec768e45e43dbd5e7
6
+ metadata.gz: 6f751bf74a6a16454a87d3f96b229f6562ca40fd4f9909414091c8fb04338222f3d5920737b3505954d8d741a6dab6261bbc748ca4416093105b63dae80550a2
7
+ data.tar.gz: 532a6ff7f121a7426d02dbe6a9afb2a6c3ebe09cf0da39500949684656c81c13705a8b04e8baa8bb3d89d2e8ee1202aa542b65e7cc89ffa7fced4b579283297f
data/README.md CHANGED
@@ -2,11 +2,16 @@
2
2
 
3
3
  Stepped is a Rails engine for orchestrating complex workflows as a tree of actions. Each action is persisted, runs through Active Job, and can fan out into more actions while keeping the parent action moving step-by-step as dependencies complete.
4
4
 
5
- The core ideas are:
5
+ <img width="1024" height="1024" alt="stepped-actions" src="https://github.com/user-attachments/assets/32577a1e-1240-44ec-af0a-493a48ec70ef" />
6
+
7
+ Stepped was extracted out of [Envirobly](https://klevo.sk/projects/envirobly-efficient-application-hosting-platform/) where it powers tasks like application deployment, that involve complex, out-of-the-band tasks like DNS provisioning, retries, waiting for instances to boot, running health checks and all the fun of a highly distributed networked system.
8
+
9
+ ## Concepts
6
10
 
7
11
  - **Action trees**: define a root action with multiple steps; each step can enqueue more actions and the step completes only once all the actions within it complete.
12
+ - **Models are the Actors**: in Rails, your business logic usually centers around database-persisted models. Stepped takes advantage of this and allows you to define and run actions on all your models, out of the box.
8
13
  - **Concurrency lanes**: actions with the same `concurrency_key` share a `Stepped::Performance`, so only one runs at a time while others queue up (with automatic superseding of older queued work).
9
- - **Reuse**: optional `checksum` lets Stepped skip work that is already achieved, or share a currently-performing action with multiple parents.
14
+ - **Reuse**: optional `checksum` lets Stepped skip work that is already achieved, or share a currently-performing action with multiple parents. Imagine you need to launch multiple workflows with different outcomes, that all depend on the outcome of the same action, somewhere in the action tree. Stepped makes this easy and efficient.
10
15
  - **Outbound completion**: actions can be marked outbound (or implemented as a job) and completed later by an external event.
11
16
 
12
17
  ## Installation
@@ -212,7 +217,9 @@ Under the hood, completion forwards to the current outbound action for that acto
212
217
 
213
218
  ## Job-backed actions
214
219
 
215
- If you prefer to implement an action as an Active Job, declare it with `job:`. Job-backed actions are treated as outbound and are expected to call `action.complete!` when finished:
220
+ This is especially useful if you'd like to have (delayed) retries on certain errors, that ActiveJob supports out of the box.
221
+
222
+ You can declare it with `job:`. Job-backed actions are treated as outbound and are expected to call `action.complete!` when finished. The action instance is passed as the first and only argument. To work with the action arguments, use the familiar `action.arguments`:
216
223
 
217
224
  ```ruby
218
225
  class TowJob < ActiveJob::Base
@@ -1,3 +1,3 @@
1
1
  module Stepped
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stepped
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
  - Robert Starsi
@@ -37,6 +37,20 @@ dependencies:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: minitest
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.27'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '5.27'
40
54
  email:
41
55
  - klevo@klevo.sk
42
56
  executables: []
@@ -85,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
99
  - !ruby/object:Gem::Version
86
100
  version: '0'
87
101
  requirements: []
88
- rubygems_version: 4.0.1
102
+ rubygems_version: 4.0.3
89
103
  specification_version: 4
90
104
  summary: Rails engine for orchestrating complex action trees.
91
105
  test_files: []