flows 0.3.0 → 0.4.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.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/{build.yml → test.yml} +5 -10
  3. data/.gitignore +1 -0
  4. data/.reek.yml +42 -0
  5. data/.rubocop.yml +20 -7
  6. data/.ruby-version +1 -1
  7. data/.yardopts +1 -0
  8. data/CHANGELOG.md +42 -0
  9. data/Gemfile +0 -6
  10. data/Gemfile.lock +139 -74
  11. data/README.md +158 -364
  12. data/Rakefile +35 -1
  13. data/bin/.rubocop.yml +5 -0
  14. data/bin/all_the_errors +47 -0
  15. data/bin/benchmark +73 -105
  16. data/bin/benchmark_cli/compare.rb +118 -0
  17. data/bin/benchmark_cli/compare/a_plus_b.rb +22 -0
  18. data/bin/benchmark_cli/compare/base.rb +45 -0
  19. data/bin/benchmark_cli/compare/command.rb +47 -0
  20. data/bin/benchmark_cli/compare/ten_steps.rb +22 -0
  21. data/bin/benchmark_cli/examples.rb +23 -0
  22. data/bin/benchmark_cli/examples/.rubocop.yml +19 -0
  23. data/bin/benchmark_cli/examples/a_plus_b/dry_do.rb +23 -0
  24. data/bin/benchmark_cli/examples/a_plus_b/dry_transaction.rb +17 -0
  25. data/bin/benchmark_cli/examples/a_plus_b/flows_do.rb +22 -0
  26. data/bin/benchmark_cli/examples/a_plus_b/flows_railway.rb +13 -0
  27. data/bin/benchmark_cli/examples/a_plus_b/flows_scp.rb +13 -0
  28. data/bin/benchmark_cli/examples/a_plus_b/flows_scp_mut.rb +13 -0
  29. data/bin/benchmark_cli/examples/a_plus_b/flows_scp_oc.rb +21 -0
  30. data/bin/benchmark_cli/examples/a_plus_b/trailblazer.rb +15 -0
  31. data/bin/benchmark_cli/examples/ten_steps/dry_do.rb +70 -0
  32. data/bin/benchmark_cli/examples/ten_steps/dry_transaction.rb +64 -0
  33. data/bin/benchmark_cli/examples/ten_steps/flows_do.rb +69 -0
  34. data/bin/benchmark_cli/examples/ten_steps/flows_railway.rb +58 -0
  35. data/bin/benchmark_cli/examples/ten_steps/flows_scp.rb +58 -0
  36. data/bin/benchmark_cli/examples/ten_steps/flows_scp_mut.rb +58 -0
  37. data/bin/benchmark_cli/examples/ten_steps/flows_scp_oc.rb +66 -0
  38. data/bin/benchmark_cli/examples/ten_steps/trailblazer.rb +60 -0
  39. data/bin/benchmark_cli/helpers.rb +12 -0
  40. data/bin/benchmark_cli/ruby.rb +15 -0
  41. data/bin/benchmark_cli/ruby/command.rb +38 -0
  42. data/bin/benchmark_cli/ruby/method_exec.rb +71 -0
  43. data/bin/benchmark_cli/ruby/self_class.rb +69 -0
  44. data/bin/benchmark_cli/ruby/structs.rb +90 -0
  45. data/bin/console +1 -0
  46. data/bin/docserver +7 -0
  47. data/bin/errors +118 -0
  48. data/bin/errors_cli/contract_error_demo.rb +49 -0
  49. data/bin/errors_cli/di_error_demo.rb +38 -0
  50. data/bin/errors_cli/flows_router_error_demo.rb +15 -0
  51. data/bin/errors_cli/oc_error_demo.rb +40 -0
  52. data/bin/errors_cli/railway_error_demo.rb +10 -0
  53. data/bin/errors_cli/result_error_demo.rb +13 -0
  54. data/bin/errors_cli/scp_error_demo.rb +17 -0
  55. data/docs/README.md +2 -186
  56. data/docs/_sidebar.md +0 -24
  57. data/docs/index.html +1 -1
  58. data/flows.gemspec +25 -2
  59. data/forspell.dict +9 -0
  60. data/lefthook.yml +9 -0
  61. data/lib/flows.rb +11 -5
  62. data/lib/flows/contract.rb +402 -0
  63. data/lib/flows/contract/array.rb +55 -0
  64. data/lib/flows/contract/case_eq.rb +41 -0
  65. data/lib/flows/contract/compose.rb +77 -0
  66. data/lib/flows/contract/either.rb +53 -0
  67. data/lib/flows/contract/error.rb +25 -0
  68. data/lib/flows/contract/hash.rb +75 -0
  69. data/lib/flows/contract/hash_of.rb +70 -0
  70. data/lib/flows/contract/helpers.rb +22 -0
  71. data/lib/flows/contract/predicate.rb +34 -0
  72. data/lib/flows/contract/transformer.rb +50 -0
  73. data/lib/flows/contract/tuple.rb +70 -0
  74. data/lib/flows/flow.rb +75 -7
  75. data/lib/flows/flow/node.rb +131 -0
  76. data/lib/flows/flow/router.rb +25 -0
  77. data/lib/flows/flow/router/custom.rb +54 -0
  78. data/lib/flows/flow/router/errors.rb +11 -0
  79. data/lib/flows/flow/router/simple.rb +20 -0
  80. data/lib/flows/plugin.rb +13 -0
  81. data/lib/flows/plugin/dependency_injector.rb +159 -0
  82. data/lib/flows/plugin/dependency_injector/dependency.rb +24 -0
  83. data/lib/flows/plugin/dependency_injector/dependency_definition.rb +16 -0
  84. data/lib/flows/plugin/dependency_injector/dependency_list.rb +57 -0
  85. data/lib/flows/plugin/dependency_injector/errors.rb +58 -0
  86. data/lib/flows/plugin/implicit_init.rb +45 -0
  87. data/lib/flows/plugin/output_contract.rb +84 -0
  88. data/lib/flows/plugin/output_contract/dsl.rb +36 -0
  89. data/lib/flows/plugin/output_contract/errors.rb +74 -0
  90. data/lib/flows/plugin/output_contract/wrapper.rb +53 -0
  91. data/lib/flows/railway.rb +140 -37
  92. data/lib/flows/railway/dsl.rb +8 -19
  93. data/lib/flows/railway/errors.rb +8 -12
  94. data/lib/flows/railway/step.rb +24 -0
  95. data/lib/flows/railway/step_list.rb +38 -0
  96. data/lib/flows/result.rb +188 -2
  97. data/lib/flows/result/do.rb +160 -16
  98. data/lib/flows/result/err.rb +12 -6
  99. data/lib/flows/result/errors.rb +29 -17
  100. data/lib/flows/result/helpers.rb +25 -3
  101. data/lib/flows/result/ok.rb +12 -6
  102. data/lib/flows/shared_context_pipeline.rb +216 -0
  103. data/lib/flows/shared_context_pipeline/dsl.rb +63 -0
  104. data/lib/flows/shared_context_pipeline/errors.rb +17 -0
  105. data/lib/flows/shared_context_pipeline/mutation_step.rb +31 -0
  106. data/lib/flows/shared_context_pipeline/router_definition.rb +21 -0
  107. data/lib/flows/shared_context_pipeline/step.rb +46 -0
  108. data/lib/flows/shared_context_pipeline/track.rb +67 -0
  109. data/lib/flows/shared_context_pipeline/track_list.rb +46 -0
  110. data/lib/flows/util.rb +17 -0
  111. data/lib/flows/util/inheritable_singleton_vars.rb +79 -0
  112. data/lib/flows/util/inheritable_singleton_vars/dup_strategy.rb +109 -0
  113. data/lib/flows/util/inheritable_singleton_vars/isolation_strategy.rb +104 -0
  114. data/lib/flows/util/prepend_to_class.rb +145 -0
  115. data/lib/flows/version.rb +1 -1
  116. metadata +233 -37
  117. data/bin/demo +0 -66
  118. data/bin/examples.rb +0 -195
  119. data/bin/profile_10steps +0 -106
  120. data/bin/ruby_benchmarks +0 -26
  121. data/docs/CNAME +0 -1
  122. data/docs/contributing/benchmarks_profiling.md +0 -3
  123. data/docs/contributing/local_development.md +0 -3
  124. data/docs/flow/direct_usage.md +0 -3
  125. data/docs/flow/general_idea.md +0 -3
  126. data/docs/operation/basic_usage.md +0 -1
  127. data/docs/operation/inject_steps.md +0 -3
  128. data/docs/operation/lambda_steps.md +0 -3
  129. data/docs/operation/result_shapes.md +0 -3
  130. data/docs/operation/routing_tracks.md +0 -3
  131. data/docs/operation/wrapping_steps.md +0 -3
  132. data/docs/overview/performance.md +0 -336
  133. data/docs/railway/basic_usage.md +0 -232
  134. data/docs/result_objects/basic_usage.md +0 -196
  135. data/docs/result_objects/do_notation.md +0 -139
  136. data/lib/flows/implicit_build.rb +0 -16
  137. data/lib/flows/node.rb +0 -27
  138. data/lib/flows/operation.rb +0 -55
  139. data/lib/flows/operation/builder.rb +0 -130
  140. data/lib/flows/operation/builder/build_router.rb +0 -37
  141. data/lib/flows/operation/dsl.rb +0 -93
  142. data/lib/flows/operation/errors.rb +0 -75
  143. data/lib/flows/operation/executor.rb +0 -78
  144. data/lib/flows/railway/builder.rb +0 -68
  145. data/lib/flows/railway/executor.rb +0 -23
  146. data/lib/flows/result_router.rb +0 -14
  147. data/lib/flows/router.rb +0 -22
@@ -0,0 +1,145 @@
1
+ module Flows
2
+ module Util
3
+ # In the situation when a module is included into another module and only afterwards included into class,
4
+ # allows to force particular module to be prepended to a class only.
5
+ #
6
+ # When you write some module to abstract out some behaviour you may
7
+ # need a way to expand initializer behaviour of a target class.
8
+ # You can prepend a module with an initializer wrapper inside `.included(mod)`
9
+ # or `.extended(mod)` callbacks. But it will not work if you include your module into module
10
+ # and only after to a class. It's one of the cases when `PrependToClass` can help you.
11
+ #
12
+ # Let's show it on example: we need a module which expands initializer to accept `:data`
13
+ # keyword argument and sets its value:
14
+ #
15
+ # class MyClass
16
+ # prepend HasData
17
+ #
18
+ # attr_reader :greeting
19
+ #
20
+ # def initialize
21
+ # @greeting = 'Hello'
22
+ # end
23
+ # end
24
+ #
25
+ # module HasData
26
+ # attr_reader :data
27
+ #
28
+ # def initialize(*args, **kwargs, &block)
29
+ # @data = kwargs[:data]
30
+ #
31
+ # filtered_kwargs = kwargs.reject { |k, _| k == :data }
32
+ #
33
+ # if filtered_kwargs.empty? # https://bugs.ruby-lang.org/issues/14415
34
+ # super(*args, &block)
35
+ # else
36
+ # super(*args, **filtered_kwargs, &block)
37
+ # end
38
+ # end
39
+ #
40
+ # def big_data
41
+ # data.upcase
42
+ # end
43
+ # end
44
+ #
45
+ # x = MyClass.new(data: 'aaa')
46
+ #
47
+ # x.greeting
48
+ # # => 'Hello'
49
+ #
50
+ # x.data
51
+ # # => 'aaa'
52
+ #
53
+ # x.big_data
54
+ # # => 'aaa'
55
+ #
56
+ # This implementation works, but has a problem:
57
+ #
58
+ # class AnotherClass
59
+ # include Stuff
60
+ #
61
+ # attr_reader :greeting
62
+ #
63
+ # def initialize
64
+ # @greeting = 'Hello'
65
+ # end
66
+ # end
67
+ #
68
+ # module Stuff
69
+ # prepend HasData
70
+ # end
71
+ #
72
+ # x = AnotherClass.new(data: 'aaa')
73
+ # # ArgumentError: wrong number of arguments (given 1, expected 0)
74
+ #
75
+ # This happens because `prepend` prepends our patch to `Stuff` module, not class.
76
+ # {PrependToClass} solves this problem:
77
+ #
78
+ # module HasData
79
+ # attr_reader :data
80
+ #
81
+ # module InitializePatch
82
+ # def initialize(*args, **kwargs, &block)
83
+ # @data = kwargs[:data]
84
+ #
85
+ # filtered_kwargs = kwargs.reject { |k, _| k == :data }
86
+ #
87
+ # if filtered_kwargs.empty? # https://bugs.ruby-lang.org/issues/14415
88
+ # super(*args, &block)
89
+ # else
90
+ # super(*args, **filtered_kwargs, &block)
91
+ # end
92
+ # end
93
+ # end
94
+ #
95
+ # Flows::Util::PrependToClass.call(self, InitializePatch)
96
+ # end
97
+ #
98
+ # module Stuff
99
+ # include HasData
100
+ # end
101
+ #
102
+ # class MyClass
103
+ # include Stuff
104
+ #
105
+ # attr_reader :greeting
106
+ #
107
+ # def initialize
108
+ # @greeting = 'Hello'
109
+ # end
110
+ # end
111
+ #
112
+ # x = MyClass.new(data: 'data')
113
+ #
114
+ # x.data
115
+ # # => 'data'
116
+ module PrependToClass
117
+ class << self
118
+ # When `mod` is included into class in any way `module_to_prepend`
119
+ # will be prepended to the class.
120
+ #
121
+ # @param mod [Module] host module
122
+ # @param module_to_prepend [Module] module to be prepended to a class
123
+ def call(mod, module_to_prepend)
124
+ mod.singleton_class.prepend injector(module_to_prepend)
125
+ end
126
+
127
+ private
128
+
129
+ def injector(module_to_prepend)
130
+ Module.new.tap do |injector|
131
+ injector.define_method(:included) do |target_mod|
132
+ if target_mod.class == Class
133
+ target_mod.prepend(module_to_prepend)
134
+ else # Module
135
+ target_mod.singleton_class.prepend injector
136
+ end
137
+
138
+ super(target_mod)
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
145
+ end
@@ -1,3 +1,3 @@
1
1
  module Flows
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flows
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kolesnev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2020-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: yard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: forspell
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +80,48 @@ dependencies:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: 0.0.8
83
+ - !ruby/object:Gem::Dependency
84
+ name: inch
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mdl
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: reek
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
69
125
  - !ruby/object:Gem::Dependency
70
126
  name: rubocop
71
127
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +178,20 @@ dependencies:
122
178
  - - ">="
123
179
  - !ruby/object:Gem::Version
124
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: awesome_print
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
125
195
  - !ruby/object:Gem::Dependency
126
196
  name: pry
127
197
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +248,20 @@ dependencies:
178
248
  - - ">="
179
249
  - !ruby/object:Gem::Version
180
250
  version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: kalibera
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - ">="
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - ">="
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
181
265
  - !ruby/object:Gem::Dependency
182
266
  name: ruby-prof
183
267
  requirement: !ruby/object:Gem::Requirement
@@ -206,6 +290,62 @@ dependencies:
206
290
  - - ">="
207
291
  - !ruby/object:Gem::Version
208
292
  version: '0'
293
+ - !ruby/object:Gem::Dependency
294
+ name: gli
295
+ requirement: !ruby/object:Gem::Requirement
296
+ requirements:
297
+ - - ">="
298
+ - !ruby/object:Gem::Version
299
+ version: '0'
300
+ type: :development
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - ">="
305
+ - !ruby/object:Gem::Version
306
+ version: '0'
307
+ - !ruby/object:Gem::Dependency
308
+ name: rainbow
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - ">="
312
+ - !ruby/object:Gem::Version
313
+ version: '0'
314
+ type: :development
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - ">="
319
+ - !ruby/object:Gem::Version
320
+ version: '0'
321
+ - !ruby/object:Gem::Dependency
322
+ name: warning
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ version: '0'
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - ">="
333
+ - !ruby/object:Gem::Version
334
+ version: '0'
335
+ - !ruby/object:Gem::Dependency
336
+ name: dry-monads
337
+ requirement: !ruby/object:Gem::Requirement
338
+ requirements:
339
+ - - "~>"
340
+ - !ruby/object:Gem::Version
341
+ version: '1.3'
342
+ type: :development
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - "~>"
347
+ - !ruby/object:Gem::Version
348
+ version: '1.3'
209
349
  - !ruby/object:Gem::Dependency
210
350
  name: dry-transaction
211
351
  requirement: !ruby/object:Gem::Requirement
@@ -241,70 +381,125 @@ executables: []
241
381
  extensions: []
242
382
  extra_rdoc_files: []
243
383
  files:
244
- - ".github/workflows/build.yml"
384
+ - ".github/workflows/test.yml"
245
385
  - ".gitignore"
246
386
  - ".mdlrc"
387
+ - ".reek.yml"
247
388
  - ".rspec"
248
389
  - ".rubocop.yml"
249
390
  - ".ruby-version"
391
+ - ".yardopts"
392
+ - CHANGELOG.md
250
393
  - CODE_OF_CONDUCT.md
251
394
  - Gemfile
252
395
  - Gemfile.lock
253
396
  - LICENSE.txt
254
397
  - README.md
255
398
  - Rakefile
399
+ - bin/.rubocop.yml
400
+ - bin/all_the_errors
256
401
  - bin/benchmark
402
+ - bin/benchmark_cli/compare.rb
403
+ - bin/benchmark_cli/compare/a_plus_b.rb
404
+ - bin/benchmark_cli/compare/base.rb
405
+ - bin/benchmark_cli/compare/command.rb
406
+ - bin/benchmark_cli/compare/ten_steps.rb
407
+ - bin/benchmark_cli/examples.rb
408
+ - bin/benchmark_cli/examples/.rubocop.yml
409
+ - bin/benchmark_cli/examples/a_plus_b/dry_do.rb
410
+ - bin/benchmark_cli/examples/a_plus_b/dry_transaction.rb
411
+ - bin/benchmark_cli/examples/a_plus_b/flows_do.rb
412
+ - bin/benchmark_cli/examples/a_plus_b/flows_railway.rb
413
+ - bin/benchmark_cli/examples/a_plus_b/flows_scp.rb
414
+ - bin/benchmark_cli/examples/a_plus_b/flows_scp_mut.rb
415
+ - bin/benchmark_cli/examples/a_plus_b/flows_scp_oc.rb
416
+ - bin/benchmark_cli/examples/a_plus_b/trailblazer.rb
417
+ - bin/benchmark_cli/examples/ten_steps/dry_do.rb
418
+ - bin/benchmark_cli/examples/ten_steps/dry_transaction.rb
419
+ - bin/benchmark_cli/examples/ten_steps/flows_do.rb
420
+ - bin/benchmark_cli/examples/ten_steps/flows_railway.rb
421
+ - bin/benchmark_cli/examples/ten_steps/flows_scp.rb
422
+ - bin/benchmark_cli/examples/ten_steps/flows_scp_mut.rb
423
+ - bin/benchmark_cli/examples/ten_steps/flows_scp_oc.rb
424
+ - bin/benchmark_cli/examples/ten_steps/trailblazer.rb
425
+ - bin/benchmark_cli/helpers.rb
426
+ - bin/benchmark_cli/ruby.rb
427
+ - bin/benchmark_cli/ruby/command.rb
428
+ - bin/benchmark_cli/ruby/method_exec.rb
429
+ - bin/benchmark_cli/ruby/self_class.rb
430
+ - bin/benchmark_cli/ruby/structs.rb
257
431
  - bin/console
258
- - bin/demo
259
- - bin/examples.rb
260
- - bin/profile_10steps
261
- - bin/ruby_benchmarks
432
+ - bin/docserver
433
+ - bin/errors
434
+ - bin/errors_cli/contract_error_demo.rb
435
+ - bin/errors_cli/di_error_demo.rb
436
+ - bin/errors_cli/flows_router_error_demo.rb
437
+ - bin/errors_cli/oc_error_demo.rb
438
+ - bin/errors_cli/railway_error_demo.rb
439
+ - bin/errors_cli/result_error_demo.rb
440
+ - bin/errors_cli/scp_error_demo.rb
262
441
  - bin/setup
263
442
  - docs/.nojekyll
264
- - docs/CNAME
265
443
  - docs/README.md
266
444
  - docs/_sidebar.md
267
- - docs/contributing/benchmarks_profiling.md
268
- - docs/contributing/local_development.md
269
- - docs/flow/direct_usage.md
270
- - docs/flow/general_idea.md
271
445
  - docs/index.html
272
- - docs/operation/basic_usage.md
273
- - docs/operation/inject_steps.md
274
- - docs/operation/lambda_steps.md
275
- - docs/operation/result_shapes.md
276
- - docs/operation/routing_tracks.md
277
- - docs/operation/wrapping_steps.md
278
- - docs/overview/performance.md
279
- - docs/railway/basic_usage.md
280
- - docs/result_objects/basic_usage.md
281
- - docs/result_objects/do_notation.md
282
446
  - flows.gemspec
283
447
  - forspell.dict
284
448
  - lefthook.yml
285
449
  - lib/flows.rb
450
+ - lib/flows/contract.rb
451
+ - lib/flows/contract/array.rb
452
+ - lib/flows/contract/case_eq.rb
453
+ - lib/flows/contract/compose.rb
454
+ - lib/flows/contract/either.rb
455
+ - lib/flows/contract/error.rb
456
+ - lib/flows/contract/hash.rb
457
+ - lib/flows/contract/hash_of.rb
458
+ - lib/flows/contract/helpers.rb
459
+ - lib/flows/contract/predicate.rb
460
+ - lib/flows/contract/transformer.rb
461
+ - lib/flows/contract/tuple.rb
286
462
  - lib/flows/flow.rb
287
- - lib/flows/implicit_build.rb
288
- - lib/flows/node.rb
289
- - lib/flows/operation.rb
290
- - lib/flows/operation/builder.rb
291
- - lib/flows/operation/builder/build_router.rb
292
- - lib/flows/operation/dsl.rb
293
- - lib/flows/operation/errors.rb
294
- - lib/flows/operation/executor.rb
463
+ - lib/flows/flow/node.rb
464
+ - lib/flows/flow/router.rb
465
+ - lib/flows/flow/router/custom.rb
466
+ - lib/flows/flow/router/errors.rb
467
+ - lib/flows/flow/router/simple.rb
468
+ - lib/flows/plugin.rb
469
+ - lib/flows/plugin/dependency_injector.rb
470
+ - lib/flows/plugin/dependency_injector/dependency.rb
471
+ - lib/flows/plugin/dependency_injector/dependency_definition.rb
472
+ - lib/flows/plugin/dependency_injector/dependency_list.rb
473
+ - lib/flows/plugin/dependency_injector/errors.rb
474
+ - lib/flows/plugin/implicit_init.rb
475
+ - lib/flows/plugin/output_contract.rb
476
+ - lib/flows/plugin/output_contract/dsl.rb
477
+ - lib/flows/plugin/output_contract/errors.rb
478
+ - lib/flows/plugin/output_contract/wrapper.rb
295
479
  - lib/flows/railway.rb
296
- - lib/flows/railway/builder.rb
297
480
  - lib/flows/railway/dsl.rb
298
481
  - lib/flows/railway/errors.rb
299
- - lib/flows/railway/executor.rb
482
+ - lib/flows/railway/step.rb
483
+ - lib/flows/railway/step_list.rb
300
484
  - lib/flows/result.rb
301
485
  - lib/flows/result/do.rb
302
486
  - lib/flows/result/err.rb
303
487
  - lib/flows/result/errors.rb
304
488
  - lib/flows/result/helpers.rb
305
489
  - lib/flows/result/ok.rb
306
- - lib/flows/result_router.rb
307
- - lib/flows/router.rb
490
+ - lib/flows/shared_context_pipeline.rb
491
+ - lib/flows/shared_context_pipeline/dsl.rb
492
+ - lib/flows/shared_context_pipeline/errors.rb
493
+ - lib/flows/shared_context_pipeline/mutation_step.rb
494
+ - lib/flows/shared_context_pipeline/router_definition.rb
495
+ - lib/flows/shared_context_pipeline/step.rb
496
+ - lib/flows/shared_context_pipeline/track.rb
497
+ - lib/flows/shared_context_pipeline/track_list.rb
498
+ - lib/flows/util.rb
499
+ - lib/flows/util/inheritable_singleton_vars.rb
500
+ - lib/flows/util/inheritable_singleton_vars/dup_strategy.rb
501
+ - lib/flows/util/inheritable_singleton_vars/isolation_strategy.rb
502
+ - lib/flows/util/prepend_to_class.rb
308
503
  - lib/flows/version.rb
309
504
  - profile/.keep
310
505
  homepage: https://github.com/ffloyd/flows
@@ -329,5 +524,6 @@ requirements: []
329
524
  rubygems_version: 3.0.3
330
525
  signing_key:
331
526
  specification_version: 4
332
- summary: Ruby framework for building FSM-like data flows.
527
+ summary: Ruby framework for building your Business Logic Layer inside Rails and other
528
+ frameworks.
333
529
  test_files: []