dry-monads-sorbet 1.1.0.pre.8 → 1.1.0.pre.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -1
- data/{rbi/dry-monads-sorbet.rbi → lib/bundled_rbi/dry-monads.rbi} +514 -1
- data/lib/dry-monads-sorbet.rb +1 -0
- data/lib/dry-monads-sorbet/Rakefile +2 -0
- data/lib/dry-monads-sorbet/railtie.rb +14 -0
- data/lib/dry-monads-sorbet/tasks/dry_monads_sorbet.rake +25 -0
- data/lib/dry/monads/sorbet/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04a3a1d08e8732376ec9f1fb820d8bd8211f95e3d2c36f61ccb36d3895643ff7
|
4
|
+
data.tar.gz: 2d308920e2f8224710bafb3b71b28829ccd2af99379dfc90ca62fb7bf6a4bdde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c71b2d4dbf65bb0011c344cadd72455dbb0b52ceb69ea781d12e2b0a5c5671adac2c78b1f1a032080032950977a796dc9652173cc5ba814dbb8c14fd2589af7
|
7
|
+
data.tar.gz: 3721a8426800c630dff2051f1de6118903f8af70d6e57eed87457c0600cdff419ccbadf6b4f4ad1f47c5b9fb220fb5f0f20dbb00fed3e57c8d9e15456920822b
|
data/README.md
CHANGED
@@ -4,10 +4,40 @@
|
|
4
4
|
|
5
5
|
Sorbet type hints for Dry::Monads.
|
6
6
|
|
7
|
-
##
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add the gem to your Gemfile:
|
8
10
|
|
9
11
|
`gem 'dry-monads-sorbet'`
|
10
12
|
|
13
|
+
### Copying the bundled RBI
|
14
|
+
|
15
|
+
You must copy in the bundled `.rbi` file that this gem maintains to add type annotations to your own project to type check your usage of `Dry::Monads`.
|
16
|
+
|
17
|
+
Following in the footsteps of `sorbet-rails` we've extracted this process to a rake task.
|
18
|
+
|
19
|
+
### In a Rails project:
|
20
|
+
|
21
|
+
The rake task that copies the bundled `.rbi` files into your project should already be loaded. You can run it by entering:
|
22
|
+
|
23
|
+
```bash
|
24
|
+
bundle exec rake dry_monads_sorbet:update_rbi
|
25
|
+
```
|
26
|
+
|
27
|
+
### Outside of Rail's projects:
|
28
|
+
|
29
|
+
Include the `Rakefile` in your own projects `Rakefile` to get access to the rbi update command:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
require 'dry-monads-sorbet'
|
33
|
+
|
34
|
+
spec = Gem::Specification.find_by_name 'dry-monads-sorbet'
|
35
|
+
rakefile = "#{spec.gem_dir}/lib/dry-monads-sorbet/Rakefile"
|
36
|
+
load rakefile
|
37
|
+
```
|
38
|
+
|
39
|
+
After including the Rakefile you should then have access to the task as described in the Rails project section.
|
40
|
+
|
11
41
|
## Usage
|
12
42
|
|
13
43
|
```ruby
|
@@ -1,7 +1,11 @@
|
|
1
1
|
# typed: strong
|
2
2
|
#
|
3
|
-
# dry-monads-
|
3
|
+
# This rbi file is bundled in the dry-monads-sorbet gem and is copied down
|
4
|
+
# into projects using the dry_monads_sorbet:update_rbi rake task.
|
4
5
|
#
|
6
|
+
# Any changes to the type annotations for Dry::Monads should be made
|
7
|
+
# in the dry-monads-sorbet gem itself in its bundled_rbi directory.
|
8
|
+
|
5
9
|
module Dry
|
6
10
|
end
|
7
11
|
module Dry::Monads
|
@@ -594,3 +598,512 @@ class Dry::Monads::Result::Fixed < Module
|
|
594
598
|
def initialize(error, **options); end
|
595
599
|
def self.[](error, **options); end
|
596
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
|
+
def self.[](error, **options); end
|
1109
|
+
end
|
data/lib/dry-monads-sorbet.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rails'
|
4
|
+
|
5
|
+
module DryMonadsSorbet
|
6
|
+
class Railtie < Rails::Railtie
|
7
|
+
railtie_name 'dry-monads-sorbet'
|
8
|
+
|
9
|
+
rake_tasks do
|
10
|
+
path = File.expand_path(__dir__)
|
11
|
+
Dir.glob("#{path}/tasks/**/*.rake").each { |f| load f }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'dry-monads-sorbet'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
DRY_MONADS_SORBET_RAKE_DIR = File.dirname(__FILE__)
|
5
|
+
|
6
|
+
namespace :dry_monads_sorbet do
|
7
|
+
desc "Generate rbis for dry/monads"
|
8
|
+
task :update_rbi do
|
9
|
+
FileUtils.rm_rf(dry_monads_sorbet_rbi_path)
|
10
|
+
|
11
|
+
copy_bundled_rbi('dry-monads.rbi')
|
12
|
+
end
|
13
|
+
|
14
|
+
def dry_monads_sorbet_rbi_path
|
15
|
+
Pathname.new(Rake.original_dir).join('sorbet', 'dry-monads-sorbet')
|
16
|
+
end
|
17
|
+
|
18
|
+
def copy_bundled_rbi(filename)
|
19
|
+
bundled_rbi_file_path = File.join(DRY_MONADS_SORBET_RAKE_DIR, '..', '..', 'bundled_rbi', filename)
|
20
|
+
copy_to_path = dry_monads_sorbet_rbi_path.join(filename)
|
21
|
+
FileUtils.mkdir_p(File.dirname(copy_to_path))
|
22
|
+
FileUtils.cp(bundled_rbi_file_path, copy_to_path)
|
23
|
+
puts "Copied bundled rbi file: #{filename}"
|
24
|
+
end
|
25
|
+
end
|
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.0.pre.
|
4
|
+
version: 1.1.0.pre.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Worth
|
@@ -129,10 +129,13 @@ files:
|
|
129
129
|
- bin/console
|
130
130
|
- bin/setup
|
131
131
|
- dry-monads-sorbet.gemspec
|
132
|
+
- lib/bundled_rbi/dry-monads.rbi
|
132
133
|
- lib/dry-monads-sorbet.rb
|
134
|
+
- lib/dry-monads-sorbet/Rakefile
|
135
|
+
- lib/dry-monads-sorbet/railtie.rb
|
136
|
+
- lib/dry-monads-sorbet/tasks/dry_monads_sorbet.rake
|
133
137
|
- lib/dry/monads/sorbet.rb
|
134
138
|
- lib/dry/monads/sorbet/version.rb
|
135
|
-
- rbi/dry-monads-sorbet.rbi
|
136
139
|
homepage: https://github.com/tricycle/dry-monads-sorbet
|
137
140
|
licenses:
|
138
141
|
- MIT
|