dry-monads-sorbet 1.1.0.pre.13 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/README.md +34 -6
- data/dry-monads-sorbet.gemspec +6 -0
- data/lib/bundled_rbi/dry-monads.rbi +5 -516
- data/lib/dry-monads-sorbet/tasks/dry_monads_sorbet.rake +2 -2
- data/lib/dry/monads/sorbet/version.rb +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d75d54ff6ec8c8f4d444a2a3edd7d301184eb0f4e4645c2a398f8697f99e62de
|
4
|
+
data.tar.gz: e1aff83742024ba30e3a1cbf57049927b3214c4cab3f0f1d7cace090224c0d33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20da7ed4fd98c6929f6972c1445d245a0415de6bb84193cbe4a95acedbe61e6c4d1607591b52dc8580fb4dbf068b3af5a3557bd0b0d3aebe592af1b8c7f6afa7
|
7
|
+
data.tar.gz: ab2725e8f12568b1403c16a62a7a85efafaa80e4917531f0fd1a46c3f0a8503d3570bfbf2c4ed25ae3f7e68241fc3f125471dbea59dd4fa8a593c2c8830d4a80
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
1.1.4
|
2
|
+
|
3
|
+
* Remove accidentally included autogenerated annotations from `dry-monads.rbi`.
|
4
|
+
|
5
|
+
1.1.3
|
6
|
+
|
7
|
+
* Fix missing type annotation for `Dry::Monads::Maybe#value!`.
|
8
|
+
|
9
|
+
1.1.2
|
10
|
+
|
11
|
+
* Fix an issue when used alongside `sorbet-rails`.
|
12
|
+
|
13
|
+
1.1.1
|
14
|
+
|
15
|
+
* Remove the accidentally bundled `/rbi` directory.
|
16
|
+
|
17
|
+
1.1.0
|
18
|
+
|
19
|
+
* Now shipping the rbi bundled with the gem with a rake task to update this as/when we update the gem.
|
20
|
+
|
1
21
|
1.0.0
|
2
22
|
|
3
|
-
* Initial release
|
23
|
+
* Initial release.
|
data/README.md
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
![dry-monads-sorbet](https://user-images.githubusercontent.com/2643026/69986703-dfc68200-1535-11ea-9035-38ecbdb67138.png)
|
2
2
|
|
3
|
-
# Dry Monads Sorbet ![CI Badge](https://github.com/tricycle/dry-monads-sorbet/workflows/
|
3
|
+
# Dry Monads Sorbet ![CI Badge](https://github.com/tricycle/dry-monads-sorbet/workflows/Continuous%20Integration/badge.svg)
|
4
4
|
|
5
5
|
Sorbet type hints for Dry::Monads.
|
6
6
|
|
7
|
+
This gem is very small, it opens up the `Dry::Monads::Result` and `Dry::Monads::Maybe` classes to add type members
|
8
|
+
that are subsequently referred to in a bundled `.rbi` file for the `dry-monads` gem.
|
9
|
+
|
10
|
+
The bundled rbi annotations are installed/updated via a rake task included in the gem.
|
11
|
+
|
7
12
|
## Installation
|
8
13
|
|
9
14
|
Add the gem to your Gemfile:
|
@@ -24,7 +29,7 @@ The rake task that copies the bundled `.rbi` files into your project should alre
|
|
24
29
|
bundle exec rake dry_monads_sorbet:update_rbi
|
25
30
|
```
|
26
31
|
|
27
|
-
### Outside of
|
32
|
+
### Outside of Rails projects:
|
28
33
|
|
29
34
|
Include the `Rakefile` in your own projects `Rakefile` to get access to the rbi update command:
|
30
35
|
|
@@ -40,13 +45,36 @@ After including the Rakefile you should then have access to the task as describe
|
|
40
45
|
|
41
46
|
## Usage
|
42
47
|
|
48
|
+
Usage is fairly simple, just annotate your methods as follows:
|
49
|
+
|
43
50
|
```ruby
|
44
51
|
require 'dry/monads/sorbet'
|
45
52
|
|
46
|
-
class
|
53
|
+
class MyLoginService
|
47
54
|
extend T::Sig
|
48
55
|
|
49
|
-
sig{returns(Dry::Monads::Result[StandardError, String])}
|
50
|
-
def
|
51
|
-
|
56
|
+
sig{params(username: String).returns(Dry::Monads::Result[StandardError, String])}
|
57
|
+
def check_username(username)
|
58
|
+
case username
|
59
|
+
when 'samuelgiles93'
|
60
|
+
Dry::Monads::Success('Hi Sam!')
|
61
|
+
else
|
62
|
+
Dry::Monads::Failure(
|
63
|
+
StandardError.new('Unauthorised')
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
sig{params(username: String).returns(Dry::Monads::Maybe[Integer])}
|
69
|
+
def find_fullname(username)
|
70
|
+
case username
|
71
|
+
when 'samuelgiles93'
|
72
|
+
Dry::Monads::Some('Samuel Giles')
|
73
|
+
else
|
74
|
+
Dry::Monads::None()
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
52
78
|
```
|
79
|
+
|
80
|
+
With the type annotations in place you'll get type errors when you attempt to say call a method that doesn't exist on the `Some` of a `Maybe` or the `Success` of a `Result`.
|
data/dry-monads-sorbet.gemspec
CHANGED
@@ -21,6 +21,12 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.bindir = 'exe'
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
|
+
spec.post_install_message = <<~TEXT
|
25
|
+
dry-monads-sorbet has been installed/updated.
|
26
|
+
|
27
|
+
This gem ships with a bundled rbi file that must be copied into your project.
|
28
|
+
You can use the included "dry_monads_sorbet:update_rbi" to do this.
|
29
|
+
TEXT
|
24
30
|
|
25
31
|
spec.add_dependency 'sorbet'
|
26
32
|
spec.add_dependency 'sorbet-runtime'
|
@@ -71,6 +71,11 @@ class Dry::Monads::Maybe
|
|
71
71
|
end
|
72
72
|
def value_or(val = nil, &blk); end
|
73
73
|
|
74
|
+
sig do
|
75
|
+
returns(Elem)
|
76
|
+
end
|
77
|
+
def value!; end
|
78
|
+
|
74
79
|
sig do
|
75
80
|
params(arg0: T.untyped)
|
76
81
|
.returns(T.self_type)
|
@@ -105,12 +110,6 @@ class Dry::Monads::Maybe::Some < Dry::Monads::Maybe
|
|
105
110
|
|
106
111
|
sig {params(value: Elem).void}
|
107
112
|
def initialize(value = nil); end
|
108
|
-
|
109
|
-
sig do
|
110
|
-
returns(Elem)
|
111
|
-
end
|
112
|
-
def value!; end
|
113
|
-
|
114
113
|
def inspect; end
|
115
114
|
def maybe(*args, &block); end
|
116
115
|
def self.[](*value); end
|
@@ -595,515 +594,5 @@ module Dry::Monads::Lazy::Mixin::Constructors
|
|
595
594
|
end
|
596
595
|
class Dry::Monads::Result::Fixed < Module
|
597
596
|
def included(base); end
|
598
|
-
def initialize(error, **options); end
|
599
|
-
def self.[](error, **options); end
|
600
|
-
end
|
601
|
-
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
|
602
|
-
# srb rbi gems
|
603
|
-
|
604
|
-
# typed: true
|
605
|
-
#
|
606
|
-
# If you would like to make changes to this file, great! Please create the gem's shim here:
|
607
|
-
#
|
608
|
-
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/dry-monads/all/dry-monads.rbi
|
609
|
-
#
|
610
|
-
# dry-monads-1.3.5
|
611
|
-
module Dry
|
612
|
-
end
|
613
|
-
module Dry::Monads
|
614
|
-
def self.Result(error, **options); end
|
615
|
-
def self.[](*monads); end
|
616
|
-
def self.all_loaded?; end
|
617
|
-
def self.constructors; end
|
618
|
-
def self.included(base); end
|
619
|
-
def self.known_monads; end
|
620
|
-
def self.load_monad(name); end
|
621
|
-
def self.register_mixin(name, mod); end
|
622
|
-
def self.registry; end
|
623
|
-
def self.registry=(registry); end
|
624
|
-
extend Dry::Monads::Maybe::Mixin::Constructors
|
625
|
-
extend Dry::Monads::Maybe::Mixin::Constructors
|
626
|
-
extend Dry::Monads::Result::Mixin::Constructors
|
627
|
-
extend Dry::Monads::Validated::Mixin::Constructors
|
628
|
-
include Dry::Core::Constants
|
629
|
-
end
|
630
|
-
module Dry::Monads::Curry
|
631
|
-
def self.call(value); end
|
632
|
-
end
|
633
|
-
class Dry::Monads::UnwrapError < StandardError
|
634
|
-
def initialize(ctx); end
|
635
|
-
end
|
636
|
-
class Dry::Monads::InvalidFailureTypeError < StandardError
|
637
|
-
def initialize(failure); end
|
638
|
-
end
|
639
|
-
class Dry::Monads::ConstructorNotAppliedError < NoMethodError
|
640
|
-
def initialize(method_name, constructor_name); end
|
641
|
-
end
|
642
|
-
module Dry::Monads::RightBiased
|
643
|
-
end
|
644
|
-
module Dry::Monads::RightBiased::Right
|
645
|
-
def ===(other); end
|
646
|
-
def and(mb); end
|
647
|
-
def apply(val = nil); end
|
648
|
-
def bind(*args, **kwargs); end
|
649
|
-
def curry; end
|
650
|
-
def deconstruct; end
|
651
|
-
def deconstruct_keys(keys); end
|
652
|
-
def destructure(*args, **kwargs); end
|
653
|
-
def discard; end
|
654
|
-
def flatten; end
|
655
|
-
def fmap(*arg0); end
|
656
|
-
def or(*arg0); end
|
657
|
-
def or_fmap(*arg0); end
|
658
|
-
def self.included(m); end
|
659
|
-
def tee(*args, &block); end
|
660
|
-
def value!; end
|
661
|
-
def value_or(_val = nil); end
|
662
|
-
end
|
663
|
-
module Dry::Monads::RightBiased::Left
|
664
|
-
def and(_); end
|
665
|
-
def apply(*arg0); end
|
666
|
-
def bind(*arg0); end
|
667
|
-
def deconstruct; end
|
668
|
-
def deconstruct_keys(keys); end
|
669
|
-
def discard; end
|
670
|
-
def flatten; end
|
671
|
-
def fmap(*arg0); end
|
672
|
-
def or(*arg0); end
|
673
|
-
def or_fmap(*arg0); end
|
674
|
-
def self.trace_caller; end
|
675
|
-
def tee(*arg0); end
|
676
|
-
def value!; end
|
677
|
-
def value_or(val = nil); end
|
678
|
-
end
|
679
|
-
module Dry::Monads::Transformer
|
680
|
-
def fmap2(*args); end
|
681
|
-
def fmap3(*args); end
|
682
|
-
end
|
683
|
-
class Dry::Monads::Maybe
|
684
|
-
def failure?; end
|
685
|
-
def monad; end
|
686
|
-
def none?; end
|
687
|
-
def self.coerce(value); end
|
688
|
-
def self.lift(*args, &block); end
|
689
|
-
def self.pure(value = nil, &block); end
|
690
|
-
def self.to_proc; end
|
691
|
-
def some?; end
|
692
|
-
def success?; end
|
693
|
-
def to_maybe; end
|
694
|
-
def to_monad; end
|
695
|
-
include Dry::Monads::Transformer
|
696
|
-
end
|
697
|
-
class Dry::Monads::Maybe::Some < Dry::Monads::Maybe
|
698
|
-
def fmap(*args, &block); end
|
699
|
-
def initialize(value = nil); end
|
700
|
-
def inspect; end
|
701
|
-
def maybe(*args, &block); end
|
702
|
-
def self.[](*value); end
|
703
|
-
def self.call(*arg0); end
|
704
|
-
def self.to_proc; end
|
705
|
-
def to_result(_fail = nil); end
|
706
|
-
def to_s; end
|
707
|
-
include Anonymous_Dry_Equalizer_40
|
708
|
-
include Dry::Equalizer::Methods
|
709
|
-
include Dry::Monads::RightBiased::Right
|
710
|
-
end
|
711
|
-
module Anonymous_Dry_Equalizer_40
|
712
|
-
def cmp?(comparator, other); end
|
713
|
-
def hash; end
|
714
|
-
def inspect; end
|
715
|
-
end
|
716
|
-
class Dry::Monads::Maybe::None < Dry::Monads::Maybe
|
717
|
-
def ==(other); end
|
718
|
-
def deconstruct; end
|
719
|
-
def eql?(other); end
|
720
|
-
def hash; end
|
721
|
-
def initialize(trace = nil); end
|
722
|
-
def inspect; end
|
723
|
-
def maybe(*arg0); end
|
724
|
-
def or(*args); end
|
725
|
-
def or_fmap(*args, &block); end
|
726
|
-
def self.instance; end
|
727
|
-
def self.method_missing(m, *arg1); end
|
728
|
-
def to_result(fail = nil); end
|
729
|
-
def to_s; end
|
730
|
-
def trace; end
|
731
|
-
include Dry::Monads::RightBiased::Left
|
732
|
-
end
|
733
|
-
module Dry::Monads::Maybe::Mixin
|
734
|
-
include Dry::Monads::Maybe::Mixin::Constructors
|
735
|
-
end
|
736
|
-
module Dry::Monads::Maybe::Mixin::Constructors
|
737
|
-
def Maybe(value); end
|
738
|
-
def None; end
|
739
|
-
def Some(value = nil, &block); end
|
740
|
-
end
|
741
|
-
module Dry::Monads::Maybe::Hash
|
742
|
-
def self.all(hash, trace = nil); end
|
743
|
-
def self.filter(hash); end
|
744
|
-
end
|
745
|
-
class Dry::Monads::Result
|
746
|
-
def failure; end
|
747
|
-
def monad; end
|
748
|
-
def self.pure(value = nil, &block); end
|
749
|
-
def success; end
|
750
|
-
def to_monad; end
|
751
|
-
def to_result; end
|
752
|
-
include Anonymous_Module_41
|
753
|
-
include Dry::Monads::Transformer
|
754
|
-
end
|
755
|
-
class Dry::Monads::Result::Success < Dry::Monads::Result
|
756
|
-
def either(f, _); end
|
757
|
-
def failure?; end
|
758
|
-
def flip; end
|
759
|
-
def fmap(*args, &block); end
|
760
|
-
def initialize(value); end
|
761
|
-
def inspect; end
|
762
|
-
def result(_, f); end
|
763
|
-
def self.[](*value); end
|
764
|
-
def self.call(*arg0); end
|
765
|
-
def self.to_proc; end
|
766
|
-
def success; end
|
767
|
-
def success?; end
|
768
|
-
def to_maybe; end
|
769
|
-
def to_s; end
|
770
|
-
def to_validated; end
|
771
|
-
include Anonymous_Dry_Equalizer_42
|
772
|
-
include Dry::Equalizer::Methods
|
773
|
-
include Dry::Monads::RightBiased::Right
|
774
|
-
end
|
775
|
-
class Dry::Monads::Result::Failure < Dry::Monads::Result
|
776
|
-
def ===(other); end
|
777
|
-
def either(_, g); end
|
778
|
-
def failure; end
|
779
|
-
def failure?; end
|
780
|
-
def flip; end
|
781
|
-
def initialize(value, trace = nil); end
|
782
|
-
def inspect; end
|
783
|
-
def or(*args); end
|
784
|
-
def or_fmap(*args, &block); end
|
785
|
-
def result(f, _); end
|
786
|
-
def self.[](*value); end
|
787
|
-
def self.call(*arg0); end
|
788
|
-
def self.to_proc; end
|
789
|
-
def success?; end
|
790
|
-
def to_maybe; end
|
791
|
-
def to_s; end
|
792
|
-
def to_validated; end
|
793
|
-
def trace; end
|
794
|
-
def value_or(val = nil); end
|
795
|
-
include Anonymous_Dry_Equalizer_43
|
796
|
-
include Dry::Equalizer::Methods
|
797
|
-
include Dry::Monads::RightBiased::Left
|
798
|
-
end
|
799
|
-
class Dry::Monads::Task
|
800
|
-
def ==(other); end
|
801
|
-
def apply(val = nil); end
|
802
|
-
def bind(&block); end
|
803
|
-
def compare_promises(x, y); end
|
804
|
-
def complete?; end
|
805
|
-
def curry(value); end
|
806
|
-
def discard; end
|
807
|
-
def fmap(&block); end
|
808
|
-
def initialize(promise); end
|
809
|
-
def inspect; end
|
810
|
-
def monad; end
|
811
|
-
def or(&block); end
|
812
|
-
def or_fmap(&block); end
|
813
|
-
def promise; end
|
814
|
-
def self.[](executor, &block); end
|
815
|
-
def self.failed(exc); end
|
816
|
-
def self.new(promise = nil, &block); end
|
817
|
-
def self.pure(value = nil, &block); end
|
818
|
-
def then(&block); end
|
819
|
-
def to_maybe; end
|
820
|
-
def to_monad; end
|
821
|
-
def to_result; end
|
822
|
-
def to_s; end
|
823
|
-
def value!; end
|
824
|
-
def value_or(&block); end
|
825
|
-
def wait(timeout = nil); end
|
826
|
-
include Anonymous_Module_44
|
827
|
-
end
|
828
|
-
class Dry::Monads::Try
|
829
|
-
def error?; end
|
830
|
-
def exception; end
|
831
|
-
def failure?; end
|
832
|
-
def self.[](*exceptions, &block); end
|
833
|
-
def self.lift(*args, &block); end
|
834
|
-
def self.pure(value = nil, exceptions = nil, &block); end
|
835
|
-
def self.run(exceptions, f); end
|
836
|
-
def success?; end
|
837
|
-
def to_monad; end
|
838
|
-
def value?; end
|
839
|
-
include Anonymous_Module_45
|
840
|
-
end
|
841
|
-
class Dry::Monads::Try::Value < Dry::Monads::Try
|
842
|
-
def bind(*args); end
|
843
|
-
def bind_call(*args, **kwargs); end
|
844
|
-
def catchable; end
|
845
|
-
def fmap(*args, &block); end
|
846
|
-
def initialize(exceptions, value); end
|
847
|
-
def inspect; end
|
848
|
-
def self.call(*arg0); end
|
849
|
-
def self.to_proc; end
|
850
|
-
def to_maybe; end
|
851
|
-
def to_result; end
|
852
|
-
def to_s; end
|
853
|
-
include Anonymous_Dry_Equalizer_46
|
854
|
-
include Dry::Equalizer::Methods
|
855
|
-
include Dry::Monads::RightBiased::Right
|
856
|
-
end
|
857
|
-
class Dry::Monads::Try::Error < Dry::Monads::Try
|
858
|
-
def ===(other); end
|
859
|
-
def initialize(exception); end
|
860
|
-
def inspect; end
|
861
|
-
def or(*args); end
|
862
|
-
def self.call(*arg0); end
|
863
|
-
def to_maybe; end
|
864
|
-
def to_result; end
|
865
|
-
def to_s; end
|
866
|
-
include Anonymous_Dry_Equalizer_47
|
867
|
-
include Dry::Equalizer::Methods
|
868
|
-
include Dry::Monads::RightBiased::Left
|
869
|
-
end
|
870
|
-
class Dry::Monads::Validated
|
871
|
-
def bind(*arg0); end
|
872
|
-
def self.pure(value = nil, &block); end
|
873
|
-
def to_monad; end
|
874
|
-
include Anonymous_Module_48
|
875
|
-
end
|
876
|
-
class Dry::Monads::Validated::Valid < Dry::Monads::Validated
|
877
|
-
def ===(other); end
|
878
|
-
def alt_map(_ = nil); end
|
879
|
-
def apply(val = nil); end
|
880
|
-
def fmap(proc = nil, &block); end
|
881
|
-
def initialize(value); end
|
882
|
-
def inspect; end
|
883
|
-
def or(_ = nil); end
|
884
|
-
def to_maybe; end
|
885
|
-
def to_result; end
|
886
|
-
def to_s; end
|
887
|
-
def value!; end
|
888
|
-
include Anonymous_Dry_Equalizer_49
|
889
|
-
include Dry::Equalizer::Methods
|
890
|
-
end
|
891
|
-
class Dry::Monads::Validated::Invalid < Dry::Monads::Validated
|
892
|
-
def ===(other); end
|
893
|
-
def alt_map(proc = nil, &block); end
|
894
|
-
def apply(val = nil); end
|
895
|
-
def error; end
|
896
|
-
def fmap(_ = nil); end
|
897
|
-
def initialize(error, trace = nil); end
|
898
|
-
def inspect; end
|
899
|
-
def or(proc = nil, &block); end
|
900
|
-
def to_maybe; end
|
901
|
-
def to_result; end
|
902
|
-
def to_s; end
|
903
|
-
def trace; end
|
904
|
-
include Anonymous_Dry_Equalizer_50
|
905
|
-
include Dry::Equalizer::Methods
|
906
|
-
end
|
907
|
-
module Dry::Monads::ConversionStubs
|
908
|
-
def self.[](*method_names); end
|
909
|
-
end
|
910
|
-
module Dry::Monads::ConversionStubs::Methods
|
911
|
-
def self.to_maybe; end
|
912
|
-
def self.to_result; end
|
913
|
-
def self.to_validated; end
|
914
|
-
def to_maybe; end
|
915
|
-
def to_result; end
|
916
|
-
def to_validated; end
|
917
|
-
end
|
918
|
-
class Dry::Monads::Task::Promise < Concurrent::Promise
|
919
|
-
def on_fulfill(result); end
|
920
|
-
def on_reject(reason); end
|
921
|
-
end
|
922
|
-
module Anonymous_Module_44
|
923
|
-
def to_maybe(*arg0); end
|
924
|
-
def to_result(*arg0); end
|
925
|
-
end
|
926
|
-
module Dry::Monads::Task::Mixin
|
927
|
-
def self.[](executor); end
|
928
|
-
include Dry::Monads::Task::Mixin::Constructors
|
929
|
-
end
|
930
|
-
module Dry::Monads::Task::Mixin::Constructors
|
931
|
-
def Task(&block); end
|
932
|
-
end
|
933
|
-
module Anonymous_Module_41
|
934
|
-
def to_maybe(*arg0); end
|
935
|
-
def to_validated(*arg0); end
|
936
|
-
end
|
937
|
-
module Anonymous_Dry_Equalizer_42
|
938
|
-
def cmp?(comparator, other); end
|
939
|
-
def hash; end
|
940
|
-
def inspect; end
|
941
|
-
end
|
942
|
-
module Anonymous_Dry_Equalizer_43
|
943
|
-
def cmp?(comparator, other); end
|
944
|
-
def hash; end
|
945
|
-
def inspect; end
|
946
|
-
end
|
947
|
-
module Dry::Monads::Result::Mixin
|
948
|
-
include Dry::Monads::Result::Mixin::Constructors
|
949
|
-
end
|
950
|
-
module Dry::Monads::Result::Mixin::Constructors
|
951
|
-
def Failure(value = nil, &block); end
|
952
|
-
def Success(value = nil, &block); end
|
953
|
-
end
|
954
|
-
module Anonymous_Module_45
|
955
|
-
def to_maybe(*arg0); end
|
956
|
-
def to_result(*arg0); end
|
957
|
-
end
|
958
|
-
module Anonymous_Dry_Equalizer_46
|
959
|
-
def cmp?(comparator, other); end
|
960
|
-
def hash; end
|
961
|
-
def inspect; end
|
962
|
-
end
|
963
|
-
module Anonymous_Dry_Equalizer_47
|
964
|
-
def cmp?(comparator, other); end
|
965
|
-
def hash; end
|
966
|
-
def inspect; end
|
967
|
-
end
|
968
|
-
module Dry::Monads::Try::Mixin
|
969
|
-
def Error(error = nil, &block); end
|
970
|
-
def Value(value = nil, exceptions = nil, &block); end
|
971
|
-
include Dry::Monads::Try::Mixin::Constructors
|
972
|
-
end
|
973
|
-
module Dry::Monads::Try::Mixin::Constructors
|
974
|
-
def Try(*exceptions, &f); end
|
975
|
-
end
|
976
|
-
module Anonymous_Module_48
|
977
|
-
def to_maybe(*arg0); end
|
978
|
-
def to_result(*arg0); end
|
979
|
-
end
|
980
|
-
module Anonymous_Dry_Equalizer_49
|
981
|
-
def cmp?(comparator, other); end
|
982
|
-
def hash; end
|
983
|
-
def inspect; end
|
984
|
-
end
|
985
|
-
module Anonymous_Dry_Equalizer_50
|
986
|
-
def cmp?(comparator, other); end
|
987
|
-
def hash; end
|
988
|
-
def inspect; end
|
989
|
-
end
|
990
|
-
module Dry::Monads::Validated::Mixin
|
991
|
-
include Dry::Monads::Validated::Mixin::Constructors
|
992
|
-
end
|
993
|
-
module Dry::Monads::Validated::Mixin::Constructors
|
994
|
-
def Invalid(value = nil, &block); end
|
995
|
-
def Valid(value = nil, &block); end
|
996
|
-
end
|
997
|
-
class Dry::Monads::List
|
998
|
-
def +(other); end
|
999
|
-
def apply(list = nil); end
|
1000
|
-
def bind(*args); end
|
1001
|
-
def coerce(other); end
|
1002
|
-
def collect; end
|
1003
|
-
def deconstruct; end
|
1004
|
-
def empty?; end
|
1005
|
-
def filter; end
|
1006
|
-
def first; end
|
1007
|
-
def fmap(*args); end
|
1008
|
-
def fold_left(initial); end
|
1009
|
-
def fold_right(initial); end
|
1010
|
-
def foldl(initial); end
|
1011
|
-
def foldr(initial); end
|
1012
|
-
def head; end
|
1013
|
-
def initialize(value, type = nil); end
|
1014
|
-
def inspect; end
|
1015
|
-
def last; end
|
1016
|
-
def map(&block); end
|
1017
|
-
def monad; end
|
1018
|
-
def reduce(initial); end
|
1019
|
-
def reverse; end
|
1020
|
-
def select; end
|
1021
|
-
def self.[](*values); end
|
1022
|
-
def self.coerce(value, type = nil); end
|
1023
|
-
def self.pure(value = nil, type = nil, &block); end
|
1024
|
-
def self.unfold(state, type = nil); end
|
1025
|
-
def size; end
|
1026
|
-
def sort; end
|
1027
|
-
def tail; end
|
1028
|
-
def to_a; end
|
1029
|
-
def to_ary; end
|
1030
|
-
def to_monad; end
|
1031
|
-
def to_s; end
|
1032
|
-
def traverse(proc = nil, &block); end
|
1033
|
-
def type; end
|
1034
|
-
def typed(type = nil); end
|
1035
|
-
def typed?; end
|
1036
|
-
def value; end
|
1037
|
-
extend Anonymous_Dry_Core_Deprecations_Tagged_51
|
1038
|
-
extend Dry::Core::Deprecations::Interface
|
1039
|
-
include Anonymous_Dry_Equalizer_52
|
1040
|
-
include Dry::Equalizer::Methods
|
1041
|
-
include Dry::Monads::Transformer
|
1042
|
-
end
|
1043
|
-
module Anonymous_Dry_Core_Deprecations_Tagged_51
|
1044
|
-
end
|
1045
|
-
module Anonymous_Dry_Equalizer_52
|
1046
|
-
def cmp?(comparator, other); end
|
1047
|
-
def hash; end
|
1048
|
-
def inspect; end
|
1049
|
-
end
|
1050
|
-
class Dry::Monads::List::ListBuilder
|
1051
|
-
def [](*args); end
|
1052
|
-
def coerce(value); end
|
1053
|
-
def initialize(type); end
|
1054
|
-
def pure(val = nil, &block); end
|
1055
|
-
def self.[](*arg0); end
|
1056
|
-
def type; end
|
1057
|
-
end
|
1058
|
-
module Dry::Monads::List::Mixin
|
1059
|
-
def List(value); end
|
1060
|
-
end
|
1061
|
-
module Dry::Monads::Do
|
1062
|
-
def self.coerce_to_monad(monads); end
|
1063
|
-
def self.for(*methods); end
|
1064
|
-
def self.halt(result); end
|
1065
|
-
def self.included(base); end
|
1066
|
-
def self.wrap_method(target, method_name); end
|
1067
|
-
extend Dry::Monads::Do::Mixin
|
1068
|
-
end
|
1069
|
-
module Dry::Monads::Do::Mixin
|
1070
|
-
def bind(monads); end
|
1071
|
-
def call; end
|
1072
|
-
end
|
1073
|
-
class Dry::Monads::Do::Halt < StandardError
|
1074
|
-
def initialize(result); end
|
1075
|
-
def result; end
|
1076
|
-
end
|
1077
|
-
module Dry::Monads::Do::All
|
1078
|
-
def self.included(base); end
|
1079
|
-
extend Dry::Monads::Do::All::InstanceMixin
|
1080
|
-
end
|
1081
|
-
class Dry::Monads::Do::All::MethodTracker < Module
|
1082
|
-
def extend_object(target); end
|
1083
|
-
def initialize(wrappers); end
|
1084
|
-
def wrap_method(target, method); end
|
1085
|
-
def wrappers; end
|
1086
|
-
end
|
1087
|
-
module Dry::Monads::Do::All::InstanceMixin
|
1088
|
-
def extended(object); end
|
1089
|
-
end
|
1090
|
-
class Dry::Monads::Lazy < Dry::Monads::Task
|
1091
|
-
def force!; end
|
1092
|
-
def force; end
|
1093
|
-
def inspect; end
|
1094
|
-
def self.[](executor, &block); end
|
1095
|
-
def self.new(promise = nil, &block); end
|
1096
|
-
def to_s; end
|
1097
|
-
def value!; end
|
1098
|
-
end
|
1099
|
-
module Dry::Monads::Lazy::Mixin
|
1100
|
-
include Dry::Monads::Lazy::Mixin::Constructors
|
1101
|
-
end
|
1102
|
-
module Dry::Monads::Lazy::Mixin::Constructors
|
1103
|
-
def Lazy(&block); end
|
1104
|
-
end
|
1105
|
-
class Dry::Monads::Result::Fixed < Module
|
1106
|
-
def included(base); end
|
1107
|
-
def initialize(error, **_options); end
|
1108
597
|
def self.[](error, **options); end
|
1109
598
|
end
|
@@ -8,14 +8,14 @@ namespace :dry_monads_sorbet do
|
|
8
8
|
task :update_rbi do
|
9
9
|
FileUtils.rm_rf(dry_monads_sorbet_rbi_path)
|
10
10
|
|
11
|
-
|
11
|
+
dry_monads_sorbet_copy_bundled_rbi('dry-monads.rbi')
|
12
12
|
end
|
13
13
|
|
14
14
|
def dry_monads_sorbet_rbi_path
|
15
15
|
Pathname.new(Rake.original_dir).join('sorbet', 'dry-monads-sorbet')
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
18
|
+
def dry_monads_sorbet_copy_bundled_rbi(filename)
|
19
19
|
bundled_rbi_file_path = File.join(DRY_MONADS_SORBET_RAKE_DIR, '..', '..', 'bundled_rbi', filename)
|
20
20
|
copy_to_path = dry_monads_sorbet_rbi_path.join(filename)
|
21
21
|
FileUtils.mkdir_p(File.dirname(copy_to_path))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-monads-sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Worth
|
@@ -140,7 +140,11 @@ homepage: https://github.com/tricycle/dry-monads-sorbet
|
|
140
140
|
licenses:
|
141
141
|
- MIT
|
142
142
|
metadata: {}
|
143
|
-
post_install_message:
|
143
|
+
post_install_message: |
|
144
|
+
dry-monads-sorbet has been installed/updated.
|
145
|
+
|
146
|
+
This gem ships with a bundled rbi file that must be copied into your project.
|
147
|
+
You can use the included "dry_monads_sorbet:update_rbi" to do this.
|
144
148
|
rdoc_options: []
|
145
149
|
require_paths:
|
146
150
|
- lib
|
@@ -151,9 +155,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
155
|
version: '0'
|
152
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
157
|
requirements:
|
154
|
-
- - "
|
158
|
+
- - ">="
|
155
159
|
- !ruby/object:Gem::Version
|
156
|
-
version:
|
160
|
+
version: '0'
|
157
161
|
requirements: []
|
158
162
|
rubygems_version: 3.1.2
|
159
163
|
signing_key:
|