quickstep 0.1.1 → 0.2.0
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 +4 -4
- data/README.md +4 -3
- data/lib/quickstep/version.rb +1 -1
- data/lib/quickstep.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 346e59b0747f25796c6903ce007daf080a63e88ed9f19897fb9ef61f12e4dbcc
|
4
|
+
data.tar.gz: c3ba62ba1c119ca5b534482d2cd0c106c7161dbcdc3940026897862a1699a43b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c78591ee480a7835663e2ca8c136c48cc566df56937dfe34c40067b50799eccb1808de158b741653083dc2e498991f74107559fb08f26acea0c03f5c00bf891
|
7
|
+
data.tar.gz: 42a6abae6b2d76ebee7dbe7644270220d1864ef8df2d76f0f3ee72bcfe35d9c4a6379b9a903f52818f264bbf7c47b3601181bd23f17781227872086598303cbc
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
# Quickstep
|
5
5
|
|
6
|
-
|
6
|
+
Quickstep is a lightweight business operation tool inspired by [dry-operation](https://github.com/dry-rb/dry-operation). It provides a structured way to execute multi-step operations with built-in success and failure handling.
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
@@ -47,8 +47,9 @@ class MyOperation
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
|
50
|
+
result = MyOperation.new.call(valid: true, value: 5)
|
51
|
+
# or
|
52
|
+
# result = MyOperation.call(valid: true, value: 5)
|
52
53
|
|
53
54
|
if result.success?
|
54
55
|
puts "Success: #{result.value}"
|
data/lib/quickstep/version.rb
CHANGED
data/lib/quickstep.rb
CHANGED
@@ -8,6 +8,7 @@ module Quickstep
|
|
8
8
|
|
9
9
|
def self.included(base)
|
10
10
|
base.extend(ClassMethods)
|
11
|
+
base.prepend(InstanceMethods)
|
11
12
|
end
|
12
13
|
|
13
14
|
module ClassMethods
|
@@ -18,6 +19,14 @@ module Quickstep
|
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
22
|
+
module InstanceMethods
|
23
|
+
def call(*args)
|
24
|
+
catch :halt do
|
25
|
+
super
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
21
30
|
def step(result)
|
22
31
|
if result.success?
|
23
32
|
result
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quickstep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Korepanov
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-07 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: |2
|
13
13
|
Quickstep provides a structured way to execute multi-step business operations with built-in success and
|