sorbet-result 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.standard.yml +6 -0
- data/.tool-versions +1 -1
- data/CHANGELOG.md +21 -0
- data/Gemfile +3 -5
- data/Gemfile.lock +79 -64
- data/README.md +25 -2
- data/Rakefile +3 -5
- data/lib/minitest/result_assertions.rb +48 -0
- data/lib/sorbet-result.rb +1 -5
- data/lib/typed/result.rb +199 -7
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +1 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
- data/sorbet/rbi/gems/{io-console@0.6.0.rbi → io-console@0.7.2.rbi} +1 -0
- data/sorbet/rbi/gems/{json@2.6.3.rbi → json@2.7.5.rbi} +168 -72
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
- data/sorbet/rbi/gems/{minitest@5.18.1.rbi → minitest@5.25.1.rbi} +337 -282
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +1 -0
- data/sorbet/rbi/gems/{parallel@1.23.0.rbi → parallel@1.26.3.rbi} +38 -20
- data/sorbet/rbi/gems/{parser@3.2.2.3.rbi → parser@3.3.5.1.rbi} +663 -2397
- data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
- data/sorbet/rbi/gems/psych@5.1.2.rbi +1732 -0
- data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.1.rbi} +37 -36
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +1 -0
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.2.1.rbi} +79 -75
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
- data/sorbet/rbi/gems/{regexp_parser@2.8.1.rbi → regexp_parser@2.9.2.rbi} +190 -167
- data/sorbet/rbi/gems/{reline@0.3.5.rbi → reline@0.5.10.rbi} +1 -0
- data/sorbet/rbi/gems/{rubocop-ast@1.29.0.rbi → rubocop-ast@1.33.1.rbi} +1220 -748
- data/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi +9 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi +9 -0
- data/sorbet/rbi/gems/{rubocop@1.52.1.rbi → rubocop@1.66.1.rbi} +6236 -3446
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +9 -0
- data/sorbet/rbi/gems/standard-performance@1.5.0.rbi +9 -0
- data/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi +53 -0
- data/sorbet/rbi/gems/standard@1.41.1.rbi +926 -0
- data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
- data/sorbet/rbi/gems/{tapioca@0.11.6.rbi → tapioca@0.16.3.rbi} +937 -635
- data/sorbet/rbi/gems/{thor@1.2.2.rbi → thor@1.3.2.rbi} +832 -419
- data/sorbet/rbi/gems/{unicode-display_width@2.4.2.rbi → unicode-display_width@2.6.0.rbi} +1 -0
- data/sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi → yard-sorbet@0.9.0.rbi} +36 -29
- data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.37.rbi} +431 -271
- data/sorbet/tapioca/config.yml +3 -12
- data/sorbet/tapioca/require.rb +0 -1
- metadata +37 -47
- data/.rubocop.yml +0 -33
- data/lib/typed/failure.rb +0 -81
- data/lib/typed/success.rb +0 -80
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
- data/sorbet/rbi/gems/irb@1.7.0.rbi +0 -342
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +0 -3008
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -4717
- data/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi +0 -2528
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -328
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +0 -1043
- data/sorbet/rbi/gems/spoom@1.2.1.rbi +0 -2503
- data/sorbet/rbi/gems/unparser@0.6.8.rbi +0 -4525
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -986
@@ -0,0 +1,150 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `erubi` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem erubi`.
|
6
|
+
|
7
|
+
|
8
|
+
# source://erubi//lib/erubi.rb#3
|
9
|
+
module Erubi
|
10
|
+
private
|
11
|
+
|
12
|
+
def h(_arg0); end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
def h(_arg0); end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# source://erubi//lib/erubi.rb#51
|
20
|
+
class Erubi::Engine
|
21
|
+
# Initialize a new Erubi::Engine. Options:
|
22
|
+
# +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
|
23
|
+
# +:bufvar+ :: The variable name to use for the buffer variable, as a string.
|
24
|
+
# +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
|
25
|
+
# performance, but can cause issues when the buffer variable is reassigned during
|
26
|
+
# template rendering (default +false+).
|
27
|
+
# +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
|
28
|
+
# +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
|
29
|
+
# +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
|
30
|
+
# +:escape_html+ :: Same as +:escape+, with lower priority.
|
31
|
+
# +:filename+ :: The filename for the template.
|
32
|
+
# the resulting source code. Note this may cause problems if you are wrapping the resulting
|
33
|
+
# source code in other code, because the magic comment only has an effect at the beginning of
|
34
|
+
# the file, and having the magic comment later in the file can trigger warnings.
|
35
|
+
# +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
|
36
|
+
# (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
|
37
|
+
# Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
|
38
|
+
# in order to improve performance.
|
39
|
+
# +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
|
40
|
+
# +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
|
41
|
+
# +:outvar+ :: Same as +:bufvar+, with lower priority.
|
42
|
+
# +:postamble+ :: The postamble for the template, by default returns the resulting source code.
|
43
|
+
# +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
|
44
|
+
# +:regexp+ :: The regexp to use for scanning.
|
45
|
+
# +:src+ :: The initial value to use for the source code, an empty string by default.
|
46
|
+
# +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
|
47
|
+
#
|
48
|
+
# @return [Engine] a new instance of Engine
|
49
|
+
#
|
50
|
+
# source://erubi//lib/erubi.rb#91
|
51
|
+
def initialize(input, properties = T.unsafe(nil)); end
|
52
|
+
|
53
|
+
# The variable name used for the buffer variable.
|
54
|
+
#
|
55
|
+
# source://erubi//lib/erubi.rb#62
|
56
|
+
def bufvar; end
|
57
|
+
|
58
|
+
# The filename of the template, if one was given.
|
59
|
+
#
|
60
|
+
# source://erubi//lib/erubi.rb#59
|
61
|
+
def filename; end
|
62
|
+
|
63
|
+
# The frozen ruby source code generated from the template, which can be evaled.
|
64
|
+
#
|
65
|
+
# source://erubi//lib/erubi.rb#56
|
66
|
+
def src; end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
# Add ruby code to the template
|
71
|
+
#
|
72
|
+
# source://erubi//lib/erubi.rb#223
|
73
|
+
def add_code(code); end
|
74
|
+
|
75
|
+
# Add the given ruby expression result to the template,
|
76
|
+
# escaping it based on the indicator given and escape flag.
|
77
|
+
#
|
78
|
+
# source://erubi//lib/erubi.rb#232
|
79
|
+
def add_expression(indicator, code); end
|
80
|
+
|
81
|
+
# Add the result of Ruby expression to the template
|
82
|
+
#
|
83
|
+
# source://erubi//lib/erubi.rb#241
|
84
|
+
def add_expression_result(code); end
|
85
|
+
|
86
|
+
# Add the escaped result of Ruby expression to the template
|
87
|
+
#
|
88
|
+
# source://erubi//lib/erubi.rb#246
|
89
|
+
def add_expression_result_escaped(code); end
|
90
|
+
|
91
|
+
# Add the given postamble to the src. Can be overridden in subclasses
|
92
|
+
# to make additional changes to src that depend on the current state.
|
93
|
+
#
|
94
|
+
# source://erubi//lib/erubi.rb#252
|
95
|
+
def add_postamble(postamble); end
|
96
|
+
|
97
|
+
# Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
|
98
|
+
# Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
|
99
|
+
#
|
100
|
+
# source://erubi//lib/erubi.rb#210
|
101
|
+
def add_text(text); end
|
102
|
+
|
103
|
+
# Raise an exception, as the base engine class does not support handling other indicators.
|
104
|
+
#
|
105
|
+
# @raise [ArgumentError]
|
106
|
+
#
|
107
|
+
# source://erubi//lib/erubi.rb#258
|
108
|
+
def handle(indicator, code, tailch, rspace, lspace); end
|
109
|
+
|
110
|
+
# Make sure that any current expression has been terminated.
|
111
|
+
# The default is to terminate all expressions, but when
|
112
|
+
# the chain_appends option is used, expressions may not be
|
113
|
+
# terminated.
|
114
|
+
#
|
115
|
+
# source://erubi//lib/erubi.rb#286
|
116
|
+
def terminate_expression; end
|
117
|
+
|
118
|
+
# Make sure the buffer variable is the target of the next append
|
119
|
+
# before yielding to the block. Mark that the buffer is the target
|
120
|
+
# of the next append after the block executes.
|
121
|
+
#
|
122
|
+
# This method should only be called if the block will result in
|
123
|
+
# code where << will append to the bufvar.
|
124
|
+
#
|
125
|
+
# source://erubi//lib/erubi.rb#268
|
126
|
+
def with_buffer; end
|
127
|
+
end
|
128
|
+
|
129
|
+
# The default regular expression used for scanning.
|
130
|
+
#
|
131
|
+
# source://erubi//lib/erubi.rb#53
|
132
|
+
Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
|
133
|
+
|
134
|
+
# source://erubi//lib/erubi.rb#17
|
135
|
+
Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass)
|
136
|
+
|
137
|
+
# source://erubi//lib/erubi.rb#15
|
138
|
+
Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
|
139
|
+
|
140
|
+
# source://erubi//lib/erubi.rb#8
|
141
|
+
Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
|
142
|
+
|
143
|
+
# source://erubi//lib/erubi.rb#9
|
144
|
+
Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
|
145
|
+
|
146
|
+
# source://erubi//lib/erubi.rb#16
|
147
|
+
Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
|
148
|
+
|
149
|
+
# source://erubi//lib/erubi.rb#4
|
150
|
+
Erubi::VERSION = T.let(T.unsafe(nil), String)
|