dry-monads 1.3.5 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +161 -80
- data/LICENSE +1 -1
- data/README.md +5 -4
- data/dry-monads.gemspec +30 -30
- data/lib/dry/monads/all.rb +2 -3
- data/lib/dry/monads/constants.rb +0 -2
- data/lib/dry/monads/curry.rb +2 -2
- data/lib/dry/monads/do/all.rb +35 -18
- data/lib/dry/monads/do.rb +48 -20
- data/lib/dry/monads/errors.rb +8 -5
- data/lib/dry/monads/lazy.rb +13 -5
- data/lib/dry/monads/list.rb +27 -37
- data/lib/dry/monads/maybe.rb +85 -26
- data/lib/dry/monads/registry.rb +20 -20
- data/lib/dry/monads/result/fixed.rb +31 -24
- data/lib/dry/monads/result.rb +37 -19
- data/lib/dry/monads/right_biased.rb +38 -31
- data/lib/dry/monads/task.rb +25 -28
- data/lib/dry/monads/transformer.rb +2 -1
- data/lib/dry/monads/traverse.rb +5 -1
- data/lib/dry/monads/try.rb +45 -18
- data/lib/dry/monads/unit.rb +9 -3
- data/lib/dry/monads/validated.rb +18 -18
- data/lib/dry/monads/version.rb +1 -1
- data/lib/dry/monads.rb +25 -4
- data/lib/dry-monads.rb +1 -1
- data/lib/json/add/dry/monads/maybe.rb +5 -5
- metadata +22 -68
- data/.codeclimate.yml +0 -12
- data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
- data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
- data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
- data/.github/workflows/ci.yml +0 -52
- data/.github/workflows/docsite.yml +0 -34
- data/.github/workflows/sync_configs.yml +0 -56
- data/.gitignore +0 -10
- data/.rspec +0 -4
- data/.rubocop.yml +0 -101
- data/.yardopts +0 -4
- data/CODE_OF_CONDUCT.md +0 -13
- data/CONTRIBUTING.md +0 -29
- data/Gemfile +0 -19
- data/Gemfile.devtools +0 -14
- data/Rakefile +0 -8
- data/bin/.gitkeep +0 -0
- data/bin/console +0 -17
- data/bin/setup +0 -7
- data/docsite/source/case-equality.html.md +0 -42
- data/docsite/source/do-notation.html.md +0 -207
- data/docsite/source/getting-started.html.md +0 -142
- data/docsite/source/index.html.md +0 -179
- data/docsite/source/list.html.md +0 -87
- data/docsite/source/maybe.html.md +0 -146
- data/docsite/source/pattern-matching.html.md +0 -68
- data/docsite/source/result.html.md +0 -190
- data/docsite/source/task.html.md +0 -126
- data/docsite/source/tracing-failures.html.md +0 -32
- data/docsite/source/try.html.md +0 -76
- data/docsite/source/unit.html.md +0 -36
- data/docsite/source/validated.html.md +0 -88
- data/lib/dry/monads/either.rb +0 -66
- data/log/.gitkeep +0 -0
- data/project.yml +0 -2
data/lib/dry/monads/try.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'dry/equalizer'
|
4
|
-
require 'dry/core/deprecations'
|
5
|
-
|
6
|
-
require 'dry/monads/right_biased'
|
7
|
-
require 'dry/monads/conversion_stubs'
|
8
|
-
|
9
3
|
module Dry
|
10
4
|
module Monads
|
11
5
|
# Represents a value which can be either success or a failure (an exception).
|
@@ -22,7 +16,7 @@ module Dry
|
|
22
16
|
attr_reader :exception
|
23
17
|
|
24
18
|
class << self
|
25
|
-
extend Core::Deprecations[:
|
19
|
+
extend Core::Deprecations[:"dry-monads"]
|
26
20
|
|
27
21
|
# Invokes a callable and if successful stores the result in the
|
28
22
|
# {Try::Value} type, but if one of the specified exceptions was raised it stores
|
@@ -72,7 +66,7 @@ module Dry
|
|
72
66
|
# @param exceptions [Array<Exception>]
|
73
67
|
# @return [Try::Value,Try::Error]
|
74
68
|
def [](*exceptions, &block)
|
75
|
-
raise ArgumentError,
|
69
|
+
raise ArgumentError, "At least one exception type required" if exceptions.empty?
|
76
70
|
|
77
71
|
run(exceptions, block)
|
78
72
|
end
|
@@ -92,7 +86,7 @@ module Dry
|
|
92
86
|
|
93
87
|
# Returns self.
|
94
88
|
#
|
95
|
-
# @return [
|
89
|
+
# @return [Try::Value, Try::Error]
|
96
90
|
def to_monad
|
97
91
|
self
|
98
92
|
end
|
@@ -110,6 +104,8 @@ module Dry
|
|
110
104
|
# @param exceptions [Array<Exception>] list of exceptions to be rescued
|
111
105
|
# @param value [Object] the value to be stored in the monad
|
112
106
|
def initialize(exceptions, value)
|
107
|
+
super()
|
108
|
+
|
113
109
|
@catchable = exceptions
|
114
110
|
@value = value
|
115
111
|
end
|
@@ -133,7 +129,7 @@ module Dry
|
|
133
129
|
# object and the rest of args will be passed
|
134
130
|
# to this object along with the internal value
|
135
131
|
# @return [Object, Try::Error]
|
136
|
-
def bind(
|
132
|
+
def bind(...)
|
137
133
|
super
|
138
134
|
rescue *catchable => e
|
139
135
|
Error.new(e)
|
@@ -151,8 +147,8 @@ module Dry
|
|
151
147
|
# @param args [Array<Object>] extra arguments for the block, arguments are being processes
|
152
148
|
# just as in #bind
|
153
149
|
# @return [Try::Value, Try::Error]
|
154
|
-
def fmap(
|
155
|
-
Value.new(catchable, bind_call(
|
150
|
+
def fmap(...)
|
151
|
+
Value.new(catchable, bind_call(...))
|
156
152
|
rescue *catchable => e
|
157
153
|
Error.new(e)
|
158
154
|
end
|
@@ -160,12 +156,21 @@ module Dry
|
|
160
156
|
# @return [String]
|
161
157
|
def to_s
|
162
158
|
if Unit.equal?(@value)
|
163
|
-
|
159
|
+
"Try::Value()"
|
164
160
|
else
|
165
161
|
"Try::Value(#{@value.inspect})"
|
166
162
|
end
|
167
163
|
end
|
168
164
|
alias_method :inspect, :to_s
|
165
|
+
|
166
|
+
# Ignores values and returns self, see {Try::Error#recover}
|
167
|
+
#
|
168
|
+
# @param errors [Class] List of Exception subclasses
|
169
|
+
#
|
170
|
+
# @return [Try::Value]
|
171
|
+
def recover(*_errors)
|
172
|
+
self
|
173
|
+
end
|
169
174
|
end
|
170
175
|
|
171
176
|
# Represents a result of a failed execution.
|
@@ -175,10 +180,12 @@ module Dry
|
|
175
180
|
include Dry::Equalizer(:exception)
|
176
181
|
include RightBiased::Left
|
177
182
|
|
178
|
-
singleton_class.
|
183
|
+
singleton_class.alias_method(:call, :new)
|
179
184
|
|
180
185
|
# @param exception [Exception]
|
181
186
|
def initialize(exception)
|
187
|
+
super()
|
188
|
+
|
182
189
|
@exception = exception
|
183
190
|
end
|
184
191
|
|
@@ -211,6 +218,26 @@ module Dry
|
|
211
218
|
def ===(other)
|
212
219
|
Error === other && exception === other.exception
|
213
220
|
end
|
221
|
+
|
222
|
+
# Acts in a similar way to `rescue`. It checks if
|
223
|
+
# {exception} is one of {errors} and yields the block if so.
|
224
|
+
#
|
225
|
+
# @param errors [Class] List of Exception subclasses
|
226
|
+
#
|
227
|
+
# @return [Try::Value]
|
228
|
+
def recover(*errors)
|
229
|
+
if errors.empty?
|
230
|
+
classes = DEFAULT_EXCEPTIONS
|
231
|
+
else
|
232
|
+
classes = errors
|
233
|
+
end
|
234
|
+
|
235
|
+
if classes.any? { _1 === exception }
|
236
|
+
Value.new([exception.class], yield(exception))
|
237
|
+
else
|
238
|
+
self
|
239
|
+
end
|
240
|
+
end
|
214
241
|
end
|
215
242
|
|
216
243
|
# A module that can be included for easier access to Try monads.
|
@@ -261,9 +288,9 @@ module Dry
|
|
261
288
|
#
|
262
289
|
def Value(value = Undefined, exceptions = DEFAULT_EXCEPTIONS, &block)
|
263
290
|
v = Undefined.default(value, block)
|
264
|
-
raise ArgumentError,
|
291
|
+
raise ArgumentError, "No value given" if !value.nil? && v.nil?
|
265
292
|
|
266
|
-
Value.new(exceptions, v)
|
293
|
+
Try::Value.new(exceptions, v)
|
267
294
|
end
|
268
295
|
|
269
296
|
# Error constructor
|
@@ -278,14 +305,14 @@ module Dry
|
|
278
305
|
#
|
279
306
|
def Error(error = Undefined, &block)
|
280
307
|
v = Undefined.default(error, block)
|
281
|
-
raise ArgumentError,
|
308
|
+
raise ArgumentError, "No value given" if v.nil?
|
282
309
|
|
283
310
|
Try::Error.new(v)
|
284
311
|
end
|
285
312
|
end
|
286
313
|
end
|
287
314
|
|
288
|
-
require
|
315
|
+
require "dry/monads/registry"
|
289
316
|
register_mixin(:try, Try::Mixin)
|
290
317
|
end
|
291
318
|
end
|
data/lib/dry/monads/unit.rb
CHANGED
@@ -18,14 +18,20 @@ module Dry
|
|
18
18
|
# Maybe(Unit)
|
19
19
|
# => Some(Unit)
|
20
20
|
#
|
21
|
-
Unit = Object.new.tap do |unit|
|
21
|
+
Unit = ::Object.new.tap do |unit|
|
22
22
|
def unit.to_s
|
23
|
-
|
23
|
+
"Unit"
|
24
24
|
end
|
25
25
|
|
26
26
|
def unit.inspect
|
27
|
-
|
27
|
+
"Unit"
|
28
28
|
end
|
29
|
+
|
30
|
+
def unit.deconstruct
|
31
|
+
EMPTY_ARRAY
|
32
|
+
end
|
33
|
+
|
34
|
+
unit.freeze
|
29
35
|
end
|
30
36
|
end
|
31
37
|
end
|
data/lib/dry/monads/validated.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'dry/monads/conversion_stubs'
|
4
|
-
require 'dry/monads/constants'
|
5
|
-
require 'dry/monads/right_biased'
|
6
|
-
|
7
3
|
module Dry
|
8
4
|
module Monads
|
9
5
|
# Validated is similar to Result and represents an outcome of a validation.
|
@@ -51,7 +47,8 @@ module Dry
|
|
51
47
|
#
|
52
48
|
def bind(*)
|
53
49
|
# See https://typelevel.org/cats/datatypes/validated.html for details on why
|
54
|
-
raise NotImplementedError,
|
50
|
+
raise NotImplementedError,
|
51
|
+
"Validated is not a monad because it would violate the monad laws"
|
55
52
|
end
|
56
53
|
|
57
54
|
# Valid result
|
@@ -60,6 +57,8 @@ module Dry
|
|
60
57
|
include Dry::Equalizer(:value!)
|
61
58
|
|
62
59
|
def initialize(value)
|
60
|
+
super()
|
61
|
+
|
63
62
|
@value = value
|
64
63
|
end
|
65
64
|
|
@@ -86,9 +85,8 @@ module Dry
|
|
86
85
|
# @yieldreturn [Validated::Valid,Validated::Invalid]
|
87
86
|
# @return [Validated::Valid,Validated::Invalid]
|
88
87
|
#
|
89
|
-
|
90
|
-
|
91
|
-
Undefined.default(val) { yield }.fmap(Curry.(value!))
|
88
|
+
def apply(val = Undefined, &block)
|
89
|
+
Undefined.default(val, &block).fmap(Curry.(value!))
|
92
90
|
end
|
93
91
|
|
94
92
|
# Lifts a block/proc over Valid
|
@@ -123,7 +121,7 @@ module Dry
|
|
123
121
|
# @return [String]
|
124
122
|
def inspect
|
125
123
|
if Unit.equal?(@value)
|
126
|
-
|
124
|
+
"Valid()"
|
127
125
|
else
|
128
126
|
"Valid(#{@value.inspect})"
|
129
127
|
end
|
@@ -133,7 +131,7 @@ module Dry
|
|
133
131
|
# @param other [Object]
|
134
132
|
# @return [Boolean]
|
135
133
|
def ===(other)
|
136
|
-
self.class
|
134
|
+
other.instance_of?(self.class) && value! === other.value!
|
137
135
|
end
|
138
136
|
end
|
139
137
|
|
@@ -154,6 +152,8 @@ module Dry
|
|
154
152
|
include Dry::Equalizer(:error)
|
155
153
|
|
156
154
|
def initialize(error, trace = RightBiased::Left.trace_caller)
|
155
|
+
super()
|
156
|
+
|
157
157
|
@error = error
|
158
158
|
@trace = trace
|
159
159
|
end
|
@@ -168,10 +168,10 @@ module Dry
|
|
168
168
|
# @yieldreturn [Validated::Valid,Validated::Invalid]
|
169
169
|
# @return [Validated::Invalid]
|
170
170
|
#
|
171
|
-
def apply(val = Undefined)
|
171
|
+
def apply(val = Undefined, &block)
|
172
172
|
Undefined
|
173
|
-
.default(val)
|
174
|
-
.alt_map {
|
173
|
+
.default(val, &block)
|
174
|
+
.alt_map { @error + _1 }
|
175
175
|
.fmap { return self }
|
176
176
|
end
|
177
177
|
|
@@ -220,7 +220,7 @@ module Dry
|
|
220
220
|
# @param other [Object]
|
221
221
|
# @return [Boolean]
|
222
222
|
def ===(other)
|
223
|
-
self.class
|
223
|
+
other.instance_of?(self.class) && error === other.error
|
224
224
|
end
|
225
225
|
end
|
226
226
|
|
@@ -250,7 +250,7 @@ module Dry
|
|
250
250
|
#
|
251
251
|
def Valid(value = Undefined, &block)
|
252
252
|
v = Undefined.default(value, block)
|
253
|
-
raise ArgumentError,
|
253
|
+
raise ArgumentError, "No value given" if !value.nil? && v.nil?
|
254
254
|
|
255
255
|
Valid.new(v)
|
256
256
|
end
|
@@ -267,7 +267,7 @@ module Dry
|
|
267
267
|
#
|
268
268
|
def Invalid(value = Undefined, &block)
|
269
269
|
v = Undefined.default(value, block)
|
270
|
-
raise ArgumentError,
|
270
|
+
raise ArgumentError, "No value given" if !value.nil? && v.nil?
|
271
271
|
|
272
272
|
Invalid.new(v, RightBiased::Left.trace_caller)
|
273
273
|
end
|
@@ -297,14 +297,14 @@ module Dry
|
|
297
297
|
class Failure < Result
|
298
298
|
# Transforms to Validated
|
299
299
|
#
|
300
|
-
# @return [Validated::
|
300
|
+
# @return [Validated::Invalid]
|
301
301
|
def to_validated
|
302
302
|
Validated::Invalid.new(failure, trace)
|
303
303
|
end
|
304
304
|
end
|
305
305
|
end
|
306
306
|
|
307
|
-
require
|
307
|
+
require "dry/monads/registry"
|
308
308
|
register_mixin(:validated, Validated::Mixin)
|
309
309
|
end
|
310
310
|
end
|
data/lib/dry/monads/version.rb
CHANGED
data/lib/dry/monads.rb
CHANGED
@@ -1,13 +1,32 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "concurrent/map"
|
4
|
+
require "zeitwerk"
|
5
|
+
require "dry/core"
|
6
|
+
require "dry/monads/constants"
|
7
|
+
require "dry/monads/errors"
|
8
|
+
require "dry/monads/registry"
|
5
9
|
|
6
10
|
module Dry
|
7
11
|
# Common, idiomatic monads for Ruby
|
8
12
|
#
|
9
13
|
# @api public
|
10
14
|
module Monads
|
15
|
+
# @api private
|
16
|
+
def self.loader
|
17
|
+
@loader ||= Zeitwerk::Loader.new.tap do |loader|
|
18
|
+
root = File.expand_path("..", __dir__)
|
19
|
+
loader.tag = "dry-monads"
|
20
|
+
loader.inflector = Zeitwerk::GemInflector.new("#{root}/dry-monads.rb")
|
21
|
+
loader.push_dir(root)
|
22
|
+
loader.ignore(
|
23
|
+
"#{root}/dry-monads.rb",
|
24
|
+
"#{root}/dry/monads/{all,constants,errors,registry,version}.rb",
|
25
|
+
"#{root}/json/**/*.rb"
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
11
30
|
# @private
|
12
31
|
def self.included(base)
|
13
32
|
if all_loaded?
|
@@ -49,10 +68,12 @@ module Dry
|
|
49
68
|
def self.[](*monads)
|
50
69
|
monads.sort!
|
51
70
|
@mixins.fetch_or_store(monads.hash) do
|
52
|
-
monads.each {
|
53
|
-
mixins = monads.map {
|
71
|
+
monads.each { load_monad(_1) }
|
72
|
+
mixins = monads.map { registry.fetch(_1) }
|
54
73
|
::Module.new { include(*mixins) }.freeze
|
55
74
|
end
|
56
75
|
end
|
76
|
+
|
77
|
+
loader.setup
|
57
78
|
end
|
58
79
|
end
|
data/lib/dry-monads.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
|
3
|
-
require
|
3
|
+
require "json" unless defined?(::JSON::JSON_LOADED) && ::JSON::JSON_LOADED
|
4
4
|
|
5
|
-
require
|
5
|
+
require "dry/monads"
|
6
6
|
|
7
7
|
# Inspired by standard library implementation
|
8
8
|
# for Time serialization/deserialization see (json/lib/json/add/time.rb)
|
@@ -12,7 +12,7 @@ module Dry
|
|
12
12
|
class Maybe
|
13
13
|
# Deserializes JSON string by using Dry::Monads::Maybe#lift method
|
14
14
|
def self.json_create(serialized)
|
15
|
-
coerce(serialized.fetch(
|
15
|
+
coerce(serialized.fetch("value"))
|
16
16
|
end
|
17
17
|
|
18
18
|
# Returns a hash, that will be turned into a JSON object and represent this
|
@@ -26,8 +26,8 @@ module Dry
|
|
26
26
|
|
27
27
|
# Stores class name (Dry::Monads::Maybe::Some or Dry::Monads::Maybe::None)
|
28
28
|
# with the monad value as JSON string
|
29
|
-
def to_json(
|
30
|
-
as_json.to_json(
|
29
|
+
def to_json(...)
|
30
|
+
as_json.to_json(...)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-monads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Shilnikov
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -30,34 +30,34 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
34
|
-
- - "
|
33
|
+
version: '1.0'
|
34
|
+
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: '2'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0
|
44
|
-
- - "
|
43
|
+
version: '1.0'
|
44
|
+
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: '2'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: zeitwerk
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '2.6'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '2.6'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: bundler
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,20 +72,6 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: dry-types
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0.12'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0.12'
|
89
75
|
- !ruby/object:Gem::Dependency
|
90
76
|
name: rake
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,48 +100,16 @@ dependencies:
|
|
114
100
|
- - ">="
|
115
101
|
- !ruby/object:Gem::Version
|
116
102
|
version: '0'
|
117
|
-
description: Common monads for Ruby
|
103
|
+
description: Common monads for Ruby
|
118
104
|
email:
|
119
105
|
- fg@flashgordon.ru
|
120
106
|
executables: []
|
121
107
|
extensions: []
|
122
108
|
extra_rdoc_files: []
|
123
109
|
files:
|
124
|
-
- ".codeclimate.yml"
|
125
|
-
- ".github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md"
|
126
|
-
- ".github/ISSUE_TEMPLATE/---bug-report.md"
|
127
|
-
- ".github/ISSUE_TEMPLATE/---feature-request.md"
|
128
|
-
- ".github/workflows/ci.yml"
|
129
|
-
- ".github/workflows/docsite.yml"
|
130
|
-
- ".github/workflows/sync_configs.yml"
|
131
|
-
- ".gitignore"
|
132
|
-
- ".rspec"
|
133
|
-
- ".rubocop.yml"
|
134
|
-
- ".yardopts"
|
135
110
|
- CHANGELOG.md
|
136
|
-
- CODE_OF_CONDUCT.md
|
137
|
-
- CONTRIBUTING.md
|
138
|
-
- Gemfile
|
139
|
-
- Gemfile.devtools
|
140
111
|
- LICENSE
|
141
112
|
- README.md
|
142
|
-
- Rakefile
|
143
|
-
- bin/.gitkeep
|
144
|
-
- bin/console
|
145
|
-
- bin/setup
|
146
|
-
- docsite/source/case-equality.html.md
|
147
|
-
- docsite/source/do-notation.html.md
|
148
|
-
- docsite/source/getting-started.html.md
|
149
|
-
- docsite/source/index.html.md
|
150
|
-
- docsite/source/list.html.md
|
151
|
-
- docsite/source/maybe.html.md
|
152
|
-
- docsite/source/pattern-matching.html.md
|
153
|
-
- docsite/source/result.html.md
|
154
|
-
- docsite/source/task.html.md
|
155
|
-
- docsite/source/tracing-failures.html.md
|
156
|
-
- docsite/source/try.html.md
|
157
|
-
- docsite/source/unit.html.md
|
158
|
-
- docsite/source/validated.html.md
|
159
113
|
- dry-monads.gemspec
|
160
114
|
- lib/dry-monads.rb
|
161
115
|
- lib/dry/monads.rb
|
@@ -166,7 +120,6 @@ files:
|
|
166
120
|
- lib/dry/monads/do.rb
|
167
121
|
- lib/dry/monads/do/all.rb
|
168
122
|
- lib/dry/monads/do/mixin.rb
|
169
|
-
- lib/dry/monads/either.rb
|
170
123
|
- lib/dry/monads/errors.rb
|
171
124
|
- lib/dry/monads/lazy.rb
|
172
125
|
- lib/dry/monads/list.rb
|
@@ -183,13 +136,14 @@ files:
|
|
183
136
|
- lib/dry/monads/validated.rb
|
184
137
|
- lib/dry/monads/version.rb
|
185
138
|
- lib/json/add/dry/monads/maybe.rb
|
186
|
-
-
|
187
|
-
- project.yml
|
188
|
-
homepage: https://github.com/dry-rb/dry-monads
|
139
|
+
homepage: https://dry-rb.org/gems/dry-monads
|
189
140
|
licenses:
|
190
141
|
- MIT
|
191
142
|
metadata:
|
192
143
|
allowed_push_host: https://rubygems.org
|
144
|
+
changelog_uri: https://github.com/dry-rb/dry-monads/blob/main/CHANGELOG.md
|
145
|
+
source_code_uri: https://github.com/dry-rb/dry-monads
|
146
|
+
bug_tracker_uri: https://github.com/dry-rb/dry-monads/issues
|
193
147
|
post_install_message:
|
194
148
|
rdoc_options: []
|
195
149
|
require_paths:
|
@@ -198,15 +152,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
152
|
requirements:
|
199
153
|
- - ">="
|
200
154
|
- !ruby/object:Gem::Version
|
201
|
-
version: 2.
|
155
|
+
version: 2.7.0
|
202
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
157
|
requirements:
|
204
158
|
- - ">="
|
205
159
|
- !ruby/object:Gem::Version
|
206
160
|
version: '0'
|
207
161
|
requirements: []
|
208
|
-
rubygems_version: 3.1.
|
162
|
+
rubygems_version: 3.1.6
|
209
163
|
signing_key:
|
210
164
|
specification_version: 4
|
211
|
-
summary: Common monads for Ruby
|
165
|
+
summary: Common monads for Ruby
|
212
166
|
test_files: []
|
data/.codeclimate.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: "\U0001F41B Bug report"
|
3
|
-
about: See CONTRIBUTING.md for more information
|
4
|
-
title: ''
|
5
|
-
labels: bug
|
6
|
-
assignees: ''
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
**Before you submit this: WE ONLY ACCEPT BUG REPORTS AND FEATURE REQUESTS**
|
11
|
-
|
12
|
-
For more information see `CONTRIBUTING.md`.
|
13
|
-
|
14
|
-
**Describe the bug**
|
15
|
-
|
16
|
-
A clear and concise description of what the bug is.
|
17
|
-
|
18
|
-
**To Reproduce**
|
19
|
-
|
20
|
-
Provide detailed steps to reproduce, an executable script would be best.
|
21
|
-
|
22
|
-
**Expected behavior**
|
23
|
-
|
24
|
-
A clear and concise description of what you expected to happen.
|
25
|
-
|
26
|
-
**Your environment**
|
27
|
-
|
28
|
-
- Affects my production application: **YES/NO**
|
29
|
-
- Ruby version: ...
|
30
|
-
- OS: ...
|
@@ -1,18 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: "\U0001F6E0 Feature request"
|
3
|
-
about: See CONTRIBUTING.md for more information
|
4
|
-
title: ''
|
5
|
-
labels: feature
|
6
|
-
assignees: ''
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
Summary of what the feature is supposed to do.
|
11
|
-
|
12
|
-
## Examples
|
13
|
-
|
14
|
-
Code examples showing how the feature could be used.
|
15
|
-
|
16
|
-
## Resources
|
17
|
-
|
18
|
-
Additional information, like a link to the discussion forum thread where the feature was discussed etc.
|