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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cab46143829bdc0368de1f306e07de41bd5baa18fea35d3e63a923939b00b622
4
- data.tar.gz: 9d5ce7cf8a42f5646043b063b2a7088231d000810a2c7a9c3a49c97c425c62d5
3
+ metadata.gz: 346e59b0747f25796c6903ce007daf080a63e88ed9f19897fb9ef61f12e4dbcc
4
+ data.tar.gz: c3ba62ba1c119ca5b534482d2cd0c106c7161dbcdc3940026897862a1699a43b
5
5
  SHA512:
6
- metadata.gz: 0ecd3c0af49c519c71d362ab25a10f900f46cbde092172faf30fc54e1f2009061cd8d222faa37a1dae7407260d1c91705c5528d4d17e2515b4a9ab796e3d99ad
7
- data.tar.gz: 54469aa1c84096a97e18e80125b48a114c11a8e2893763ba555e55575128d2e75d12b5d529cbea09fcaf3490250ca474787d029ea009a53486db809f0c00d851
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
- QQuickstep 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.
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
- operation = MyOperation.new
51
- result = operation.call(valid: true, value: 5)
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}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Quickstep
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.0'
5
5
  end
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.1.1
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-04-01 00:00:00.000000000 Z
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