wal 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -7
  3. data/exe/wal +19 -14
  4. data/lib/wal/noop_watcher.rb +0 -4
  5. data/lib/wal/record_watcher.rb +4 -58
  6. data/lib/wal/replicator.rb +2 -21
  7. data/lib/wal/streaming_watcher.rb +0 -9
  8. data/lib/wal/version.rb +1 -2
  9. data/lib/wal/watcher.rb +0 -25
  10. data/lib/wal.rb +5 -64
  11. data/rbi/wal.rbi +21 -102
  12. metadata +2 -161
  13. data/sorbet/config +0 -7
  14. data/sorbet/rbi/annotations/.gitattributes +0 -1
  15. data/sorbet/rbi/annotations/activemodel.rbi +0 -89
  16. data/sorbet/rbi/annotations/activerecord.rbi +0 -98
  17. data/sorbet/rbi/annotations/activesupport.rbi +0 -463
  18. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  19. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  20. data/sorbet/rbi/gems/.gitattributes +0 -1
  21. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +0 -9
  22. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +0 -9
  23. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +0 -9
  24. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +0 -21122
  25. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +0 -9
  26. data/sorbet/rbi/gems/actionview@8.0.2.rbi +0 -16423
  27. data/sorbet/rbi/gems/activejob@8.0.2.rbi +0 -9
  28. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +0 -6866
  29. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +0 -43227
  30. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +0 -9
  31. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +0 -21110
  32. data/sorbet/rbi/gems/ast@2.4.3.rbi +0 -585
  33. data/sorbet/rbi/gems/base64@0.3.0.rbi +0 -545
  34. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +0 -619
  35. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +0 -78
  36. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
  37. data/sorbet/rbi/gems/commander@5.0.0.rbi +0 -9
  38. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +0 -11657
  39. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +0 -9
  40. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
  41. data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
  42. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +0 -1134
  43. data/sorbet/rbi/gems/docker-api@2.4.0.rbi +0 -1719
  44. data/sorbet/rbi/gems/docopt@0.6.1.rbi +0 -9
  45. data/sorbet/rbi/gems/drb@2.2.3.rbi +0 -1661
  46. data/sorbet/rbi/gems/erubi@1.13.1.rbi +0 -155
  47. data/sorbet/rbi/gems/excon@1.2.7.rbi +0 -1514
  48. data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
  49. data/sorbet/rbi/gems/highline@3.0.1.rbi +0 -9
  50. data/sorbet/rbi/gems/i18n@1.14.7.rbi +0 -2359
  51. data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
  52. data/sorbet/rbi/gems/logger@1.7.0.rbi +0 -963
  53. data/sorbet/rbi/gems/loofah@2.24.1.rbi +0 -1105
  54. data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
  55. data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
  56. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
  57. data/sorbet/rbi/gems/minitest@5.25.5.rbi +0 -1704
  58. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  59. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +0 -9
  60. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
  61. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
  62. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +0 -9
  63. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  64. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
  65. data/sorbet/rbi/gems/nokogiri@1.18.8.rbi +0 -8206
  66. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +0 -354
  67. data/sorbet/rbi/gems/parallel@1.27.0.rbi +0 -291
  68. data/sorbet/rbi/gems/parlour@9.1.1.rbi +0 -3071
  69. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +0 -7338
  70. data/sorbet/rbi/gems/pg-replication-protocol@0.0.7.rbi +0 -633
  71. data/sorbet/rbi/gems/pg@1.5.9.rbi +0 -2806
  72. data/sorbet/rbi/gems/pp@0.6.2.rbi +0 -368
  73. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +0 -477
  74. data/sorbet/rbi/gems/prism@1.4.0.rbi +0 -41732
  75. data/sorbet/rbi/gems/psych@5.2.3.rbi +0 -2435
  76. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -160
  77. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +0 -727
  78. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +0 -734
  79. data/sorbet/rbi/gems/rack@3.1.16.rbi +0 -4940
  80. data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
  81. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +0 -858
  82. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
  83. data/sorbet/rbi/gems/rails@8.0.2.rbi +0 -9
  84. data/sorbet/rbi/gems/railties@8.0.2.rbi +0 -3865
  85. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  86. data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3120
  87. data/sorbet/rbi/gems/rbi@0.3.6.rbi +0 -6893
  88. data/sorbet/rbi/gems/rbs@3.9.4.rbi +0 -6978
  89. data/sorbet/rbi/gems/rdoc@6.12.0.rbi +0 -12760
  90. data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2451
  91. data/sorbet/rbi/gems/rexml@3.4.1.rbi +0 -5240
  92. data/sorbet/rbi/gems/rspec-core@3.13.4.rbi +0 -11348
  93. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +0 -8189
  94. data/sorbet/rbi/gems/rspec-mocks@3.13.5.rbi +0 -5350
  95. data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +0 -164
  96. data/sorbet/rbi/gems/rspec-support@3.13.4.rbi +0 -1630
  97. data/sorbet/rbi/gems/rspec@3.13.1.rbi +0 -83
  98. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -75
  99. data/sorbet/rbi/gems/spoom@1.6.3.rbi +0 -6985
  100. data/sorbet/rbi/gems/stringio@3.1.5.rbi +0 -9
  101. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +0 -3628
  102. data/sorbet/rbi/gems/testcontainers-core@0.2.0.rbi +0 -1005
  103. data/sorbet/rbi/gems/testcontainers-postgres@0.2.0.rbi +0 -145
  104. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  105. data/sorbet/rbi/gems/timeout@0.4.3.rbi +0 -157
  106. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  107. data/sorbet/rbi/gems/uri@1.0.3.rbi +0 -2349
  108. data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
  109. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +0 -9
  110. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
  111. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  112. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18379
  113. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +0 -9
  114. data/sorbet/tapioca/config.yml +0 -5
  115. data/sorbet/tapioca/require.rb +0 -12
@@ -1,545 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `base64` gem.
5
- # Please instead update this file by running `bin/tapioca gem base64`.
6
-
7
-
8
- # \Module \Base64 provides methods for:
9
- #
10
- # - \Encoding a binary string (containing non-ASCII characters)
11
- # as a string of printable ASCII characters.
12
- # - Decoding such an encoded string.
13
- #
14
- # \Base64 is commonly used in contexts where binary data
15
- # is not allowed or supported:
16
- #
17
- # - Images in HTML or CSS files, or in URLs.
18
- # - Email attachments.
19
- #
20
- # A \Base64-encoded string is about one-third larger that its source.
21
- # See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64]
22
- # for more information.
23
- #
24
- # This module provides three pairs of encode/decode methods.
25
- # Your choices among these methods should depend on:
26
- #
27
- # - Which character set is to be used for encoding and decoding.
28
- # - Whether "padding" is to be used.
29
- # - Whether encoded strings are to contain newlines.
30
- #
31
- # Note: Examples on this page assume that the including program has executed:
32
- #
33
- # require 'base64'
34
- #
35
- # == \Encoding Character Sets
36
- #
37
- # A \Base64-encoded string consists only of characters from a 64-character set:
38
- #
39
- # - <tt>('A'..'Z')</tt>.
40
- # - <tt>('a'..'z')</tt>.
41
- # - <tt>('0'..'9')</tt>.
42
- # - <tt>=</tt>, the 'padding' character.
43
- # - Either:
44
- # - <tt>%w[+ /]</tt>:
45
- # {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045];
46
- # _not_ safe for URLs.
47
- # - <tt>%w[- _]</tt>:
48
- # {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648];
49
- # safe for URLs.
50
- #
51
- # If you are working with \Base64-encoded strings that will come from
52
- # or be put into URLs, you should choose this encoder-decoder pair
53
- # of RFC-4648-compliant methods:
54
- #
55
- # - Base64.urlsafe_encode64 and Base64.urlsafe_decode64.
56
- #
57
- # Otherwise, you may choose any of the pairs in this module,
58
- # including the pair above, or the RFC-2045-compliant pairs:
59
- #
60
- # - Base64.encode64 and Base64.decode64.
61
- # - Base64.strict_encode64 and Base64.strict_decode64.
62
- #
63
- # == Padding
64
- #
65
- # \Base64-encoding changes a triplet of input bytes
66
- # into a quartet of output characters.
67
- #
68
- # <b>Padding in Encode Methods</b>
69
- #
70
- # Padding -- extending an encoded string with zero, one, or two trailing
71
- # <tt>=</tt> characters -- is performed by methods Base64.encode64,
72
- # Base64.strict_encode64, and, by default, Base64.urlsafe_encode64:
73
- #
74
- # Base64.encode64('s') # => "cw==\n"
75
- # Base64.strict_encode64('s') # => "cw=="
76
- # Base64.urlsafe_encode64('s') # => "cw=="
77
- # Base64.urlsafe_encode64('s', padding: false) # => "cw"
78
- #
79
- # When padding is performed, the encoded string is always of length <em>4n</em>,
80
- # where +n+ is a non-negative integer:
81
- #
82
- # - Input bytes of length <em>3n</em> generate unpadded output characters
83
- # of length <em>4n</em>:
84
- #
85
- # # n = 1: 3 bytes => 4 characters.
86
- # Base64.strict_encode64('123') # => "MDEy"
87
- # # n = 2: 6 bytes => 8 characters.
88
- # Base64.strict_encode64('123456') # => "MDEyMzQ1"
89
- #
90
- # - Input bytes of length <em>3n+1</em> generate padded output characters
91
- # of length <em>4(n+1)</em>, with two padding characters at the end:
92
- #
93
- # # n = 1: 4 bytes => 8 characters.
94
- # Base64.strict_encode64('1234') # => "MDEyMw=="
95
- # # n = 2: 7 bytes => 12 characters.
96
- # Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng=="
97
- #
98
- # - Input bytes of length <em>3n+2</em> generate padded output characters
99
- # of length <em>4(n+1)</em>, with one padding character at the end:
100
- #
101
- # # n = 1: 5 bytes => 8 characters.
102
- # Base64.strict_encode64('12345') # => "MDEyMzQ="
103
- # # n = 2: 8 bytes => 12 characters.
104
- # Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc="
105
- #
106
- # When padding is suppressed, for a positive integer <em>n</em>:
107
- #
108
- # - Input bytes of length <em>3n</em> generate unpadded output characters
109
- # of length <em>4n</em>:
110
- #
111
- # # n = 1: 3 bytes => 4 characters.
112
- # Base64.urlsafe_encode64('123', padding: false) # => "MDEy"
113
- # # n = 2: 6 bytes => 8 characters.
114
- # Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1"
115
- #
116
- # - Input bytes of length <em>3n+1</em> generate unpadded output characters
117
- # of length <em>4n+2</em>, with two padding characters at the end:
118
- #
119
- # # n = 1: 4 bytes => 6 characters.
120
- # Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw"
121
- # # n = 2: 7 bytes => 10 characters.
122
- # Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng"
123
- #
124
- # - Input bytes of length <em>3n+2</em> generate unpadded output characters
125
- # of length <em>4n+3</em>, with one padding character at the end:
126
- #
127
- # # n = 1: 5 bytes => 7 characters.
128
- # Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ"
129
- # # m = 2: 8 bytes => 11 characters.
130
- # Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc"
131
- #
132
- # <b>Padding in Decode Methods</b>
133
- #
134
- # All of the \Base64 decode methods support (but do not require) padding.
135
- #
136
- # \Method Base64.decode64 does not check the size of the padding:
137
- #
138
- # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
139
- # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
140
- # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
141
- #
142
- # \Method Base64.strict_decode64 strictly enforces padding size:
143
- #
144
- # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
145
- # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
146
- # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
147
- #
148
- # \Method Base64.urlsafe_decode64 allows padding in the encoded string,
149
- # which if present, must be correct:
150
- # see {Padding}[Base64.html#module-Base64-label-Padding], above:
151
- #
152
- # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
153
- # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
154
- # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
155
- #
156
- # == Newlines
157
- #
158
- # An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64
159
- # has an embedded newline character
160
- # after each 60-character sequence, and, if non-empty, at the end:
161
- #
162
- # # No newline if empty.
163
- # encoded = Base64.encode64("\x00" * 0)
164
- # encoded.index("\n") # => nil
165
- #
166
- # # Newline at end of short output.
167
- # encoded = Base64.encode64("\x00" * 1)
168
- # encoded.size # => 4
169
- # encoded.index("\n") # => 4
170
- #
171
- # # Newline at end of longer output.
172
- # encoded = Base64.encode64("\x00" * 45)
173
- # encoded.size # => 60
174
- # encoded.index("\n") # => 60
175
- #
176
- # # Newlines embedded and at end of still longer output.
177
- # encoded = Base64.encode64("\x00" * 46)
178
- # encoded.size # => 65
179
- # encoded.rindex("\n") # => 65
180
- # encoded.split("\n").map {|s| s.size } # => [60, 4]
181
- #
182
- # The string to be encoded may itself contain newlines,
183
- # which are encoded as \Base64:
184
- #
185
- # # Base64.encode64("\n\n\n") # => "CgoK\n"
186
- # s = "This is line 1\nThis is line 2\n"
187
- # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
188
- #
189
- # source://base64//lib/base64.rb#184
190
- module Base64
191
- private
192
-
193
- # :call-seq:
194
- # Base64.decode(encoded_string) -> decoded_string
195
- #
196
- # Returns a string containing the decoding of an RFC-2045-compliant
197
- # \Base64-encoded string +encoded_string+:
198
- #
199
- # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
200
- # Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
201
- #
202
- # Non-\Base64 characters in +encoded_string+ are ignored;
203
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
204
- # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
205
- #
206
- # Base64.decode64("\x00\n-_") # => ""
207
- #
208
- # Padding in +encoded_string+ (even if incorrect) is ignored:
209
- #
210
- # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
211
- # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
212
- # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
213
- #
214
- # source://base64//lib/base64.rb#247
215
- def decode64(str); end
216
-
217
- # :call-seq:
218
- # Base64.encode64(string) -> encoded_string
219
- #
220
- # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+.
221
- #
222
- # Per RFC 2045, the returned string may contain the URL-unsafe characters
223
- # <tt>+</tt> or <tt>/</tt>;
224
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
225
- #
226
- # Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
227
- # Base64.encode64("\xFF\xFF\xFF") # => "////\n"
228
- #
229
- # The returned string may include padding;
230
- # see {Padding}[Base64.html#module-Base64-label-Padding] above.
231
- #
232
- # Base64.encode64('*') # => "Kg==\n"
233
- #
234
- # The returned string ends with a newline character, and if sufficiently long
235
- # will have one or more embedded newline characters;
236
- # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
237
- #
238
- # Base64.encode64('*') # => "Kg==\n"
239
- # Base64.encode64('*' * 46)
240
- # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
241
- #
242
- # The string to be encoded may itself contain newlines,
243
- # which will be encoded as ordinary \Base64:
244
- #
245
- # Base64.encode64("\n\n\n") # => "CgoK\n"
246
- # s = "This is line 1\nThis is line 2\n"
247
- # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
248
- #
249
- # source://base64//lib/base64.rb#222
250
- def encode64(bin); end
251
-
252
- # :call-seq:
253
- # Base64.strict_decode64(encoded_string) -> decoded_string
254
- #
255
- # Returns a string containing the decoding of an RFC-2045-compliant
256
- # \Base64-encoded string +encoded_string+:
257
- #
258
- # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
259
- # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
260
- #
261
- # Non-\Base64 characters in +encoded_string+ are not allowed;
262
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
263
- # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
264
- #
265
- # Base64.strict_decode64("\n") # Raises ArgumentError
266
- # Base64.strict_decode64('-') # Raises ArgumentError
267
- # Base64.strict_decode64('_') # Raises ArgumentError
268
- #
269
- # Padding in +encoded_string+, if present, must be correct:
270
- #
271
- # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
272
- # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
273
- # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
274
- #
275
- # source://base64//lib/base64.rb#309
276
- def strict_decode64(str); end
277
-
278
- # :call-seq:
279
- # Base64.strict_encode64(string) -> encoded_string
280
- #
281
- # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+.
282
- #
283
- # Per RFC 2045, the returned string may contain the URL-unsafe characters
284
- # <tt>+</tt> or <tt>/</tt>;
285
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
286
- #
287
- # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
288
- # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
289
- #
290
- # The returned string may include padding;
291
- # see {Padding}[Base64.html#module-Base64-label-Padding] above.
292
- #
293
- # Base64.strict_encode64('*') # => "Kg==\n"
294
- #
295
- # The returned string will have no newline characters, regardless of its length;
296
- # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
297
- #
298
- # Base64.strict_encode64('*') # => "Kg=="
299
- # Base64.strict_encode64('*' * 46)
300
- # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
301
- #
302
- # The string to be encoded may itself contain newlines,
303
- # which will be encoded as ordinary \Base64:
304
- #
305
- # Base64.strict_encode64("\n\n\n") # => "CgoK"
306
- # s = "This is line 1\nThis is line 2\n"
307
- # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
308
- #
309
- # source://base64//lib/base64.rb#282
310
- def strict_encode64(bin); end
311
-
312
- # :call-seq:
313
- # Base64.urlsafe_decode64(encoded_string) -> decoded_string
314
- #
315
- # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +encoded_string+:
316
- #
317
- # +encoded_string+ may not contain non-Base64 characters;
318
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
319
- #
320
- # Base64.urlsafe_decode64('+') # Raises ArgumentError.
321
- # Base64.urlsafe_decode64('/') # Raises ArgumentError.
322
- # Base64.urlsafe_decode64("\n") # Raises ArgumentError.
323
- #
324
- # Padding in +encoded_string+, if present, must be correct:
325
- # see {Padding}[Base64.html#module-Base64-label-Padding], above:
326
- #
327
- # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
328
- # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
329
- # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
330
- #
331
- # source://base64//lib/base64.rb#369
332
- def urlsafe_decode64(str); end
333
-
334
- # :call-seq:
335
- # Base64.urlsafe_encode64(string) -> encoded_string
336
- #
337
- # Returns the RFC-4648-compliant \Base64-encoding of +string+.
338
- #
339
- # Per RFC 4648, the returned string will not contain the URL-unsafe characters
340
- # <tt>+</tt> or <tt>/</tt>,
341
- # but instead may contain the URL-safe characters
342
- # <tt>-</tt> and <tt>_</tt>;
343
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
344
- #
345
- # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
346
- # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
347
- #
348
- # By default, the returned string may have padding;
349
- # see {Padding}[Base64.html#module-Base64-label-Padding], above:
350
- #
351
- # Base64.urlsafe_encode64('*') # => "Kg=="
352
- #
353
- # Optionally, you can suppress padding:
354
- #
355
- # Base64.urlsafe_encode64('*', padding: false) # => "Kg"
356
- #
357
- # The returned string will have no newline characters, regardless of its length;
358
- # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
359
- #
360
- # Base64.urlsafe_encode64('*') # => "Kg=="
361
- # Base64.urlsafe_encode64('*' * 46)
362
- # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
363
- #
364
- # source://base64//lib/base64.rb#343
365
- def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
366
-
367
- class << self
368
- # :call-seq:
369
- # Base64.decode(encoded_string) -> decoded_string
370
- #
371
- # Returns a string containing the decoding of an RFC-2045-compliant
372
- # \Base64-encoded string +encoded_string+:
373
- #
374
- # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
375
- # Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
376
- #
377
- # Non-\Base64 characters in +encoded_string+ are ignored;
378
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
379
- # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
380
- #
381
- # Base64.decode64("\x00\n-_") # => ""
382
- #
383
- # Padding in +encoded_string+ (even if incorrect) is ignored:
384
- #
385
- # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
386
- # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
387
- # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
388
- #
389
- # source://base64//lib/base64.rb#247
390
- def decode64(str); end
391
-
392
- # :call-seq:
393
- # Base64.encode64(string) -> encoded_string
394
- #
395
- # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+.
396
- #
397
- # Per RFC 2045, the returned string may contain the URL-unsafe characters
398
- # <tt>+</tt> or <tt>/</tt>;
399
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
400
- #
401
- # Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
402
- # Base64.encode64("\xFF\xFF\xFF") # => "////\n"
403
- #
404
- # The returned string may include padding;
405
- # see {Padding}[Base64.html#module-Base64-label-Padding] above.
406
- #
407
- # Base64.encode64('*') # => "Kg==\n"
408
- #
409
- # The returned string ends with a newline character, and if sufficiently long
410
- # will have one or more embedded newline characters;
411
- # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
412
- #
413
- # Base64.encode64('*') # => "Kg==\n"
414
- # Base64.encode64('*' * 46)
415
- # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
416
- #
417
- # The string to be encoded may itself contain newlines,
418
- # which will be encoded as ordinary \Base64:
419
- #
420
- # Base64.encode64("\n\n\n") # => "CgoK\n"
421
- # s = "This is line 1\nThis is line 2\n"
422
- # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
423
- #
424
- # source://base64//lib/base64.rb#222
425
- def encode64(bin); end
426
-
427
- # :call-seq:
428
- # Base64.strict_decode64(encoded_string) -> decoded_string
429
- #
430
- # Returns a string containing the decoding of an RFC-2045-compliant
431
- # \Base64-encoded string +encoded_string+:
432
- #
433
- # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
434
- # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
435
- #
436
- # Non-\Base64 characters in +encoded_string+ are not allowed;
437
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
438
- # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
439
- #
440
- # Base64.strict_decode64("\n") # Raises ArgumentError
441
- # Base64.strict_decode64('-') # Raises ArgumentError
442
- # Base64.strict_decode64('_') # Raises ArgumentError
443
- #
444
- # Padding in +encoded_string+, if present, must be correct:
445
- #
446
- # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
447
- # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
448
- # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
449
- #
450
- # source://base64//lib/base64.rb#309
451
- def strict_decode64(str); end
452
-
453
- # :call-seq:
454
- # Base64.strict_encode64(string) -> encoded_string
455
- #
456
- # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+.
457
- #
458
- # Per RFC 2045, the returned string may contain the URL-unsafe characters
459
- # <tt>+</tt> or <tt>/</tt>;
460
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
461
- #
462
- # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
463
- # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
464
- #
465
- # The returned string may include padding;
466
- # see {Padding}[Base64.html#module-Base64-label-Padding] above.
467
- #
468
- # Base64.strict_encode64('*') # => "Kg==\n"
469
- #
470
- # The returned string will have no newline characters, regardless of its length;
471
- # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
472
- #
473
- # Base64.strict_encode64('*') # => "Kg=="
474
- # Base64.strict_encode64('*' * 46)
475
- # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
476
- #
477
- # The string to be encoded may itself contain newlines,
478
- # which will be encoded as ordinary \Base64:
479
- #
480
- # Base64.strict_encode64("\n\n\n") # => "CgoK"
481
- # s = "This is line 1\nThis is line 2\n"
482
- # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
483
- #
484
- # source://base64//lib/base64.rb#282
485
- def strict_encode64(bin); end
486
-
487
- # :call-seq:
488
- # Base64.urlsafe_decode64(encoded_string) -> decoded_string
489
- #
490
- # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +encoded_string+:
491
- #
492
- # +encoded_string+ may not contain non-Base64 characters;
493
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
494
- #
495
- # Base64.urlsafe_decode64('+') # Raises ArgumentError.
496
- # Base64.urlsafe_decode64('/') # Raises ArgumentError.
497
- # Base64.urlsafe_decode64("\n") # Raises ArgumentError.
498
- #
499
- # Padding in +encoded_string+, if present, must be correct:
500
- # see {Padding}[Base64.html#module-Base64-label-Padding], above:
501
- #
502
- # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
503
- # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
504
- # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
505
- #
506
- # source://base64//lib/base64.rb#369
507
- def urlsafe_decode64(str); end
508
-
509
- # :call-seq:
510
- # Base64.urlsafe_encode64(string) -> encoded_string
511
- #
512
- # Returns the RFC-4648-compliant \Base64-encoding of +string+.
513
- #
514
- # Per RFC 4648, the returned string will not contain the URL-unsafe characters
515
- # <tt>+</tt> or <tt>/</tt>,
516
- # but instead may contain the URL-safe characters
517
- # <tt>-</tt> and <tt>_</tt>;
518
- # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
519
- #
520
- # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
521
- # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
522
- #
523
- # By default, the returned string may have padding;
524
- # see {Padding}[Base64.html#module-Base64-label-Padding], above:
525
- #
526
- # Base64.urlsafe_encode64('*') # => "Kg=="
527
- #
528
- # Optionally, you can suppress padding:
529
- #
530
- # Base64.urlsafe_encode64('*', padding: false) # => "Kg"
531
- #
532
- # The returned string will have no newline characters, regardless of its length;
533
- # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
534
- #
535
- # Base64.urlsafe_encode64('*') # => "Kg=="
536
- # Base64.urlsafe_encode64('*' * 46)
537
- # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
538
- #
539
- # source://base64//lib/base64.rb#343
540
- def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
541
- end
542
- end
543
-
544
- # source://base64//lib/base64.rb#186
545
- Base64::VERSION = T.let(T.unsafe(nil), String)