packwerk 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/lib/packwerk/checker.rb +3 -3
  3. data/lib/packwerk/offenses_formatter.rb +3 -3
  4. data/lib/packwerk/package_todo.rb +1 -4
  5. data/lib/packwerk/parsers/factory.rb +3 -3
  6. data/lib/packwerk/parsers/ruby.rb +7 -0
  7. data/lib/packwerk/reference_offense.rb +1 -1
  8. data/lib/packwerk/validator.rb +3 -3
  9. data/lib/packwerk/version.rb +1 -1
  10. data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +3280 -3450
  11. data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +2322 -1782
  12. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +2654 -3268
  13. data/sorbet/rbi/gems/ast@2.4.2.rbi +535 -6
  14. data/sorbet/rbi/gems/better_html@2.0.1.rbi +529 -0
  15. data/sorbet/rbi/gems/builder@3.2.4.rbi +4 -4
  16. data/sorbet/rbi/gems/byebug@11.1.3.rbi +32 -4
  17. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +1750 -1840
  18. data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +15 -15
  19. data/sorbet/rbi/gems/crass@1.0.6.rbi +489 -5
  20. data/sorbet/rbi/gems/erubi@1.11.0.rbi +24 -21
  21. data/sorbet/rbi/gems/i18n@1.12.0.rbi +395 -395
  22. data/sorbet/rbi/gems/json@2.6.2.rbi +70 -77
  23. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +1 -1
  24. data/sorbet/rbi/gems/loofah@2.18.0.rbi +134 -134
  25. data/sorbet/rbi/gems/m@1.6.0.rbi +60 -60
  26. data/sorbet/rbi/gems/method_source@1.1.0.rbi +303 -0
  27. data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +22 -28
  28. data/sorbet/rbi/gems/minitest@5.16.2.rbi +384 -396
  29. data/sorbet/rbi/gems/mocha@1.14.0.rbi +589 -589
  30. data/sorbet/rbi/gems/netrc@0.11.0.rbi +37 -32
  31. data/sorbet/rbi/gems/nokogiri@1.15.3.rbi +962 -946
  32. data/sorbet/rbi/gems/{parallel@1.22.1.rbi → parallel@1.24.0.rbi} +85 -82
  33. data/sorbet/rbi/gems/{parser@3.2.2.0.rbi → parser@3.3.1.0.rbi} +1679 -1609
  34. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +1 -1
  35. data/sorbet/rbi/gems/{prism@0.24.0.rbi → prism@0.27.0.rbi} +13473 -6472
  36. data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.7.1.rbi} +42 -33
  37. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +148 -338
  38. data/sorbet/rbi/gems/rack@2.2.4.rbi +1079 -1130
  39. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +354 -22
  40. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +113 -259
  41. data/sorbet/rbi/gems/railties@7.0.3.1.rbi +642 -638
  42. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +109 -99
  43. data/sorbet/rbi/gems/rake@13.0.6.rbi +714 -599
  44. data/sorbet/rbi/gems/{rbi@0.0.15.rbi → rbi@0.1.12.rbi} +865 -801
  45. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +853 -870
  46. data/sorbet/rbi/gems/rexml@3.2.5.rbi +480 -477
  47. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +1621 -1622
  48. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +507 -526
  49. data/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi +1 -1
  50. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +186 -203
  51. data/sorbet/rbi/gems/rubocop@1.34.1.rbi +8126 -8367
  52. data/sorbet/rbi/gems/{ruby-lsp@0.2.1.rbi → ruby-lsp@0.2.3.rbi} +2 -2
  53. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1235 -4
  54. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +90 -90
  55. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
  56. data/sorbet/rbi/gems/spring@4.0.0.rbi +104 -104
  57. data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +1 -1
  58. data/sorbet/rbi/gems/{tapioca@0.9.2.rbi → tapioca@0.13.3.rbi} +1596 -1253
  59. data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.3.1.rbi} +1047 -652
  60. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +531 -513
  61. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +13 -13
  62. data/sorbet/rbi/gems/{yard-sorbet@0.6.1.rbi → yard-sorbet@0.8.1.rbi} +132 -92
  63. data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.36.rbi} +3158 -3067
  64. data/sorbet/rbi/gems/zeitwerk@2.6.4.rbi +149 -145
  65. metadata +18 -76
  66. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -27
  67. data/.github/pull_request_template.md +0 -28
  68. data/.github/workflows/ci.yml +0 -93
  69. data/.github/workflows/cla.yml +0 -22
  70. data/.gitignore +0 -13
  71. data/.rubocop.yml +0 -75
  72. data/.ruby-version +0 -1
  73. data/CODEOWNERS +0 -1
  74. data/CODE_OF_CONDUCT.md +0 -76
  75. data/CONTRIBUTING.md +0 -17
  76. data/Gemfile +0 -27
  77. data/Gemfile.lock +0 -206
  78. data/RESOLVING_VIOLATIONS.md +0 -76
  79. data/Rakefile +0 -22
  80. data/TROUBLESHOOT.md +0 -44
  81. data/UPGRADING.md +0 -66
  82. data/USAGE.md +0 -364
  83. data/bin/console +0 -15
  84. data/bin/m +0 -29
  85. data/bin/rake +0 -29
  86. data/bin/rubocop +0 -29
  87. data/bin/setup +0 -8
  88. data/bin/srb +0 -29
  89. data/bin/tapioca +0 -29
  90. data/dev.yml +0 -32
  91. data/docs/cohesion.png +0 -0
  92. data/gemfiles/Gemfile-rails-6-0 +0 -22
  93. data/gemfiles/Gemfile-rails-6-1 +0 -22
  94. data/packwerk.gemspec +0 -59
  95. data/shipit.rubygems.yml +0 -5
  96. data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +0 -2754
  97. data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +0 -1496
  98. data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +0 -2362
  99. data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +0 -1569
  100. data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +0 -2553
  101. data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +0 -5999
  102. data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +0 -37832
  103. data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +0 -2321
  104. data/sorbet/rbi/gems/better_html@1.0.16.rbi +0 -317
  105. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
  106. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1079
  107. data/sorbet/rbi/gems/digest@3.1.0.rbi +0 -189
  108. data/sorbet/rbi/gems/globalid@1.0.0.rbi +0 -572
  109. data/sorbet/rbi/gems/mail@2.7.1.rbi +0 -2490
  110. data/sorbet/rbi/gems/marcel@1.0.2.rbi +0 -220
  111. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -76
  112. data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +0 -170
  113. data/sorbet/rbi/gems/net-imap@0.2.3.rbi +0 -2147
  114. data/sorbet/rbi/gems/net-pop@0.1.1.rbi +0 -926
  115. data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +0 -11
  116. data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +0 -1108
  117. data/sorbet/rbi/gems/nio4r@2.5.8.rbi +0 -292
  118. data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
  119. data/sorbet/rbi/gems/rails@7.0.3.1.rbi +0 -8
  120. data/sorbet/rbi/gems/spoom@1.1.11.rbi +0 -2181
  121. data/sorbet/rbi/gems/strscan@3.0.4.rbi +0 -8
  122. data/sorbet/rbi/gems/timeout@0.3.0.rbi +0 -142
  123. data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
  124. data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2582
  125. data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +0 -993
  126. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -71
@@ -1,572 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `globalid` gem.
5
- # Please instead update this file by running `bin/tapioca gem globalid`.
6
-
7
- # source://globalid-1.0.0/lib/global_id/global_id.rb:8
8
- class GlobalID
9
- extend ::ActiveSupport::Autoload
10
-
11
- # @return [GlobalID] a new instance of GlobalID
12
- #
13
- # source://globalid-1.0.0/lib/global_id/global_id.rb:51
14
- def initialize(gid, options = T.unsafe(nil)); end
15
-
16
- # source://globalid-1.0.0/lib/global_id/global_id.rb:63
17
- def ==(other); end
18
-
19
- # source://globalid-1.0.0/lib/global_id/global_id.rb:49
20
- def app(*_arg0, &_arg1); end
21
-
22
- # source://globalid-1.0.0/lib/global_id/global_id.rb:63
23
- def eql?(other); end
24
-
25
- # source://globalid-1.0.0/lib/global_id/global_id.rb:55
26
- def find(options = T.unsafe(nil)); end
27
-
28
- # source://globalid-1.0.0/lib/global_id/global_id.rb:68
29
- def hash; end
30
-
31
- # source://globalid-1.0.0/lib/global_id/global_id.rb:59
32
- def model_class; end
33
-
34
- # source://globalid-1.0.0/lib/global_id/global_id.rb:49
35
- def model_id(*_arg0, &_arg1); end
36
-
37
- # source://globalid-1.0.0/lib/global_id/global_id.rb:49
38
- def model_name(*_arg0, &_arg1); end
39
-
40
- # source://globalid-1.0.0/lib/global_id/global_id.rb:49
41
- def params(*_arg0, &_arg1); end
42
-
43
- # source://globalid-1.0.0/lib/global_id/global_id.rb:72
44
- def to_param; end
45
-
46
- # source://globalid-1.0.0/lib/global_id/global_id.rb:49
47
- def to_s(*_arg0, &_arg1); end
48
-
49
- # Returns the value of attribute uri.
50
- #
51
- # source://globalid-1.0.0/lib/global_id/global_id.rb:48
52
- def uri; end
53
-
54
- class << self
55
- # Returns the value of attribute app.
56
- #
57
- # source://globalid-1.0.0/lib/global_id/global_id.rb:10
58
- def app; end
59
-
60
- # source://globalid-1.0.0/lib/global_id/global_id.rb:32
61
- def app=(app); end
62
-
63
- # source://globalid-1.0.0/lib/global_id/global_id.rb:12
64
- def create(model, options = T.unsafe(nil)); end
65
-
66
- # source://globalid-1.0.0/lib/global_id.rb:15
67
- def eager_load!; end
68
-
69
- # source://globalid-1.0.0/lib/global_id/global_id.rb:22
70
- def find(gid, options = T.unsafe(nil)); end
71
-
72
- # source://globalid-1.0.0/lib/global_id/global_id.rb:26
73
- def parse(gid, options = T.unsafe(nil)); end
74
-
75
- private
76
-
77
- # source://globalid-1.0.0/lib/global_id/global_id.rb:37
78
- def parse_encoded_gid(gid, options); end
79
-
80
- # We removed the base64 padding character = during #to_param, now we're adding it back so decoding will work
81
- #
82
- # source://globalid-1.0.0/lib/global_id/global_id.rb:42
83
- def repad_gid(gid); end
84
- end
85
- end
86
-
87
- # source://globalid-1.0.0/lib/global_id/identification.rb:2
88
- module GlobalID::Identification
89
- # source://globalid-1.0.0/lib/global_id/identification.rb:3
90
- def to_gid(options = T.unsafe(nil)); end
91
-
92
- # source://globalid-1.0.0/lib/global_id/identification.rb:8
93
- def to_gid_param(options = T.unsafe(nil)); end
94
-
95
- # source://globalid-1.0.0/lib/global_id/identification.rb:3
96
- def to_global_id(options = T.unsafe(nil)); end
97
-
98
- # source://globalid-1.0.0/lib/global_id/identification.rb:12
99
- def to_sgid(options = T.unsafe(nil)); end
100
-
101
- # source://globalid-1.0.0/lib/global_id/identification.rb:17
102
- def to_sgid_param(options = T.unsafe(nil)); end
103
-
104
- # source://globalid-1.0.0/lib/global_id/identification.rb:12
105
- def to_signed_global_id(options = T.unsafe(nil)); end
106
- end
107
-
108
- # source://globalid-1.0.0/lib/global_id/locator.rb:5
109
- module GlobalID::Locator
110
- class << self
111
- # Takes either a GlobalID or a string that can be turned into a GlobalID
112
- #
113
- # Options:
114
- # * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
115
- # allowed to be located. Passing one or more classes limits instances of returned
116
- # classes to those classes or their subclasses. Passing one or more modules in limits
117
- # instances of returned classes to those including that module. If no classes or
118
- # modules match, +nil+ is returned.
119
- #
120
- # source://globalid-1.0.0/lib/global_id/locator.rb:15
121
- def locate(gid, options = T.unsafe(nil)); end
122
-
123
- # Takes an array of GlobalIDs or strings that can be turned into a GlobalIDs.
124
- # All GlobalIDs must belong to the same app, as they will be located using
125
- # the same locator using its locate_many method.
126
- #
127
- # By default the GlobalIDs will be located using Model.find(array_of_ids), so the
128
- # models must respond to that finder signature.
129
- #
130
- # This approach will efficiently call only one #find (or #where(id: id), when using ignore_missing)
131
- # per model class, but still interpolate the results to match the order in which the gids were passed.
132
- #
133
- # Options:
134
- # * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
135
- # allowed to be located. Passing one or more classes limits instances of returned
136
- # classes to those classes or their subclasses. Passing one or more modules in limits
137
- # instances of returned classes to those including that module. If no classes or
138
- # modules match, +nil+ is returned.
139
- # * <tt>:ignore_missing</tt> - By default, locate_many will call #find on the model to locate the
140
- # ids extracted from the GIDs. In Active Record (and other data stores following the same pattern),
141
- # #find will raise an exception if a named ID can't be found. When you set this option to true,
142
- # we will use #where(id: ids) instead, which does not raise on missing records.
143
- #
144
- # source://globalid-1.0.0/lib/global_id/locator.rb:41
145
- def locate_many(gids, options = T.unsafe(nil)); end
146
-
147
- # Takes an array of SignedGlobalIDs or strings that can be turned into a SignedGlobalIDs.
148
- # The SignedGlobalIDs are located using Model.find(array_of_ids), so the models must respond to
149
- # that finder signature.
150
- #
151
- # This approach will efficiently call only one #find per model class, but still interpolate
152
- # the results to match the order in which the gids were passed.
153
- #
154
- # Options:
155
- # * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
156
- # allowed to be located. Passing one or more classes limits instances of returned
157
- # classes to those classes or their subclasses. Passing one or more modules in limits
158
- # instances of returned classes to those including that module. If no classes or
159
- # modules match, +nil+ is returned.
160
- #
161
- # source://globalid-1.0.0/lib/global_id/locator.rb:75
162
- def locate_many_signed(sgids, options = T.unsafe(nil)); end
163
-
164
- # Takes either a SignedGlobalID or a string that can be turned into a SignedGlobalID
165
- #
166
- # Options:
167
- # * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
168
- # allowed to be located. Passing one or more classes limits instances of returned
169
- # classes to those classes or their subclasses. Passing one or more modules in limits
170
- # instances of returned classes to those including that module. If no classes or
171
- # modules match, +nil+ is returned.
172
- #
173
- # source://globalid-1.0.0/lib/global_id/locator.rb:58
174
- def locate_signed(sgid, options = T.unsafe(nil)); end
175
-
176
- # Tie a locator to an app.
177
- # Useful when different apps collaborate and reference each others' Global IDs.
178
- #
179
- # The locator can be either a block or a class.
180
- #
181
- # Using a block:
182
- #
183
- # GlobalID::Locator.use :foo do |gid|
184
- # FooRemote.const_get(gid.model_name).find(gid.model_id)
185
- # end
186
- #
187
- # Using a class:
188
- #
189
- # GlobalID::Locator.use :bar, BarLocator.new
190
- #
191
- # class BarLocator
192
- # def locate(gid)
193
- # @search_client.search name: gid.model_name, id: gid.model_id
194
- # end
195
- # end
196
- #
197
- # @raise [ArgumentError]
198
- #
199
- # source://globalid-1.0.0/lib/global_id/locator.rb:99
200
- def use(app, locator = T.unsafe(nil), &locator_block); end
201
-
202
- private
203
-
204
- # @return [Boolean]
205
- #
206
- # source://globalid-1.0.0/lib/global_id/locator.rb:112
207
- def find_allowed?(model_class, only = T.unsafe(nil)); end
208
-
209
- # source://globalid-1.0.0/lib/global_id/locator.rb:108
210
- def locator_for(gid); end
211
-
212
- # source://globalid-1.0.0/lib/global_id/locator.rb:120
213
- def normalize_app(app); end
214
-
215
- # source://globalid-1.0.0/lib/global_id/locator.rb:116
216
- def parse_allowed(gids, only = T.unsafe(nil)); end
217
- end
218
- end
219
-
220
- # source://globalid-1.0.0/lib/global_id/locator.rb:128
221
- class GlobalID::Locator::BaseLocator
222
- # source://globalid-1.0.0/lib/global_id/locator.rb:129
223
- def locate(gid); end
224
-
225
- # source://globalid-1.0.0/lib/global_id/locator.rb:133
226
- def locate_many(gids, options = T.unsafe(nil)); end
227
-
228
- private
229
-
230
- # source://globalid-1.0.0/lib/global_id/locator.rb:144
231
- def find_records(model_class, ids, options); end
232
- end
233
-
234
- # source://globalid-1.0.0/lib/global_id/locator.rb:173
235
- class GlobalID::Locator::BlockLocator
236
- # @return [BlockLocator] a new instance of BlockLocator
237
- #
238
- # source://globalid-1.0.0/lib/global_id/locator.rb:174
239
- def initialize(block); end
240
-
241
- # source://globalid-1.0.0/lib/global_id/locator.rb:178
242
- def locate(gid); end
243
-
244
- # source://globalid-1.0.0/lib/global_id/locator.rb:182
245
- def locate_many(gids, options = T.unsafe(nil)); end
246
- end
247
-
248
- # source://globalid-1.0.0/lib/global_id/locator.rb:171
249
- GlobalID::Locator::DEFAULT_LOCATOR = T.let(T.unsafe(nil), GlobalID::Locator::UnscopedLocator)
250
-
251
- # source://globalid-1.0.0/lib/global_id/locator.rb:153
252
- class GlobalID::Locator::UnscopedLocator < ::GlobalID::Locator::BaseLocator
253
- # source://globalid-1.0.0/lib/global_id/locator.rb:154
254
- def locate(gid); end
255
-
256
- private
257
-
258
- # source://globalid-1.0.0/lib/global_id/locator.rb:159
259
- def find_records(model_class, ids, options); end
260
-
261
- # source://globalid-1.0.0/lib/global_id/locator.rb:163
262
- def unscoped(model_class); end
263
- end
264
-
265
- # source://globalid-1.0.0/lib/global_id/railtie.rb:13
266
- class GlobalID::Railtie < ::Rails::Railtie; end
267
-
268
- # source://globalid-1.0.0/lib/global_id/verifier.rb:5
269
- class GlobalID::Verifier < ::ActiveSupport::MessageVerifier
270
- private
271
-
272
- # source://globalid-1.0.0/lib/global_id/verifier.rb:11
273
- def decode(data); end
274
-
275
- # source://globalid-1.0.0/lib/global_id/verifier.rb:7
276
- def encode(data); end
277
- end
278
-
279
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:5
280
- class SignedGlobalID < ::GlobalID
281
- # @return [SignedGlobalID] a new instance of SignedGlobalID
282
- #
283
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:51
284
- def initialize(gid, options = T.unsafe(nil)); end
285
-
286
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:69
287
- def ==(other); end
288
-
289
- # Returns the value of attribute expires_at.
290
- #
291
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:49
292
- def expires_at; end
293
-
294
- # Returns the value of attribute purpose.
295
- #
296
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:49
297
- def purpose; end
298
-
299
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:63
300
- def to_h; end
301
-
302
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:58
303
- def to_param; end
304
-
305
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:58
306
- def to_s; end
307
-
308
- # Returns the value of attribute verifier.
309
- #
310
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:49
311
- def verifier; end
312
-
313
- private
314
-
315
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:74
316
- def encoded_expiration; end
317
-
318
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:78
319
- def pick_expiration(options); end
320
-
321
- class << self
322
- # Returns the value of attribute expires_in.
323
- #
324
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:23
325
- def expires_in; end
326
-
327
- # Sets the attribute expires_in
328
- #
329
- # @param value the value to set the attribute expires_in to.
330
- #
331
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:23
332
- def expires_in=(_arg0); end
333
-
334
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:11
335
- def parse(sgid, options = T.unsafe(nil)); end
336
-
337
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:27
338
- def pick_purpose(options); end
339
-
340
- # Grab the verifier from options and fall back to SignedGlobalID.verifier.
341
- # Raise ArgumentError if neither is available.
342
- #
343
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:17
344
- def pick_verifier(options); end
345
-
346
- # Returns the value of attribute verifier.
347
- #
348
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:9
349
- def verifier; end
350
-
351
- # Sets the attribute verifier
352
- #
353
- # @param value the value to set the attribute verifier to.
354
- #
355
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:9
356
- def verifier=(_arg0); end
357
-
358
- private
359
-
360
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:42
361
- def raise_if_expired(expires_at); end
362
-
363
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:32
364
- def verify(sgid, options); end
365
- end
366
- end
367
-
368
- # source://globalid-1.0.0/lib/global_id/signed_global_id.rb:6
369
- class SignedGlobalID::ExpiredMessage < ::StandardError; end
370
-
371
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:6
372
- module URI
373
- include ::URI::RFC2396_REGEXP
374
- extend ::URI::Escape
375
- end
376
-
377
- class URI::File < ::URI::Generic
378
- # source://RUBY_ROOT/uri/file.rb:76
379
- def check_password(user); end
380
-
381
- # source://RUBY_ROOT/uri/file.rb:71
382
- def check_user(user); end
383
-
384
- # source://RUBY_ROOT/uri/file.rb:66
385
- def check_userinfo(user); end
386
-
387
- # source://RUBY_ROOT/uri/file.rb:56
388
- def set_host(v); end
389
-
390
- # source://RUBY_ROOT/uri/file.rb:89
391
- def set_password(v); end
392
-
393
- # source://RUBY_ROOT/uri/file.rb:62
394
- def set_port(v); end
395
-
396
- # source://RUBY_ROOT/uri/file.rb:85
397
- def set_user(v); end
398
-
399
- # source://RUBY_ROOT/uri/file.rb:81
400
- def set_userinfo(v); end
401
-
402
- class << self
403
- # source://RUBY_ROOT/uri/file.rb:47
404
- def build(args); end
405
- end
406
- end
407
-
408
- # source://RUBY_ROOT/uri/file.rb:17
409
- URI::File::COMPONENT = T.let(T.unsafe(nil), Array)
410
-
411
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:27
412
- class URI::GID < ::URI::Generic
413
- # URI::GID encodes an app unique reference to a specific model as an URI.
414
- # It has the components: app name, model class name, model id and params.
415
- # All components except params are required.
416
- #
417
- # The URI format looks like "gid://app/model_name/model_id".
418
- #
419
- # Simple metadata can be stored in params. Useful if your app has multiple databases,
420
- # for instance, and you need to find out which one to look up the model in.
421
- #
422
- # Params will be encoded as query parameters like so
423
- # "gid://app/model_name/model_id?key=value&another_key=another_value".
424
- #
425
- # Params won't be typecast, they're always strings.
426
- # For convenience params can be accessed using both strings and symbol keys.
427
- #
428
- # Multi value params aren't supported. Any params encoding multiple values under
429
- # the same key will return only the last value. For example, when decoding
430
- # params like "key=first_value&key=last_value" key will only be last_value.
431
- #
432
- # Read the documentation for +parse+, +create+ and +build+ for more.
433
- #
434
- # source://RUBY_ROOT/uri/generic.rb:244
435
- def app; end
436
-
437
- # Returns the value of attribute model_id.
438
- #
439
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:29
440
- def model_id; end
441
-
442
- # Returns the value of attribute model_name.
443
- #
444
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:29
445
- def model_name; end
446
-
447
- # Returns the value of attribute params.
448
- #
449
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:29
450
- def params; end
451
-
452
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:96
453
- def to_s; end
454
-
455
- protected
456
-
457
- # Ruby 2.2 uses #query= instead of #set_query
458
- #
459
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:108
460
- def query=(query); end
461
-
462
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:119
463
- def set_params(params); end
464
-
465
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:102
466
- def set_path(path); end
467
-
468
- # Ruby 2.1 or less uses #set_query to assign the query
469
- #
470
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:114
471
- def set_query(query); end
472
-
473
- private
474
-
475
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:129
476
- def check_host(host); end
477
-
478
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:134
479
- def check_path(path); end
480
-
481
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:139
482
- def check_scheme(scheme); end
483
-
484
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:171
485
- def parse_query_params(query); end
486
-
487
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:147
488
- def set_model_components(path, validate = T.unsafe(nil)); end
489
-
490
- # @raise [URI::InvalidComponentError]
491
- #
492
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:157
493
- def validate_component(component); end
494
-
495
- # @raise [MissingModelIdError]
496
- #
497
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:164
498
- def validate_model_id(model_id, model_name); end
499
-
500
- class << self
501
- # Create a new URI::GID from components with argument check.
502
- #
503
- # The allowed components are app, model_name, model_id and params, which can be
504
- # either a hash or an array.
505
- #
506
- # Using a hash:
507
- #
508
- # URI::GID.build(app: 'bcx', model_name: 'Person', model_id: '1', params: { key: 'value' })
509
- #
510
- # Using an array, the arguments must be in order [app, model_name, model_id, params]:
511
- #
512
- # URI::GID.build(['bcx', 'Person', '1', key: 'value'])
513
- #
514
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:83
515
- def build(args); end
516
-
517
- # Shorthand to build a URI::GID from an app, a model and optional params.
518
- #
519
- # URI::GID.create('bcx', Person.find(5), database: 'superhumans')
520
- #
521
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:67
522
- def create(app, model, params = T.unsafe(nil)); end
523
-
524
- # Create a new URI::GID by parsing a gid string with argument check.
525
- #
526
- # URI::GID.parse 'gid://bcx/Person/1?key=value'
527
- #
528
- # This differs from URI() and URI.parse which do not check arguments.
529
- #
530
- # URI('gid://bcx') # => URI::GID instance
531
- # URI.parse('gid://bcx') # => URI::GID instance
532
- # URI::GID.parse('gid://bcx/') # => raises URI::InvalidComponentError
533
- #
534
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:59
535
- def parse(uri); end
536
-
537
- # Validates +app+'s as URI hostnames containing only alphanumeric characters
538
- # and hyphens. An ArgumentError is raised if +app+ is invalid.
539
- #
540
- # URI::GID.validate_app('bcx') # => 'bcx'
541
- # URI::GID.validate_app('foo-bar') # => 'foo-bar'
542
- #
543
- # URI::GID.validate_app(nil) # => ArgumentError
544
- # URI::GID.validate_app('foo/bar') # => ArgumentError
545
- #
546
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:43
547
- def validate_app(app); end
548
- end
549
- end
550
-
551
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:124
552
- URI::GID::COMPONENT = T.let(T.unsafe(nil), Array)
553
-
554
- # Raised when creating a Global ID for a model without an id
555
- #
556
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:32
557
- class URI::GID::MissingModelIdError < ::URI::InvalidComponentError; end
558
-
559
- # Extracts model_name and model_id from the URI path.
560
- #
561
- # source://globalid-1.0.0/lib/global_id/uri/gid.rb:127
562
- URI::GID::PATH_REGEXP = T.let(T.unsafe(nil), Regexp)
563
-
564
- # source://RUBY_ROOT/uri/common.rb:18
565
- URI::Parser = URI::RFC2396_Parser
566
-
567
- # source://RUBY_ROOT/uri/common.rb:17
568
- URI::REGEXP = URI::RFC2396_REGEXP
569
-
570
- class URI::RFC2396_Parser
571
- include ::URI::RFC2396_REGEXP
572
- end