fluxus 0.1.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53b87715576086932fa0632d366b8f17a9abb4790a7115777f2891795e4762bc
4
- data.tar.gz: 0c1efd6a6a09618de16a27690c936ab6911a751b17f3943f637efcfb35a356e6
3
+ metadata.gz: 16c37c28746b33b52f7b930e5a747b05e8327a3c807bcc57cd711eb0c81cb6a7
4
+ data.tar.gz: 40b4567e2e5d98b2b290a73955b63847dc389b01674bf0bfd1de5796ed517e55
5
5
  SHA512:
6
- metadata.gz: f833f3d13d02259e8e6fdb4a003e1af89e2a8a50ae85353122b1bd4a130723acb6a9c1dceacdf1d28692569cae032e0760757e2e1a4c4e8333abb1d94f6f0ec7
7
- data.tar.gz: ff4fee21d2f14dc6feb32bd3c539643830df5e4d017b27d9edd60705ae468d4c38173133295ef3cfa9eb63ba0d799c07185ecdfab9bed730d2cb7c63f52aa709
6
+ metadata.gz: 03ad45b0df8ff8e9dbf004955b7dba53c606f3d71f78e3c41bc46e830abb221be38d09b9b90730f2c5f8e896c9b3ce254a31846ad0dd034d00bf0f205526a25d
7
+ data.tar.gz: d89ba54302bab42e2c170842a65ab2f9ebad84702ea7b1f426cd762075dd4a901bdefdbee3f66a343e64e9fb8e82b0f7031ddcad1945ae4c87741512b2afe258
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluxus (0.1.0)
4
+ fluxus (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,20 +9,10 @@ GEM
9
9
  ast (2.4.2)
10
10
  byebug (11.1.3)
11
11
  coderay (1.1.3)
12
- coveralls (0.7.2)
13
- multi_json (~> 1.3)
14
- rest-client (= 1.6.7)
15
- simplecov (>= 0.7)
16
- term-ansicolor (= 1.2.2)
17
- thor (= 0.18.1)
18
12
  docile (1.4.0)
19
13
  json (2.6.1)
20
14
  method_source (1.0.0)
21
- mime-types (3.4.1)
22
- mime-types-data (~> 3.2015)
23
- mime-types-data (3.2022.0105)
24
15
  minitest (5.16.3)
25
- multi_json (1.15.0)
26
16
  parallel (1.22.1)
27
17
  parser (3.2.0.0)
28
18
  ast (~> 2.4.1)
@@ -35,8 +25,6 @@ GEM
35
25
  rainbow (3.1.1)
36
26
  rake (13.0.6)
37
27
  regexp_parser (2.6.2)
38
- rest-client (1.6.7)
39
- mime-types (>= 1.16)
40
28
  rexml (3.2.5)
41
29
  rubocop (1.44.1)
42
30
  json (~> 2.3)
@@ -57,10 +45,6 @@ GEM
57
45
  simplecov_json_formatter (~> 0.1)
58
46
  simplecov-html (0.12.3)
59
47
  simplecov_json_formatter (0.1.4)
60
- term-ansicolor (1.2.2)
61
- tins (~> 0.8)
62
- thor (0.18.1)
63
- tins (0.13.2)
64
48
  unicode-display_width (2.4.2)
65
49
 
66
50
  PLATFORMS
@@ -70,7 +54,6 @@ PLATFORMS
70
54
  DEPENDENCIES
71
55
  bundler
72
56
  byebug (~> 11)
73
- coveralls
74
57
  fluxus!
75
58
  minitest (~> 5)
76
59
  pry (~> 0.14)
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Fluxus
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/fluxus.svg)](https://badge.fury.io/rb/fluxus)
3
4
  [![build](https://github.com/Rynaro/fluxus/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Rynaro/fluxus/actions/workflows/ci.yml)
4
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/e86034a1a2fdc1e8e88b/maintainability)](https://codeclimate.com/github/Rynaro/fluxus/maintainability)
5
6
 
@@ -8,11 +9,9 @@ Fluxus [[ˈfluːk.sus]](https://en.wiktionary.org/wiki/fluxus#Latin) is a simple
8
9
 
9
10
  _This library takes inspiration from the Clean Architecture concepts of use cases._
10
11
 
11
- _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._
12
-
13
12
  ## Installation
14
13
 
15
- You can add as your project as a dependency:
14
+ You can add it to your project as a dependency:
16
15
 
17
16
  ```ruby
18
17
  gem 'fluxus'
@@ -61,7 +60,7 @@ This approach could be useful for some error recovery systems. Since the applica
61
60
 
62
61
  ---
63
62
 
64
- ### The return `Flow::Results`
63
+ ### The return `Fluxus::Results`
65
64
 
66
65
  The expected `Fluxus` contract expects a `Fluxus::Results::Result` interface compatible as a return value.
67
66
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fluxus
4
- VERSION = '0.1.0'
4
+ VERSION = '1.0.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.0
4
+ version: 1.0.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-08 00:00:00.000000000 Z
11
+ date: 2024-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,7 +24,8 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- description: Really simple fluxus objects for use cases.
27
+ description: Fluxus is a simple, dependencyless, and extensible use-case wrapper for
28
+ your Ruby code.
28
29
  email:
29
30
  - hi@hlavezzo.me
30
31
  executables: []
@@ -70,5 +71,5 @@ requirements: []
70
71
  rubygems_version: 3.2.33
71
72
  signing_key:
72
73
  specification_version: 4
73
- summary: Simple use case objects
74
+ summary: Simple Ruby objects for use case wrapping
74
75
  test_files: []