dry-monads-sorbet 1.0.0 → 1.1.0.pre.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b05da9a054e5d4cdd5a1c633508c625d1747b09f91083c1dbe470ed40e3fa8e
4
- data.tar.gz: 032e205d4a338bc7c63578f87ea2e519351c1afe86c9f81afa2e5e4e8e1c4d34
3
+ metadata.gz: e63c7f2683c4f670315300ab39f081e9883976856c52d6244c0aebea7d2ba0ac
4
+ data.tar.gz: f6a910c42a3242926ee8b9b1b0e505a7672266072c89cee37f0d01b73945c8dc
5
5
  SHA512:
6
- metadata.gz: 782efb30f148bef10ff3f6ee3377414198362503e8175392010f39c1847d25eee1cd4d8f5eee890aa1cb8bdc95a9d3abd8583131353dfa187e9ce41d5f8ac3f6
7
- data.tar.gz: c1558b1848b5e5d09b3af4ba4bd81ffb615e6951e9f60e4a84240e1067fe79ad2c958baeb0e6f419b58e43a0c3f845de5183881335eda4f1ba70a57b33d69731
6
+ metadata.gz: 25c51e24fc69a19671e9c855407e4a17aef0630fde1d4412100d24316f8ccabb6e7220211c69c50814bf6e8f4418434c2d533cd88e952bfd12d559a9f31bb439
7
+ data.tar.gz: 1252fa88e4fc280d1d0ac30f4269d643298687a31081365b12f5fab8b2a2ec9e498f8952ed5695d318d033cf2f7f5310fbc998d35f11ceb9ad25339ad9d466c3
@@ -1 +1 @@
1
- 2.5.5
1
+ 2.7.1
data/README.md CHANGED
@@ -16,7 +16,7 @@ require 'dry/monads/sorbet'
16
16
  class MyClass
17
17
  extend T::Sig
18
18
 
19
- sig{returns(Dry::Monads::Sorbet[StandardError, String])}
20
- def my_method
19
+ sig{returns(Dry::Monads::Result[StandardError, String])}
20
+ def my_result
21
21
  ...
22
22
  ```
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['luke.worth@bellroy.com']
11
11
 
12
12
  spec.summary = 'Sorbet type hints for Dry::Monads'
13
- spec.homepage = 'https://github.com/tricycle/dry-monads-sirbet'
13
+ spec.homepage = 'https://github.com/tricycle/dry-monads-sorbet'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  # Specify which files should be added to the gem when it is released.
@@ -1,9 +1,12 @@
1
1
  # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
+ require 'sorbet-runtime'
5
+
4
6
  class Dry::Monads::Result
5
7
  extend T::Sig
6
8
  extend T::Generic
9
+
7
10
  FailureType = type_member
8
11
  SuccessType = type_member
9
12
  end
@@ -11,5 +14,6 @@ end
11
14
  class Dry::Monads::Maybe
12
15
  extend T::Sig
13
16
  extend T::Generic
17
+
14
18
  Elem = type_member
15
19
  end
@@ -3,7 +3,7 @@
3
3
  module Dry
4
4
  module Monads
5
5
  module Sorbet
6
- VERSION = '1.0.0'
6
+ VERSION = '1.1.0.pre.5'
7
7
  end
8
8
  end
9
9
  end
@@ -2,8 +2,6 @@
2
2
  #
3
3
  # dry-monads-1.3.1
4
4
  #
5
- # Note: This file depends on dry/monads/sorbet to define generics.
6
-
7
5
  module Dry
8
6
  end
9
7
  module Dry::Monads
@@ -39,7 +37,12 @@ module Dry::Monads::Transformer
39
37
  def fmap3(*args); end
40
38
  end
41
39
  class Dry::Monads::Maybe
40
+ extend T::Sig
41
+ extend T::Generic
42
42
  extend T::Helpers
43
+
44
+ Elem = type_member
45
+
43
46
  abstract!
44
47
  sealed!
45
48
 
@@ -78,21 +81,14 @@ class Dry::Monads::Maybe
78
81
  end
79
82
  def to_result(val = nil, &blk); end
80
83
 
81
- sig {returns(T::Boolean)}
82
84
  def failure?; end
83
85
  def monad; end
84
-
85
- sig {returns(T::Boolean)}
86
86
  def none?; end
87
87
  def self.coerce(value); end
88
88
  def self.lift(*args, &block); end
89
89
  def self.pure(value = nil, &block); end
90
90
  def self.to_proc; end
91
-
92
- sig {returns(T::Boolean)}
93
91
  def some?; end
94
-
95
- sig {returns(T::Boolean)}
96
92
  def success?; end
97
93
  def to_maybe; end
98
94
  def to_monad; end
@@ -162,7 +158,13 @@ module Dry::Monads::Maybe::Hash
162
158
  def self.filter(hash); end
163
159
  end
164
160
  class Dry::Monads::Result
161
+ extend T::Sig
162
+ extend T::Generic
165
163
  extend T::Helpers
164
+
165
+ FailureType = type_member
166
+ SuccessType = type_member
167
+
166
168
  abstract!
167
169
  sealed!
168
170
 
@@ -204,8 +206,9 @@ class Dry::Monads::Result
204
206
  def failure; end
205
207
 
206
208
  sig do
207
- params(blk: T.proc.params(arg0: FailureType).returns(Dry::Monads::Result[FailureType, SuccessType]))
208
- .returns(Dry::Monads::Result[FailureType, SuccessType])
209
+ type_parameters(:NewFailureType)
210
+ .params(blk: T.proc.params(arg0: FailureType).returns(Dry::Monads::Result[T.type_parameter(:out, :NewFailureType), SuccessType]))
211
+ .returns(Dry::Monads::Result[T.type_parameter(:out, :NewFailureType), SuccessType])
209
212
  end
210
213
  def or(&blk); end
211
214
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-monads-sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0.pre.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Worth
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-02 00:00:00.000000000 Z
11
+ date: 2020-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet
@@ -132,7 +132,7 @@ files:
132
132
  - lib/dry/monads/sorbet.rb
133
133
  - lib/dry/monads/sorbet/version.rb
134
134
  - rbi/dry-monads.rbi
135
- homepage: https://github.com/tricycle/dry-monads-sirbet
135
+ homepage: https://github.com/tricycle/dry-monads-sorbet
136
136
  licenses:
137
137
  - MIT
138
138
  metadata: {}
@@ -147,12 +147,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - ">"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 1.3.1
153
153
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.7.6.2
154
+ rubygems_version: 3.1.2
156
155
  signing_key:
157
156
  specification_version: 4
158
157
  summary: Sorbet type hints for Dry::Monads