dry-monads 1.3.5 → 1.5.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 +4 -4
- data/CHANGELOG.md +152 -80
- data/LICENSE +1 -1
- data/README.md +5 -4
- data/dry-monads.gemspec +31 -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 -54
- 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.5.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-10-16 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.
|
33
|
+
version: '0.9'
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: '0.9'
|
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.
|
43
|
+
version: '0.9'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: '0.9'
|
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
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
81
|
+
version: 0.1.2
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
88
|
+
version: 0.1.2
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: rake
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,48 +114,16 @@ dependencies:
|
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
|
-
description: Common monads for Ruby
|
117
|
+
description: Common monads for Ruby
|
118
118
|
email:
|
119
119
|
- fg@flashgordon.ru
|
120
120
|
executables: []
|
121
121
|
extensions: []
|
122
122
|
extra_rdoc_files: []
|
123
123
|
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
124
|
- CHANGELOG.md
|
136
|
-
- CODE_OF_CONDUCT.md
|
137
|
-
- CONTRIBUTING.md
|
138
|
-
- Gemfile
|
139
|
-
- Gemfile.devtools
|
140
125
|
- LICENSE
|
141
126
|
- 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
127
|
- dry-monads.gemspec
|
160
128
|
- lib/dry-monads.rb
|
161
129
|
- lib/dry/monads.rb
|
@@ -166,7 +134,6 @@ files:
|
|
166
134
|
- lib/dry/monads/do.rb
|
167
135
|
- lib/dry/monads/do/all.rb
|
168
136
|
- lib/dry/monads/do/mixin.rb
|
169
|
-
- lib/dry/monads/either.rb
|
170
137
|
- lib/dry/monads/errors.rb
|
171
138
|
- lib/dry/monads/lazy.rb
|
172
139
|
- lib/dry/monads/list.rb
|
@@ -183,13 +150,14 @@ files:
|
|
183
150
|
- lib/dry/monads/validated.rb
|
184
151
|
- lib/dry/monads/version.rb
|
185
152
|
- lib/json/add/dry/monads/maybe.rb
|
186
|
-
-
|
187
|
-
- project.yml
|
188
|
-
homepage: https://github.com/dry-rb/dry-monads
|
153
|
+
homepage: https://dry-rb.org/gems/dry-monads
|
189
154
|
licenses:
|
190
155
|
- MIT
|
191
156
|
metadata:
|
192
157
|
allowed_push_host: https://rubygems.org
|
158
|
+
changelog_uri: https://github.com/dry-rb/dry-monads/blob/main/CHANGELOG.md
|
159
|
+
source_code_uri: https://github.com/dry-rb/dry-monads
|
160
|
+
bug_tracker_uri: https://github.com/dry-rb/dry-monads/issues
|
193
161
|
post_install_message:
|
194
162
|
rdoc_options: []
|
195
163
|
require_paths:
|
@@ -198,15 +166,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
166
|
requirements:
|
199
167
|
- - ">="
|
200
168
|
- !ruby/object:Gem::Version
|
201
|
-
version: 2.
|
169
|
+
version: 2.7.0
|
202
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
171
|
requirements:
|
204
172
|
- - ">="
|
205
173
|
- !ruby/object:Gem::Version
|
206
174
|
version: '0'
|
207
175
|
requirements: []
|
208
|
-
rubygems_version: 3.1.
|
176
|
+
rubygems_version: 3.1.6
|
209
177
|
signing_key:
|
210
178
|
specification_version: 4
|
211
|
-
summary: Common monads for Ruby
|
179
|
+
summary: Common monads for Ruby
|
212
180
|
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.
|