ruby-paseto 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +549 -0
- data/lib/paseto/asn1/algorithm_identifier.rb +17 -0
- data/lib/paseto/asn1/curve_private_key.rb +22 -0
- data/lib/paseto/asn1/ec_private_key.rb +27 -0
- data/lib/paseto/asn1/ecdsa_full_r.rb +26 -0
- data/lib/paseto/asn1/ecdsa_sig_value.rb +23 -0
- data/lib/paseto/asn1/ecdsa_signature.rb +49 -0
- data/lib/paseto/asn1/ed25519_identifier.rb +15 -0
- data/lib/paseto/asn1/named_curve.rb +17 -0
- data/lib/paseto/asn1/one_asymmetric_key.rb +32 -0
- data/lib/paseto/asn1/private_key.rb +17 -0
- data/lib/paseto/asn1/private_key_algorithm_identifier.rb +17 -0
- data/lib/paseto/asn1/public_key.rb +17 -0
- data/lib/paseto/asn1/subject_public_key_info.rb +28 -0
- data/lib/paseto/asn1.rb +101 -0
- data/lib/paseto/asymmetric_key.rb +100 -0
- data/lib/paseto/configuration/box.rb +23 -0
- data/lib/paseto/configuration/decode_configuration.rb +68 -0
- data/lib/paseto/configuration.rb +18 -0
- data/lib/paseto/interface/i_d.rb +23 -0
- data/lib/paseto/interface/key.rb +113 -0
- data/lib/paseto/interface/pbkd.rb +83 -0
- data/lib/paseto/interface/pie.rb +59 -0
- data/lib/paseto/interface/pke.rb +86 -0
- data/lib/paseto/interface/serializer.rb +19 -0
- data/lib/paseto/interface/version.rb +161 -0
- data/lib/paseto/interface/wrapper.rb +20 -0
- data/lib/paseto/operations/i_d.rb +48 -0
- data/lib/paseto/operations/id/i_dv3.rb +20 -0
- data/lib/paseto/operations/id/i_dv4.rb +20 -0
- data/lib/paseto/operations/pbkd/p_b_k_dv3.rb +85 -0
- data/lib/paseto/operations/pbkd/p_b_k_dv4.rb +94 -0
- data/lib/paseto/operations/pbkw.rb +73 -0
- data/lib/paseto/operations/pke/p_k_ev3.rb +97 -0
- data/lib/paseto/operations/pke/p_k_ev4.rb +95 -0
- data/lib/paseto/operations/pke.rb +57 -0
- data/lib/paseto/operations/wrap.rb +29 -0
- data/lib/paseto/paserk.rb +55 -0
- data/lib/paseto/paserk_types.rb +46 -0
- data/lib/paseto/protocol/version3.rb +100 -0
- data/lib/paseto/protocol/version4.rb +99 -0
- data/lib/paseto/result.rb +9 -0
- data/lib/paseto/serializer/optional_json.rb +30 -0
- data/lib/paseto/serializer/raw.rb +23 -0
- data/lib/paseto/sodium/curve_25519.rb +46 -0
- data/lib/paseto/sodium/safe_ed25519_loader.rb +19 -0
- data/lib/paseto/sodium/stream/base.rb +82 -0
- data/lib/paseto/sodium/stream/x_cha_cha20_xor.rb +31 -0
- data/lib/paseto/sodium.rb +5 -0
- data/lib/paseto/symmetric_key.rb +119 -0
- data/lib/paseto/token.rb +127 -0
- data/lib/paseto/token_types.rb +29 -0
- data/lib/paseto/util.rb +105 -0
- data/lib/paseto/v3/local.rb +63 -0
- data/lib/paseto/v3/public.rb +204 -0
- data/lib/paseto/v4/local.rb +56 -0
- data/lib/paseto/v4/public.rb +169 -0
- data/lib/paseto/validator.rb +154 -0
- data/lib/paseto/verifiers/footer.rb +30 -0
- data/lib/paseto/verifiers/payload.rb +42 -0
- data/lib/paseto/verify.rb +48 -0
- data/lib/paseto/version.rb +6 -0
- data/lib/paseto/versions.rb +25 -0
- data/lib/paseto/wrappers/pie/pie_v3.rb +72 -0
- data/lib/paseto/wrappers/pie/pie_v4.rb +72 -0
- data/lib/paseto/wrappers/pie.rb +71 -0
- data/lib/paseto.rb +99 -0
- data/paseto.gemspec +58 -0
- data/sorbet/config +3 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +376 -0
- data/sorbet/rbi/gems/ffi@1.15.5.rbi +1994 -0
- data/sorbet/rbi/gems/io-console@0.5.11.rbi +8 -0
- data/sorbet/rbi/gems/irb@1.5.1.rbi +342 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +267 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/oj@3.13.23.rbi +603 -0
- data/sorbet/rbi/gems/openssl@3.0.1.rbi +1735 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +407 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3021 -0
- data/sorbet/rbi/gems/rbnacl@7.1.1.rbi +3218 -0
- data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3481 -0
- data/sorbet/rbi/gems/reline@0.3.1.rbi +8 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10887 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5300 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1239 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +219 -0
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +2135 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/timecop@0.9.6.rbi +350 -0
- data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +48 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
- data/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +391 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17816 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.6.rbi +950 -0
- data/sorbet/rbi/shims/multi_json.rbi +19 -0
- data/sorbet/rbi/shims/openssl.rbi +111 -0
- data/sorbet/rbi/shims/rbnacl.rbi +65 -0
- data/sorbet/rbi/shims/zeitwerk.rbi +6 -0
- data/sorbet/rbi/todo.rbi +7 -0
- data/sorbet/tapioca/config.yml +30 -0
- data/sorbet/tapioca/require.rb +12 -0
- metadata +376 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
|
|
3
|
+
# DO NOT EDIT MANUALLY
|
|
4
|
+
# This is an autogenerated file for types exported from the `timecop` gem.
|
|
5
|
+
# Please instead update this file by running `bin/tapioca gem timecop`.
|
|
6
|
+
|
|
7
|
+
# source://timecop//lib/timecop/time_extensions.rb#31
|
|
8
|
+
class Date
|
|
9
|
+
include ::Comparable
|
|
10
|
+
|
|
11
|
+
class << self
|
|
12
|
+
# source://timecop//lib/timecop/time_extensions.rb#104
|
|
13
|
+
def closest_wday(wday); end
|
|
14
|
+
|
|
15
|
+
# source://timecop//lib/timecop/time_extensions.rb#33
|
|
16
|
+
def mock_date; end
|
|
17
|
+
|
|
18
|
+
# source://timecop//lib/timecop/time_extensions.rb#100
|
|
19
|
+
def mocked_time_stack_item; end
|
|
20
|
+
|
|
21
|
+
# source://timecop//lib/timecop/time_extensions.rb#78
|
|
22
|
+
def parse(*args); end
|
|
23
|
+
|
|
24
|
+
# source://timecop//lib/timecop/time_extensions.rb#78
|
|
25
|
+
def parse_with_mock_date(*args); end
|
|
26
|
+
|
|
27
|
+
# source://timecop//lib/timecop/time_extensions.rb#47
|
|
28
|
+
def strptime(str = T.unsafe(nil), fmt = T.unsafe(nil), start = T.unsafe(nil)); end
|
|
29
|
+
|
|
30
|
+
# source://timecop//lib/timecop/time_extensions.rb#47
|
|
31
|
+
def strptime_with_mock_date(str = T.unsafe(nil), fmt = T.unsafe(nil), start = T.unsafe(nil)); end
|
|
32
|
+
|
|
33
|
+
# source://timecop//lib/timecop/time_extensions.rb#39
|
|
34
|
+
def today; end
|
|
35
|
+
|
|
36
|
+
# source://timecop//lib/timecop/time_extensions.rb#39
|
|
37
|
+
def today_with_mock_date; end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# source://date/3.2.2/date.rb#7
|
|
42
|
+
Date::VERSION = T.let(T.unsafe(nil), String)
|
|
43
|
+
|
|
44
|
+
# source://timecop//lib/timecop/time_extensions.rb#113
|
|
45
|
+
class DateTime < ::Date
|
|
46
|
+
class << self
|
|
47
|
+
# source://timecop//lib/timecop/time_extensions.rb#115
|
|
48
|
+
def mock_time; end
|
|
49
|
+
|
|
50
|
+
# source://timecop//lib/timecop/time_extensions.rb#150
|
|
51
|
+
def mocked_time_stack_item; end
|
|
52
|
+
|
|
53
|
+
# source://timecop//lib/timecop/time_extensions.rb#119
|
|
54
|
+
def now; end
|
|
55
|
+
|
|
56
|
+
# source://timecop//lib/timecop/time_extensions.rb#119
|
|
57
|
+
def now_with_mock_time; end
|
|
58
|
+
|
|
59
|
+
# source://timecop//lib/timecop/time_extensions.rb#127
|
|
60
|
+
def parse(*args); end
|
|
61
|
+
|
|
62
|
+
# source://timecop//lib/timecop/time_extensions.rb#127
|
|
63
|
+
def parse_with_mock_date(*args); end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# source://timecop//lib/timecop/time_extensions.rb#4
|
|
68
|
+
class Time
|
|
69
|
+
include ::Comparable
|
|
70
|
+
|
|
71
|
+
class << self
|
|
72
|
+
# source://timecop//lib/timecop/time_extensions.rb#6
|
|
73
|
+
def mock_time; end
|
|
74
|
+
|
|
75
|
+
# source://timecop//lib/timecop/time_extensions.rb#21
|
|
76
|
+
def new(*args, **_arg1); end
|
|
77
|
+
|
|
78
|
+
# source://timecop//lib/timecop/time_extensions.rb#21
|
|
79
|
+
def new_with_mock_time(*args, **_arg1); end
|
|
80
|
+
|
|
81
|
+
# source://timecop//lib/timecop/time_extensions.rb#13
|
|
82
|
+
def now; end
|
|
83
|
+
|
|
84
|
+
# source://timecop//lib/timecop/time_extensions.rb#13
|
|
85
|
+
def now_with_mock_time; end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Timecop
|
|
90
|
+
# * Wrapper class for manipulating the extensions to the Time, Date, and DateTime objects
|
|
91
|
+
# * Allows us to "freeze" time in our Ruby applications.
|
|
92
|
+
# * Optionally allows time travel to simulate a running clock, such time is not technically frozen.
|
|
93
|
+
#
|
|
94
|
+
# This is very useful when your app's functionality is dependent on time (e.g.
|
|
95
|
+
# anything that might expire). This will allow us to alter the return value of
|
|
96
|
+
# Date.today, Time.now, and DateTime.now, such that our application code _never_ has to change.
|
|
97
|
+
#
|
|
98
|
+
# source://timecop//lib/timecop/time_stack_item.rb#1
|
|
99
|
+
class Timecop
|
|
100
|
+
include ::Singleton
|
|
101
|
+
extend ::Singleton::SingletonClassMethods
|
|
102
|
+
|
|
103
|
+
# @return [Timecop] a new instance of Timecop
|
|
104
|
+
#
|
|
105
|
+
# source://timecop//lib/timecop/timecop.rb#174
|
|
106
|
+
def initialize; end
|
|
107
|
+
|
|
108
|
+
# source://timecop//lib/timecop/timecop.rb#141
|
|
109
|
+
def baseline; end
|
|
110
|
+
|
|
111
|
+
# source://timecop//lib/timecop/timecop.rb#136
|
|
112
|
+
def baseline=(b); end
|
|
113
|
+
|
|
114
|
+
# source://timecop//lib/timecop/timecop.rb#209
|
|
115
|
+
def return(&block); end
|
|
116
|
+
|
|
117
|
+
# source://timecop//lib/timecop/timecop.rb#224
|
|
118
|
+
def return_to_baseline; end
|
|
119
|
+
|
|
120
|
+
# source://timecop//lib/timecop/timecop.rb#149
|
|
121
|
+
def set_baseline(b); end
|
|
122
|
+
|
|
123
|
+
# source://timecop//lib/timecop/timecop.rb#166
|
|
124
|
+
def set_stack(s); end
|
|
125
|
+
|
|
126
|
+
# source://timecop//lib/timecop/timecop.rb#157
|
|
127
|
+
def stack; end
|
|
128
|
+
|
|
129
|
+
# source://timecop//lib/timecop/timecop.rb#185
|
|
130
|
+
def thread_safe; end
|
|
131
|
+
|
|
132
|
+
# source://timecop//lib/timecop/timecop.rb#180
|
|
133
|
+
def thread_safe=(t); end
|
|
134
|
+
|
|
135
|
+
# @raise [SafeModeException]
|
|
136
|
+
#
|
|
137
|
+
# source://timecop//lib/timecop/timecop.rb#189
|
|
138
|
+
def travel(mock_type, *args, &block); end
|
|
139
|
+
|
|
140
|
+
# source://timecop//lib/timecop/timecop.rb#219
|
|
141
|
+
def unmock!; end
|
|
142
|
+
|
|
143
|
+
class << self
|
|
144
|
+
# source://timecop//lib/timecop/timecop.rb#78
|
|
145
|
+
def baseline; end
|
|
146
|
+
|
|
147
|
+
# source://timecop//lib/timecop/timecop.rb#82
|
|
148
|
+
def baseline=(baseline); end
|
|
149
|
+
|
|
150
|
+
# Allows you to run a block of code and "fake" a time throughout the execution of that block.
|
|
151
|
+
# This is particularly useful for writing test methods where the passage of time is critical to the business
|
|
152
|
+
# logic being tested. For example:
|
|
153
|
+
#
|
|
154
|
+
# joe = User.find(1)
|
|
155
|
+
# joe.purchase_home()
|
|
156
|
+
# assert !joe.mortgage_due?
|
|
157
|
+
# Timecop.freeze(2008, 10, 5) do
|
|
158
|
+
# assert joe.mortgage_due?
|
|
159
|
+
# end
|
|
160
|
+
#
|
|
161
|
+
# freeze and travel will respond to several different arguments:
|
|
162
|
+
# 1. Timecop.freeze(time_inst)
|
|
163
|
+
# 2. Timecop.freeze(datetime_inst)
|
|
164
|
+
# 3. Timecop.freeze(date_inst)
|
|
165
|
+
# 4. Timecop.freeze(offset_in_seconds)
|
|
166
|
+
# 5. Timecop.freeze(year, month, day, hour=0, minute=0, second=0)
|
|
167
|
+
# 6. Timecop.freeze() # Defaults to Time.now
|
|
168
|
+
#
|
|
169
|
+
# When a block is also passed, Time.now, DateTime.now and Date.today are all reset to their
|
|
170
|
+
# previous values after the block has finished executing. This allows us to nest multiple
|
|
171
|
+
# calls to Timecop.travel and have each block maintain it's concept of "now."
|
|
172
|
+
#
|
|
173
|
+
# * Note: Timecop.freeze will actually freeze time. This can cause unanticipated problems if
|
|
174
|
+
# benchmark or other timing calls are executed, which implicitly expect Time to actually move
|
|
175
|
+
# forward.
|
|
176
|
+
#
|
|
177
|
+
# * Rails Users: Be especially careful when setting this in your development environment in a
|
|
178
|
+
# rails project. Generators will load your environment, including the migration generator,
|
|
179
|
+
# which will lead to files being generated with the timestamp set by the Timecop.freeze call
|
|
180
|
+
# in your dev environment
|
|
181
|
+
#
|
|
182
|
+
# Returns the value of the block if one is given, or the mocked time.
|
|
183
|
+
#
|
|
184
|
+
# source://timecop//lib/timecop/timecop.rb#51
|
|
185
|
+
def freeze(*args, &block); end
|
|
186
|
+
|
|
187
|
+
# Returns whether or not Timecop is currently frozen/travelled
|
|
188
|
+
#
|
|
189
|
+
# @return [Boolean]
|
|
190
|
+
#
|
|
191
|
+
# source://timecop//lib/timecop/timecop.rb#125
|
|
192
|
+
def frozen?; end
|
|
193
|
+
|
|
194
|
+
# Reverts back to system's Time.now, Date.today and DateTime.now (if it exists) permamently when
|
|
195
|
+
# no block argument is given, or temporarily reverts back to the system's time temporarily for
|
|
196
|
+
# the given block.
|
|
197
|
+
#
|
|
198
|
+
# source://timecop//lib/timecop/timecop.rb#89
|
|
199
|
+
def return(&block); end
|
|
200
|
+
|
|
201
|
+
# source://timecop//lib/timecop/timecop.rb#99
|
|
202
|
+
def return_to_baseline; end
|
|
203
|
+
|
|
204
|
+
# source://timecop//lib/timecop/timecop.rb#108
|
|
205
|
+
def safe_mode=(safe); end
|
|
206
|
+
|
|
207
|
+
# @return [Boolean]
|
|
208
|
+
#
|
|
209
|
+
# source://timecop//lib/timecop/timecop.rb#112
|
|
210
|
+
def safe_mode?; end
|
|
211
|
+
|
|
212
|
+
# Allows you to run a block of code and "scale" a time throughout the execution of that block.
|
|
213
|
+
# The first argument is a scaling factor, for example:
|
|
214
|
+
# Timecop.scale(2) do
|
|
215
|
+
# ... time will 'go' twice as fast here
|
|
216
|
+
# end
|
|
217
|
+
# See Timecop#freeze for exact usage of the other arguments
|
|
218
|
+
#
|
|
219
|
+
# Returns the value of the block if one is given, or the mocked time.
|
|
220
|
+
#
|
|
221
|
+
# source://timecop//lib/timecop/timecop.rb#74
|
|
222
|
+
def scale(*args, &block); end
|
|
223
|
+
|
|
224
|
+
# source://timecop//lib/timecop/timecop.rb#120
|
|
225
|
+
def thread_safe; end
|
|
226
|
+
|
|
227
|
+
# source://timecop//lib/timecop/timecop.rb#116
|
|
228
|
+
def thread_safe=(t); end
|
|
229
|
+
|
|
230
|
+
# source://timecop//lib/timecop/timecop.rb#104
|
|
231
|
+
def top_stack_item; end
|
|
232
|
+
|
|
233
|
+
# Allows you to run a block of code and "fake" a time throughout the execution of that block.
|
|
234
|
+
# See Timecop#freeze for a sample of how to use (same exact usage syntax)
|
|
235
|
+
#
|
|
236
|
+
# * Note: Timecop.travel will not freeze time (as opposed to Timecop.freeze). This is a particularly
|
|
237
|
+
# good candidate for use in environment files in rails projects.
|
|
238
|
+
#
|
|
239
|
+
# Returns the value of the block if one is given, or the mocked time.
|
|
240
|
+
#
|
|
241
|
+
# source://timecop//lib/timecop/timecop.rb#62
|
|
242
|
+
def travel(*args, &block); end
|
|
243
|
+
|
|
244
|
+
# Reverts back to system's Time.now, Date.today and DateTime.now (if it exists) permamently when
|
|
245
|
+
# no block argument is given, or temporarily reverts back to the system's time temporarily for
|
|
246
|
+
# the given block.
|
|
247
|
+
#
|
|
248
|
+
# source://timecop//lib/timecop/timecop.rb#89
|
|
249
|
+
def unfreeze(&block); end
|
|
250
|
+
|
|
251
|
+
private
|
|
252
|
+
|
|
253
|
+
def allocate; end
|
|
254
|
+
|
|
255
|
+
# source://singleton/0.1.1/singleton.rb#123
|
|
256
|
+
def instance; end
|
|
257
|
+
|
|
258
|
+
def new(*_arg0); end
|
|
259
|
+
|
|
260
|
+
# source://timecop//lib/timecop/timecop.rb#130
|
|
261
|
+
def send_travel(mock_type, *args, &block); end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# source://timecop//lib/timecop/timecop.rb#232
|
|
266
|
+
class Timecop::SafeModeException < ::StandardError
|
|
267
|
+
# @return [SafeModeException] a new instance of SafeModeException
|
|
268
|
+
#
|
|
269
|
+
# source://timecop//lib/timecop/timecop.rb#233
|
|
270
|
+
def initialize; end
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# A data class for carrying around "time movement" objects. Makes it easy to keep track of the time
|
|
274
|
+
# movements on a simple stack.
|
|
275
|
+
#
|
|
276
|
+
# source://timecop//lib/timecop/time_stack_item.rb#4
|
|
277
|
+
class Timecop::TimeStackItem
|
|
278
|
+
# @return [TimeStackItem] a new instance of TimeStackItem
|
|
279
|
+
#
|
|
280
|
+
# source://timecop//lib/timecop/time_stack_item.rb#7
|
|
281
|
+
def initialize(mock_type, *args); end
|
|
282
|
+
|
|
283
|
+
# source://timecop//lib/timecop/time_stack_item.rb#77
|
|
284
|
+
def date(date_klass = T.unsafe(nil)); end
|
|
285
|
+
|
|
286
|
+
# source://timecop//lib/timecop/time_stack_item.rb#81
|
|
287
|
+
def datetime(datetime_klass = T.unsafe(nil)); end
|
|
288
|
+
|
|
289
|
+
# source://timecop//lib/timecop/time_stack_item.rb#25
|
|
290
|
+
def day; end
|
|
291
|
+
|
|
292
|
+
# source://timecop//lib/timecop/time_stack_item.rb#29
|
|
293
|
+
def hour; end
|
|
294
|
+
|
|
295
|
+
# source://timecop//lib/timecop/time_stack_item.rb#33
|
|
296
|
+
def min; end
|
|
297
|
+
|
|
298
|
+
# source://timecop//lib/timecop/time_stack_item.rb#5
|
|
299
|
+
def mock_type; end
|
|
300
|
+
|
|
301
|
+
# source://timecop//lib/timecop/time_stack_item.rb#21
|
|
302
|
+
def month; end
|
|
303
|
+
|
|
304
|
+
# source://timecop//lib/timecop/time_stack_item.rb#73
|
|
305
|
+
def scaled_time; end
|
|
306
|
+
|
|
307
|
+
# source://timecop//lib/timecop/time_stack_item.rb#53
|
|
308
|
+
def scaling_factor; end
|
|
309
|
+
|
|
310
|
+
# source://timecop//lib/timecop/time_stack_item.rb#37
|
|
311
|
+
def sec; end
|
|
312
|
+
|
|
313
|
+
# source://timecop//lib/timecop/time_stack_item.rb#57
|
|
314
|
+
def time(time_klass = T.unsafe(nil)); end
|
|
315
|
+
|
|
316
|
+
# source://timecop//lib/timecop/time_stack_item.rb#45
|
|
317
|
+
def travel_offset; end
|
|
318
|
+
|
|
319
|
+
# source://timecop//lib/timecop/time_stack_item.rb#49
|
|
320
|
+
def travel_offset_days; end
|
|
321
|
+
|
|
322
|
+
# source://timecop//lib/timecop/time_stack_item.rb#41
|
|
323
|
+
def utc_offset; end
|
|
324
|
+
|
|
325
|
+
# source://timecop//lib/timecop/time_stack_item.rb#17
|
|
326
|
+
def year; end
|
|
327
|
+
|
|
328
|
+
private
|
|
329
|
+
|
|
330
|
+
# source://timecop//lib/timecop/time_stack_item.rb#128
|
|
331
|
+
def compute_travel_offset; end
|
|
332
|
+
|
|
333
|
+
# source://timecop//lib/timecop/time_stack_item.rb#100
|
|
334
|
+
def parse_time(*args); end
|
|
335
|
+
|
|
336
|
+
# source://timecop//lib/timecop/time_stack_item.rb#92
|
|
337
|
+
def rational_to_utc_offset(rational); end
|
|
338
|
+
|
|
339
|
+
# source://timecop//lib/timecop/time_stack_item.rb#136
|
|
340
|
+
def time_klass; end
|
|
341
|
+
|
|
342
|
+
# source://timecop//lib/timecop/time_stack_item.rb#132
|
|
343
|
+
def times_are_equal_within_epsilon(t1, t2, epsilon_in_seconds); end
|
|
344
|
+
|
|
345
|
+
# source://timecop//lib/timecop/time_stack_item.rb#96
|
|
346
|
+
def utc_offset_to_rational(utc_offset); end
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
# source://timecop//lib/timecop/version.rb#2
|
|
350
|
+
Timecop::VERSION = T.let(T.unsafe(nil), String)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
# DO NOT EDIT MANUALLY
|
|
4
|
+
# This is an autogenerated file for types exported from the `unicode-display_width` gem.
|
|
5
|
+
# Please instead update this file by running `bin/tapioca gem unicode-display_width`.
|
|
6
|
+
|
|
7
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#3
|
|
8
|
+
module Unicode; end
|
|
9
|
+
|
|
10
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#4
|
|
11
|
+
class Unicode::DisplayWidth
|
|
12
|
+
# @return [DisplayWidth] a new instance of DisplayWidth
|
|
13
|
+
#
|
|
14
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#46
|
|
15
|
+
def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end
|
|
16
|
+
|
|
17
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#52
|
|
18
|
+
def get_config(**kwargs); end
|
|
19
|
+
|
|
20
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#60
|
|
21
|
+
def of(string, **kwargs); end
|
|
22
|
+
|
|
23
|
+
class << self
|
|
24
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#28
|
|
25
|
+
def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end
|
|
26
|
+
|
|
27
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#10
|
|
28
|
+
def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#7
|
|
33
|
+
Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String)
|
|
34
|
+
|
|
35
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#8
|
|
36
|
+
Unicode::DisplayWidth::DEPTHS = T.let(T.unsafe(nil), Array)
|
|
37
|
+
|
|
38
|
+
# source://unicode-display_width//lib/unicode/display_width/index.rb#11
|
|
39
|
+
Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array)
|
|
40
|
+
|
|
41
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#8
|
|
42
|
+
Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String)
|
|
43
|
+
|
|
44
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#6
|
|
45
|
+
Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String)
|
|
46
|
+
|
|
47
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#5
|
|
48
|
+
Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String)
|