packwerk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  3. data/.github/probots.yml +2 -0
  4. data/.github/pull_request_template.md +27 -0
  5. data/.github/workflows/ci.yml +50 -0
  6. data/.gitignore +12 -0
  7. data/.rubocop.yml +46 -0
  8. data/.ruby-version +1 -0
  9. data/CODEOWNERS +1 -0
  10. data/CODE_OF_CONDUCT.md +76 -0
  11. data/CONTRIBUTING.md +17 -0
  12. data/Gemfile +22 -0
  13. data/Gemfile.lock +236 -0
  14. data/LICENSE.md +7 -0
  15. data/README.md +73 -0
  16. data/Rakefile +13 -0
  17. data/TROUBLESHOOT.md +67 -0
  18. data/USAGE.md +250 -0
  19. data/bin/console +15 -0
  20. data/bin/setup +8 -0
  21. data/dev.yml +32 -0
  22. data/docs/cohesion.png +0 -0
  23. data/exe/packwerk +6 -0
  24. data/lib/packwerk.rb +44 -0
  25. data/lib/packwerk/application_validator.rb +343 -0
  26. data/lib/packwerk/association_inspector.rb +44 -0
  27. data/lib/packwerk/checking_deprecated_references.rb +40 -0
  28. data/lib/packwerk/cli.rb +238 -0
  29. data/lib/packwerk/configuration.rb +82 -0
  30. data/lib/packwerk/const_node_inspector.rb +44 -0
  31. data/lib/packwerk/constant_discovery.rb +60 -0
  32. data/lib/packwerk/constant_name_inspector.rb +22 -0
  33. data/lib/packwerk/dependency_checker.rb +28 -0
  34. data/lib/packwerk/deprecated_references.rb +92 -0
  35. data/lib/packwerk/file_processor.rb +43 -0
  36. data/lib/packwerk/files_for_processing.rb +67 -0
  37. data/lib/packwerk/formatters/progress_formatter.rb +46 -0
  38. data/lib/packwerk/generators/application_validation.rb +62 -0
  39. data/lib/packwerk/generators/configuration_file.rb +69 -0
  40. data/lib/packwerk/generators/inflections_file.rb +43 -0
  41. data/lib/packwerk/generators/root_package.rb +37 -0
  42. data/lib/packwerk/generators/templates/inflections.yml +6 -0
  43. data/lib/packwerk/generators/templates/package.yml +17 -0
  44. data/lib/packwerk/generators/templates/packwerk +23 -0
  45. data/lib/packwerk/generators/templates/packwerk.yml.erb +23 -0
  46. data/lib/packwerk/generators/templates/packwerk_validator_test.rb +11 -0
  47. data/lib/packwerk/graph.rb +74 -0
  48. data/lib/packwerk/inflections/custom.rb +33 -0
  49. data/lib/packwerk/inflections/default.rb +73 -0
  50. data/lib/packwerk/inflector.rb +41 -0
  51. data/lib/packwerk/node.rb +259 -0
  52. data/lib/packwerk/node_processor.rb +49 -0
  53. data/lib/packwerk/node_visitor.rb +22 -0
  54. data/lib/packwerk/offense.rb +44 -0
  55. data/lib/packwerk/output_styles.rb +41 -0
  56. data/lib/packwerk/package.rb +56 -0
  57. data/lib/packwerk/package_set.rb +59 -0
  58. data/lib/packwerk/parsed_constant_definitions.rb +62 -0
  59. data/lib/packwerk/parsers.rb +23 -0
  60. data/lib/packwerk/parsers/erb.rb +66 -0
  61. data/lib/packwerk/parsers/factory.rb +34 -0
  62. data/lib/packwerk/parsers/ruby.rb +42 -0
  63. data/lib/packwerk/privacy_checker.rb +45 -0
  64. data/lib/packwerk/reference.rb +6 -0
  65. data/lib/packwerk/reference_extractor.rb +81 -0
  66. data/lib/packwerk/reference_lister.rb +23 -0
  67. data/lib/packwerk/run_context.rb +103 -0
  68. data/lib/packwerk/sanity_checker.rb +10 -0
  69. data/lib/packwerk/spring_command.rb +28 -0
  70. data/lib/packwerk/updating_deprecated_references.rb +51 -0
  71. data/lib/packwerk/version.rb +6 -0
  72. data/lib/packwerk/violation_type.rb +13 -0
  73. data/library.yml +6 -0
  74. data/packwerk.gemspec +58 -0
  75. data/service.yml +6 -0
  76. data/shipit.rubygems.yml +1 -0
  77. data/sorbet/config +2 -0
  78. data/sorbet/rbi/gems/actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +840 -0
  79. data/sorbet/rbi/gems/actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +571 -0
  80. data/sorbet/rbi/gems/actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +568 -0
  81. data/sorbet/rbi/gems/actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +5216 -0
  82. data/sorbet/rbi/gems/actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +663 -0
  83. data/sorbet/rbi/gems/actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +2504 -0
  84. data/sorbet/rbi/gems/activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +635 -0
  85. data/sorbet/rbi/gems/activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +1201 -0
  86. data/sorbet/rbi/gems/activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8011 -0
  87. data/sorbet/rbi/gems/activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +904 -0
  88. data/sorbet/rbi/gems/activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +3888 -0
  89. data/sorbet/rbi/gems/ast@2.4.1.rbi +54 -0
  90. data/sorbet/rbi/gems/better_html@1.0.15.rbi +317 -0
  91. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  92. data/sorbet/rbi/gems/byebug@11.1.3.rbi +8 -0
  93. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  94. data/sorbet/rbi/gems/colorize@0.8.1.rbi +40 -0
  95. data/sorbet/rbi/gems/commander@4.5.2.rbi +8 -0
  96. data/sorbet/rbi/gems/concurrent-ruby@1.1.6.rbi +1966 -0
  97. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +26 -0
  98. data/sorbet/rbi/gems/crass@1.0.6.rbi +138 -0
  99. data/sorbet/rbi/gems/erubi@1.9.0.rbi +39 -0
  100. data/sorbet/rbi/gems/globalid@0.4.2.rbi +178 -0
  101. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  102. data/sorbet/rbi/gems/html_tokenizer@0.0.7.rbi +46 -0
  103. data/sorbet/rbi/gems/i18n@1.8.2.rbi +633 -0
  104. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +8 -0
  105. data/sorbet/rbi/gems/loofah@2.5.0.rbi +272 -0
  106. data/sorbet/rbi/gems/m@1.5.1.rbi +108 -0
  107. data/sorbet/rbi/gems/mail@2.7.1.rbi +2490 -0
  108. data/sorbet/rbi/gems/marcel@0.3.3.rbi +30 -0
  109. data/sorbet/rbi/gems/method_source@1.0.0.rbi +76 -0
  110. data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +47 -0
  111. data/sorbet/rbi/gems/mini_mime@1.0.2.rbi +71 -0
  112. data/sorbet/rbi/gems/mini_portile2@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/minitest@5.14.0.rbi +542 -0
  114. data/sorbet/rbi/gems/mocha@1.11.2.rbi +964 -0
  115. data/sorbet/rbi/gems/nio4r@2.5.2.rbi +89 -0
  116. data/sorbet/rbi/gems/nokogiri@1.10.9.rbi +1608 -0
  117. data/sorbet/rbi/gems/parallel@1.19.1.rbi +8 -0
  118. data/sorbet/rbi/gems/parlour@4.0.1.rbi +561 -0
  119. data/sorbet/rbi/gems/parser@2.7.1.4.rbi +1632 -0
  120. data/sorbet/rbi/gems/pry@0.13.1.rbi +8 -0
  121. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +335 -0
  122. data/sorbet/rbi/gems/rack@2.2.2.rbi +1730 -0
  123. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +123 -0
  124. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +213 -0
  125. data/sorbet/rbi/gems/rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8 -0
  126. data/sorbet/rbi/gems/railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +869 -0
  127. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +155 -0
  128. data/sorbet/rbi/gems/rake@13.0.1.rbi +841 -0
  129. data/sorbet/rbi/gems/rexml@3.2.4.rbi +8 -0
  130. data/sorbet/rbi/gems/rubocop-performance@1.5.2.rbi +8 -0
  131. data/sorbet/rbi/gems/rubocop-shopify@1.0.2.rbi +8 -0
  132. data/sorbet/rbi/gems/rubocop-sorbet@0.3.7.rbi +8 -0
  133. data/sorbet/rbi/gems/rubocop@0.82.0.rbi +8 -0
  134. data/sorbet/rbi/gems/ruby-progressbar@1.10.1.rbi +8 -0
  135. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +168 -0
  136. data/sorbet/rbi/gems/spoom@1.0.4.rbi +418 -0
  137. data/sorbet/rbi/gems/spring@2.1.0.rbi +160 -0
  138. data/sorbet/rbi/gems/sprockets-rails@3.2.1.rbi +431 -0
  139. data/sorbet/rbi/gems/sprockets@4.0.0.rbi +1132 -0
  140. data/sorbet/rbi/gems/tapioca@0.4.5.rbi +518 -0
  141. data/sorbet/rbi/gems/thor@1.0.1.rbi +892 -0
  142. data/sorbet/rbi/gems/tzinfo@2.0.2.rbi +547 -0
  143. data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
  144. data/sorbet/rbi/gems/websocket-driver@0.7.1.rbi +438 -0
  145. data/sorbet/rbi/gems/websocket-extensions@0.1.4.rbi +71 -0
  146. data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +8 -0
  147. data/sorbet/tapioca/require.rb +25 -0
  148. data/static/packwerk-check-demo.png +0 -0
  149. data/static/packwerk_check.gif +0 -0
  150. data/static/packwerk_check_violation.gif +0 -0
  151. data/static/packwerk_update.gif +0 -0
  152. data/static/packwerk_validate.gif +0 -0
  153. metadata +341 -0
@@ -0,0 +1,547 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `tzinfo` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module TZInfo
8
+ end
9
+
10
+ class TZInfo::AmbiguousTime < ::StandardError
11
+ end
12
+
13
+ class TZInfo::Country
14
+ include(::Comparable)
15
+
16
+ def initialize(info); end
17
+
18
+ def <=>(c); end
19
+ def =~(regexp); end
20
+ def _dump(limit); end
21
+ def code; end
22
+ def eql?(c); end
23
+ def hash; end
24
+ def inspect; end
25
+ def name; end
26
+ def to_s; end
27
+ def zone_identifiers; end
28
+ def zone_info; end
29
+ def zone_names; end
30
+ def zones; end
31
+
32
+ class << self
33
+ def _load(data); end
34
+ def all; end
35
+ def all_codes; end
36
+ def get(code); end
37
+
38
+ private
39
+
40
+ def data_source; end
41
+ end
42
+ end
43
+
44
+ class TZInfo::CountryTimezone
45
+ def initialize(identifier, latitude, longitude, description = T.unsafe(nil)); end
46
+
47
+ def ==(ct); end
48
+ def description; end
49
+ def description_or_friendly_identifier; end
50
+ def eql?(ct); end
51
+ def hash; end
52
+ def identifier; end
53
+ def latitude; end
54
+ def longitude; end
55
+ def timezone; end
56
+ end
57
+
58
+ class TZInfo::DataSource
59
+ def initialize; end
60
+
61
+ def country_codes; end
62
+ def data_timezone_identifiers; end
63
+ def get_country_info(code); end
64
+ def get_timezone_info(identifier); end
65
+ def inspect; end
66
+ def linked_timezone_identifiers; end
67
+ def timezone_identifiers; end
68
+ def to_s; end
69
+
70
+ protected
71
+
72
+ def load_country_info(code); end
73
+ def load_timezone_info(identifier); end
74
+ def lookup_country_info(hash, code, encoding = T.unsafe(nil)); end
75
+ def timezone_identifier_encoding; end
76
+ def validate_timezone_identifier(identifier); end
77
+
78
+ private
79
+
80
+ def build_timezone_identifiers; end
81
+ def find_timezone_identifier(identifier); end
82
+ def raise_invalid_data_source(method_name); end
83
+ def try_with_encoding(string, encoding); end
84
+
85
+ class << self
86
+ def get; end
87
+ def set(data_source_or_type, *args); end
88
+
89
+ private
90
+
91
+ def create_default_data_source; end
92
+ end
93
+ end
94
+
95
+ class TZInfo::DataSourceNotFound < ::StandardError
96
+ end
97
+
98
+ module TZInfo::DataSources
99
+ end
100
+
101
+ class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo < ::TZInfo::DataSources::DataTimezoneInfo
102
+ def initialize(identifier, constant_offset); end
103
+
104
+ def constant_offset; end
105
+ def period_for(timestamp); end
106
+ def periods_for_local(local_timestamp); end
107
+ def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end
108
+
109
+ private
110
+
111
+ def constant_period; end
112
+ end
113
+
114
+ class TZInfo::DataSources::CountryInfo
115
+ def initialize(code, name, zones); end
116
+
117
+ def code; end
118
+ def inspect; end
119
+ def name; end
120
+ def zones; end
121
+ end
122
+
123
+ class TZInfo::DataSources::DataTimezoneInfo < ::TZInfo::DataSources::TimezoneInfo
124
+ def create_timezone; end
125
+ def period_for(timestamp); end
126
+ def periods_for_local(local_timestamp); end
127
+ def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end
128
+
129
+ private
130
+
131
+ def raise_not_implemented(method_name); end
132
+ end
133
+
134
+ class TZInfo::DataSources::InvalidZoneinfoDirectory < ::StandardError
135
+ end
136
+
137
+ class TZInfo::DataSources::InvalidZoneinfoFile < ::StandardError
138
+ end
139
+
140
+ class TZInfo::DataSources::LinkedTimezoneInfo < ::TZInfo::DataSources::TimezoneInfo
141
+ def initialize(identifier, link_to_identifier); end
142
+
143
+ def create_timezone; end
144
+ def link_to_identifier; end
145
+ end
146
+
147
+ class TZInfo::DataSources::RubyDataSource < ::TZInfo::DataSource
148
+ def initialize; end
149
+
150
+ def country_codes; end
151
+ def data_timezone_identifiers; end
152
+ def inspect; end
153
+ def linked_timezone_identifiers; end
154
+ def to_s; end
155
+
156
+ protected
157
+
158
+ def load_country_info(code); end
159
+ def load_timezone_info(identifier); end
160
+
161
+ private
162
+
163
+ def require_data(*file); end
164
+ def require_definition(identifier); end
165
+ def require_index(name); end
166
+ def version_info; end
167
+ end
168
+
169
+ class TZInfo::DataSources::TZInfoDataNotFound < ::StandardError
170
+ end
171
+
172
+ class TZInfo::DataSources::TimezoneInfo
173
+ def initialize(identifier); end
174
+
175
+ def create_timezone; end
176
+ def identifier; end
177
+ def inspect; end
178
+
179
+ private
180
+
181
+ def raise_not_implemented(method_name); end
182
+ end
183
+
184
+ class TZInfo::DataSources::TransitionsDataTimezoneInfo < ::TZInfo::DataSources::DataTimezoneInfo
185
+ def initialize(identifier, transitions); end
186
+
187
+ def period_for(timestamp); end
188
+ def periods_for_local(local_timestamp); end
189
+ def transitions; end
190
+ def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end
191
+
192
+ private
193
+
194
+ def find_minimum_transition(&block); end
195
+ def transition_on_or_after_timestamp?(transition, timestamp); end
196
+ end
197
+
198
+ class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource
199
+ def initialize(zoneinfo_dir = T.unsafe(nil), alternate_iso3166_tab_path = T.unsafe(nil)); end
200
+
201
+ def country_codes; end
202
+ def data_timezone_identifiers; end
203
+ def inspect; end
204
+ def linked_timezone_identifiers; end
205
+ def to_s; end
206
+ def zoneinfo_dir; end
207
+
208
+ protected
209
+
210
+ def load_country_info(code); end
211
+ def load_timezone_info(identifier); end
212
+
213
+ private
214
+
215
+ def dms_to_rational(sign, degrees, minutes, seconds = T.unsafe(nil)); end
216
+ def enum_timezones(dir, exclude = T.unsafe(nil), &block); end
217
+ def find_zoneinfo_dir; end
218
+ def load_countries(iso3166_tab_path, zone_tab_path); end
219
+ def load_timezone_identifiers; end
220
+ def resolve_tab_path(zoneinfo_path, standard_names, tab_name); end
221
+ def validate_zoneinfo_dir(path, iso3166_tab_path = T.unsafe(nil)); end
222
+
223
+ class << self
224
+ def alternate_iso3166_tab_search_path; end
225
+ def alternate_iso3166_tab_search_path=(alternate_iso3166_tab_search_path); end
226
+ def search_path; end
227
+ def search_path=(search_path); end
228
+
229
+ private
230
+
231
+ def process_search_path(path, default); end
232
+ end
233
+ end
234
+
235
+ class TZInfo::DataSources::ZoneinfoDirectoryNotFound < ::StandardError
236
+ end
237
+
238
+ class TZInfo::DataTimezone < ::TZInfo::InfoTimezone
239
+ def canonical_zone; end
240
+ def period_for(time); end
241
+ def periods_for_local(local_time); end
242
+ def transitions_up_to(to, from = T.unsafe(nil)); end
243
+ end
244
+
245
+ class TZInfo::DateTimeWithOffset < ::DateTime
246
+ include(::TZInfo::WithOffset)
247
+
248
+ def downto(min); end
249
+ def england; end
250
+ def gregorian; end
251
+ def italy; end
252
+ def julian; end
253
+ def new_start(start = T.unsafe(nil)); end
254
+ def set_timezone_offset(timezone_offset); end
255
+ def step(limit, step = T.unsafe(nil)); end
256
+ def timezone_offset; end
257
+ def to_time; end
258
+ def upto(max); end
259
+
260
+ protected
261
+
262
+ def clear_timezone_offset; end
263
+ end
264
+
265
+ class TZInfo::InfoTimezone < ::TZInfo::Timezone
266
+ def initialize(info); end
267
+
268
+ def identifier; end
269
+
270
+ protected
271
+
272
+ def info; end
273
+ end
274
+
275
+ class TZInfo::InvalidCountryCode < ::StandardError
276
+ end
277
+
278
+ class TZInfo::InvalidDataSource < ::StandardError
279
+ end
280
+
281
+ class TZInfo::InvalidTimezoneIdentifier < ::StandardError
282
+ end
283
+
284
+ class TZInfo::LinkedTimezone < ::TZInfo::InfoTimezone
285
+ def initialize(info); end
286
+
287
+ def canonical_zone; end
288
+ def period_for(time); end
289
+ def periods_for_local(local_time); end
290
+ def transitions_up_to(to, from = T.unsafe(nil)); end
291
+ end
292
+
293
+ class TZInfo::OffsetTimezonePeriod < ::TZInfo::TimezonePeriod
294
+ def initialize(offset); end
295
+
296
+ def ==(p); end
297
+ def end_transition; end
298
+ def eql?(p); end
299
+ def hash; end
300
+ def start_transition; end
301
+ end
302
+
303
+ class TZInfo::PeriodNotFound < ::StandardError
304
+ end
305
+
306
+ class TZInfo::TimeWithOffset < ::Time
307
+ include(::TZInfo::WithOffset)
308
+
309
+ def dst?; end
310
+ def gmtime; end
311
+ def isdst; end
312
+ def localtime(*args); end
313
+ def round(ndigits = T.unsafe(nil)); end
314
+ def set_timezone_offset(timezone_offset); end
315
+ def timezone_offset; end
316
+ def to_a; end
317
+ def to_datetime; end
318
+ def utc; end
319
+ def zone; end
320
+ end
321
+
322
+ class TZInfo::Timestamp
323
+ include(::Comparable)
324
+
325
+ def initialize(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end
326
+
327
+ def <=>(t); end
328
+ def add_and_set_utc_offset(seconds, utc_offset); end
329
+ def eql?(_); end
330
+ def hash; end
331
+ def inspect; end
332
+ def strftime(format); end
333
+ def sub_second; end
334
+ def to_datetime; end
335
+ def to_i; end
336
+ def to_s; end
337
+ def to_time; end
338
+ def utc; end
339
+ def utc?; end
340
+ def utc_offset; end
341
+ def value; end
342
+
343
+ protected
344
+
345
+ def new_datetime(klass = T.unsafe(nil)); end
346
+ def new_time(klass = T.unsafe(nil)); end
347
+
348
+ private
349
+
350
+ def initialize!(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end
351
+ def sub_second_to_s; end
352
+ def value_and_sub_second_to_s(offset = T.unsafe(nil)); end
353
+
354
+ class << self
355
+ def create(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end
356
+ def for(value, offset = T.unsafe(nil)); end
357
+ def utc(value, sub_second = T.unsafe(nil)); end
358
+
359
+ private
360
+
361
+ def for_datetime(datetime, ignore_offset, target_utc_offset); end
362
+ def for_time(time, ignore_offset, target_utc_offset); end
363
+ def for_time_like(time_like, ignore_offset, target_utc_offset); end
364
+ def for_timestamp(timestamp, ignore_offset, target_utc_offset); end
365
+ def is_time_like?(value); end
366
+ def new!(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end
367
+ end
368
+ end
369
+
370
+ class TZInfo::TimestampWithOffset < ::TZInfo::Timestamp
371
+ include(::TZInfo::WithOffset)
372
+
373
+ def set_timezone_offset(timezone_offset); end
374
+ def timezone_offset; end
375
+ def to_datetime; end
376
+ def to_time; end
377
+
378
+ class << self
379
+ def set_timezone_offset(timestamp, timezone_offset); end
380
+ end
381
+ end
382
+
383
+ class TZInfo::Timezone
384
+ include(::Comparable)
385
+
386
+ def <=>(tz); end
387
+ def =~(regexp); end
388
+ def _dump(limit); end
389
+ def abbr(time = T.unsafe(nil)); end
390
+ def abbreviation(time = T.unsafe(nil)); end
391
+ def base_utc_offset(time = T.unsafe(nil)); end
392
+ def canonical_identifier; end
393
+ def canonical_zone; end
394
+ def current_period; end
395
+ def current_period_and_time; end
396
+ def current_time_and_period; end
397
+ def dst?(time = T.unsafe(nil)); end
398
+ def eql?(tz); end
399
+ def friendly_identifier(skip_first_part = T.unsafe(nil)); end
400
+ def hash; end
401
+ def identifier; end
402
+ def inspect; end
403
+ def local_datetime(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end
404
+ def local_time(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end
405
+ def local_timestamp(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end
406
+ def local_to_utc(local_time, dst = T.unsafe(nil)); end
407
+ def name; end
408
+ def now; end
409
+ def observed_utc_offset(time = T.unsafe(nil)); end
410
+ def offsets_up_to(to, from = T.unsafe(nil)); end
411
+ def period_for(time); end
412
+ def period_for_local(local_time, dst = T.unsafe(nil)); end
413
+ def period_for_utc(utc_time); end
414
+ def periods_for_local(local_time); end
415
+ def strftime(format, time = T.unsafe(nil)); end
416
+ def to_local(time); end
417
+ def to_s; end
418
+ def transitions_up_to(to, from = T.unsafe(nil)); end
419
+ def utc_offset(time = T.unsafe(nil)); end
420
+ def utc_to_local(utc_time); end
421
+
422
+ private
423
+
424
+ def raise_unknown_timezone; end
425
+
426
+ class << self
427
+ def _load(data); end
428
+ def all; end
429
+ def all_country_zone_identifiers; end
430
+ def all_country_zones; end
431
+ def all_data_zone_identifiers; end
432
+ def all_data_zones; end
433
+ def all_identifiers; end
434
+ def all_linked_zone_identifiers; end
435
+ def all_linked_zones; end
436
+ def default_dst; end
437
+ def default_dst=(value); end
438
+ def get(identifier); end
439
+ def get_proxy(identifier); end
440
+
441
+ private
442
+
443
+ def data_source; end
444
+ def get_proxies(identifiers); end
445
+ end
446
+ end
447
+
448
+ class TZInfo::TimezoneOffset
449
+ def initialize(base_utc_offset, std_offset, abbreviation); end
450
+
451
+ def ==(toi); end
452
+ def abbr; end
453
+ def abbreviation; end
454
+ def base_utc_offset; end
455
+ def dst?; end
456
+ def eql?(toi); end
457
+ def hash; end
458
+ def inspect; end
459
+ def observed_utc_offset; end
460
+ def std_offset; end
461
+ def utc_offset; end
462
+ def utc_total_offset; end
463
+ end
464
+
465
+ class TZInfo::TimezonePeriod
466
+ def initialize(offset); end
467
+
468
+ def abbr; end
469
+ def abbreviation; end
470
+ def base_utc_offset; end
471
+ def dst?; end
472
+ def end_transition; end
473
+ def ends_at; end
474
+ def local_ends_at; end
475
+ def local_starts_at; end
476
+ def observed_utc_offset; end
477
+ def offset; end
478
+ def start_transition; end
479
+ def starts_at; end
480
+ def std_offset; end
481
+ def utc_offset; end
482
+ def utc_total_offset; end
483
+ def zone_identifier; end
484
+
485
+ private
486
+
487
+ def raise_not_implemented(method_name); end
488
+ def timestamp(transition); end
489
+ def timestamp_with_offset(transition); end
490
+ end
491
+
492
+ class TZInfo::TimezoneProxy < ::TZInfo::Timezone
493
+ def initialize(identifier); end
494
+
495
+ def _dump(limit); end
496
+ def canonical_zone; end
497
+ def identifier; end
498
+ def period_for(time); end
499
+ def periods_for_local(local_time); end
500
+ def transitions_up_to(to, from = T.unsafe(nil)); end
501
+
502
+ private
503
+
504
+ def real_timezone; end
505
+
506
+ class << self
507
+ def _load(data); end
508
+ end
509
+ end
510
+
511
+ class TZInfo::TimezoneTransition
512
+ def initialize(offset, previous_offset, timestamp_value); end
513
+
514
+ def ==(tti); end
515
+ def at; end
516
+ def eql?(tti); end
517
+ def hash; end
518
+ def local_end_at; end
519
+ def local_start_at; end
520
+ def offset; end
521
+ def previous_offset; end
522
+ def timestamp_value; end
523
+ end
524
+
525
+ class TZInfo::TransitionsTimezonePeriod < ::TZInfo::TimezonePeriod
526
+ def initialize(start_transition, end_transition); end
527
+
528
+ def ==(p); end
529
+ def end_transition; end
530
+ def eql?(p); end
531
+ def hash; end
532
+ def inspect; end
533
+ def start_transition; end
534
+ end
535
+
536
+ class TZInfo::UnknownTimezone < ::StandardError
537
+ end
538
+
539
+ TZInfo::VERSION = T.let(T.unsafe(nil), String)
540
+
541
+ module TZInfo::WithOffset
542
+ def strftime(format); end
543
+
544
+ protected
545
+
546
+ def if_timezone_offset(result = T.unsafe(nil)); end
547
+ end