fluxus 0.1.2 → 1.1.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: 363722f2ddaae2293eecb73281941ad8c3c48b9e41fd2f582e603f7d73356e72
4
- data.tar.gz: 3c8b9bcb8931e852dbee325a3138e62ddb39ffd7a5f89af01a43301680aa9489
3
+ metadata.gz: d5021a334d45da67ad2dbc54813a4dbcaa4dad544ee2df027bf69fa34ea45e83
4
+ data.tar.gz: 9ee442fb05480874bab73ddd781fb34fe5b125ba4d6d29b4ffb8b78f8b6b3b12
5
5
  SHA512:
6
- metadata.gz: 1fe377536f736b5b40058d33f64edc8d6b1a6ac1e49866d17f4d99c5a4aec49d3d5af774134760d12fd2bccc6567aa14f2db5f461223c9d0735842b3d3003aab
7
- data.tar.gz: 9d1f29508ee2b4fdb14114c45e77cdbb4dfae2005ace37e2405509c726f9a20f605db62d7de391675b097a6de2d638c9774a7128886c7cdd048a3625bc614727
6
+ metadata.gz: 426ffacc4e14669f48f3b9ec0adbb171322c4dd38ac3c8c947710740152e2f28bc2818d62b8fc1919f2ffe3946ce1552e37ea62e322fc9704ef5d536da7adad6
7
+ data.tar.gz: '04648671436ee0c027d1e63cc34d1bff54b3dbb6f398fa6f09b474b7ca549b8a57e6071d0f45aafa5621038835d5350e37cebeb7bb87b9bf9c9a900820ebe2bd'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluxus (0.1.2)
4
+ fluxus (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
+ result_data = self.data.is_a?(Hash) ? self.data : { result: self.data }
10
+ klass.call!(**result_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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fluxus
4
- VERSION = '0.1.2'
4
+ VERSION = '1.1.0'
5
5
  end
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.1.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Aparecido Lavezzo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2025-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 3.3.7
71
+ rubygems_version: 3.5.16
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: Simple Ruby objects for use case wrapping