fluxus 0.1.2 → 1.0.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/Gemfile.lock +1 -1
- data/README.md +0 -2
- data/lib/fluxus/results/chainable.rb +7 -0
- data/lib/fluxus/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16c37c28746b33b52f7b930e5a747b05e8327a3c807bcc57cd711eb0c81cb6a7
|
4
|
+
data.tar.gz: 40b4567e2e5d98b2b290a73955b63847dc389b01674bf0bfd1de5796ed517e55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03ad45b0df8ff8e9dbf004955b7dba53c606f3d71f78e3c41bc46e830abb221be38d09b9b90730f2c5f8e896c9b3ce254a31846ad0dd034d00bf0f205526a25d
|
7
|
+
data.tar.gz: d89ba54302bab42e2c170842a65ab2f9ebad84702ea7b1f426cd762075dd4a901bdefdbee3f66a343e64e9fb8e82b0f7031ddcad1945ae4c87741512b2afe258
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -9,8 +9,6 @@ Fluxus [[ˈfluːk.sus]](https://en.wiktionary.org/wiki/fluxus#Latin) is a simple
|
|
9
9
|
|
10
10
|
_This library takes inspiration from the Clean Architecture concepts of use cases._
|
11
11
|
|
12
|
-
_Some similarities with [dry-monads](https://github.com/dry-rb/dry-monads) and [u-case](https://github.com/serradura/u-case) can easily be perceived. This library operates to bring interoperability with them._
|
13
|
-
|
14
12
|
## Installation
|
15
13
|
|
16
14
|
You can add it to your project as a dependency:
|
@@ -3,6 +3,13 @@
|
|
3
3
|
module Fluxus
|
4
4
|
module Results
|
5
5
|
module Chainable
|
6
|
+
def then(klass, **kwargs)
|
7
|
+
return self if failure?
|
8
|
+
|
9
|
+
data ||= {}
|
10
|
+
klass.call!(**data.merge(kwargs))
|
11
|
+
end
|
12
|
+
|
6
13
|
def on_success(expected_type = nil)
|
7
14
|
yield(data) if __success_type?(expected_type)
|
8
15
|
self
|
data/lib/fluxus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluxus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique Aparecido Lavezzo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,7 +53,7 @@ licenses:
|
|
53
53
|
metadata:
|
54
54
|
homepage_uri: https://github.com/Rynaro/fluxus
|
55
55
|
source_code_uri: https://github.com/Rynaro/fluxus
|
56
|
-
post_install_message:
|
56
|
+
post_install_message:
|
57
57
|
rdoc_options: []
|
58
58
|
require_paths:
|
59
59
|
- lib
|
@@ -68,8 +68,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.
|
72
|
-
signing_key:
|
71
|
+
rubygems_version: 3.2.33
|
72
|
+
signing_key:
|
73
73
|
specification_version: 4
|
74
74
|
summary: Simple Ruby objects for use case wrapping
|
75
75
|
test_files: []
|