mangrove 0.1.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 +7 -0
- data/.rubocop.yml +42 -0
- data/LICENSE +21 -0
- data/README.md +54 -0
- data/Rakefile +14 -0
- data/lib/mangrove/control_flow/control_signal.rb +16 -0
- data/lib/mangrove/control_flow/rewriter.rb +152 -0
- data/lib/mangrove/control_flow.rb +84 -0
- data/lib/mangrove/interfaces.rb +8 -0
- data/lib/mangrove/mangrove.rb +35 -0
- data/lib/mangrove/option/control_signal.rb +33 -0
- data/lib/mangrove/option.rb +134 -0
- data/lib/mangrove/result/control_signal.rb +33 -0
- data/lib/mangrove/result.rb +167 -0
- data/lib/mangrove/version.rb +6 -0
- data/lib/mangrove.rb +8 -0
- data/sig/mangrove.rbs +4 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/base64@0.1.1.rbi +172 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1533 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/ordinare@0.4.0.rbi +77 -0
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
- data/sorbet/rbi/gems/parser@3.2.2.3.rbi +7253 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/racc@1.7.1.rbi +161 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3024 -0
- data/sorbet/rbi/gems/rbi@0.0.17.rbi +2972 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.1.rbi +3749 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
- data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +10805 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +8100 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +5310 -0
- data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +163 -0
- data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +1609 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
- data/sorbet/rbi/gems/ruboclean@0.4.0.rbi +189 -0
- data/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +6985 -0
- data/sorbet/rbi/gems/rubocop@1.56.0.rbi +56491 -0
- data/sorbet/rbi/gems/ruby-lsp@0.8.0.rbi +11 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/spoom@1.2.3.rbi +3203 -0
- data/sorbet/rbi/gems/syntax_tree@6.1.1.rbi +22855 -0
- data/sorbet/rbi/gems/tapioca@0.11.8.rbi +3349 -0
- data/sorbet/rbi/gems/thor@1.2.2.rbi +3965 -0
- data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
- data/sorbet/rbi/gems/unparser@0.6.8.rbi +4525 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
- data/sorbet/rbi/shims/gems/rspec-core.rbi +12 -0
- data/sorbet/rbi/shims/gems/rspec-expectations.rbi +8 -0
- data/sorbet/rbi/shims/mangrove/option.rbi +15 -0
- data/sorbet/rbi/shims/mangrove/result.rbi +15 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +161 -0
@@ -0,0 +1,82 @@
|
|
1
|
+
# typed: false
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `rspec` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem rspec`.
|
6
|
+
|
7
|
+
# source://rspec//lib/rspec/version.rb#1
|
8
|
+
module RSpec
|
9
|
+
class << self
|
10
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#70
|
11
|
+
def clear_examples; end
|
12
|
+
|
13
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#85
|
14
|
+
def configuration; end
|
15
|
+
|
16
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#49
|
17
|
+
def configuration=(_arg0); end
|
18
|
+
|
19
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#97
|
20
|
+
def configure; end
|
21
|
+
|
22
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#194
|
23
|
+
def const_missing(name); end
|
24
|
+
|
25
|
+
# source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42
|
26
|
+
def context(*args, &example_group_block); end
|
27
|
+
|
28
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#122
|
29
|
+
def current_example; end
|
30
|
+
|
31
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#128
|
32
|
+
def current_example=(example); end
|
33
|
+
|
34
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#154
|
35
|
+
def current_scope; end
|
36
|
+
|
37
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#134
|
38
|
+
def current_scope=(scope); end
|
39
|
+
|
40
|
+
# source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42
|
41
|
+
def describe(*args, &example_group_block); end
|
42
|
+
|
43
|
+
# source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42
|
44
|
+
def example_group(*args, &example_group_block); end
|
45
|
+
|
46
|
+
# source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42
|
47
|
+
def fcontext(*args, &example_group_block); end
|
48
|
+
|
49
|
+
# source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42
|
50
|
+
def fdescribe(*args, &example_group_block); end
|
51
|
+
|
52
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#58
|
53
|
+
def reset; end
|
54
|
+
|
55
|
+
# source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110
|
56
|
+
def shared_context(name, *args, &block); end
|
57
|
+
|
58
|
+
# source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110
|
59
|
+
def shared_examples(name, *args, &block); end
|
60
|
+
|
61
|
+
# source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110
|
62
|
+
def shared_examples_for(name, *args, &block); end
|
63
|
+
|
64
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#160
|
65
|
+
def world; end
|
66
|
+
|
67
|
+
# source://rspec-core/3.12.2/lib/rspec/core.rb#49
|
68
|
+
def world=(_arg0); end
|
69
|
+
|
70
|
+
# source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42
|
71
|
+
def xcontext(*args, &example_group_block); end
|
72
|
+
|
73
|
+
# source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42
|
74
|
+
def xdescribe(*args, &example_group_block); end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# source://rspec//lib/rspec/version.rb#2
|
79
|
+
module RSpec::Version; end
|
80
|
+
|
81
|
+
# source://rspec//lib/rspec/version.rb#3
|
82
|
+
RSpec::Version::STRING = T.let(T.unsafe(nil), String)
|
@@ -0,0 +1,189 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `ruboclean` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem ruboclean`.
|
6
|
+
|
7
|
+
# Ruboclean entry point
|
8
|
+
#
|
9
|
+
# source://ruboclean//lib/ruboclean/version.rb#3
|
10
|
+
module Ruboclean
|
11
|
+
class << self
|
12
|
+
# source://ruboclean//lib/ruboclean.rb#14
|
13
|
+
def run_from_cli!(command_line_arguments); end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# Reads command line arguments and exposes corresponding reader methods
|
18
|
+
#
|
19
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#5
|
20
|
+
class Ruboclean::Arguments
|
21
|
+
# @return [Arguments] a new instance of Arguments
|
22
|
+
#
|
23
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#6
|
24
|
+
def initialize(command_line_arguments = T.unsafe(nil)); end
|
25
|
+
|
26
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#10
|
27
|
+
def path; end
|
28
|
+
|
29
|
+
# @return [Boolean]
|
30
|
+
#
|
31
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#22
|
32
|
+
def preserve_comments?; end
|
33
|
+
|
34
|
+
# @return [Boolean]
|
35
|
+
#
|
36
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#18
|
37
|
+
def silent?; end
|
38
|
+
|
39
|
+
# @return [Boolean]
|
40
|
+
#
|
41
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#14
|
42
|
+
def verbose?; end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
# Returns the value of attribute command_line_arguments.
|
47
|
+
#
|
48
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#28
|
49
|
+
def command_line_arguments; end
|
50
|
+
|
51
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#38
|
52
|
+
def find_argument(name); end
|
53
|
+
|
54
|
+
# source://ruboclean//lib/ruboclean/arguments.rb#30
|
55
|
+
def find_path; end
|
56
|
+
end
|
57
|
+
|
58
|
+
# source://ruboclean//lib/ruboclean.rb#12
|
59
|
+
class Ruboclean::Error < ::StandardError; end
|
60
|
+
|
61
|
+
# Groups the rubocop configuration items into three categories:
|
62
|
+
# - base: base configuration like 'require', 'inherit_from', etc
|
63
|
+
# - namespaces: every item which does **not** include an "/"
|
64
|
+
# - cops: every item which **includes** an "/"
|
65
|
+
#
|
66
|
+
# source://ruboclean//lib/ruboclean/grouper.rb#8
|
67
|
+
class Ruboclean::Grouper
|
68
|
+
# @return [Grouper] a new instance of Grouper
|
69
|
+
#
|
70
|
+
# source://ruboclean//lib/ruboclean/grouper.rb#9
|
71
|
+
def initialize(config_hash); end
|
72
|
+
|
73
|
+
# source://ruboclean//lib/ruboclean/grouper.rb#13
|
74
|
+
def group_config; end
|
75
|
+
|
76
|
+
private
|
77
|
+
|
78
|
+
# source://ruboclean//lib/ruboclean/grouper.rb#23
|
79
|
+
def empty_groups; end
|
80
|
+
|
81
|
+
# source://ruboclean//lib/ruboclean/grouper.rb#27
|
82
|
+
def find_target_group(key); end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Orders the items within the groups alphabetically
|
86
|
+
#
|
87
|
+
# source://ruboclean//lib/ruboclean/orderer.rb#7
|
88
|
+
class Ruboclean::Orderer
|
89
|
+
# @return [Orderer] a new instance of Orderer
|
90
|
+
#
|
91
|
+
# source://ruboclean//lib/ruboclean/orderer.rb#8
|
92
|
+
def initialize(config_hash); end
|
93
|
+
|
94
|
+
# source://ruboclean//lib/ruboclean/orderer.rb#12
|
95
|
+
def order; end
|
96
|
+
|
97
|
+
private
|
98
|
+
|
99
|
+
# source://ruboclean//lib/ruboclean/orderer.rb#25
|
100
|
+
def grouped_config; end
|
101
|
+
|
102
|
+
# source://ruboclean//lib/ruboclean/orderer.rb#21
|
103
|
+
def order_by_key(config_hash); end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Contains the config_hash representation of the `.rubocop.yml` file
|
107
|
+
#
|
108
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration.rb#5
|
109
|
+
class Ruboclean::RubocopConfiguration
|
110
|
+
# @return [RubocopConfiguration] a new instance of RubocopConfiguration
|
111
|
+
#
|
112
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration.rb#6
|
113
|
+
def initialize(config_hash); end
|
114
|
+
|
115
|
+
# @return [Boolean]
|
116
|
+
#
|
117
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration.rb#14
|
118
|
+
def nil?; end
|
119
|
+
|
120
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration.rb#10
|
121
|
+
def order; end
|
122
|
+
end
|
123
|
+
|
124
|
+
# Interface for reading and writing the `.rubocop.yml` file
|
125
|
+
#
|
126
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#8
|
127
|
+
class Ruboclean::RubocopConfigurationPath
|
128
|
+
# @raise [InvalidPathError]
|
129
|
+
# @return [RubocopConfigurationPath] a new instance of RubocopConfigurationPath
|
130
|
+
#
|
131
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#18
|
132
|
+
def initialize(path); end
|
133
|
+
|
134
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#30
|
135
|
+
def load; end
|
136
|
+
|
137
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#34
|
138
|
+
def write(rubocop_configuration, preserve_comments: T.unsafe(nil)); end
|
139
|
+
|
140
|
+
private
|
141
|
+
|
142
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#46
|
143
|
+
def load_yaml; end
|
144
|
+
|
145
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#54
|
146
|
+
def preserve_preceding_comments(source, target); end
|
147
|
+
|
148
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#42
|
149
|
+
def sanitize_yaml(data); end
|
150
|
+
|
151
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#50
|
152
|
+
def source_yaml; end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Thrown if given path is invalid
|
156
|
+
#
|
157
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#12
|
158
|
+
class Ruboclean::RubocopConfigurationPath::InvalidPathError < ::StandardError
|
159
|
+
# @return [InvalidPathError] a new instance of InvalidPathError
|
160
|
+
#
|
161
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#13
|
162
|
+
def initialize(path); end
|
163
|
+
end
|
164
|
+
|
165
|
+
# source://ruboclean//lib/ruboclean/rubocop_configuration_path.rb#9
|
166
|
+
Ruboclean::RubocopConfigurationPath::PERMITTED_CLASSED = T.let(T.unsafe(nil), Array)
|
167
|
+
|
168
|
+
# Proxy for invoking the cleaning
|
169
|
+
#
|
170
|
+
# source://ruboclean//lib/ruboclean/runner.rb#5
|
171
|
+
class Ruboclean::Runner
|
172
|
+
# @return [Runner] a new instance of Runner
|
173
|
+
#
|
174
|
+
# source://ruboclean//lib/ruboclean/runner.rb#6
|
175
|
+
def initialize(arguments); end
|
176
|
+
|
177
|
+
# source://ruboclean//lib/ruboclean/runner.rb#10
|
178
|
+
def run!; end
|
179
|
+
|
180
|
+
private
|
181
|
+
|
182
|
+
# Returns the value of attribute arguments.
|
183
|
+
#
|
184
|
+
# source://ruboclean//lib/ruboclean/runner.rb#21
|
185
|
+
def arguments; end
|
186
|
+
end
|
187
|
+
|
188
|
+
# source://ruboclean//lib/ruboclean/version.rb#4
|
189
|
+
Ruboclean::VERSION = T.let(T.unsafe(nil), String)
|