model-to-schema 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +20 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +13 -0
- data/LICENSE.txt +21 -0
- data/README.md +111 -0
- data/Rakefile +12 -0
- data/esquema.gemspec +38 -0
- data/lib/esquema/builder.rb +155 -0
- data/lib/esquema/configuration.rb +34 -0
- data/lib/esquema/keyword_validator.rb +98 -0
- data/lib/esquema/model.rb +31 -0
- data/lib/esquema/property.rb +238 -0
- data/lib/esquema/schema_enhancer.rb +90 -0
- data/lib/esquema/type_caster.rb +53 -0
- data/lib/esquema/version.rb +5 -0
- data/lib/esquema/virtual_column.rb +46 -0
- data/lib/esquema.rb +14 -0
- data/lib/generators/esquema/install/install_generator.rb +16 -0
- data/lib/generators/esquema/install/templates/esquema_initializer.rb +22 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/activemodel.rbi +89 -0
- data/sorbet/rbi/annotations/activerecord.rbi +92 -0
- data/sorbet/rbi/annotations/activesupport.rbi +421 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activemodel@7.1.3.rbi +8 -0
- data/sorbet/rbi/gems/activerecord@7.1.3.rbi +8 -0
- data/sorbet/rbi/gems/activesupport@7.1.3.rbi +192 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +8 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +8 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1130 -0
- data/sorbet/rbi/gems/drb@2.2.0.rbi +1272 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +8 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1553 -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/minitest@5.22.2.rbi +8 -0
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
- data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.24.0.rbi +31040 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10075 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +157 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
- data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
- data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
- data/sorbet/rbi/gems/rspec-core@3.13.0.rbi +10978 -0
- data/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi +8153 -0
- data/sorbet/rbi/gems/rspec-mocks@3.13.0.rbi +5340 -0
- data/sorbet/rbi/gems/rspec-support@3.13.0.rbi +1629 -0
- data/sorbet/rbi/gems/rspec@3.13.0.rbi +82 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7006 -0
- data/sorbet/rbi/gems/rubocop@1.60.2.rbi +57383 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/sqlite3@1.7.2.rbi +1691 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23133 -0
- data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3510 -0
- data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
- data/sorbet/rbi/gems/timeout@0.4.1.rbi +142 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +8 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -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/todo.rbi +20 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +176 -0
@@ -0,0 +1,1629 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `rspec-support` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem rspec-support`.
|
6
|
+
|
7
|
+
# source://rspec-support//lib/rspec/support.rb#3
|
8
|
+
module RSpec
|
9
|
+
extend ::RSpec::Support::Warnings
|
10
|
+
|
11
|
+
class << self
|
12
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#70
|
13
|
+
def clear_examples; end
|
14
|
+
|
15
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#85
|
16
|
+
def configuration; end
|
17
|
+
|
18
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#49
|
19
|
+
def configuration=(_arg0); end
|
20
|
+
|
21
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#97
|
22
|
+
def configure; end
|
23
|
+
|
24
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#194
|
25
|
+
def const_missing(name); end
|
26
|
+
|
27
|
+
# source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42
|
28
|
+
def context(*args, &example_group_block); end
|
29
|
+
|
30
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#122
|
31
|
+
def current_example; end
|
32
|
+
|
33
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#128
|
34
|
+
def current_example=(example); end
|
35
|
+
|
36
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#154
|
37
|
+
def current_scope; end
|
38
|
+
|
39
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#134
|
40
|
+
def current_scope=(scope); end
|
41
|
+
|
42
|
+
# source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42
|
43
|
+
def describe(*args, &example_group_block); end
|
44
|
+
|
45
|
+
# source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42
|
46
|
+
def example_group(*args, &example_group_block); end
|
47
|
+
|
48
|
+
# source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42
|
49
|
+
def fcontext(*args, &example_group_block); end
|
50
|
+
|
51
|
+
# source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42
|
52
|
+
def fdescribe(*args, &example_group_block); end
|
53
|
+
|
54
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#58
|
55
|
+
def reset; end
|
56
|
+
|
57
|
+
# source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110
|
58
|
+
def shared_context(name, *args, &block); end
|
59
|
+
|
60
|
+
# source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110
|
61
|
+
def shared_examples(name, *args, &block); end
|
62
|
+
|
63
|
+
# source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110
|
64
|
+
def shared_examples_for(name, *args, &block); end
|
65
|
+
|
66
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#160
|
67
|
+
def world; end
|
68
|
+
|
69
|
+
# source://rspec-core/3.13.0/lib/rspec/core.rb#49
|
70
|
+
def world=(_arg0); end
|
71
|
+
|
72
|
+
# source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42
|
73
|
+
def xcontext(*args, &example_group_block); end
|
74
|
+
|
75
|
+
# source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42
|
76
|
+
def xdescribe(*args, &example_group_block); end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Consistent implementation for "cleaning" the caller method to strip out
|
81
|
+
# non-rspec lines. This enables errors to be reported at the call site in
|
82
|
+
# the code using the library, which is far more useful than the particular
|
83
|
+
# internal method that raised an error.
|
84
|
+
#
|
85
|
+
# source://rspec-support//lib/rspec/support/caller_filter.rb#10
|
86
|
+
class RSpec::CallerFilter
|
87
|
+
class << self
|
88
|
+
# Earlier rubies do not support the two argument form of `caller`. This
|
89
|
+
# fallback is logically the same, but slower.
|
90
|
+
#
|
91
|
+
# source://rspec-support//lib/rspec/support/caller_filter.rb#49
|
92
|
+
def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# source://rspec-support//lib/rspec/support/caller_filter.rb#20
|
97
|
+
RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array)
|
98
|
+
|
99
|
+
# rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want
|
100
|
+
# it ignored when we are looking for the first meaningful line of the backtrace outside
|
101
|
+
# of RSpec. It can show up in the backtrace as the immediate first caller
|
102
|
+
# when `CallerFilter.first_non_rspec_line` is called from the top level of a required
|
103
|
+
# file, but it depends on if rubygems is loaded or not. We don't want to have to deal
|
104
|
+
# with this complexity in our `RSpec.deprecate` calls, so we ignore it here.
|
105
|
+
#
|
106
|
+
# source://rspec-support//lib/rspec/support/caller_filter.rb#30
|
107
|
+
RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp)
|
108
|
+
|
109
|
+
# source://rspec-support//lib/rspec/support/caller_filter.rb#22
|
110
|
+
RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp)
|
111
|
+
|
112
|
+
# source://rspec-support//lib/rspec/support/caller_filter.rb#11
|
113
|
+
RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array)
|
114
|
+
|
115
|
+
# source://rspec-support//lib/rspec/support.rb#4
|
116
|
+
module RSpec::Support
|
117
|
+
class << self
|
118
|
+
# Used internally to get a class of a given object, even if it does not respond to #class.
|
119
|
+
#
|
120
|
+
# @api private
|
121
|
+
#
|
122
|
+
# source://rspec-support//lib/rspec/support.rb#86
|
123
|
+
def class_of(object); end
|
124
|
+
|
125
|
+
# Defines a helper method that is optimized to require files from the
|
126
|
+
# named lib. The passed block MUST be `{ |f| require_relative f }`
|
127
|
+
# because for `require_relative` to work properly from within the named
|
128
|
+
# lib the line of code must be IN that lib.
|
129
|
+
#
|
130
|
+
# `require_relative` is preferred when available because it is always O(1),
|
131
|
+
# regardless of the number of dirs in $LOAD_PATH. `require`, on the other
|
132
|
+
# hand, does a linear O(N) search over the dirs in the $LOAD_PATH until
|
133
|
+
# it can resolve the file relative to one of the dirs.
|
134
|
+
#
|
135
|
+
# @api private
|
136
|
+
#
|
137
|
+
# source://rspec-support//lib/rspec/support.rb#16
|
138
|
+
def define_optimized_require_for_rspec(lib, &require_relative); end
|
139
|
+
|
140
|
+
# Remove a previously registered matcher. Useful for cleaning up after
|
141
|
+
# yourself in specs.
|
142
|
+
#
|
143
|
+
# @private
|
144
|
+
#
|
145
|
+
# source://rspec-support//lib/rspec/support/matcher_definition.rb#24
|
146
|
+
def deregister_matcher_definition(&block); end
|
147
|
+
|
148
|
+
# @api private
|
149
|
+
#
|
150
|
+
# source://rspec-support//lib/rspec/support.rb#113
|
151
|
+
def failure_notifier; end
|
152
|
+
|
153
|
+
# @api private
|
154
|
+
#
|
155
|
+
# source://rspec-support//lib/rspec/support.rb#105
|
156
|
+
def failure_notifier=(callable); end
|
157
|
+
|
158
|
+
# @private
|
159
|
+
# @return [Boolean]
|
160
|
+
#
|
161
|
+
# source://rspec-support//lib/rspec/support/matcher_definition.rb#29
|
162
|
+
def is_a_matcher?(object); end
|
163
|
+
|
164
|
+
# @private
|
165
|
+
#
|
166
|
+
# source://rspec-support//lib/rspec/support/matcher_definition.rb#6
|
167
|
+
def matcher_definitions; end
|
168
|
+
|
169
|
+
# source://rspec-support//lib/rspec/support.rb#54
|
170
|
+
def method_handle_for(object, method_name); end
|
171
|
+
|
172
|
+
# @api private
|
173
|
+
#
|
174
|
+
# source://rspec-support//lib/rspec/support.rb#118
|
175
|
+
def notify_failure(failure, options = T.unsafe(nil)); end
|
176
|
+
|
177
|
+
# Used internally to break cyclic dependency between mocks, expectations,
|
178
|
+
# and support. We don't currently have a consistent implementation of our
|
179
|
+
# matchers, though we are considering changing that:
|
180
|
+
# https://github.com/rspec/rspec-mocks/issues/513
|
181
|
+
#
|
182
|
+
# @private
|
183
|
+
#
|
184
|
+
# source://rspec-support//lib/rspec/support/matcher_definition.rb#16
|
185
|
+
def register_matcher_definition(&block); end
|
186
|
+
|
187
|
+
# source://rspec-support//lib/rspec/support.rb#25
|
188
|
+
def require_rspec_core(f); end
|
189
|
+
|
190
|
+
# source://rspec-support//lib/rspec/support.rb#25
|
191
|
+
def require_rspec_support(f); end
|
192
|
+
|
193
|
+
# gives a string representation of an object for use in RSpec descriptions
|
194
|
+
#
|
195
|
+
# @api private
|
196
|
+
#
|
197
|
+
# source://rspec-support//lib/rspec/support/matcher_definition.rb#36
|
198
|
+
def rspec_description_for_object(object); end
|
199
|
+
|
200
|
+
# source://rspec-support//lib/rspec/support.rb#95
|
201
|
+
def thread_local_data; end
|
202
|
+
|
203
|
+
# @api private
|
204
|
+
#
|
205
|
+
# source://rspec-support//lib/rspec/support.rb#140
|
206
|
+
def warning_notifier; end
|
207
|
+
|
208
|
+
# @api private
|
209
|
+
#
|
210
|
+
# source://rspec-support//lib/rspec/support.rb#133
|
211
|
+
def warning_notifier=(_arg0); end
|
212
|
+
|
213
|
+
# @api private
|
214
|
+
#
|
215
|
+
# source://rspec-support//lib/rspec/support.rb#123
|
216
|
+
def with_failure_notifier(callable); end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# @private
|
221
|
+
#
|
222
|
+
# source://rspec-support//lib/rspec/support.rb#145
|
223
|
+
module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue
|
224
|
+
class << self
|
225
|
+
# source://rspec-support//lib/rspec/support.rb#150
|
226
|
+
def ===(exception); end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
# These exceptions are dangerous to rescue as rescuing them
|
231
|
+
# would interfere with things we should not interfere with.
|
232
|
+
#
|
233
|
+
# source://rspec-support//lib/rspec/support.rb#148
|
234
|
+
RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array)
|
235
|
+
|
236
|
+
# Deals with the slightly different semantics of block arguments.
|
237
|
+
# For methods, arguments are required unless a default value is provided.
|
238
|
+
# For blocks, arguments are optional, even if no default value is provided.
|
239
|
+
#
|
240
|
+
# However, we want to treat block args as required since you virtually
|
241
|
+
# always want to pass a value for each received argument and our
|
242
|
+
# `and_yield` has treated block args as required for many years.
|
243
|
+
#
|
244
|
+
# @api private
|
245
|
+
#
|
246
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268
|
247
|
+
class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature
|
248
|
+
# @api private
|
249
|
+
#
|
250
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#270
|
251
|
+
def classify_parameters; end
|
252
|
+
end
|
253
|
+
|
254
|
+
# @private
|
255
|
+
#
|
256
|
+
# source://rspec-support//lib/rspec/support/comparable_version.rb#6
|
257
|
+
class RSpec::Support::ComparableVersion
|
258
|
+
include ::Comparable
|
259
|
+
|
260
|
+
# @return [ComparableVersion] a new instance of ComparableVersion
|
261
|
+
#
|
262
|
+
# source://rspec-support//lib/rspec/support/comparable_version.rb#11
|
263
|
+
def initialize(string); end
|
264
|
+
|
265
|
+
# source://rspec-support//lib/rspec/support/comparable_version.rb#15
|
266
|
+
def <=>(other); end
|
267
|
+
|
268
|
+
# source://rspec-support//lib/rspec/support/comparable_version.rb#37
|
269
|
+
def segments; end
|
270
|
+
|
271
|
+
# Returns the value of attribute string.
|
272
|
+
#
|
273
|
+
# source://rspec-support//lib/rspec/support/comparable_version.rb#9
|
274
|
+
def string; end
|
275
|
+
end
|
276
|
+
|
277
|
+
# @private
|
278
|
+
#
|
279
|
+
# source://rspec-support//lib/rspec/support.rb#110
|
280
|
+
RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc)
|
281
|
+
|
282
|
+
# @private
|
283
|
+
#
|
284
|
+
# source://rspec-support//lib/rspec/support.rb#137
|
285
|
+
RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc)
|
286
|
+
|
287
|
+
# source://rspec-support//lib/rspec/support/differ.rb#12
|
288
|
+
class RSpec::Support::Differ
|
289
|
+
# @return [Differ] a new instance of Differ
|
290
|
+
#
|
291
|
+
# source://rspec-support//lib/rspec/support/differ.rb#69
|
292
|
+
def initialize(opts = T.unsafe(nil)); end
|
293
|
+
|
294
|
+
# @return [Boolean]
|
295
|
+
#
|
296
|
+
# source://rspec-support//lib/rspec/support/differ.rb#65
|
297
|
+
def color?; end
|
298
|
+
|
299
|
+
# source://rspec-support//lib/rspec/support/differ.rb#13
|
300
|
+
def diff(actual, expected); end
|
301
|
+
|
302
|
+
# source://rspec-support//lib/rspec/support/differ.rb#59
|
303
|
+
def diff_as_object(actual, expected); end
|
304
|
+
|
305
|
+
# source://rspec-support//lib/rspec/support/differ.rb#30
|
306
|
+
def diff_as_string(actual, expected); end
|
307
|
+
|
308
|
+
private
|
309
|
+
|
310
|
+
# source://rspec-support//lib/rspec/support/differ.rb#130
|
311
|
+
def add_old_hunk_to_hunk(hunk, oldhunk); end
|
312
|
+
|
313
|
+
# source://rspec-support//lib/rspec/support/differ.rb#126
|
314
|
+
def add_to_output(output, string); end
|
315
|
+
|
316
|
+
# @return [Boolean]
|
317
|
+
#
|
318
|
+
# source://rspec-support//lib/rspec/support/differ.rb#80
|
319
|
+
def all_strings?(*args); end
|
320
|
+
|
321
|
+
# @return [Boolean]
|
322
|
+
#
|
323
|
+
# source://rspec-support//lib/rspec/support/differ.rb#84
|
324
|
+
def any_multiline_strings?(*args); end
|
325
|
+
|
326
|
+
# source://rspec-support//lib/rspec/support/differ.rb#155
|
327
|
+
def blue(text); end
|
328
|
+
|
329
|
+
# source://rspec-support//lib/rspec/support/differ.rb#117
|
330
|
+
def build_hunks(actual, expected); end
|
331
|
+
|
332
|
+
# source://rspec-support//lib/rspec/support/differ.rb#92
|
333
|
+
def coerce_to_string(string_or_array); end
|
334
|
+
|
335
|
+
# source://rspec-support//lib/rspec/support/differ.rb#143
|
336
|
+
def color(text, color_code); end
|
337
|
+
|
338
|
+
# source://rspec-support//lib/rspec/support/differ.rb#163
|
339
|
+
def color_diff(diff); end
|
340
|
+
|
341
|
+
# source://rspec-support//lib/rspec/support/differ.rb#97
|
342
|
+
def diffably_stringify(array); end
|
343
|
+
|
344
|
+
# source://rspec-support//lib/rspec/support/differ.rb#121
|
345
|
+
def finalize_output(output, final_line); end
|
346
|
+
|
347
|
+
# source://rspec-support//lib/rspec/support/differ.rb#139
|
348
|
+
def format_type; end
|
349
|
+
|
350
|
+
# source://rspec-support//lib/rspec/support/differ.rb#151
|
351
|
+
def green(text); end
|
352
|
+
|
353
|
+
# source://rspec-support//lib/rspec/support/differ.rb#204
|
354
|
+
def handle_encoding_errors(actual, expected); end
|
355
|
+
|
356
|
+
# source://rspec-support//lib/rspec/support/differ.rb#194
|
357
|
+
def hash_to_string(hash); end
|
358
|
+
|
359
|
+
# @return [Boolean]
|
360
|
+
#
|
361
|
+
# source://rspec-support//lib/rspec/support/differ.rb#108
|
362
|
+
def multiline?(string); end
|
363
|
+
|
364
|
+
# @return [Boolean]
|
365
|
+
#
|
366
|
+
# source://rspec-support//lib/rspec/support/differ.rb#88
|
367
|
+
def no_numbers?(*args); end
|
368
|
+
|
369
|
+
# @return [Boolean]
|
370
|
+
#
|
371
|
+
# source://rspec-support//lib/rspec/support/differ.rb#76
|
372
|
+
def no_procs?(*args); end
|
373
|
+
|
374
|
+
# source://rspec-support//lib/rspec/support/differ.rb#159
|
375
|
+
def normal(text); end
|
376
|
+
|
377
|
+
# source://rspec-support//lib/rspec/support/differ.rb#180
|
378
|
+
def object_to_string(object); end
|
379
|
+
|
380
|
+
# source://rspec-support//lib/rspec/support/differ.rb#147
|
381
|
+
def red(text); end
|
382
|
+
|
383
|
+
# source://rspec-support//lib/rspec/support/differ.rb#134
|
384
|
+
def safely_flatten(array); end
|
385
|
+
end
|
386
|
+
|
387
|
+
# Replacement for fileutils#mkdir_p because we don't want to require parts
|
388
|
+
# of stdlib in RSpec.
|
389
|
+
#
|
390
|
+
# @api private
|
391
|
+
#
|
392
|
+
# source://rspec-support//lib/rspec/support/directory_maker.rb#11
|
393
|
+
class RSpec::Support::DirectoryMaker
|
394
|
+
class << self
|
395
|
+
# Implements nested directory construction
|
396
|
+
#
|
397
|
+
# @api private
|
398
|
+
#
|
399
|
+
# source://rspec-support//lib/rspec/support/directory_maker.rb#15
|
400
|
+
def mkdir_p(path); end
|
401
|
+
|
402
|
+
private
|
403
|
+
|
404
|
+
# @api private
|
405
|
+
# @return [Boolean]
|
406
|
+
#
|
407
|
+
# source://rspec-support//lib/rspec/support/directory_maker.rb#57
|
408
|
+
def directory_exists?(dirname); end
|
409
|
+
|
410
|
+
# @api private
|
411
|
+
#
|
412
|
+
# source://rspec-support//lib/rspec/support/directory_maker.rb#52
|
413
|
+
def generate_path(stack, part); end
|
414
|
+
|
415
|
+
# @api private
|
416
|
+
#
|
417
|
+
# source://rspec-support//lib/rspec/support/directory_maker.rb#49
|
418
|
+
def generate_stack(path); end
|
419
|
+
end
|
420
|
+
end
|
421
|
+
|
422
|
+
# @private
|
423
|
+
#
|
424
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#6
|
425
|
+
class RSpec::Support::EncodedString
|
426
|
+
# @return [EncodedString] a new instance of EncodedString
|
427
|
+
#
|
428
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#16
|
429
|
+
def initialize(string, encoding = T.unsafe(nil)); end
|
430
|
+
|
431
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#28
|
432
|
+
def <<(string); end
|
433
|
+
|
434
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
435
|
+
def ==(*args, &block); end
|
436
|
+
|
437
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
438
|
+
def empty?(*args, &block); end
|
439
|
+
|
440
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
441
|
+
def encoding(*args, &block); end
|
442
|
+
|
443
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
444
|
+
def eql?(*args, &block); end
|
445
|
+
|
446
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#25
|
447
|
+
def lines(*args, &block); end
|
448
|
+
|
449
|
+
# Returns the value of attribute source_encoding.
|
450
|
+
#
|
451
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#21
|
452
|
+
def source_encoding; end
|
453
|
+
|
454
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#41
|
455
|
+
def split(regex_or_string); end
|
456
|
+
|
457
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#46
|
458
|
+
def to_s; end
|
459
|
+
|
460
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#46
|
461
|
+
def to_str; end
|
462
|
+
|
463
|
+
private
|
464
|
+
|
465
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#139
|
466
|
+
def detect_source_encoding(string); end
|
467
|
+
|
468
|
+
# Encoding Exceptions:
|
469
|
+
#
|
470
|
+
# Raised by Encoding and String methods:
|
471
|
+
# Encoding::UndefinedConversionError:
|
472
|
+
# when a transcoding operation fails
|
473
|
+
# if the String contains characters invalid for the target encoding
|
474
|
+
# e.g. "\x80".encode('UTF-8','ASCII-8BIT')
|
475
|
+
# vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '<undef>')
|
476
|
+
# # => '<undef>'
|
477
|
+
# Encoding::CompatibilityError
|
478
|
+
# when Encoding.compatible?(str1, str2) is nil
|
479
|
+
# e.g. utf_16le_emoji_string.split("\n")
|
480
|
+
# e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string
|
481
|
+
# Encoding::InvalidByteSequenceError:
|
482
|
+
# when the string being transcoded contains a byte invalid for
|
483
|
+
# either the source or target encoding
|
484
|
+
# e.g. "\x80".encode('UTF-8','US-ASCII')
|
485
|
+
# vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '<byte>')
|
486
|
+
# # => '<byte>'
|
487
|
+
# ArgumentError
|
488
|
+
# when operating on a string with invalid bytes
|
489
|
+
# e.g."\x80".split("\n")
|
490
|
+
# TypeError
|
491
|
+
# when a symbol is passed as an encoding
|
492
|
+
# Encoding.find(:"UTF-8")
|
493
|
+
# when calling force_encoding on an object
|
494
|
+
# that doesn't respond to #to_str
|
495
|
+
#
|
496
|
+
# Raised by transcoding methods:
|
497
|
+
# Encoding::ConverterNotFoundError:
|
498
|
+
# when a named encoding does not correspond with a known converter
|
499
|
+
# e.g. 'abc'.force_encoding('UTF-8').encode('foo')
|
500
|
+
# or a converter path cannot be found
|
501
|
+
# e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule')
|
502
|
+
#
|
503
|
+
# Raised by byte <-> char conversions
|
504
|
+
# RangeError: out of char range
|
505
|
+
# e.g. the UTF-16LE emoji: 128169.chr
|
506
|
+
#
|
507
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#93
|
508
|
+
def matching_encoding(string); end
|
509
|
+
|
510
|
+
# http://stackoverflow.com/a/8711118/879854
|
511
|
+
# Loop over chars in a string replacing chars
|
512
|
+
# with invalid encoding, which is a pretty good proxy
|
513
|
+
# for the invalid byte sequence that causes an ArgumentError
|
514
|
+
#
|
515
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#124
|
516
|
+
def remove_invalid_bytes(string); end
|
517
|
+
|
518
|
+
class << self
|
519
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#143
|
520
|
+
def pick_encoding(source_a, source_b); end
|
521
|
+
end
|
522
|
+
end
|
523
|
+
|
524
|
+
# Ruby's default replacement string is:
|
525
|
+
# U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else
|
526
|
+
# ? ("\x3F")
|
527
|
+
#
|
528
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#14
|
529
|
+
RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String)
|
530
|
+
|
531
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#9
|
532
|
+
RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String)
|
533
|
+
|
534
|
+
# Reduce allocations by storing constants.
|
535
|
+
#
|
536
|
+
# source://rspec-support//lib/rspec/support/encoded_string.rb#8
|
537
|
+
RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String)
|
538
|
+
|
539
|
+
# @private
|
540
|
+
#
|
541
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#9
|
542
|
+
class RSpec::Support::HunkGenerator
|
543
|
+
# @return [HunkGenerator] a new instance of HunkGenerator
|
544
|
+
#
|
545
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#10
|
546
|
+
def initialize(actual, expected); end
|
547
|
+
|
548
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#15
|
549
|
+
def hunks; end
|
550
|
+
|
551
|
+
private
|
552
|
+
|
553
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#32
|
554
|
+
def actual_lines; end
|
555
|
+
|
556
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#36
|
557
|
+
def build_hunk(piece); end
|
558
|
+
|
559
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#44
|
560
|
+
def context_lines; end
|
561
|
+
|
562
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#24
|
563
|
+
def diffs; end
|
564
|
+
|
565
|
+
# source://rspec-support//lib/rspec/support/hunk_generator.rb#28
|
566
|
+
def expected_lines; end
|
567
|
+
end
|
568
|
+
|
569
|
+
# @api private
|
570
|
+
#
|
571
|
+
# source://rspec-support//lib/rspec/support.rb#40
|
572
|
+
RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
573
|
+
|
574
|
+
# Allows matchers to be used instead of providing keyword arguments. In
|
575
|
+
# practice, when this happens only the arity of the method is verified.
|
576
|
+
#
|
577
|
+
# @private
|
578
|
+
#
|
579
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#395
|
580
|
+
class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier
|
581
|
+
private
|
582
|
+
|
583
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#398
|
584
|
+
def split_args(*args); end
|
585
|
+
end
|
586
|
+
|
587
|
+
# If a matcher is used in a signature in place of keyword arguments, all
|
588
|
+
# keyword argument validation needs to be skipped since the matcher is
|
589
|
+
# opaque.
|
590
|
+
#
|
591
|
+
# Instead, keyword arguments will be validated when the method is called
|
592
|
+
# and they are actually known.
|
593
|
+
#
|
594
|
+
# @private
|
595
|
+
#
|
596
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#415
|
597
|
+
class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
|
598
|
+
# @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher
|
599
|
+
#
|
600
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416
|
601
|
+
def initialize(signature); end
|
602
|
+
|
603
|
+
# @return [Boolean]
|
604
|
+
#
|
605
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#436
|
606
|
+
def has_kw_args_in?(args); end
|
607
|
+
|
608
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424
|
609
|
+
def invalid_kw_args_from(_kw_args); end
|
610
|
+
|
611
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420
|
612
|
+
def missing_kw_args_from(_kw_args); end
|
613
|
+
|
614
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428
|
615
|
+
def non_kw_args_arity_description; end
|
616
|
+
|
617
|
+
# @return [Boolean]
|
618
|
+
#
|
619
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432
|
620
|
+
def valid_non_kw_args?(*args); end
|
621
|
+
end
|
622
|
+
|
623
|
+
# Extracts info about the number of arguments and allowed/required
|
624
|
+
# keyword args of a given method.
|
625
|
+
#
|
626
|
+
# @private
|
627
|
+
#
|
628
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#13
|
629
|
+
class RSpec::Support::MethodSignature
|
630
|
+
# @return [MethodSignature] a new instance of MethodSignature
|
631
|
+
#
|
632
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#16
|
633
|
+
def initialize(method); end
|
634
|
+
|
635
|
+
# @return [Boolean]
|
636
|
+
#
|
637
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#98
|
638
|
+
def arbitrary_kw_args?; end
|
639
|
+
|
640
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#38
|
641
|
+
def classify_arity(arity = T.unsafe(nil)); end
|
642
|
+
|
643
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#106
|
644
|
+
def classify_parameters; end
|
645
|
+
|
646
|
+
# Without considering what the last arg is, could it
|
647
|
+
# contain keyword arguments?
|
648
|
+
#
|
649
|
+
# @return [Boolean]
|
650
|
+
#
|
651
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#92
|
652
|
+
def could_contain_kw_args?(args); end
|
653
|
+
|
654
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#51
|
655
|
+
def description; end
|
656
|
+
|
657
|
+
# If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments
|
658
|
+
# the rest will be grouped in another Hash and passed as positional argument.
|
659
|
+
#
|
660
|
+
# @return [Boolean]
|
661
|
+
#
|
662
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#84
|
663
|
+
def has_kw_args_in?(args); end
|
664
|
+
|
665
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#77
|
666
|
+
def invalid_kw_args_from(given_kw_args); end
|
667
|
+
|
668
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
669
|
+
def max_non_kw_args; end
|
670
|
+
|
671
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
672
|
+
def min_non_kw_args; end
|
673
|
+
|
674
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#73
|
675
|
+
def missing_kw_args_from(given_kw_args); end
|
676
|
+
|
677
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#23
|
678
|
+
def non_kw_args_arity_description; end
|
679
|
+
|
680
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
681
|
+
def optional_kw_args; end
|
682
|
+
|
683
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14
|
684
|
+
def required_kw_args; end
|
685
|
+
|
686
|
+
# @return [Boolean]
|
687
|
+
#
|
688
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#102
|
689
|
+
def unlimited_args?; end
|
690
|
+
|
691
|
+
# @return [Boolean]
|
692
|
+
#
|
693
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#31
|
694
|
+
def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end
|
695
|
+
end
|
696
|
+
|
697
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#162
|
698
|
+
RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float)
|
699
|
+
|
700
|
+
# Encapsulates expectations about the number of arguments and
|
701
|
+
# allowed/required keyword args of a given method.
|
702
|
+
#
|
703
|
+
# @api private
|
704
|
+
#
|
705
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#219
|
706
|
+
class RSpec::Support::MethodSignatureExpectation
|
707
|
+
# @api private
|
708
|
+
# @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation
|
709
|
+
#
|
710
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#220
|
711
|
+
def initialize; end
|
712
|
+
|
713
|
+
# @api private
|
714
|
+
# @return [Boolean]
|
715
|
+
#
|
716
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#247
|
717
|
+
def empty?; end
|
718
|
+
|
719
|
+
# @api private
|
720
|
+
#
|
721
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
722
|
+
def expect_arbitrary_keywords; end
|
723
|
+
|
724
|
+
# @api private
|
725
|
+
#
|
726
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
727
|
+
def expect_arbitrary_keywords=(_arg0); end
|
728
|
+
|
729
|
+
# @api private
|
730
|
+
#
|
731
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
732
|
+
def expect_unlimited_arguments; end
|
733
|
+
|
734
|
+
# @api private
|
735
|
+
#
|
736
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231
|
737
|
+
def expect_unlimited_arguments=(_arg0); end
|
738
|
+
|
739
|
+
# @api private
|
740
|
+
#
|
741
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
|
742
|
+
def keywords; end
|
743
|
+
|
744
|
+
# @api private
|
745
|
+
#
|
746
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#254
|
747
|
+
def keywords=(values); end
|
748
|
+
|
749
|
+
# @api private
|
750
|
+
#
|
751
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
|
752
|
+
def max_count; end
|
753
|
+
|
754
|
+
# @api private
|
755
|
+
# @raise [ArgumentError]
|
756
|
+
#
|
757
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#233
|
758
|
+
def max_count=(number); end
|
759
|
+
|
760
|
+
# @api private
|
761
|
+
#
|
762
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229
|
763
|
+
def min_count; end
|
764
|
+
|
765
|
+
# @api private
|
766
|
+
# @raise [ArgumentError]
|
767
|
+
#
|
768
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#240
|
769
|
+
def min_count=(number); end
|
770
|
+
end
|
771
|
+
|
772
|
+
# Abstract base class for signature verifiers.
|
773
|
+
#
|
774
|
+
# @api private
|
775
|
+
#
|
776
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#280
|
777
|
+
class RSpec::Support::MethodSignatureVerifier
|
778
|
+
# @api private
|
779
|
+
# @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier
|
780
|
+
#
|
781
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#283
|
782
|
+
def initialize(signature, args = T.unsafe(nil)); end
|
783
|
+
|
784
|
+
# @api private
|
785
|
+
#
|
786
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#326
|
787
|
+
def error_message; end
|
788
|
+
|
789
|
+
# @api private
|
790
|
+
#
|
791
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
792
|
+
def kw_args; end
|
793
|
+
|
794
|
+
# @api private
|
795
|
+
#
|
796
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
797
|
+
def max_non_kw_args; end
|
798
|
+
|
799
|
+
# @api private
|
800
|
+
#
|
801
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
802
|
+
def min_non_kw_args; end
|
803
|
+
|
804
|
+
# @api private
|
805
|
+
#
|
806
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281
|
807
|
+
def non_kw_args; end
|
808
|
+
|
809
|
+
# @api private
|
810
|
+
# @return [Boolean]
|
811
|
+
#
|
812
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#318
|
813
|
+
def valid?; end
|
814
|
+
|
815
|
+
# @api private
|
816
|
+
#
|
817
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#290
|
818
|
+
def with_expectation(expectation); end
|
819
|
+
|
820
|
+
private
|
821
|
+
|
822
|
+
# @api private
|
823
|
+
# @return [Boolean]
|
824
|
+
#
|
825
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#357
|
826
|
+
def arbitrary_kw_args?; end
|
827
|
+
|
828
|
+
# @api private
|
829
|
+
#
|
830
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#353
|
831
|
+
def invalid_kw_args; end
|
832
|
+
|
833
|
+
# @api private
|
834
|
+
#
|
835
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#349
|
836
|
+
def missing_kw_args; end
|
837
|
+
|
838
|
+
# @api private
|
839
|
+
#
|
840
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#365
|
841
|
+
def split_args(*args); end
|
842
|
+
|
843
|
+
# @api private
|
844
|
+
# @return [Boolean]
|
845
|
+
#
|
846
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#361
|
847
|
+
def unlimited_args?; end
|
848
|
+
|
849
|
+
# @api private
|
850
|
+
# @return [Boolean]
|
851
|
+
#
|
852
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#345
|
853
|
+
def valid_non_kw_args?; end
|
854
|
+
end
|
855
|
+
|
856
|
+
# On 1.9 and up, this is in core, so we just use the real one
|
857
|
+
#
|
858
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#65
|
859
|
+
class RSpec::Support::Mutex < ::Thread::Mutex
|
860
|
+
class << self
|
861
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#70
|
862
|
+
def new; end
|
863
|
+
end
|
864
|
+
end
|
865
|
+
|
866
|
+
# If you mock Mutex.new you break our usage of Mutex, so
|
867
|
+
# instead we capture the original method to return Mutexes.
|
868
|
+
#
|
869
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68
|
870
|
+
RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method)
|
871
|
+
|
872
|
+
# Provides query methods for different OS or OS features.
|
873
|
+
#
|
874
|
+
# @api private
|
875
|
+
#
|
876
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#11
|
877
|
+
module RSpec::Support::OS
|
878
|
+
private
|
879
|
+
|
880
|
+
# @api private
|
881
|
+
#
|
882
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#14
|
883
|
+
def windows?; end
|
884
|
+
|
885
|
+
# @api private
|
886
|
+
#
|
887
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#18
|
888
|
+
def windows_file_path?; end
|
889
|
+
|
890
|
+
class << self
|
891
|
+
# @api private
|
892
|
+
# @return [Boolean]
|
893
|
+
#
|
894
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#14
|
895
|
+
def windows?; end
|
896
|
+
|
897
|
+
# @api private
|
898
|
+
# @return [Boolean]
|
899
|
+
#
|
900
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#18
|
901
|
+
def windows_file_path?; end
|
902
|
+
end
|
903
|
+
end
|
904
|
+
|
905
|
+
# Provide additional output details beyond what `inspect` provides when
|
906
|
+
# printing Time, DateTime, or BigDecimal
|
907
|
+
#
|
908
|
+
# @api private
|
909
|
+
#
|
910
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#10
|
911
|
+
class RSpec::Support::ObjectFormatter
|
912
|
+
# @api private
|
913
|
+
# @return [ObjectFormatter] a new instance of ObjectFormatter
|
914
|
+
#
|
915
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#29
|
916
|
+
def initialize(max_formatted_output_length = T.unsafe(nil)); end
|
917
|
+
|
918
|
+
# @api private
|
919
|
+
#
|
920
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#34
|
921
|
+
def format(object); end
|
922
|
+
|
923
|
+
# @api private
|
924
|
+
#
|
925
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#13
|
926
|
+
def max_formatted_output_length; end
|
927
|
+
|
928
|
+
# @api private
|
929
|
+
#
|
930
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#13
|
931
|
+
def max_formatted_output_length=(_arg0); end
|
932
|
+
|
933
|
+
# @api private
|
934
|
+
#
|
935
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#70
|
936
|
+
def prepare_array(array); end
|
937
|
+
|
938
|
+
# @api private
|
939
|
+
#
|
940
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#94
|
941
|
+
def prepare_element(element); end
|
942
|
+
|
943
|
+
# Prepares the provided object to be formatted by wrapping it as needed
|
944
|
+
# in something that, when `inspect` is called on it, will produce the
|
945
|
+
# desired output.
|
946
|
+
#
|
947
|
+
# This allows us to apply the desired formatting to hash/array data structures
|
948
|
+
# at any level of nesting, simply by walking that structure and replacing items
|
949
|
+
# with custom items that have `inspect` defined to return the desired output
|
950
|
+
# for that item. Then we can just use `Array#inspect` or `Hash#inspect` to
|
951
|
+
# format the entire thing.
|
952
|
+
#
|
953
|
+
# @api private
|
954
|
+
#
|
955
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#58
|
956
|
+
def prepare_for_inspection(object); end
|
957
|
+
|
958
|
+
# @api private
|
959
|
+
#
|
960
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#76
|
961
|
+
def prepare_hash(input_hash); end
|
962
|
+
|
963
|
+
# @api private
|
964
|
+
# @return [Boolean]
|
965
|
+
#
|
966
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#113
|
967
|
+
def recursive_structure?(object); end
|
968
|
+
|
969
|
+
# @api private
|
970
|
+
#
|
971
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#86
|
972
|
+
def sort_hash_keys(input_hash); end
|
973
|
+
|
974
|
+
# @api private
|
975
|
+
#
|
976
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#106
|
977
|
+
def with_entering_structure(structure); end
|
978
|
+
|
979
|
+
private
|
980
|
+
|
981
|
+
# Returns the substring defined by the start_index and end_index
|
982
|
+
# If the string ends with a partial ANSI code code then that
|
983
|
+
# will be removed as printing partial ANSI
|
984
|
+
# codes to the terminal can lead to corruption
|
985
|
+
#
|
986
|
+
# @api private
|
987
|
+
#
|
988
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#268
|
989
|
+
def truncate_string(str, start_index, end_index); end
|
990
|
+
|
991
|
+
class << self
|
992
|
+
# Methods are deferred to a default instance of the class to maintain the interface
|
993
|
+
# For example, calling ObjectFormatter.format is still possible
|
994
|
+
#
|
995
|
+
# @api private
|
996
|
+
#
|
997
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#17
|
998
|
+
def default_instance; end
|
999
|
+
|
1000
|
+
# @api private
|
1001
|
+
#
|
1002
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#21
|
1003
|
+
def format(object); end
|
1004
|
+
|
1005
|
+
# @api private
|
1006
|
+
#
|
1007
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#25
|
1008
|
+
def prepare_for_inspection(object); end
|
1009
|
+
end
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
# @api private
|
1013
|
+
#
|
1014
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#127
|
1015
|
+
class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct
|
1016
|
+
# Returns the value of attribute formatter
|
1017
|
+
#
|
1018
|
+
# @return [Object] the current value of formatter
|
1019
|
+
def formatter; end
|
1020
|
+
|
1021
|
+
# Sets the attribute formatter
|
1022
|
+
#
|
1023
|
+
# @param value [Object] the value to set the attribute formatter to.
|
1024
|
+
# @return [Object] the newly set value
|
1025
|
+
def formatter=(_); end
|
1026
|
+
|
1027
|
+
# @api private
|
1028
|
+
# @raise [NotImplementedError]
|
1029
|
+
#
|
1030
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#132
|
1031
|
+
def inspect; end
|
1032
|
+
|
1033
|
+
# Returns the value of attribute object
|
1034
|
+
#
|
1035
|
+
# @return [Object] the current value of object
|
1036
|
+
def object; end
|
1037
|
+
|
1038
|
+
# Sets the attribute object
|
1039
|
+
#
|
1040
|
+
# @param value [Object] the value to set the attribute object to.
|
1041
|
+
# @return [Object] the newly set value
|
1042
|
+
def object=(_); end
|
1043
|
+
|
1044
|
+
# @api private
|
1045
|
+
#
|
1046
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#136
|
1047
|
+
def pretty_print(pp); end
|
1048
|
+
|
1049
|
+
class << self
|
1050
|
+
def [](*_arg0); end
|
1051
|
+
|
1052
|
+
# @api private
|
1053
|
+
# @raise [NotImplementedError]
|
1054
|
+
# @return [Boolean]
|
1055
|
+
#
|
1056
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#128
|
1057
|
+
def can_inspect?(_object); end
|
1058
|
+
|
1059
|
+
def inspect; end
|
1060
|
+
def keyword_init?; end
|
1061
|
+
def members; end
|
1062
|
+
def new(*_arg0); end
|
1063
|
+
end
|
1064
|
+
end
|
1065
|
+
|
1066
|
+
# @api private
|
1067
|
+
#
|
1068
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#177
|
1069
|
+
class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
1070
|
+
# @api private
|
1071
|
+
#
|
1072
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#182
|
1073
|
+
def inspect; end
|
1074
|
+
|
1075
|
+
class << self
|
1076
|
+
# @api private
|
1077
|
+
# @return [Boolean]
|
1078
|
+
#
|
1079
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#178
|
1080
|
+
def can_inspect?(object); end
|
1081
|
+
end
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
# @api private
|
1085
|
+
#
|
1086
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#159
|
1087
|
+
class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
1088
|
+
# ActiveSupport sometimes overrides inspect. If `ActiveSupport` is
|
1089
|
+
# defined use a custom format string that includes more time precision.
|
1090
|
+
#
|
1091
|
+
# @api private
|
1092
|
+
#
|
1093
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#168
|
1094
|
+
def inspect; end
|
1095
|
+
|
1096
|
+
class << self
|
1097
|
+
# @api private
|
1098
|
+
# @return [Boolean]
|
1099
|
+
#
|
1100
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#162
|
1101
|
+
def can_inspect?(object); end
|
1102
|
+
end
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
# @api private
|
1106
|
+
#
|
1107
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#160
|
1108
|
+
RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String)
|
1109
|
+
|
1110
|
+
# @api private
|
1111
|
+
#
|
1112
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#224
|
1113
|
+
class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
1114
|
+
# @api private
|
1115
|
+
#
|
1116
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#229
|
1117
|
+
def inspect; end
|
1118
|
+
|
1119
|
+
class << self
|
1120
|
+
# @api private
|
1121
|
+
# @return [Boolean]
|
1122
|
+
#
|
1123
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#225
|
1124
|
+
def can_inspect?(object); end
|
1125
|
+
end
|
1126
|
+
end
|
1127
|
+
|
1128
|
+
# @api private
|
1129
|
+
#
|
1130
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#187
|
1131
|
+
class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
1132
|
+
# @api private
|
1133
|
+
#
|
1134
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#192
|
1135
|
+
def inspect; end
|
1136
|
+
|
1137
|
+
class << self
|
1138
|
+
# @api private
|
1139
|
+
# @return [Boolean]
|
1140
|
+
#
|
1141
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#188
|
1142
|
+
def can_inspect?(object); end
|
1143
|
+
end
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
# @api private
|
1147
|
+
#
|
1148
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#11
|
1149
|
+
RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String)
|
1150
|
+
|
1151
|
+
# @api private
|
1152
|
+
#
|
1153
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#247
|
1154
|
+
RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array)
|
1155
|
+
|
1156
|
+
# @api private
|
1157
|
+
#
|
1158
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#117
|
1159
|
+
class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct
|
1160
|
+
# @api private
|
1161
|
+
#
|
1162
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#118
|
1163
|
+
def inspect; end
|
1164
|
+
|
1165
|
+
# @api private
|
1166
|
+
#
|
1167
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#122
|
1168
|
+
def pretty_print(pp); end
|
1169
|
+
|
1170
|
+
# Returns the value of attribute text
|
1171
|
+
#
|
1172
|
+
# @return [Object] the current value of text
|
1173
|
+
def text; end
|
1174
|
+
|
1175
|
+
# Sets the attribute text
|
1176
|
+
#
|
1177
|
+
# @param value [Object] the value to set the attribute text to.
|
1178
|
+
# @return [Object] the newly set value
|
1179
|
+
def text=(_); end
|
1180
|
+
|
1181
|
+
class << self
|
1182
|
+
def [](*_arg0); end
|
1183
|
+
def inspect; end
|
1184
|
+
def keyword_init?; end
|
1185
|
+
def members; end
|
1186
|
+
def new(*_arg0); end
|
1187
|
+
end
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
# @api private
|
1191
|
+
#
|
1192
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#234
|
1193
|
+
class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
1194
|
+
# @api private
|
1195
|
+
#
|
1196
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#242
|
1197
|
+
def inspect; end
|
1198
|
+
|
1199
|
+
class << self
|
1200
|
+
# @api private
|
1201
|
+
# @return [Boolean]
|
1202
|
+
#
|
1203
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#235
|
1204
|
+
def can_inspect?(object); end
|
1205
|
+
end
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
# @api private
|
1209
|
+
#
|
1210
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#141
|
1211
|
+
class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
1212
|
+
# for 1.8.7
|
1213
|
+
#
|
1214
|
+
# @api private
|
1215
|
+
#
|
1216
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#149
|
1217
|
+
def inspect; end
|
1218
|
+
|
1219
|
+
class << self
|
1220
|
+
# @api private
|
1221
|
+
# @return [Boolean]
|
1222
|
+
#
|
1223
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#144
|
1224
|
+
def can_inspect?(object); end
|
1225
|
+
end
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
# @api private
|
1229
|
+
#
|
1230
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#142
|
1231
|
+
RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String)
|
1232
|
+
|
1233
|
+
# @api private
|
1234
|
+
#
|
1235
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#197
|
1236
|
+
class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
|
1237
|
+
# @api private
|
1238
|
+
#
|
1239
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#207
|
1240
|
+
def inspect; end
|
1241
|
+
|
1242
|
+
# @api private
|
1243
|
+
#
|
1244
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#211
|
1245
|
+
def klass; end
|
1246
|
+
|
1247
|
+
# http://stackoverflow.com/a/2818916
|
1248
|
+
#
|
1249
|
+
# @api private
|
1250
|
+
#
|
1251
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#216
|
1252
|
+
def native_object_id; end
|
1253
|
+
|
1254
|
+
class << self
|
1255
|
+
# @api private
|
1256
|
+
# @return [Boolean]
|
1257
|
+
#
|
1258
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#200
|
1259
|
+
def can_inspect?(object); end
|
1260
|
+
end
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
# @api private
|
1264
|
+
#
|
1265
|
+
# source://rspec-support//lib/rspec/support/object_formatter.rb#198
|
1266
|
+
RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String)
|
1267
|
+
|
1268
|
+
# Provides recursive constant lookup methods useful for
|
1269
|
+
# constant stubbing.
|
1270
|
+
#
|
1271
|
+
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#7
|
1272
|
+
module RSpec::Support::RecursiveConstMethods
|
1273
|
+
# @return [Boolean]
|
1274
|
+
#
|
1275
|
+
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#45
|
1276
|
+
def const_defined_on?(mod, const_name); end
|
1277
|
+
|
1278
|
+
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#53
|
1279
|
+
def constants_defined_on(mod); end
|
1280
|
+
|
1281
|
+
# @raise [NameError]
|
1282
|
+
#
|
1283
|
+
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#49
|
1284
|
+
def get_const_defined_on(mod, const_name); end
|
1285
|
+
|
1286
|
+
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#73
|
1287
|
+
def normalize_const_name(const_name); end
|
1288
|
+
|
1289
|
+
# @return [Boolean]
|
1290
|
+
#
|
1291
|
+
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#64
|
1292
|
+
def recursive_const_defined?(const_name); end
|
1293
|
+
|
1294
|
+
# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#58
|
1295
|
+
def recursive_const_get(const_name); end
|
1296
|
+
end
|
1297
|
+
|
1298
|
+
# Allows a thread to lock out other threads from a critical section of code,
|
1299
|
+
# while allowing the thread with the lock to reenter that section.
|
1300
|
+
#
|
1301
|
+
# Based on Monitor as of 2.2 -
|
1302
|
+
# https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9
|
1303
|
+
#
|
1304
|
+
# Depends on Mutex, but Mutex is only available as part of core since 1.9.1:
|
1305
|
+
# exists - http://ruby-doc.org/core-1.9.1/Mutex.html
|
1306
|
+
# dne - http://ruby-doc.org/core-1.9.0/Mutex.html
|
1307
|
+
#
|
1308
|
+
# @private
|
1309
|
+
#
|
1310
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#16
|
1311
|
+
class RSpec::Support::ReentrantMutex
|
1312
|
+
# @return [ReentrantMutex] a new instance of ReentrantMutex
|
1313
|
+
#
|
1314
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#17
|
1315
|
+
def initialize; end
|
1316
|
+
|
1317
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#23
|
1318
|
+
def synchronize; end
|
1319
|
+
|
1320
|
+
private
|
1321
|
+
|
1322
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#35
|
1323
|
+
def enter; end
|
1324
|
+
|
1325
|
+
# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#40
|
1326
|
+
def exit; end
|
1327
|
+
end
|
1328
|
+
|
1329
|
+
# Provides query methods for different rubies
|
1330
|
+
#
|
1331
|
+
# @api private
|
1332
|
+
#
|
1333
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#26
|
1334
|
+
module RSpec::Support::Ruby
|
1335
|
+
private
|
1336
|
+
|
1337
|
+
# @api private
|
1338
|
+
#
|
1339
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#29
|
1340
|
+
def jruby?; end
|
1341
|
+
|
1342
|
+
# @api private
|
1343
|
+
#
|
1344
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#37
|
1345
|
+
def jruby_9000?; end
|
1346
|
+
|
1347
|
+
# @api private
|
1348
|
+
#
|
1349
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#33
|
1350
|
+
def jruby_version; end
|
1351
|
+
|
1352
|
+
# @api private
|
1353
|
+
#
|
1354
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#49
|
1355
|
+
def mri?; end
|
1356
|
+
|
1357
|
+
# @api private
|
1358
|
+
#
|
1359
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#45
|
1360
|
+
def non_mri?; end
|
1361
|
+
|
1362
|
+
# @api private
|
1363
|
+
#
|
1364
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#41
|
1365
|
+
def rbx?; end
|
1366
|
+
|
1367
|
+
# @api private
|
1368
|
+
#
|
1369
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#53
|
1370
|
+
def truffleruby?; end
|
1371
|
+
|
1372
|
+
class << self
|
1373
|
+
# @api private
|
1374
|
+
# @return [Boolean]
|
1375
|
+
#
|
1376
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#29
|
1377
|
+
def jruby?; end
|
1378
|
+
|
1379
|
+
# @api private
|
1380
|
+
# @return [Boolean]
|
1381
|
+
#
|
1382
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#37
|
1383
|
+
def jruby_9000?; end
|
1384
|
+
|
1385
|
+
# @api private
|
1386
|
+
#
|
1387
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#33
|
1388
|
+
def jruby_version; end
|
1389
|
+
|
1390
|
+
# @api private
|
1391
|
+
# @return [Boolean]
|
1392
|
+
#
|
1393
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#49
|
1394
|
+
def mri?; end
|
1395
|
+
|
1396
|
+
# @api private
|
1397
|
+
# @return [Boolean]
|
1398
|
+
#
|
1399
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#45
|
1400
|
+
def non_mri?; end
|
1401
|
+
|
1402
|
+
# @api private
|
1403
|
+
# @return [Boolean]
|
1404
|
+
#
|
1405
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#41
|
1406
|
+
def rbx?; end
|
1407
|
+
|
1408
|
+
# @api private
|
1409
|
+
# @return [Boolean]
|
1410
|
+
#
|
1411
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#53
|
1412
|
+
def truffleruby?; end
|
1413
|
+
end
|
1414
|
+
end
|
1415
|
+
|
1416
|
+
# Provides query methods for ruby features that differ among
|
1417
|
+
# implementations.
|
1418
|
+
#
|
1419
|
+
# @api private
|
1420
|
+
#
|
1421
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#62
|
1422
|
+
module RSpec::Support::RubyFeatures
|
1423
|
+
private
|
1424
|
+
|
1425
|
+
# @api private
|
1426
|
+
#
|
1427
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#85
|
1428
|
+
def caller_locations_supported?; end
|
1429
|
+
|
1430
|
+
# @api private
|
1431
|
+
#
|
1432
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#155
|
1433
|
+
def distincts_kw_args_from_positional_hash?; end
|
1434
|
+
|
1435
|
+
# On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
|
1436
|
+
# but when you try to fork, it raises an error:
|
1437
|
+
# NotImplementedError: fork is not available on this platform
|
1438
|
+
#
|
1439
|
+
# When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop
|
1440
|
+
# this special case.
|
1441
|
+
#
|
1442
|
+
# @api private
|
1443
|
+
# @return [Boolean]
|
1444
|
+
#
|
1445
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#76
|
1446
|
+
def fork_supported?; end
|
1447
|
+
|
1448
|
+
# https://rubyreferences.github.io/rubychanges/3.0.html#keyword-arguments-are-now-fully-separated-from-positional-arguments
|
1449
|
+
#
|
1450
|
+
# @api private
|
1451
|
+
# @return [Boolean]
|
1452
|
+
#
|
1453
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#111
|
1454
|
+
def kw_arg_separation?; end
|
1455
|
+
|
1456
|
+
# @api private
|
1457
|
+
# @return [Boolean]
|
1458
|
+
#
|
1459
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#160
|
1460
|
+
def kw_args_supported?; end
|
1461
|
+
|
1462
|
+
# @api private
|
1463
|
+
#
|
1464
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#216
|
1465
|
+
def module_prepends_supported?; end
|
1466
|
+
|
1467
|
+
# @api private
|
1468
|
+
#
|
1469
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#212
|
1470
|
+
def module_refinement_supported?; end
|
1471
|
+
|
1472
|
+
# @api private
|
1473
|
+
#
|
1474
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#81
|
1475
|
+
def optional_and_splat_args_supported?; end
|
1476
|
+
|
1477
|
+
# @api private
|
1478
|
+
# @return [Boolean]
|
1479
|
+
#
|
1480
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#164
|
1481
|
+
def required_kw_args_supported?; end
|
1482
|
+
|
1483
|
+
# @api private
|
1484
|
+
# @return [Boolean]
|
1485
|
+
#
|
1486
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#146
|
1487
|
+
def ripper_supported?; end
|
1488
|
+
|
1489
|
+
# @api private
|
1490
|
+
# @return [Boolean]
|
1491
|
+
#
|
1492
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#90
|
1493
|
+
def supports_exception_cause?; end
|
1494
|
+
|
1495
|
+
# @api private
|
1496
|
+
# @return [Boolean]
|
1497
|
+
#
|
1498
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#168
|
1499
|
+
def supports_rebinding_module_methods?; end
|
1500
|
+
|
1501
|
+
# @api private
|
1502
|
+
# @return [Boolean]
|
1503
|
+
#
|
1504
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#100
|
1505
|
+
def supports_syntax_suggest?; end
|
1506
|
+
|
1507
|
+
# @api private
|
1508
|
+
# @return [Boolean]
|
1509
|
+
#
|
1510
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#121
|
1511
|
+
def supports_taint?; end
|
1512
|
+
|
1513
|
+
class << self
|
1514
|
+
# @api private
|
1515
|
+
# @return [Boolean]
|
1516
|
+
#
|
1517
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#85
|
1518
|
+
def caller_locations_supported?; end
|
1519
|
+
|
1520
|
+
# @api private
|
1521
|
+
# @return [Boolean]
|
1522
|
+
#
|
1523
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#155
|
1524
|
+
def distincts_kw_args_from_positional_hash?; end
|
1525
|
+
|
1526
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#76
|
1527
|
+
def fork_supported?; end
|
1528
|
+
|
1529
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#111
|
1530
|
+
def kw_arg_separation?; end
|
1531
|
+
|
1532
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#160
|
1533
|
+
def kw_args_supported?; end
|
1534
|
+
|
1535
|
+
# @api private
|
1536
|
+
# @return [Boolean]
|
1537
|
+
#
|
1538
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#216
|
1539
|
+
def module_prepends_supported?; end
|
1540
|
+
|
1541
|
+
# @api private
|
1542
|
+
# @return [Boolean]
|
1543
|
+
#
|
1544
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#212
|
1545
|
+
def module_refinement_supported?; end
|
1546
|
+
|
1547
|
+
# @api private
|
1548
|
+
# @return [Boolean]
|
1549
|
+
#
|
1550
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#81
|
1551
|
+
def optional_and_splat_args_supported?; end
|
1552
|
+
|
1553
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#164
|
1554
|
+
def required_kw_args_supported?; end
|
1555
|
+
|
1556
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#146
|
1557
|
+
def ripper_supported?; end
|
1558
|
+
|
1559
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#90
|
1560
|
+
def supports_exception_cause?; end
|
1561
|
+
|
1562
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#168
|
1563
|
+
def supports_rebinding_module_methods?; end
|
1564
|
+
|
1565
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#100
|
1566
|
+
def supports_syntax_suggest?; end
|
1567
|
+
|
1568
|
+
# source://rspec-support//lib/rspec/support/ruby_features.rb#121
|
1569
|
+
def supports_taint?; end
|
1570
|
+
end
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
# Figures out whether a given method can accept various arguments.
|
1574
|
+
# Surprisingly non-trivial.
|
1575
|
+
#
|
1576
|
+
# @private
|
1577
|
+
#
|
1578
|
+
# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#389
|
1579
|
+
RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier
|
1580
|
+
|
1581
|
+
# source://rspec-support//lib/rspec/support/version.rb#5
|
1582
|
+
module RSpec::Support::Version; end
|
1583
|
+
|
1584
|
+
# source://rspec-support//lib/rspec/support/version.rb#6
|
1585
|
+
RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String)
|
1586
|
+
|
1587
|
+
# source://rspec-support//lib/rspec/support/warnings.rb#8
|
1588
|
+
module RSpec::Support::Warnings
|
1589
|
+
# source://rspec-support//lib/rspec/support/warnings.rb#9
|
1590
|
+
def deprecate(deprecated, options = T.unsafe(nil)); end
|
1591
|
+
|
1592
|
+
# Used internally to print deprecation warnings
|
1593
|
+
# when rspec-core isn't loaded
|
1594
|
+
#
|
1595
|
+
# @private
|
1596
|
+
#
|
1597
|
+
# source://rspec-support//lib/rspec/support/warnings.rb#17
|
1598
|
+
def warn_deprecation(message, options = T.unsafe(nil)); end
|
1599
|
+
|
1600
|
+
# Used internally to print longer warnings
|
1601
|
+
#
|
1602
|
+
# @private
|
1603
|
+
#
|
1604
|
+
# source://rspec-support//lib/rspec/support/warnings.rb#31
|
1605
|
+
def warn_with(message, options = T.unsafe(nil)); end
|
1606
|
+
|
1607
|
+
# Used internally to print warnings
|
1608
|
+
#
|
1609
|
+
# @private
|
1610
|
+
#
|
1611
|
+
# source://rspec-support//lib/rspec/support/warnings.rb#24
|
1612
|
+
def warning(text, options = T.unsafe(nil)); end
|
1613
|
+
end
|
1614
|
+
|
1615
|
+
# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#7
|
1616
|
+
module RSpec::Support::WithKeywordsWhenNeeded
|
1617
|
+
private
|
1618
|
+
|
1619
|
+
# Remove this in RSpec 4 in favour of explicitly passed in kwargs where
|
1620
|
+
# this is used. Works around a warning in Ruby 2.7
|
1621
|
+
#
|
1622
|
+
# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17
|
1623
|
+
def class_exec(klass, *args, **_arg2, &block); end
|
1624
|
+
|
1625
|
+
class << self
|
1626
|
+
# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17
|
1627
|
+
def class_exec(klass, *args, **_arg2, &block); end
|
1628
|
+
end
|
1629
|
+
end
|