dry-monads 0.4.0 → 1.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +7 -4
- data/CHANGELOG.md +141 -1
- data/CONTRIBUTING.md +1 -1
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/dry-monads.gemspec +2 -1
- data/lib/dry/monads.rb +22 -1
- data/lib/dry/monads/curry.rb +19 -0
- data/lib/dry/monads/do.rb +119 -0
- data/lib/dry/monads/either.rb +63 -0
- data/lib/dry/monads/errors.rb +3 -1
- data/lib/dry/monads/lazy.rb +78 -0
- data/lib/dry/monads/list.rb +109 -12
- data/lib/dry/monads/maybe.rb +50 -24
- data/lib/dry/monads/result.rb +93 -49
- data/lib/dry/monads/result/fixed.rb +2 -2
- data/lib/dry/monads/right_biased.rb +18 -27
- data/lib/dry/monads/task.rb +309 -0
- data/lib/dry/monads/transformer.rb +1 -0
- data/lib/dry/monads/traverse.rb +20 -0
- data/lib/dry/monads/try.rb +111 -39
- data/lib/dry/monads/validated.rb +283 -0
- data/lib/dry/monads/version.rb +2 -1
- data/lib/json/add/dry/monads/maybe.rb +1 -1
- metadata +29 -9
data/lib/dry/monads/version.rb
CHANGED
@@ -11,7 +11,7 @@ module Dry
|
|
11
11
|
class Maybe
|
12
12
|
# Deserializes JSON string by using Dry::Monads::Maybe#lift method
|
13
13
|
def self.json_create(serialized)
|
14
|
-
|
14
|
+
coerce(serialized.fetch('value'))
|
15
15
|
end
|
16
16
|
|
17
17
|
# Returns a hash, that will be turned into a JSON object and represent this
|
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: 0.
|
4
|
+
version: 1.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Shilnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-equalizer
|
@@ -30,20 +30,34 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.4'
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: 0.4.4
|
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.4'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.4.4
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: concurrent-ruby
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.0'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: bundler
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,15 +137,21 @@ files:
|
|
123
137
|
- dry-monads.gemspec
|
124
138
|
- lib/dry-monads.rb
|
125
139
|
- lib/dry/monads.rb
|
140
|
+
- lib/dry/monads/curry.rb
|
141
|
+
- lib/dry/monads/do.rb
|
126
142
|
- lib/dry/monads/either.rb
|
127
143
|
- lib/dry/monads/errors.rb
|
144
|
+
- lib/dry/monads/lazy.rb
|
128
145
|
- lib/dry/monads/list.rb
|
129
146
|
- lib/dry/monads/maybe.rb
|
130
147
|
- lib/dry/monads/result.rb
|
131
148
|
- lib/dry/monads/result/fixed.rb
|
132
149
|
- lib/dry/monads/right_biased.rb
|
150
|
+
- lib/dry/monads/task.rb
|
133
151
|
- lib/dry/monads/transformer.rb
|
152
|
+
- lib/dry/monads/traverse.rb
|
134
153
|
- lib/dry/monads/try.rb
|
154
|
+
- lib/dry/monads/validated.rb
|
135
155
|
- lib/dry/monads/version.rb
|
136
156
|
- lib/json/add/dry/monads/maybe.rb
|
137
157
|
- log/.gitkeep
|
@@ -151,12 +171,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
171
|
version: 2.2.0
|
152
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
173
|
requirements:
|
154
|
-
- - "
|
174
|
+
- - ">"
|
155
175
|
- !ruby/object:Gem::Version
|
156
|
-
version:
|
176
|
+
version: 1.3.1
|
157
177
|
requirements: []
|
158
178
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.
|
179
|
+
rubygems_version: 2.7.3
|
160
180
|
signing_key:
|
161
181
|
specification_version: 4
|
162
182
|
summary: Common monads for Ruby.
|