vigiles 0.1.0.pre.beta3 → 0.1.0.pre.beta5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +10 -1
  3. data/lib/vigiles/archive/extras.rb +4 -3
  4. data/lib/vigiles/archive/metadata.rb +3 -2
  5. data/lib/vigiles/archive/request.rb +18 -4
  6. data/lib/vigiles/archive.rb +15 -3
  7. data/lib/vigiles/constants.rb +7 -0
  8. data/lib/vigiles/middleware/record_conversation.rb +6 -22
  9. data/lib/vigiles/spec.rb +1 -1
  10. data/lib/vigiles/utilities/uri.rb +18 -0
  11. data/lib/vigiles/version.rb +2 -2
  12. data/lib/vigiles.rb +5 -1
  13. data/sorbet/rbi/gems/{activemodel@7.0.5.rbi → actioncable@7.1.3.3.rbi} +2 -2
  14. data/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +8 -0
  15. data/sorbet/rbi/gems/{activerecord@7.0.5.rbi → actionmailer@7.1.3.3.rbi} +2 -2
  16. data/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +20046 -0
  17. data/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +8 -0
  18. data/sorbet/rbi/gems/actionview@7.1.3.3.rbi +15953 -0
  19. data/sorbet/rbi/gems/activejob@7.1.3.3.rbi +8 -0
  20. data/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +6657 -0
  21. data/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +41520 -0
  22. data/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +8 -0
  23. data/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +20570 -0
  24. data/sorbet/rbi/gems/base64@0.2.0.rbi +508 -0
  25. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +77 -0
  26. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  27. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  28. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  29. data/sorbet/rbi/gems/date@3.3.4.rbi +74 -0
  30. data/sorbet/rbi/gems/drb@2.2.1.rbi +1346 -0
  31. data/sorbet/rbi/gems/globalid@1.2.1.rbi +8 -0
  32. data/sorbet/rbi/gems/i18n@1.14.5.rbi +2358 -0
  33. data/sorbet/rbi/gems/io-console@0.7.2.rbi +8 -0
  34. data/sorbet/rbi/gems/loofah@2.22.0.rbi +1080 -0
  35. data/sorbet/rbi/gems/{i18n@1.14.1.rbi → mail@2.8.1.rbi} +2 -2
  36. data/sorbet/rbi/gems/marcel@1.0.4.rbi +8 -0
  37. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +8 -0
  38. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +93 -0
  39. data/sorbet/rbi/gems/net-imap@0.4.11.rbi +8 -0
  40. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +8 -0
  41. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +291 -0
  42. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +8 -0
  43. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +8 -0
  44. data/sorbet/rbi/gems/nokogiri@1.16.5.rbi +7310 -0
  45. data/sorbet/rbi/gems/psych@5.1.2.rbi +1768 -0
  46. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +729 -0
  47. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +749 -0
  48. data/sorbet/rbi/gems/rack@3.0.11.rbi +5195 -0
  49. data/sorbet/rbi/gems/rackup@2.1.0.rbi +406 -0
  50. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +691 -0
  51. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +721 -0
  52. data/sorbet/rbi/gems/rails@7.1.3.3.rbi +8 -0
  53. data/sorbet/rbi/gems/railties@7.1.3.3.rbi +2167 -0
  54. data/sorbet/rbi/gems/rdoc@6.6.3.1.rbi +12715 -0
  55. data/sorbet/rbi/gems/reline@0.5.7.rbi +8 -0
  56. data/sorbet/rbi/gems/stringio@3.1.0.rbi +8 -0
  57. data/sorbet/rbi/gems/timeout@0.4.1.rbi +148 -0
  58. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2606 -0
  59. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +8 -0
  60. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +8 -0
  61. data/sorbet/rbi/gems/zeitwerk@2.6.13.rbi +1003 -0
  62. data/vigiles.gemspec +1 -1
  63. metadata +54 -7
  64. data/sorbet/rbi/gems/activesupport@7.0.5.rbi +0 -14
@@ -0,0 +1,622 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `crass` gem.
5
+ # Please instead update this file by running `bin/tapioca gem crass`.
6
+
7
+ # A CSS parser based on the CSS Syntax Module Level 3 spec.
8
+ #
9
+ # source://crass//lib/crass/token-scanner.rb#3
10
+ module Crass
11
+ class << self
12
+ # Parses _input_ as a CSS stylesheet and returns a parse tree.
13
+ #
14
+ # See {Tokenizer#initialize} for _options_.
15
+ #
16
+ # source://crass//lib/crass.rb#10
17
+ def parse(input, options = T.unsafe(nil)); end
18
+
19
+ # Parses _input_ as a string of CSS properties (such as the contents of an
20
+ # HTML element's `style` attribute) and returns a parse tree.
21
+ #
22
+ # See {Tokenizer#initialize} for _options_.
23
+ #
24
+ # source://crass//lib/crass.rb#18
25
+ def parse_properties(input, options = T.unsafe(nil)); end
26
+ end
27
+ end
28
+
29
+ # Parses a CSS string or list of tokens.
30
+ #
31
+ # 5. http://dev.w3.org/csswg/css-syntax/#parsing
32
+ #
33
+ # source://crass//lib/crass/parser.rb#10
34
+ class Crass::Parser
35
+ # Initializes a parser based on the given _input_, which may be a CSS string
36
+ # or an array of tokens.
37
+ #
38
+ # See {Tokenizer#initialize} for _options_.
39
+ #
40
+ # @return [Parser] a new instance of Parser
41
+ #
42
+ # source://crass//lib/crass/parser.rb#126
43
+ def initialize(input, options = T.unsafe(nil)); end
44
+
45
+ # Consumes an at-rule and returns it.
46
+ #
47
+ # 5.4.2. http://dev.w3.org/csswg/css-syntax-3/#consume-at-rule
48
+ #
49
+ # source://crass//lib/crass/parser.rb#137
50
+ def consume_at_rule(input = T.unsafe(nil)); end
51
+
52
+ # Consumes a component value and returns it, or `nil` if there are no more
53
+ # tokens.
54
+ #
55
+ # 5.4.6. http://dev.w3.org/csswg/css-syntax-3/#consume-a-component-value
56
+ #
57
+ # source://crass//lib/crass/parser.rb#184
58
+ def consume_component_value(input = T.unsafe(nil)); end
59
+
60
+ # Consumes a declaration and returns it, or `nil` on parse error.
61
+ #
62
+ # 5.4.5. http://dev.w3.org/csswg/css-syntax-3/#consume-a-declaration
63
+ #
64
+ # source://crass//lib/crass/parser.rb#209
65
+ def consume_declaration(input = T.unsafe(nil)); end
66
+
67
+ # Consumes a list of declarations and returns them.
68
+ #
69
+ # By default, the returned list may include `:comment`, `:semicolon`, and
70
+ # `:whitespace` nodes, which is non-standard.
71
+ #
72
+ # Options:
73
+ #
74
+ # * **:strict** - Set to `true` to exclude non-standard `:comment`,
75
+ # `:semicolon`, and `:whitespace` nodes.
76
+ #
77
+ # 5.4.4. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-declarations
78
+ #
79
+ # source://crass//lib/crass/parser.rb#276
80
+ def consume_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end
81
+
82
+ # Consumes a function and returns it.
83
+ #
84
+ # 5.4.8. http://dev.w3.org/csswg/css-syntax-3/#consume-a-function
85
+ #
86
+ # source://crass//lib/crass/parser.rb#326
87
+ def consume_function(input = T.unsafe(nil)); end
88
+
89
+ # Consumes a qualified rule and returns it, or `nil` if a parse error
90
+ # occurs.
91
+ #
92
+ # 5.4.3. http://dev.w3.org/csswg/css-syntax-3/#consume-a-qualified-rule
93
+ #
94
+ # source://crass//lib/crass/parser.rb#357
95
+ def consume_qualified_rule(input = T.unsafe(nil)); end
96
+
97
+ # Consumes a list of rules and returns them.
98
+ #
99
+ # 5.4.1. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-rules
100
+ #
101
+ # source://crass//lib/crass/parser.rb#398
102
+ def consume_rules(flags = T.unsafe(nil)); end
103
+
104
+ # Consumes and returns a simple block associated with the current input
105
+ # token.
106
+ #
107
+ # 5.4.7. http://dev.w3.org/csswg/css-syntax/#consume-a-simple-block
108
+ #
109
+ # source://crass//lib/crass/parser.rb#434
110
+ def consume_simple_block(input = T.unsafe(nil)); end
111
+
112
+ # Creates and returns a new parse node with the given _properties_.
113
+ #
114
+ # source://crass//lib/crass/parser.rb#458
115
+ def create_node(type, properties = T.unsafe(nil)); end
116
+
117
+ # Parses the given _input_ tokens into a selector node and returns it.
118
+ #
119
+ # Doesn't bother splitting the selector list into individual selectors or
120
+ # validating them. Feel free to do that yourself! It'll be fun!
121
+ #
122
+ # source://crass//lib/crass/parser.rb#466
123
+ def create_selector(input); end
124
+
125
+ # Creates a `:style_rule` node from the given qualified _rule_, and returns
126
+ # it.
127
+ #
128
+ # source://crass//lib/crass/parser.rb#474
129
+ def create_style_rule(rule); end
130
+
131
+ # Parses a single component value and returns it.
132
+ #
133
+ # 5.3.7. http://dev.w3.org/csswg/css-syntax-3/#parse-a-component-value
134
+ #
135
+ # source://crass//lib/crass/parser.rb#483
136
+ def parse_component_value(input = T.unsafe(nil)); end
137
+
138
+ # Parses a list of component values and returns an array of parsed tokens.
139
+ #
140
+ # 5.3.8. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-component-values
141
+ #
142
+ # source://crass//lib/crass/parser.rb#510
143
+ def parse_component_values(input = T.unsafe(nil)); end
144
+
145
+ # Parses a single declaration and returns it.
146
+ #
147
+ # 5.3.5. http://dev.w3.org/csswg/css-syntax/#parse-a-declaration
148
+ #
149
+ # source://crass//lib/crass/parser.rb#524
150
+ def parse_declaration(input = T.unsafe(nil)); end
151
+
152
+ # Parses a list of declarations and returns them.
153
+ #
154
+ # See {#consume_declarations} for _options_.
155
+ #
156
+ # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations
157
+ #
158
+ # source://crass//lib/crass/parser.rb#552
159
+ def parse_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end
160
+
161
+ # Parses a list of declarations and returns an array of `:property` nodes
162
+ # (and any non-declaration nodes that were in the input). This is useful for
163
+ # parsing the contents of an HTML element's `style` attribute.
164
+ #
165
+ # source://crass//lib/crass/parser.rb#560
166
+ def parse_properties(input = T.unsafe(nil)); end
167
+
168
+ # Parses a single rule and returns it.
169
+ #
170
+ # 5.3.4. http://dev.w3.org/csswg/css-syntax-3/#parse-a-rule
171
+ #
172
+ # source://crass//lib/crass/parser.rb#586
173
+ def parse_rule(input = T.unsafe(nil)); end
174
+
175
+ # Returns the unescaped value of a selector name or property declaration.
176
+ #
177
+ # source://crass//lib/crass/parser.rb#615
178
+ def parse_value(nodes); end
179
+
180
+ # {TokenScanner} wrapping the tokens generated from this parser's input.
181
+ #
182
+ # source://crass//lib/crass/parser.rb#120
183
+ def tokens; end
184
+
185
+ class << self
186
+ # Parses CSS properties (such as the contents of an HTML element's `style`
187
+ # attribute) and returns a parse tree.
188
+ #
189
+ # See {Tokenizer#initialize} for _options_.
190
+ #
191
+ # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations
192
+ #
193
+ # source://crass//lib/crass/parser.rb#25
194
+ def parse_properties(input, options = T.unsafe(nil)); end
195
+
196
+ # Parses CSS rules (such as the content of a `@media` block) and returns a
197
+ # parse tree. The only difference from {parse_stylesheet} is that CDO/CDC
198
+ # nodes (`<!--` and `-->`) aren't ignored.
199
+ #
200
+ # See {Tokenizer#initialize} for _options_.
201
+ #
202
+ # 5.3.3. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-rules
203
+ #
204
+ # source://crass//lib/crass/parser.rb#36
205
+ def parse_rules(input, options = T.unsafe(nil)); end
206
+
207
+ # Parses a CSS stylesheet and returns a parse tree.
208
+ #
209
+ # See {Tokenizer#initialize} for _options_.
210
+ #
211
+ # 5.3.2. http://dev.w3.org/csswg/css-syntax/#parse-a-stylesheet
212
+ #
213
+ # source://crass//lib/crass/parser.rb#54
214
+ def parse_stylesheet(input, options = T.unsafe(nil)); end
215
+
216
+ # Converts a node or array of nodes into a CSS string based on their
217
+ # original tokenized input.
218
+ #
219
+ # Options:
220
+ #
221
+ # * **:exclude_comments** - When `true`, comments will be excluded.
222
+ #
223
+ # source://crass//lib/crass/parser.rb#74
224
+ def stringify(nodes, options = T.unsafe(nil)); end
225
+ end
226
+ end
227
+
228
+ # source://crass//lib/crass/parser.rb#11
229
+ Crass::Parser::BLOCK_END_TOKENS = T.let(T.unsafe(nil), Hash)
230
+
231
+ # Similar to a StringScanner, but with extra functionality needed to tokenize
232
+ # CSS while preserving the original text.
233
+ #
234
+ # source://crass//lib/crass/scanner.rb#8
235
+ class Crass::Scanner
236
+ # Creates a Scanner instance for the given _input_ string or IO instance.
237
+ #
238
+ # @return [Scanner] a new instance of Scanner
239
+ #
240
+ # source://crass//lib/crass/scanner.rb#25
241
+ def initialize(input); end
242
+
243
+ # Consumes the next character and returns it, advancing the pointer, or
244
+ # an empty string if the end of the string has been reached.
245
+ #
246
+ # source://crass//lib/crass/scanner.rb#34
247
+ def consume; end
248
+
249
+ # Consumes the rest of the string and returns it, advancing the pointer to
250
+ # the end of the string. Returns an empty string is the end of the string
251
+ # has already been reached.
252
+ #
253
+ # source://crass//lib/crass/scanner.rb#46
254
+ def consume_rest; end
255
+
256
+ # Current character, or `nil` if the scanner hasn't yet consumed a
257
+ # character, or is at the end of the string.
258
+ #
259
+ # source://crass//lib/crass/scanner.rb#11
260
+ def current; end
261
+
262
+ # Returns `true` if the end of the string has been reached, `false`
263
+ # otherwise.
264
+ #
265
+ # @return [Boolean]
266
+ #
267
+ # source://crass//lib/crass/scanner.rb#57
268
+ def eos?; end
269
+
270
+ # Sets the marker to the position of the next character that will be
271
+ # consumed.
272
+ #
273
+ # source://crass//lib/crass/scanner.rb#63
274
+ def mark; end
275
+
276
+ # Returns the substring between {#marker} and {#pos}, without altering the
277
+ # pointer.
278
+ #
279
+ # source://crass//lib/crass/scanner.rb#69
280
+ def marked; end
281
+
282
+ # Current marker position. Use {#marked} to get the substring between
283
+ # {#marker} and {#pos}.
284
+ #
285
+ # source://crass//lib/crass/scanner.rb#15
286
+ def marker; end
287
+
288
+ # Current marker position. Use {#marked} to get the substring between
289
+ # {#marker} and {#pos}.
290
+ #
291
+ # source://crass//lib/crass/scanner.rb#15
292
+ def marker=(_arg0); end
293
+
294
+ # Returns up to _length_ characters starting at the current position, but
295
+ # doesn't consume them. The number of characters returned may be less than
296
+ # _length_ if the end of the string is reached.
297
+ #
298
+ # source://crass//lib/crass/scanner.rb#80
299
+ def peek(length = T.unsafe(nil)); end
300
+
301
+ # Position of the next character that will be consumed. This is a character
302
+ # position, not a byte position, so it accounts for multi-byte characters.
303
+ #
304
+ # source://crass//lib/crass/scanner.rb#19
305
+ def pos; end
306
+
307
+ # Position of the next character that will be consumed. This is a character
308
+ # position, not a byte position, so it accounts for multi-byte characters.
309
+ #
310
+ # source://crass//lib/crass/scanner.rb#19
311
+ def pos=(_arg0); end
312
+
313
+ # Moves the pointer back one character without changing the value of
314
+ # {#current}. The next call to {#consume} will re-consume the current
315
+ # character.
316
+ #
317
+ # source://crass//lib/crass/scanner.rb#87
318
+ def reconsume; end
319
+
320
+ # Resets the pointer to the beginning of the string.
321
+ #
322
+ # source://crass//lib/crass/scanner.rb#93
323
+ def reset; end
324
+
325
+ # Tries to match _pattern_ at the current position. If it matches, the
326
+ # matched substring will be returned and the pointer will be advanced.
327
+ # Otherwise, `nil` will be returned.
328
+ #
329
+ # source://crass//lib/crass/scanner.rb#103
330
+ def scan(pattern); end
331
+
332
+ # Scans the string until the _pattern_ is matched. Returns the substring up
333
+ # to and including the end of the match, and advances the pointer. If there
334
+ # is no match, `nil` is returned and the pointer is not advanced.
335
+ #
336
+ # source://crass//lib/crass/scanner.rb#115
337
+ def scan_until(pattern); end
338
+
339
+ # String being scanned.
340
+ #
341
+ # source://crass//lib/crass/scanner.rb#22
342
+ def string; end
343
+ end
344
+
345
+ # Like {Scanner}, but for tokens!
346
+ #
347
+ # source://crass//lib/crass/token-scanner.rb#6
348
+ class Crass::TokenScanner
349
+ # @return [TokenScanner] a new instance of TokenScanner
350
+ #
351
+ # source://crass//lib/crass/token-scanner.rb#9
352
+ def initialize(tokens); end
353
+
354
+ # Executes the given block, collects all tokens that are consumed during its
355
+ # execution, and returns them.
356
+ #
357
+ # source://crass//lib/crass/token-scanner.rb#16
358
+ def collect; end
359
+
360
+ # Consumes the next token and returns it, advancing the pointer. Returns
361
+ # `nil` if there is no next token.
362
+ #
363
+ # source://crass//lib/crass/token-scanner.rb#24
364
+ def consume; end
365
+
366
+ # Returns the value of attribute current.
367
+ #
368
+ # source://crass//lib/crass/token-scanner.rb#7
369
+ def current; end
370
+
371
+ # Returns the next token without consuming it, or `nil` if there is no next
372
+ # token.
373
+ #
374
+ # source://crass//lib/crass/token-scanner.rb#32
375
+ def peek; end
376
+
377
+ # Returns the value of attribute pos.
378
+ #
379
+ # source://crass//lib/crass/token-scanner.rb#7
380
+ def pos; end
381
+
382
+ # Reconsumes the current token, moving the pointer back one position.
383
+ #
384
+ # http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/#reconsume-the-current-input-token
385
+ #
386
+ # source://crass//lib/crass/token-scanner.rb#39
387
+ def reconsume; end
388
+
389
+ # Resets the pointer to the first token in the list.
390
+ #
391
+ # source://crass//lib/crass/token-scanner.rb#44
392
+ def reset; end
393
+
394
+ # Returns the value of attribute tokens.
395
+ #
396
+ # source://crass//lib/crass/token-scanner.rb#7
397
+ def tokens; end
398
+ end
399
+
400
+ # Tokenizes a CSS string.
401
+ #
402
+ # 4. http://dev.w3.org/csswg/css-syntax/#tokenization
403
+ #
404
+ # source://crass//lib/crass/tokenizer.rb#9
405
+ class Crass::Tokenizer
406
+ # Initializes a new Tokenizer.
407
+ #
408
+ # Options:
409
+ #
410
+ # * **:preserve_comments** - If `true`, comments will be preserved as
411
+ # `:comment` tokens.
412
+ #
413
+ # * **:preserve_hacks** - If `true`, certain non-standard browser hacks
414
+ # such as the IE "*" hack will be preserved even though they violate
415
+ # CSS 3 syntax rules.
416
+ #
417
+ # @return [Tokenizer] a new instance of Tokenizer
418
+ #
419
+ # source://crass//lib/crass/tokenizer.rb#62
420
+ def initialize(input, options = T.unsafe(nil)); end
421
+
422
+ # Consumes a token and returns the token that was consumed.
423
+ #
424
+ # 4.3.1. http://dev.w3.org/csswg/css-syntax/#consume-a-token
425
+ #
426
+ # source://crass//lib/crass/tokenizer.rb#70
427
+ def consume; end
428
+
429
+ # Consumes the remnants of a bad URL and returns the consumed text.
430
+ #
431
+ # 4.3.15. http://dev.w3.org/csswg/css-syntax/#consume-the-remnants-of-a-bad-url
432
+ #
433
+ # source://crass//lib/crass/tokenizer.rb#275
434
+ def consume_bad_url; end
435
+
436
+ # Consumes comments and returns them, or `nil` if no comments were consumed.
437
+ #
438
+ # 4.3.2. http://dev.w3.org/csswg/css-syntax/#consume-comments
439
+ #
440
+ # source://crass//lib/crass/tokenizer.rb#301
441
+ def consume_comments; end
442
+
443
+ # Consumes an escaped code point and returns its unescaped value.
444
+ #
445
+ # This method assumes that the `\` has already been consumed, and that the
446
+ # next character in the input has already been verified not to be a newline
447
+ # or EOF.
448
+ #
449
+ # 4.3.8. http://dev.w3.org/csswg/css-syntax/#consume-an-escaped-code-point
450
+ #
451
+ # source://crass//lib/crass/tokenizer.rb#326
452
+ def consume_escaped; end
453
+
454
+ # Consumes an ident-like token and returns it.
455
+ #
456
+ # 4.3.4. http://dev.w3.org/csswg/css-syntax/#consume-an-ident-like-token
457
+ #
458
+ # source://crass//lib/crass/tokenizer.rb#350
459
+ def consume_ident; end
460
+
461
+ # Consumes a name and returns it.
462
+ #
463
+ # 4.3.12. http://dev.w3.org/csswg/css-syntax/#consume-a-name
464
+ #
465
+ # source://crass//lib/crass/tokenizer.rb#375
466
+ def consume_name; end
467
+
468
+ # Consumes a number and returns a 3-element array containing the number's
469
+ # original representation, its numeric value, and its type (either
470
+ # `:integer` or `:number`).
471
+ #
472
+ # 4.3.13. http://dev.w3.org/csswg/css-syntax/#consume-a-number
473
+ #
474
+ # source://crass//lib/crass/tokenizer.rb#407
475
+ def consume_number; end
476
+
477
+ # Consumes a numeric token and returns it.
478
+ #
479
+ # 4.3.3. http://dev.w3.org/csswg/css-syntax/#consume-a-numeric-token
480
+ #
481
+ # source://crass//lib/crass/tokenizer.rb#430
482
+ def consume_numeric; end
483
+
484
+ # Consumes a string token that ends at the given character, and returns the
485
+ # token.
486
+ #
487
+ # 4.3.5. http://dev.w3.org/csswg/css-syntax/#consume-a-string-token
488
+ #
489
+ # source://crass//lib/crass/tokenizer.rb#469
490
+ def consume_string(ending = T.unsafe(nil)); end
491
+
492
+ # Consumes a Unicode range token and returns it. Assumes the initial "u+" or
493
+ # "U+" has already been consumed.
494
+ #
495
+ # 4.3.7. http://dev.w3.org/csswg/css-syntax/#consume-a-unicode-range-token
496
+ #
497
+ # source://crass//lib/crass/tokenizer.rb#510
498
+ def consume_unicode_range; end
499
+
500
+ # Consumes a URL token and returns it. Assumes the original "url(" has
501
+ # already been consumed.
502
+ #
503
+ # 4.3.6. http://dev.w3.org/csswg/css-syntax/#consume-a-url-token
504
+ #
505
+ # source://crass//lib/crass/tokenizer.rb#542
506
+ def consume_url; end
507
+
508
+ # Converts a valid CSS number string into a number and returns the number.
509
+ #
510
+ # 4.3.14. http://dev.w3.org/csswg/css-syntax/#convert-a-string-to-a-number
511
+ #
512
+ # source://crass//lib/crass/tokenizer.rb#590
513
+ def convert_string_to_number(str); end
514
+
515
+ # Creates and returns a new token with the given _properties_.
516
+ #
517
+ # source://crass//lib/crass/tokenizer.rb#616
518
+ def create_token(type, properties = T.unsafe(nil)); end
519
+
520
+ # Preprocesses _input_ to prepare it for the tokenizer.
521
+ #
522
+ # 3.3. http://dev.w3.org/csswg/css-syntax/#input-preprocessing
523
+ #
524
+ # source://crass//lib/crass/tokenizer.rb#627
525
+ def preprocess(input); end
526
+
527
+ # Returns `true` if the given three-character _text_ would start an
528
+ # identifier. If _text_ is `nil`, the current and next two characters in the
529
+ # input stream will be checked, but will not be consumed.
530
+ #
531
+ # 4.3.10. http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier
532
+ #
533
+ # @return [Boolean]
534
+ #
535
+ # source://crass//lib/crass/tokenizer.rb#642
536
+ def start_identifier?(text = T.unsafe(nil)); end
537
+
538
+ # Returns `true` if the given three-character _text_ would start a number.
539
+ # If _text_ is `nil`, the current and next two characters in the input
540
+ # stream will be checked, but will not be consumed.
541
+ #
542
+ # 4.3.11. http://dev.w3.org/csswg/css-syntax/#starts-with-a-number
543
+ #
544
+ # @return [Boolean]
545
+ #
546
+ # source://crass//lib/crass/tokenizer.rb#666
547
+ def start_number?(text = T.unsafe(nil)); end
548
+
549
+ # Tokenizes the input stream and returns an array of tokens.
550
+ #
551
+ # source://crass//lib/crass/tokenizer.rb#685
552
+ def tokenize; end
553
+
554
+ # Returns `true` if the given two-character _text_ is the beginning of a
555
+ # valid escape sequence. If _text_ is `nil`, the current and next character
556
+ # in the input stream will be checked, but will not be consumed.
557
+ #
558
+ # 4.3.9. http://dev.w3.org/csswg/css-syntax/#starts-with-a-valid-escape
559
+ #
560
+ # @return [Boolean]
561
+ #
562
+ # source://crass//lib/crass/tokenizer.rb#702
563
+ def valid_escape?(text = T.unsafe(nil)); end
564
+
565
+ class << self
566
+ # Tokenizes the given _input_ as a CSS string and returns an array of
567
+ # tokens.
568
+ #
569
+ # See {#initialize} for _options_.
570
+ #
571
+ # source://crass//lib/crass/tokenizer.rb#45
572
+ def tokenize(input, options = T.unsafe(nil)); end
573
+ end
574
+ end
575
+
576
+ # source://crass//lib/crass/tokenizer.rb#10
577
+ Crass::Tokenizer::RE_COMMENT_CLOSE = T.let(T.unsafe(nil), Regexp)
578
+
579
+ # source://crass//lib/crass/tokenizer.rb#11
580
+ Crass::Tokenizer::RE_DIGIT = T.let(T.unsafe(nil), Regexp)
581
+
582
+ # source://crass//lib/crass/tokenizer.rb#12
583
+ Crass::Tokenizer::RE_ESCAPE = T.let(T.unsafe(nil), Regexp)
584
+
585
+ # source://crass//lib/crass/tokenizer.rb#13
586
+ Crass::Tokenizer::RE_HEX = T.let(T.unsafe(nil), Regexp)
587
+
588
+ # source://crass//lib/crass/tokenizer.rb#14
589
+ Crass::Tokenizer::RE_NAME = T.let(T.unsafe(nil), Regexp)
590
+
591
+ # source://crass//lib/crass/tokenizer.rb#15
592
+ Crass::Tokenizer::RE_NAME_START = T.let(T.unsafe(nil), Regexp)
593
+
594
+ # source://crass//lib/crass/tokenizer.rb#16
595
+ Crass::Tokenizer::RE_NON_PRINTABLE = T.let(T.unsafe(nil), Regexp)
596
+
597
+ # source://crass//lib/crass/tokenizer.rb#17
598
+ Crass::Tokenizer::RE_NUMBER_DECIMAL = T.let(T.unsafe(nil), Regexp)
599
+
600
+ # source://crass//lib/crass/tokenizer.rb#18
601
+ Crass::Tokenizer::RE_NUMBER_EXPONENT = T.let(T.unsafe(nil), Regexp)
602
+
603
+ # source://crass//lib/crass/tokenizer.rb#19
604
+ Crass::Tokenizer::RE_NUMBER_SIGN = T.let(T.unsafe(nil), Regexp)
605
+
606
+ # source://crass//lib/crass/tokenizer.rb#21
607
+ Crass::Tokenizer::RE_NUMBER_STR = T.let(T.unsafe(nil), Regexp)
608
+
609
+ # source://crass//lib/crass/tokenizer.rb#33
610
+ Crass::Tokenizer::RE_QUOTED_URL_START = T.let(T.unsafe(nil), Regexp)
611
+
612
+ # source://crass//lib/crass/tokenizer.rb#35
613
+ Crass::Tokenizer::RE_UNICODE_RANGE_END = T.let(T.unsafe(nil), Regexp)
614
+
615
+ # source://crass//lib/crass/tokenizer.rb#34
616
+ Crass::Tokenizer::RE_UNICODE_RANGE_START = T.let(T.unsafe(nil), Regexp)
617
+
618
+ # source://crass//lib/crass/tokenizer.rb#36
619
+ Crass::Tokenizer::RE_WHITESPACE = T.let(T.unsafe(nil), Regexp)
620
+
621
+ # source://crass//lib/crass/tokenizer.rb#37
622
+ Crass::Tokenizer::RE_WHITESPACE_ANCHORED = T.let(T.unsafe(nil), Regexp)
@@ -0,0 +1,74 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `date` gem.
5
+ # Please instead update this file by running `bin/tapioca gem date`.
6
+
7
+ # source://date//lib/date.rb#6
8
+ class Date
9
+ include ::Comparable
10
+
11
+ # call-seq:
12
+ # infinite? -> false
13
+ #
14
+ # Returns +false+
15
+ #
16
+ # @return [Boolean]
17
+ #
18
+ # source://date//lib/date.rb#13
19
+ def infinite?; end
20
+ end
21
+
22
+ # source://date//lib/date.rb#17
23
+ class Date::Infinity < ::Numeric
24
+ # @return [Infinity] a new instance of Infinity
25
+ #
26
+ # source://date//lib/date.rb#19
27
+ def initialize(d = T.unsafe(nil)); end
28
+
29
+ # source://date//lib/date.rb#33
30
+ def +@; end
31
+
32
+ # source://date//lib/date.rb#32
33
+ def -@; end
34
+
35
+ # source://date//lib/date.rb#35
36
+ def <=>(other); end
37
+
38
+ # source://date//lib/date.rb#30
39
+ def abs; end
40
+
41
+ # source://date//lib/date.rb#51
42
+ def coerce(other); end
43
+
44
+ # @return [Boolean]
45
+ #
46
+ # source://date//lib/date.rb#26
47
+ def finite?; end
48
+
49
+ # @return [Boolean]
50
+ #
51
+ # source://date//lib/date.rb#27
52
+ def infinite?; end
53
+
54
+ # @return [Boolean]
55
+ #
56
+ # source://date//lib/date.rb#28
57
+ def nan?; end
58
+
59
+ # source://date//lib/date.rb#59
60
+ def to_f; end
61
+
62
+ # @return [Boolean]
63
+ #
64
+ # source://date//lib/date.rb#25
65
+ def zero?; end
66
+
67
+ protected
68
+
69
+ # source://date//lib/date.rb#21
70
+ def d; end
71
+ end
72
+
73
+ # source://date//lib/date.rb#7
74
+ Date::VERSION = T.let(T.unsafe(nil), String)