u-case 4.0.0 → 4.2.2

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: e5a9b11b39c8c90670c4308c91e4e887871eb8f98a1fb739c4be71885a14d0b8
4
- data.tar.gz: d4ce16229a9afd7dd4d1a1cf8e5b11067a11a6317c6857264ba46b324b220994
3
+ metadata.gz: 472d6a0f07c2e365dcd4157440888be4a140fabd171c1f8bfdf1f30ffd4c109f
4
+ data.tar.gz: 3b255504d5c6c886bcc9aa167ce5ed57930002b92cb730410ec835a17840a15b
5
5
  SHA512:
6
- metadata.gz: '078f264aa7ca294bcbc12e97b4ef210a11a46151adc94d7954846e81f6e6f1647896969ee8fcf40b1bf715145b7adf029f7d22d26f226c7071d29ea477ca56b7'
7
- data.tar.gz: e5a24e5095cb1178e92919d3f953bfbc6d690242dffafb9b8cdc4ce7c00e943c9921d4013e76b3e062d4269d32b4e4f7bb133951cc0e395416090b36cbf91b36
6
+ metadata.gz: 99c0bd68b866a0a999f86dcd54a13587c05319c068635821e7fc0470f80b92608186d2bb7d263549e11f73951cff06e8f15c5f7586600b660abfb356ab3c5eaf
7
+ data.tar.gz: 2d22c278fc9f1f6e2f845d1477295314efa6b5fd627019d4e4f086ed1542d89d2c14c9df5b466babc4b1d0036c7aba8f0ea6a22163e5314dc1a4d7c3a0482465
data/.travis.sh CHANGED
@@ -2,22 +2,44 @@
2
2
 
3
3
  ruby_v=$(ruby -v)
4
4
 
5
- ACTIVEMODEL_VERSION='3.2' bundle update
6
- ACTIVEMODEL_VERSION='3.2' ENABLE_TRANSITIONS='false' bundle exec rake test
7
- ACTIVEMODEL_VERSION='3.2' ENABLE_TRANSITIONS='true' bundle exec rake test
5
+ if [[ $ruby_v =~ '2.2.' ]] || [[ $ruby_v =~ '2.3.' ]]; then
6
+ ACTIVERECORD_VERSION='3.2' bundle update
7
+ ACTIVERECORD_VERSION='3.2' ENABLE_TRANSITIONS='true' bundle exec rake test
8
+ ACTIVERECORD_VERSION='3.2' ENABLE_TRANSITIONS='false' bundle exec rake test
9
+
10
+ ACTIVERECORD_VERSION='4.0' bundle update
11
+ ACTIVERECORD_VERSION='4.0' ENABLE_TRANSITIONS='true' bundle exec rake test
12
+ ACTIVERECORD_VERSION='4.0' ENABLE_TRANSITIONS='false' bundle exec rake test
13
+
14
+ ACTIVERECORD_VERSION='4.1' bundle update
15
+ ACTIVERECORD_VERSION='4.1' ENABLE_TRANSITIONS='true' bundle exec rake test
16
+ ACTIVERECORD_VERSION='4.1' ENABLE_TRANSITIONS='false' bundle exec rake test
17
+ fi
18
+
19
+ ACTIVERECORD_VERSION='4.2' bundle update
20
+ ACTIVERECORD_VERSION='4.2' ENABLE_TRANSITIONS='true' bundle exec rake test
21
+ ACTIVERECORD_VERSION='4.2' ENABLE_TRANSITIONS='false' bundle exec rake test
22
+
23
+ ACTIVERECORD_VERSION='5.0' bundle update
24
+ ACTIVERECORD_VERSION='5.0' ENABLE_TRANSITIONS='true' bundle exec rake test
25
+ ACTIVERECORD_VERSION='5.0' ENABLE_TRANSITIONS='false' bundle exec rake test
26
+
27
+ ACTIVERECORD_VERSION='5.1' bundle update
28
+ ACTIVERECORD_VERSION='5.1' ENABLE_TRANSITIONS='true' bundle exec rake test
29
+ ACTIVERECORD_VERSION='5.1' ENABLE_TRANSITIONS='false' bundle exec rake test
8
30
 
9
31
  if [[ ! $ruby_v =~ '2.2.0' ]]; then
10
- ACTIVEMODEL_VERSION='5.2' bundle update
11
- ACTIVEMODEL_VERSION='5.2' ENABLE_TRANSITIONS='false' bundle exec rake test
12
- ACTIVEMODEL_VERSION='5.2' ENABLE_TRANSITIONS='true' bundle exec rake test
32
+ ACTIVERECORD_VERSION='5.2' bundle update
33
+ ACTIVERECORD_VERSION='5.2' ENABLE_TRANSITIONS='true' bundle exec rake test
34
+ ACTIVERECORD_VERSION='5.2' ENABLE_TRANSITIONS='false' bundle exec rake test
13
35
  fi
14
36
 
15
37
  if [[ $ruby_v =~ '2.5.' ]] || [[ $ruby_v =~ '2.6.' ]] || [[ $ruby_v =~ '2.7.' ]]; then
16
- ACTIVEMODEL_VERSION='6.0' bundle update
17
- ACTIVEMODEL_VERSION='6.0' ENABLE_TRANSITIONS='false' bundle exec rake test
18
- ACTIVEMODEL_VERSION='6.0' ENABLE_TRANSITIONS='true' bundle exec rake test
38
+ ACTIVERECORD_VERSION='6.0' bundle update
39
+ ACTIVERECORD_VERSION='6.0' ENABLE_TRANSITIONS='true' bundle exec rake test
40
+ ACTIVERECORD_VERSION='6.0' ENABLE_TRANSITIONS='false' bundle exec rake test
19
41
  fi
20
42
 
21
43
  bundle update
22
- ENABLE_TRANSITIONS='false' bundle exec rake test
23
44
  ENABLE_TRANSITIONS='true' bundle exec rake test
45
+ ENABLE_TRANSITIONS='false' bundle exec rake test
data/Gemfile CHANGED
@@ -2,19 +2,19 @@ source "https://rubygems.org"
2
2
 
3
3
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
- activemodel_version = ENV.fetch('ACTIVEMODEL_VERSION', '6.1.0')
5
+ activerecord_version = ENV.fetch('ACTIVERECORD_VERSION', '6.1')
6
6
 
7
- activemodel = case activemodel_version
7
+ activerecord = case activerecord_version
8
8
  when '3.2' then '3.2.22'
9
+ when '4.0' then '4.0.13'
10
+ when '4.1' then '4.1.16'
11
+ when '4.2' then '4.2.11'
12
+ when '5.0' then '5.0.7'
13
+ when '5.1' then '5.1.7'
9
14
  when '5.2' then '5.2.3'
10
- when '6.0' then '6.0.2'
15
+ when '6.0' then '6.0.3'
11
16
  end
12
17
 
13
- if activemodel_version < '6.1.0'
14
- gem 'activemodel', activemodel, require: false
15
- gem 'activesupport', activemodel, require: false
16
- end
17
-
18
18
  simplecov_version =
19
19
  case RUBY_VERSION
20
20
  when /\A2.[23]/ then '~> 0.17.1'
@@ -23,9 +23,20 @@ simplecov_version =
23
23
  end
24
24
 
25
25
  group :test do
26
- gem 'minitest', activemodel_version < '4.1' ? '~> 4.2' : '~> 5.0'
26
+ gem 'minitest', activerecord_version < '4.1' ? '~> 4.2' : '~> 5.0'
27
27
 
28
28
  gem 'simplecov', simplecov_version, require: false
29
+
30
+ if activerecord
31
+ sqlite3 =
32
+ case activerecord
33
+ when /\A6\.0/, nil then '~> 1.4.0'
34
+ else '~> 1.3.0'
35
+ end
36
+
37
+ gem 'sqlite3', sqlite3
38
+ gem 'activerecord', activerecord, require: 'active_record'
39
+ end
29
40
  end
30
41
 
31
42
  pry_byebug_version =
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  </p>
7
7
 
8
8
  <p align="center">
9
- <img src="https://img.shields.io/badge/ruby-2.2+-ruby.svg?colorA=99004d&colorB=cc0066" alt="Ruby">
9
+ <img src="https://img.shields.io/badge/ruby->%3D%202.2.0-ruby.svg?colorA=99004d&colorB=cc0066" alt="Ruby">
10
10
 
11
11
  <a href="https://rubygems.org/gems/u-case">
12
12
  <img alt="Gem" src="https://img.shields.io/gem/v/u-case.svg?style=flat-square">
@@ -38,12 +38,13 @@ The main project goals are:
38
38
 
39
39
  Version | Documentation
40
40
  --------- | -------------
41
- 4.0.0 | https://github.com/serradura/u-case/blob/main/README.md
41
+ unreleased| https://github.com/serradura/u-case/blob/main/README.md
42
+ 4.2.2 | https://github.com/serradura/u-case/blob/v4.x/README.md
42
43
  3.1.0 | https://github.com/serradura/u-case/blob/v3.x/README.md
43
44
  2.6.0 | https://github.com/serradura/u-case/blob/v2.x/README.md
44
45
  1.1.0 | https://github.com/serradura/u-case/blob/v1.x/README.md
45
46
 
46
- > **Note:** Você entende português? 🇧🇷🇵🇹 Verifique o [README traduzido em pt-BR](https://github.com/serradura/u-case/blob/main/README.pt-BR.md).
47
+ > **Note:** Você entende português? 🇧🇷&nbsp;🇵🇹 Verifique o [README traduzido em pt-BR](https://github.com/serradura/u-case/blob/main/README.pt-BR.md).
47
48
 
48
49
  ## Table of Contents <!-- omit in toc -->
49
50
  - [Compatibility](#compatibility)
@@ -100,7 +101,8 @@ Version | Documentation
100
101
 
101
102
  | u-case | branch | ruby | activemodel | u-attributes |
102
103
  | -------------- | ------- | -------- | ------------- | ------------ |
103
- | 4.0.0 | main | >= 2.2.0 | >= 3.2, < 6.1 | ~> 2.0 |
104
+ | unreleased | main | >= 2.2.0 | >= 3.2, < 6.1 | ~> 2.0 |
105
+ | 4.2.2 | v4.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 2.0 |
104
106
  | 3.1.0 | v3.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 1.1 |
105
107
  | 2.6.0 | v2.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 1.1 |
106
108
  | 1.1.0 | v1.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 1.1 |
@@ -124,7 +126,7 @@ Version | Documentation
124
126
  Add this line to your application's Gemfile:
125
127
 
126
128
  ```ruby
127
- gem 'u-case', '~> 3.1.0'
129
+ gem 'u-case', '~> 4.1.0'
128
130
  ```
129
131
 
130
132
  And then execute:
@@ -1198,42 +1200,44 @@ end
1198
1200
 
1199
1201
  | Gem / Abstraction | Iterations per second | Comparison |
1200
1202
  | ----------------- | --------------------: | ----------------: |
1201
- | Dry::Monads | 281515.4 | _**The Fastest**_ |
1202
- | **Micro::Case** | 151711.3 | 1.86x slower |
1203
- | Interactor | 53016.2 | 5.31x slower |
1204
- | Trailblazer::Operation | 38314.2 | 7.35x slower |
1205
- | Dry::Transaction | 10440.7 | 26.96x slower |
1203
+ | Dry::Monads | 315635.1 | _**The Fastest**_ |
1204
+ | **Micro::Case** | 75837.7 | 4.16x slower |
1205
+ | Interactor | 59745.5 | 5.28x slower |
1206
+ | Trailblazer::Operation | 28423.9 | 11.10x slower |
1207
+ | Dry::Transaction | 10130.9 | 31.16x slower |
1206
1208
 
1207
1209
  <details>
1208
1210
  <summary>Show the full <a href="https://github.com/evanphx/benchmark-ips">benchmark/ips</a> results.</summary>
1209
1211
 
1210
1212
  ```ruby
1211
1213
  # Warming up --------------------------------------
1212
- # Interactor 5.151k i/100ms
1213
- # Trailblazer::Operation 3.805k i/100ms
1214
- # Dry::Monads 28.153k i/100ms
1215
- # Dry::Transaction 1.063k i/100ms
1216
- # Micro::Case 15.159k i/100ms
1217
- # Micro::Case::Safe 15.172k i/100ms
1218
- # Micro::Case::Strict 12.557k i/100ms
1214
+ # Interactor 5.711k i/100ms
1215
+ # Trailblazer::Operation
1216
+ # 2.283k i/100ms
1217
+ # Dry::Monads 31.130k i/100ms
1218
+ # Dry::Transaction 994.000 i/100ms
1219
+ # Micro::Case 7.911k i/100ms
1220
+ # Micro::Case::Safe 7.911k i/100ms
1221
+ # Micro::Case::Strict 6.248k i/100ms
1219
1222
 
1220
1223
  # Calculating -------------------------------------
1221
- # Interactor 53.016k 1.8%) i/s - 267.852k in 5.053967s
1222
- # Trailblazer::Operation 38.314k (± 1.7%) i/s - 194.055k in 5.066374s
1223
- # Dry::Monads 281.515k 2.4%) i/s - 1.408M in 5.003266s
1224
- # Dry::Transaction 10.441k2.1%) i/s - 53.150k in 5.092957s
1225
- # Micro::Case 151.711k1.7%) i/s - 773.109k in 5.097555s
1226
- # Micro::Case::Safe 145.801k6.7%) i/s - 728.256k in 5.022666s
1227
- # Micro::Case::Strict 115.636k 8.4%) i/s - 577.622k in 5.042079s
1224
+ # Interactor 59.746k29.9%) i/s - 274.128k in 5.049901s
1225
+ # Trailblazer::Operation
1226
+ # 28.424k15.8%) i/s - 141.546k in 5.087882s
1227
+ # Dry::Monads 315.635k6.1%) i/s - 1.588M in 5.048914s
1228
+ # Dry::Transaction 10.131k6.4%) i/s - 50.694k in 5.025150s
1229
+ # Micro::Case 75.838k9.7%) i/s - 379.728k in 5.052573s
1230
+ # Micro::Case::Safe 75.461k10.1%) i/s - 379.728k in 5.079238s
1231
+ # Micro::Case::Strict 64.235k (± 9.0%) i/s - 324.896k in 5.097028s
1228
1232
 
1229
1233
  # Comparison:
1230
- # Dry::Monads: 281515.4 i/s
1231
- # Micro::Case: 151711.3 i/s - 1.86x (± 0.00) slower
1232
- # Micro::Case::Safe: 145800.8 i/s - 1.93x (± 0.00) slower
1233
- # Micro::Case::Strict: 115635.8 i/s - 2.43x (± 0.00) slower
1234
- # Interactor: 53016.2 i/s - 5.31x (± 0.00) slower
1235
- # Trailblazer::Operation: 38314.2 i/s - 7.35x (± 0.00) slower
1236
- # Dry::Transaction: 10440.7 i/s - 26.96x (± 0.00) slower
1234
+ # Dry::Monads: 315635.1 i/s
1235
+ # Micro::Case: 75837.7 i/s - 4.16x (± 0.00) slower
1236
+ # Micro::Case::Safe: 75461.3 i/s - 4.18x (± 0.00) slower
1237
+ # Micro::Case::Strict: 64234.9 i/s - 4.91x (± 0.00) slower
1238
+ # Interactor: 59745.5 i/s - 5.28x (± 0.00) slower
1239
+ # Trailblazer::Operation: 28423.9 i/s - 11.10x (± 0.00) slower
1240
+ # Dry::Transaction: 10130.9 i/s - 31.16x (± 0.00) slower
1237
1241
  ```
1238
1242
  </details>
1239
1243
 
@@ -1243,42 +1247,42 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/suc
1243
1247
 
1244
1248
  | Gem / Abstraction | Iterations per second | Comparison |
1245
1249
  | ----------------- | --------------------: | ----------------: |
1246
- | **Micro::Case** | 140794.0 | _**The Fastest**_ |
1247
- | Dry::Monads | 133865.5 | 0x slower |
1248
- | Trailblazer::Operation | 39829.9 | 3.53x slower |
1249
- | Interactor | 23856.0 | 5.90x slower |
1250
- | Dry::Transaction | 7975.0 | 17.65x slower |
1250
+ | Dry::Monads | 135386.9 | _**The Fastest**_ |
1251
+ | **Micro::Case** | 73489.3 | 1.85x slower |
1252
+ | Trailblazer::Operation | 29016.4 | 4.67x slower |
1253
+ | Interactor | 27037.0 | 5.01x slower |
1254
+ | Dry::Transaction | 8988.6 | 15.06x slower |
1251
1255
 
1252
1256
  <details>
1253
1257
  <summary>Show the full <a href="https://github.com/evanphx/benchmark-ips">benchmark/ips</a> results.</summary>
1254
1258
 
1255
1259
  ```ruby
1256
1260
  # Warming up --------------------------------------
1257
- # Interactor 2.351k i/100ms
1258
- # Trailblazer::Operation 3.941k i/100ms
1259
- # Dry::Monads 13.567k i/100ms
1260
- # Dry::Transaction 927.000 i/100ms
1261
- # Micro::Case 14.959k i/100ms
1262
- # Micro::Case::Safe 14.904k i/100ms
1263
- # Micro::Case::Strict 12.007k i/100ms
1261
+ # Interactor 2.626k i/100ms
1262
+ # Trailblazer::Operation 2.343k i/100ms
1263
+ # Dry::Monads 13.386k i/100ms
1264
+ # Dry::Transaction 868.000 i/100ms
1265
+ # Micro::Case 7.603k i/100ms
1266
+ # Micro::Case::Safe 7.598k i/100ms
1267
+ # Micro::Case::Strict 6.178k i/100ms
1264
1268
 
1265
1269
  # Calculating -------------------------------------
1266
- # Interactor 23.856k 1.7%) i/s - 119.901k in 5.027585s
1267
- # Trailblazer::Operation 39.830k 1.2%) i/s - 200.991k in 5.047032s
1268
- # Dry::Monads 133.866k 2.5%) i/s - 678.350k in 5.070899s
1269
- # Dry::Transaction 7.975k8.6%) i/s - 39.861k in 5.036260s
1270
- # Micro::Case 130.534k24.4%) i/s - 583.401k in 5.040907s
1271
- # Micro::Case::Safe 140.794k8.1%) i/s - 700.488k in 5.020935s
1272
- # Micro::Case::Strict 102.641k21.3%) i/s - 480.280k in 5.020354s
1270
+ # Interactor 27.037k24.9%) i/s - 128.674k in 5.102133s
1271
+ # Trailblazer::Operation 29.016k12.4%) i/s - 145.266k in 5.074991s
1272
+ # Dry::Monads 135.387k15.1%) i/s - 669.300k in 5.055356s
1273
+ # Dry::Transaction 8.989k9.2%) i/s - 45.136k in 5.084820s
1274
+ # Micro::Case 73.247k 9.9%) i/s - 364.944k in 5.030449s
1275
+ # Micro::Case::Safe 73.489k9.6%) i/s - 364.704k in 5.007282s
1276
+ # Micro::Case::Strict 61.980k 8.0%) i/s - 308.900k in 5.014821s
1273
1277
 
1274
1278
  # Comparison:
1275
- # Micro::Case::Safe: 140794.0 i/s
1276
- # Dry::Monads: 133865.5 i/s - same-ish: difference falls within error
1277
- # Micro::Case: 130534.0 i/s - same-ish: difference falls within error
1278
- # Micro::Case::Strict: 102640.7 i/s - 1.37x (± 0.00) slower
1279
- # Trailblazer::Operation: 39829.9 i/s - 3.53x (± 0.00) slower
1280
- # Interactor: 23856.0 i/s - 5.90x (± 0.00) slower
1281
- # Dry::Transaction: 7975.0 i/s - 17.65x (± 0.00) slower
1279
+ # Dry::Monads: 135386.9 i/s
1280
+ # Micro::Case::Safe: 73489.3 i/s - 1.84x (± 0.00) slower
1281
+ # Micro::Case: 73246.6 i/s - 1.85x (± 0.00) slower
1282
+ # Micro::Case::Strict: 61979.7 i/s - 2.18x (± 0.00) slower
1283
+ # Trailblazer::Operation: 29016.4 i/s - 4.67x (± 0.00) slower
1284
+ # Interactor: 27037.0 i/s - 5.01x (± 0.00) slower
1285
+ # Dry::Transaction: 8988.6 i/s - 15.06x (± 0.00) slower
1282
1286
  ```
1283
1287
  </details>
1284
1288
 
@@ -1290,12 +1294,12 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/fai
1290
1294
 
1291
1295
  | Gems / Abstraction | [Success results](https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/flow/success_results.rb) | [Failure results](https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/flow/failure_results.rb) |
1292
1296
  | ------------------------------------------- | ----------------: | ----------------: |
1293
- | Micro::Case::Result `pipe` method | 172734.4 i/s | 153745.6 i/s |
1294
- | Micro::Case::Result `then` method | 1.24x slower | 1.21x slower |
1295
- | Micro::Cases.flow | 1.30x slower | 1.30x slower |
1296
- | Micro::Case class with an inner flow | 2.05x slower | 1.98x slower |
1297
- | Micro::Case class including itself as a step| 2.14x slower | 2.09x slower |
1298
- | Interactor::Organizer | 7.69x slower | 7.03x slower |
1297
+ | Micro::Case::Result `pipe` method | 80936.2 i/s | 78280.4 i/s |
1298
+ | Micro::Case::Result `then` method | 0x slower | 0x slower |
1299
+ | Micro::Cases.flow | 0x slower | 0x slower |
1300
+ | Micro::Case class with an inner flow | 1.72x slower | 1.68x slower |
1301
+ | Micro::Case class including itself as a step| 1.93x slower | 1.87x slower |
1302
+ | Interactor::Organizer | 3.33x slower | 3.22x slower |
1299
1303
 
1300
1304
  \* The `Dry::Monads`, `Dry::Transaction`, `Trailblazer::Operation` gems are out of this analysis because all of them doesn't have this kind of feature.
1301
1305
 
@@ -1304,28 +1308,28 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/fai
1304
1308
 
1305
1309
  ```ruby
1306
1310
  # Warming up --------------------------------------
1307
- # Interactor::Organizer 2.163k i/100ms
1308
- # Micro::Cases.flow([]) 13.158k i/100ms
1309
- # Micro::Case flow in a class 8.400k i/100ms
1310
- # Micro::Case including the class 8.008k i/100ms
1311
- # Micro::Case::Result#| 17.151k i/100ms
1312
- # Micro::Case::Result#then 14.121k i/100ms
1311
+ # Interactor::Organizer 1.809k i/100ms
1312
+ # Micro::Cases.flow([]) 7.808k i/100ms
1313
+ # Micro::Case flow in a class 4.816k i/100ms
1314
+ # Micro::Case including the class 4.094k i/100ms
1315
+ # Micro::Case::Result#| 7.656k i/100ms
1316
+ # Micro::Case::Result#then 7.138k i/100ms
1313
1317
 
1314
1318
  # Calculating -------------------------------------
1315
- # Interactor::Organizer 22.467k 1.8%) i/s - 112.476k in 5.007787s
1316
- # Micro::Cases.flow([]) 133.183k 1.5%) i/s - 671.058k in 5.039815s
1317
- # Micro::Case flow in a class 84.083k1.8%) i/s - 428.400k in 5.096623s
1318
- # Micro::Case including the class 80.574k1.6%) i/s - 408.408k in 5.070029s
1319
- # Micro::Case::Result#| 172.734k 1.1%) i/s - 874.701k in 5.064429s
1320
- # Micro::Case::Result#then 139.799k1.7%) i/s - 706.050k in 5.052035s
1319
+ # Interactor::Organizer 24.290k24.0%) i/s - 113.967k in 5.032825s
1320
+ # Micro::Cases.flow([]) 74.790k11.1%) i/s - 374.784k in 5.071740s
1321
+ # Micro::Case flow in a class 47.043k8.0%) i/s - 235.984k in 5.047477s
1322
+ # Micro::Case including the class 42.030k8.5%) i/s - 208.794k in 5.002138s
1323
+ # Micro::Case::Result#| 80.936k15.9%) i/s - 398.112k in 5.052531s
1324
+ # Micro::Case::Result#then 71.459k8.8%) i/s - 356.900k in 5.030526s
1321
1325
 
1322
1326
  # Comparison:
1323
- # Micro::Case::Result#|: 172734.4 i/s
1324
- # Micro::Case::Result#then: 139799.0 i/s - 1.24x (± 0.00) slower
1325
- # Micro::Cases.flow([]): 133182.9 i/s - 1.30x (± 0.00) slower
1326
- # Micro::Case flow in a class: 84082.6 i/s - 2.05x (± 0.00) slower
1327
- # Micro::Case including the class: 80574.3 i/s - 2.14x (± 0.00) slower
1328
- # Interactor::Organizer: 22467.4 i/s - 7.69x (± 0.00) slower
1327
+ # Micro::Case::Result#|: 80936.2 i/s
1328
+ # Micro::Cases.flow([]): 74790.1 i/s - same-ish: difference falls within error
1329
+ # Micro::Case::Result#then: 71459.5 i/s - same-ish: difference falls within error
1330
+ # Micro::Case flow in a class: 47042.6 i/s - 1.72x (± 0.00) slower
1331
+ # Micro::Case including the class: 42030.2 i/s - 1.93x (± 0.00) slower
1332
+ # Interactor::Organizer: 24290.3 i/s - 3.33x (± 0.00) slower
1329
1333
  ```
1330
1334
  </details>
1331
1335
 
@@ -1334,28 +1338,28 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/fai
1334
1338
 
1335
1339
  ```ruby
1336
1340
  # Warming up --------------------------------------
1337
- # Interactor::Organizer 2.167k i/100ms
1338
- # Micro::Cases.flow([]) 11.797k i/100ms
1339
- # Micro::Case flow in a class 7.783k i/100ms
1340
- # Micro::Case including the class 7.097k i/100ms
1341
- # Micro::Case::Result#| 14.398k i/100ms
1342
- # Micro::Case::Result#then 12.719k i/100ms
1341
+ # Interactor::Organizer 1.734k i/100ms
1342
+ # Micro::Cases.flow([]) 7.515k i/100ms
1343
+ # Micro::Case flow in a class 4.636k i/100ms
1344
+ # Micro::Case including the class 4.114k i/100ms
1345
+ # Micro::Case::Result#| 7.588k i/100ms
1346
+ # Micro::Case::Result#then 6.681k i/100ms
1343
1347
 
1344
1348
  # Calculating -------------------------------------
1345
- # Interactor::Organizer 21.863k 2.5%) i/s - 110.517k in 5.058420s
1346
- # Micro::Cases.flow([]) 118.124k1.8%) i/s - 601.647k in 5.095102s
1347
- # Micro::Case flow in a class 77.801k1.5%) i/s - 389.150k in 5.003002s
1348
- # Micro::Case including the class 73.533k2.1%) i/s - 369.044k in 5.021076s
1349
- # Micro::Case::Result#| 153.746k 1.5%) i/s - 777.492k in 5.058177s
1350
- # Micro::Case::Result#then 126.897k1.7%) i/s - 635.950k in 5.013059s
1349
+ # Interactor::Organizer 24.280k24.5%) i/s - 112.710k in 5.013334s
1350
+ # Micro::Cases.flow([]) 74.999k9.8%) i/s - 375.750k in 5.055777s
1351
+ # Micro::Case flow in a class 46.681k9.3%) i/s - 236.436k in 5.105105s
1352
+ # Micro::Case including the class 41.921k8.9%) i/s - 209.814k in 5.043622s
1353
+ # Micro::Case::Result#| 78.280k12.6%) i/s - 386.988k in 5.022146s
1354
+ # Micro::Case::Result#then 68.898k8.8%) i/s - 347.412k in 5.080116s
1351
1355
 
1352
1356
  # Comparison:
1353
- # Micro::Case::Result#|: 153745.6 i/s
1354
- # Micro::Case::Result#then: 126896.6 i/s - 1.21x (± 0.00) slower
1355
- # Micro::Cases.flow([]): 118123.9 i/s - 1.30x (± 0.00) slower
1356
- # Micro::Case flow in a class: 77800.7 i/s - 1.98x (± 0.00) slower
1357
- # Micro::Case including the class: 73532.9 i/s - 2.09x (± 0.00) slower
1358
- # Interactor::Organizer: 21862.9 i/s - 7.03x (± 0.00) slower
1357
+ # Micro::Case::Result#|: 78280.4 i/s
1358
+ # Micro::Cases.flow([]): 74999.4 i/s - same-ish: difference falls within error
1359
+ # Micro::Case::Result#then: 68898.4 i/s - same-ish: difference falls within error
1360
+ # Micro::Case flow in a class: 46681.0 i/s - 1.68x (± 0.00) slower
1361
+ # Micro::Case including the class: 41920.8 i/s - 1.87x (± 0.00) slower
1362
+ # Interactor::Organizer: 24280.0 i/s - 3.22x (± 0.00) slower
1359
1363
  ```
1360
1364
  </details>
1361
1365
 
@@ -38,7 +38,8 @@ Principais objetivos deste projeto:
38
38
 
39
39
  Versão | Documentação
40
40
  --------- | -------------
41
- 4.0.0 | https://github.com/serradura/u-case/blob/main/README.md
41
+ unreleased| https://github.com/serradura/u-case/blob/main/README.md
42
+ 4.2.2 | https://github.com/serradura/u-case/blob/v4.x/README.md
42
43
  3.1.0 | https://github.com/serradura/u-case/blob/v3.x/README.md
43
44
  2.6.0 | https://github.com/serradura/u-case/blob/v2.x/README.md
44
45
  1.1.0 | https://github.com/serradura/u-case/blob/v1.x/README.md
@@ -69,9 +70,8 @@ Versão | Documentação
69
70
  - [É possível declarar um fluxo que inclui o próprio caso de uso?](#é-possível-declarar-um-fluxo-que-inclui-o-próprio-caso-de-uso)
70
71
  - [`Micro::Case::Strict` - O que é um caso de uso estrito?](#microcasestrict---o-que-é-um-caso-de-uso-estrito)
71
72
  - [`Micro::Case::Safe` - Existe algum recurso para lidar automaticamente com exceções dentro de um caso de uso ou fluxo?](#microcasesafe---existe-algum-recurso-para-lidar-automaticamente-com-exceções-dentro-de-um-caso-de-uso-ou-fluxo)
72
- - [`Micro::Case::Result#on_exception`](#microcaseresulton_exception)
73
73
  - [`Micro::Cases::Safe::Flow`](#microcasessafeflow)
74
- - [`Micro::Case::Result#on_exception`](#microcaseresulton_exception-1)
74
+ - [`Micro::Case::Result#on_exception`](#microcaseresulton_exception)
75
75
  - [`u-case/with_activemodel_validation` - Como validar os atributos do caso de uso?](#u-casewith_activemodel_validation---como-validar-os-atributos-do-caso-de-uso)
76
76
  - [Se eu habilitei a validação automática, é possível desabilitá-la apenas em casos de uso específicos?](#se-eu-habilitei-a-validação-automática-é-possível-desabilitá-la-apenas-em-casos-de-uso-específicos)
77
77
  - [`Kind::Validator`](#kindvalidator)
@@ -99,7 +99,8 @@ Versão | Documentação
99
99
 
100
100
  | u-case | branch | ruby | activemodel | u-attributes |
101
101
  | -------------- | ------- | -------- | ------------- | ------------ |
102
- | 4.0.0 | main | >= 2.2.0 | >= 3.2, < 6.1 | ~> 2.0 |
102
+ | unreleased | main | >= 2.2.0 | >= 3.2, < 6.1 | ~> 2.0 |
103
+ | 4.2.2 | v4.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 2.0 |
103
104
  | 3.1.0 | v3.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 1.1 |
104
105
  | 2.6.0 | v2.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 1.1 |
105
106
  | 1.1.0 | v1.x | >= 2.2.0 | >= 3.2, < 6.1 | ~> 1.1 |
@@ -123,7 +124,7 @@ Versão | Documentação
123
124
  Adicione essa linha ao Gemfile da sua aplicação:
124
125
 
125
126
  ```ruby
126
- gem 'u-case', '~> 3.1.0'
127
+ gem 'u-case', '~> 4.1.0'
127
128
  ```
128
129
 
129
130
  E então execute:
@@ -975,8 +976,6 @@ result.on_failure(:exception) do |result|
975
976
  end
976
977
  ```
977
978
 
978
- #### `Micro::Case::Result#on_exception`
979
-
980
979
  Se você precisar lidar com um erro específico, recomendo o uso de uma instrução case. Exemplo:
981
980
 
982
981
  ```ruby
@@ -1200,44 +1199,46 @@ end
1200
1199
 
1201
1200
  #### Success results
1202
1201
 
1203
- | Gem / Abstração | Iterações por segundo | Comparação |
1204
- | ----------------- | --------------------: | ----------------: |
1205
- | Dry::Monads | 281515.4 | _**O mais rápido**_ |
1206
- | **Micro::Case** | 151711.3 | 1.86x mais lento |
1207
- | Interactor | 53016.2 | 5.31x mais lento |
1208
- | Trailblazer::Operation | 38314.2 | 7.35x mais lento |
1209
- | Dry::Transaction | 10440.7 | 26.96x mais lento |
1202
+ | Gem / Abstração | Iterações por segundo | Comparação |
1203
+ | ----------------- | --------------------: | -------------------: |
1204
+ | Dry::Monads | 315635.1 | _**O mais rápido**_ |
1205
+ | **Micro::Case** | 75837.7 | 4.16x mais lento |
1206
+ | Interactor | 59745.5 | 5.28x mais lento |
1207
+ | Trailblazer::Operation | 28423.9 | 11.10x mais lento |
1208
+ | Dry::Transaction | 10130.9 | 31.16x mais lento |
1210
1209
 
1211
1210
  <details>
1212
1211
  <summary>Show the full <a href="https://github.com/evanphx/benchmark-ips">benchmark/ips</a> results.</summary>
1213
1212
 
1214
1213
  ```ruby
1215
1214
  # Warming up --------------------------------------
1216
- # Interactor 5.151k i/100ms
1217
- # Trailblazer::Operation 3.805k i/100ms
1218
- # Dry::Monads 28.153k i/100ms
1219
- # Dry::Transaction 1.063k i/100ms
1220
- # Micro::Case 15.159k i/100ms
1221
- # Micro::Case::Safe 15.172k i/100ms
1222
- # Micro::Case::Strict 12.557k i/100ms
1215
+ # Interactor 5.711k i/100ms
1216
+ # Trailblazer::Operation
1217
+ # 2.283k i/100ms
1218
+ # Dry::Monads 31.130k i/100ms
1219
+ # Dry::Transaction 994.000 i/100ms
1220
+ # Micro::Case 7.911k i/100ms
1221
+ # Micro::Case::Safe 7.911k i/100ms
1222
+ # Micro::Case::Strict 6.248k i/100ms
1223
1223
 
1224
1224
  # Calculating -------------------------------------
1225
- # Interactor 53.016k 1.8%) i/s - 267.852k in 5.053967s
1226
- # Trailblazer::Operation 38.314k (± 1.7%) i/s - 194.055k in 5.066374s
1227
- # Dry::Monads 281.515k 2.4%) i/s - 1.408M in 5.003266s
1228
- # Dry::Transaction 10.441k2.1%) i/s - 53.150k in 5.092957s
1229
- # Micro::Case 151.711k1.7%) i/s - 773.109k in 5.097555s
1230
- # Micro::Case::Safe 145.801k6.7%) i/s - 728.256k in 5.022666s
1231
- # Micro::Case::Strict 115.636k 8.4%) i/s - 577.622k in 5.042079s
1225
+ # Interactor 59.746k29.9%) i/s - 274.128k in 5.049901s
1226
+ # Trailblazer::Operation
1227
+ # 28.424k15.8%) i/s - 141.546k in 5.087882s
1228
+ # Dry::Monads 315.635k6.1%) i/s - 1.588M in 5.048914s
1229
+ # Dry::Transaction 10.131k6.4%) i/s - 50.694k in 5.025150s
1230
+ # Micro::Case 75.838k9.7%) i/s - 379.728k in 5.052573s
1231
+ # Micro::Case::Safe 75.461k10.1%) i/s - 379.728k in 5.079238s
1232
+ # Micro::Case::Strict 64.235k (± 9.0%) i/s - 324.896k in 5.097028s
1232
1233
 
1233
1234
  # Comparison:
1234
- # Dry::Monads: 281515.4 i/s
1235
- # Micro::Case: 151711.3 i/s - 1.86x (± 0.00) slower
1236
- # Micro::Case::Safe: 145800.8 i/s - 1.93x (± 0.00) slower
1237
- # Micro::Case::Strict: 115635.8 i/s - 2.43x (± 0.00) slower
1238
- # Interactor: 53016.2 i/s - 5.31x (± 0.00) slower
1239
- # Trailblazer::Operation: 38314.2 i/s - 7.35x (± 0.00) slower
1240
- # Dry::Transaction: 10440.7 i/s - 26.96x (± 0.00) slower
1235
+ # Dry::Monads: 315635.1 i/s
1236
+ # Micro::Case: 75837.7 i/s - 4.16x (± 0.00) slower
1237
+ # Micro::Case::Safe: 75461.3 i/s - 4.18x (± 0.00) slower
1238
+ # Micro::Case::Strict: 64234.9 i/s - 4.91x (± 0.00) slower
1239
+ # Interactor: 59745.5 i/s - 5.28x (± 0.00) slower
1240
+ # Trailblazer::Operation: 28423.9 i/s - 11.10x (± 0.00) slower
1241
+ # Dry::Transaction: 10130.9 i/s - 31.16x (± 0.00) slower
1241
1242
  ```
1242
1243
  </details>
1243
1244
 
@@ -1245,44 +1246,44 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/suc
1245
1246
 
1246
1247
  #### Failure results
1247
1248
 
1248
- | Gem / Abstração | Iterações por segundo | Comparação |
1249
- | ----------------- | --------------------: | ----------------: |
1250
- | **Micro::Case** | 140794.0 | _**O mais rápido**_ |
1251
- | Dry::Monads | 133865.5 | 0x mais devagar |
1252
- | Trailblazer::Operation | 39829.9 | 3.53x mais devagar |
1253
- | Interactor | 23856.0 | 5.90x mais devagar |
1254
- | Dry::Transaction | 7975.0 | 17.65x mais devagar |
1249
+ | Gem / Abstração | Iterações por segundo | Comparação |
1250
+ | ----------------- | --------------------: | -------------------: |
1251
+ | Dry::Monads | 135386.9 | _**O mais rápido**_ |
1252
+ | **Micro::Case** | 73489.3 | 1.85x mais lento |
1253
+ | Trailblazer::Operation | 29016.4 | 4.67x mais lento |
1254
+ | Interactor | 27037.0 | 5.01x mais lento |
1255
+ | Dry::Transaction | 8988.6 | 15.06x mais lento |
1255
1256
 
1256
1257
  <details>
1257
1258
  <summary>Mostrar o resultado completo do <a href="https://github.com/evanphx/benchmark-ips">benchmark/ips</a>.</summary>
1258
1259
 
1259
1260
  ```ruby
1260
1261
  # Warming up --------------------------------------
1261
- # Interactor 2.351k i/100ms
1262
- # Trailblazer::Operation 3.941k i/100ms
1263
- # Dry::Monads 13.567k i/100ms
1264
- # Dry::Transaction 927.000 i/100ms
1265
- # Micro::Case 14.959k i/100ms
1266
- # Micro::Case::Safe 14.904k i/100ms
1267
- # Micro::Case::Strict 12.007k i/100ms
1262
+ # Interactor 2.626k i/100ms
1263
+ # Trailblazer::Operation 2.343k i/100ms
1264
+ # Dry::Monads 13.386k i/100ms
1265
+ # Dry::Transaction 868.000 i/100ms
1266
+ # Micro::Case 7.603k i/100ms
1267
+ # Micro::Case::Safe 7.598k i/100ms
1268
+ # Micro::Case::Strict 6.178k i/100ms
1268
1269
 
1269
1270
  # Calculating -------------------------------------
1270
- # Interactor 23.856k 1.7%) i/s - 119.901k in 5.027585s
1271
- # Trailblazer::Operation 39.830k 1.2%) i/s - 200.991k in 5.047032s
1272
- # Dry::Monads 133.866k 2.5%) i/s - 678.350k in 5.070899s
1273
- # Dry::Transaction 7.975k8.6%) i/s - 39.861k in 5.036260s
1274
- # Micro::Case 130.534k24.4%) i/s - 583.401k in 5.040907s
1275
- # Micro::Case::Safe 140.794k8.1%) i/s - 700.488k in 5.020935s
1276
- # Micro::Case::Strict 102.641k21.3%) i/s - 480.280k in 5.020354s
1271
+ # Interactor 27.037k24.9%) i/s - 128.674k in 5.102133s
1272
+ # Trailblazer::Operation 29.016k12.4%) i/s - 145.266k in 5.074991s
1273
+ # Dry::Monads 135.387k15.1%) i/s - 669.300k in 5.055356s
1274
+ # Dry::Transaction 8.989k9.2%) i/s - 45.136k in 5.084820s
1275
+ # Micro::Case 73.247k 9.9%) i/s - 364.944k in 5.030449s
1276
+ # Micro::Case::Safe 73.489k9.6%) i/s - 364.704k in 5.007282s
1277
+ # Micro::Case::Strict 61.980k 8.0%) i/s - 308.900k in 5.014821s
1277
1278
 
1278
1279
  # Comparison:
1279
- # Micro::Case::Safe: 140794.0 i/s
1280
- # Dry::Monads: 133865.5 i/s - same-ish: difference falls within error
1281
- # Micro::Case: 130534.0 i/s - same-ish: difference falls within error
1282
- # Micro::Case::Strict: 102640.7 i/s - 1.37x (± 0.00) slower
1283
- # Trailblazer::Operation: 39829.9 i/s - 3.53x (± 0.00) slower
1284
- # Interactor: 23856.0 i/s - 5.90x (± 0.00) slower
1285
- # Dry::Transaction: 7975.0 i/s - 17.65x (± 0.00) slower
1280
+ # Dry::Monads: 135386.9 i/s
1281
+ # Micro::Case::Safe: 73489.3 i/s - 1.84x (± 0.00) slower
1282
+ # Micro::Case: 73246.6 i/s - 1.85x (± 0.00) slower
1283
+ # Micro::Case::Strict: 61979.7 i/s - 2.18x (± 0.00) slower
1284
+ # Trailblazer::Operation: 29016.4 i/s - 4.67x (± 0.00) slower
1285
+ # Interactor: 27037.0 i/s - 5.01x (± 0.00) slower
1286
+ # Dry::Transaction: 8988.6 i/s - 15.06x (± 0.00) slower
1286
1287
  ```
1287
1288
  </details>
1288
1289
 
@@ -1294,12 +1295,12 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/fai
1294
1295
 
1295
1296
  | Gem / Abstração | [Resultados de sucesso](https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/flow/success_results.rb) | [Resultados de falha](https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/flow/failure_results.rb) |
1296
1297
  | ------------------------------------------- | ----------------: | ----------------: |
1297
- | Micro::Case::Result `pipe` method | 172734.4 i/s | 153745.6 i/s |
1298
- | Micro::Case::Result `then` method | 1.24x mais devagar | 1.21x mais devagar |
1299
- | Micro::Cases.flow | 1.30x mais devagar | 1.30x mais devagar |
1300
- | Micro::Case class with an inner flow | 2.05x mais devagar | 1.98x mais devagar |
1301
- | Micro::Case class including itself as a step| 2.14x mais devagar | 2.09x mais devagar |
1302
- | Interactor::Organizer | 7.69x mais devagar | 7.03x mais devagar |
1298
+ | Micro::Case::Result `pipe` method | 80936.2 i/s | 78280.4 i/s |
1299
+ | Micro::Case::Result `then` method | 0x mais lento | 0x mais lento |
1300
+ | Micro::Cases.flow | 0x mais lento | 0x mais lento |
1301
+ | Micro::Case class with an inner flow | 1.72x mais lento | 1.68x mais lento |
1302
+ | Micro::Case class including itself as a step| 1.93x mais lento | 1.87x mais lento |
1303
+ | Interactor::Organizer | 3.33x mais lento | 3.22x mais lento |
1303
1304
 
1304
1305
  \* As gems `Dry::Monads`, `Dry::Transaction`, `Trailblazer::Operation` estão fora desta análise por não terem esse tipo de funcionalidade.
1305
1306
 
@@ -1308,28 +1309,28 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/fai
1308
1309
 
1309
1310
  ```ruby
1310
1311
  # Warming up --------------------------------------
1311
- # Interactor::Organizer 2.163k i/100ms
1312
- # Micro::Cases.flow([]) 13.158k i/100ms
1313
- # Micro::Case flow in a class 8.400k i/100ms
1314
- # Micro::Case including the class 8.008k i/100ms
1315
- # Micro::Case::Result#| 17.151k i/100ms
1316
- # Micro::Case::Result#then 14.121k i/100ms
1312
+ # Interactor::Organizer 1.809k i/100ms
1313
+ # Micro::Cases.flow([]) 7.808k i/100ms
1314
+ # Micro::Case flow in a class 4.816k i/100ms
1315
+ # Micro::Case including the class 4.094k i/100ms
1316
+ # Micro::Case::Result#| 7.656k i/100ms
1317
+ # Micro::Case::Result#then 7.138k i/100ms
1317
1318
 
1318
1319
  # Calculating -------------------------------------
1319
- # Interactor::Organizer 22.467k 1.8%) i/s - 112.476k in 5.007787s
1320
- # Micro::Cases.flow([]) 133.183k 1.5%) i/s - 671.058k in 5.039815s
1321
- # Micro::Case flow in a class 84.083k1.8%) i/s - 428.400k in 5.096623s
1322
- # Micro::Case including the class 80.574k1.6%) i/s - 408.408k in 5.070029s
1323
- # Micro::Case::Result#| 172.734k 1.1%) i/s - 874.701k in 5.064429s
1324
- # Micro::Case::Result#then 139.799k1.7%) i/s - 706.050k in 5.052035s
1320
+ # Interactor::Organizer 24.290k24.0%) i/s - 113.967k in 5.032825s
1321
+ # Micro::Cases.flow([]) 74.790k11.1%) i/s - 374.784k in 5.071740s
1322
+ # Micro::Case flow in a class 47.043k8.0%) i/s - 235.984k in 5.047477s
1323
+ # Micro::Case including the class 42.030k8.5%) i/s - 208.794k in 5.002138s
1324
+ # Micro::Case::Result#| 80.936k15.9%) i/s - 398.112k in 5.052531s
1325
+ # Micro::Case::Result#then 71.459k8.8%) i/s - 356.900k in 5.030526s
1325
1326
 
1326
1327
  # Comparison:
1327
- # Micro::Case::Result#|: 172734.4 i/s
1328
- # Micro::Case::Result#then: 139799.0 i/s - 1.24x (± 0.00) slower
1329
- # Micro::Cases.flow([]): 133182.9 i/s - 1.30x (± 0.00) slower
1330
- # Micro::Case flow in a class: 84082.6 i/s - 2.05x (± 0.00) slower
1331
- # Micro::Case including the class: 80574.3 i/s - 2.14x (± 0.00) slower
1332
- # Interactor::Organizer: 22467.4 i/s - 7.69x (± 0.00) slower
1328
+ # Micro::Case::Result#|: 80936.2 i/s
1329
+ # Micro::Cases.flow([]): 74790.1 i/s - same-ish: difference falls within error
1330
+ # Micro::Case::Result#then: 71459.5 i/s - same-ish: difference falls within error
1331
+ # Micro::Case flow in a class: 47042.6 i/s - 1.72x (± 0.00) slower
1332
+ # Micro::Case including the class: 42030.2 i/s - 1.93x (± 0.00) slower
1333
+ # Interactor::Organizer: 24290.3 i/s - 3.33x (± 0.00) slower
1333
1334
  ```
1334
1335
  </details>
1335
1336
 
@@ -1338,28 +1339,28 @@ https://github.com/serradura/u-case/blob/main/benchmarks/perfomance/use_case/fai
1338
1339
 
1339
1340
  ```ruby
1340
1341
  # Warming up --------------------------------------
1341
- # Interactor::Organizer 2.167k i/100ms
1342
- # Micro::Cases.flow([]) 11.797k i/100ms
1343
- # Micro::Case flow in a class 7.783k i/100ms
1344
- # Micro::Case including the class 7.097k i/100ms
1345
- # Micro::Case::Result#| 14.398k i/100ms
1346
- # Micro::Case::Result#then 12.719k i/100ms
1342
+ # Interactor::Organizer 1.734k i/100ms
1343
+ # Micro::Cases.flow([]) 7.515k i/100ms
1344
+ # Micro::Case flow in a class 4.636k i/100ms
1345
+ # Micro::Case including the class 4.114k i/100ms
1346
+ # Micro::Case::Result#| 7.588k i/100ms
1347
+ # Micro::Case::Result#then 6.681k i/100ms
1347
1348
 
1348
1349
  # Calculating -------------------------------------
1349
- # Interactor::Organizer 21.863k 2.5%) i/s - 110.517k in 5.058420s
1350
- # Micro::Cases.flow([]) 118.124k1.8%) i/s - 601.647k in 5.095102s
1351
- # Micro::Case flow in a class 77.801k1.5%) i/s - 389.150k in 5.003002s
1352
- # Micro::Case including the class 73.533k2.1%) i/s - 369.044k in 5.021076s
1353
- # Micro::Case::Result#| 153.746k 1.5%) i/s - 777.492k in 5.058177s
1354
- # Micro::Case::Result#then 126.897k1.7%) i/s - 635.950k in 5.013059s
1350
+ # Interactor::Organizer 24.280k24.5%) i/s - 112.710k in 5.013334s
1351
+ # Micro::Cases.flow([]) 74.999k9.8%) i/s - 375.750k in 5.055777s
1352
+ # Micro::Case flow in a class 46.681k9.3%) i/s - 236.436k in 5.105105s
1353
+ # Micro::Case including the class 41.921k8.9%) i/s - 209.814k in 5.043622s
1354
+ # Micro::Case::Result#| 78.280k12.6%) i/s - 386.988k in 5.022146s
1355
+ # Micro::Case::Result#then 68.898k8.8%) i/s - 347.412k in 5.080116s
1355
1356
 
1356
1357
  # Comparison:
1357
- # Micro::Case::Result#|: 153745.6 i/s
1358
- # Micro::Case::Result#then: 126896.6 i/s - 1.21x (± 0.00) slower
1359
- # Micro::Cases.flow([]): 118123.9 i/s - 1.30x (± 0.00) slower
1360
- # Micro::Case flow in a class: 77800.7 i/s - 1.98x (± 0.00) slower
1361
- # Micro::Case including the class: 73532.9 i/s - 2.09x (± 0.00) slower
1362
- # Interactor::Organizer: 21862.9 i/s - 7.03x (± 0.00) slower
1358
+ # Micro::Case::Result#|: 78280.4 i/s
1359
+ # Micro::Cases.flow([]): 74999.4 i/s - same-ish: difference falls within error
1360
+ # Micro::Case::Result#then: 68898.4 i/s - same-ish: difference falls within error
1361
+ # Micro::Case flow in a class: 46681.0 i/s - 1.68x (± 0.00) slower
1362
+ # Micro::Case including the class: 41920.8 i/s - 1.87x (± 0.00) slower
1363
+ # Interactor::Organizer: 24280.0 i/s - 3.22x (± 0.00) slower
1363
1364
  ```
1364
1365
  </details>
1365
1366