packwerk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
- data/.github/probots.yml +2 -0
- data/.github/pull_request_template.md +27 -0
- data/.github/workflows/ci.yml +50 -0
- data/.gitignore +12 -0
- data/.rubocop.yml +46 -0
- data/.ruby-version +1 -0
- data/CODEOWNERS +1 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +17 -0
- data/Gemfile +22 -0
- data/Gemfile.lock +236 -0
- data/LICENSE.md +7 -0
- data/README.md +73 -0
- data/Rakefile +13 -0
- data/TROUBLESHOOT.md +67 -0
- data/USAGE.md +250 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/dev.yml +32 -0
- data/docs/cohesion.png +0 -0
- data/exe/packwerk +6 -0
- data/lib/packwerk.rb +44 -0
- data/lib/packwerk/application_validator.rb +343 -0
- data/lib/packwerk/association_inspector.rb +44 -0
- data/lib/packwerk/checking_deprecated_references.rb +40 -0
- data/lib/packwerk/cli.rb +238 -0
- data/lib/packwerk/configuration.rb +82 -0
- data/lib/packwerk/const_node_inspector.rb +44 -0
- data/lib/packwerk/constant_discovery.rb +60 -0
- data/lib/packwerk/constant_name_inspector.rb +22 -0
- data/lib/packwerk/dependency_checker.rb +28 -0
- data/lib/packwerk/deprecated_references.rb +92 -0
- data/lib/packwerk/file_processor.rb +43 -0
- data/lib/packwerk/files_for_processing.rb +67 -0
- data/lib/packwerk/formatters/progress_formatter.rb +46 -0
- data/lib/packwerk/generators/application_validation.rb +62 -0
- data/lib/packwerk/generators/configuration_file.rb +69 -0
- data/lib/packwerk/generators/inflections_file.rb +43 -0
- data/lib/packwerk/generators/root_package.rb +37 -0
- data/lib/packwerk/generators/templates/inflections.yml +6 -0
- data/lib/packwerk/generators/templates/package.yml +17 -0
- data/lib/packwerk/generators/templates/packwerk +23 -0
- data/lib/packwerk/generators/templates/packwerk.yml.erb +23 -0
- data/lib/packwerk/generators/templates/packwerk_validator_test.rb +11 -0
- data/lib/packwerk/graph.rb +74 -0
- data/lib/packwerk/inflections/custom.rb +33 -0
- data/lib/packwerk/inflections/default.rb +73 -0
- data/lib/packwerk/inflector.rb +41 -0
- data/lib/packwerk/node.rb +259 -0
- data/lib/packwerk/node_processor.rb +49 -0
- data/lib/packwerk/node_visitor.rb +22 -0
- data/lib/packwerk/offense.rb +44 -0
- data/lib/packwerk/output_styles.rb +41 -0
- data/lib/packwerk/package.rb +56 -0
- data/lib/packwerk/package_set.rb +59 -0
- data/lib/packwerk/parsed_constant_definitions.rb +62 -0
- data/lib/packwerk/parsers.rb +23 -0
- data/lib/packwerk/parsers/erb.rb +66 -0
- data/lib/packwerk/parsers/factory.rb +34 -0
- data/lib/packwerk/parsers/ruby.rb +42 -0
- data/lib/packwerk/privacy_checker.rb +45 -0
- data/lib/packwerk/reference.rb +6 -0
- data/lib/packwerk/reference_extractor.rb +81 -0
- data/lib/packwerk/reference_lister.rb +23 -0
- data/lib/packwerk/run_context.rb +103 -0
- data/lib/packwerk/sanity_checker.rb +10 -0
- data/lib/packwerk/spring_command.rb +28 -0
- data/lib/packwerk/updating_deprecated_references.rb +51 -0
- data/lib/packwerk/version.rb +6 -0
- data/lib/packwerk/violation_type.rb +13 -0
- data/library.yml +6 -0
- data/packwerk.gemspec +58 -0
- data/service.yml +6 -0
- data/shipit.rubygems.yml +1 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +840 -0
- data/sorbet/rbi/gems/actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +571 -0
- data/sorbet/rbi/gems/actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +568 -0
- data/sorbet/rbi/gems/actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +5216 -0
- data/sorbet/rbi/gems/actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +663 -0
- data/sorbet/rbi/gems/actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +2504 -0
- data/sorbet/rbi/gems/activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +635 -0
- data/sorbet/rbi/gems/activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +1201 -0
- data/sorbet/rbi/gems/activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8011 -0
- data/sorbet/rbi/gems/activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +904 -0
- data/sorbet/rbi/gems/activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +3888 -0
- data/sorbet/rbi/gems/ast@2.4.1.rbi +54 -0
- data/sorbet/rbi/gems/better_html@1.0.15.rbi +317 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +8 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
- data/sorbet/rbi/gems/colorize@0.8.1.rbi +40 -0
- data/sorbet/rbi/gems/commander@4.5.2.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.1.6.rbi +1966 -0
- data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +26 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +138 -0
- data/sorbet/rbi/gems/erubi@1.9.0.rbi +39 -0
- data/sorbet/rbi/gems/globalid@0.4.2.rbi +178 -0
- data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
- data/sorbet/rbi/gems/html_tokenizer@0.0.7.rbi +46 -0
- data/sorbet/rbi/gems/i18n@1.8.2.rbi +633 -0
- data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.5.0.rbi +272 -0
- data/sorbet/rbi/gems/m@1.5.1.rbi +108 -0
- data/sorbet/rbi/gems/mail@2.7.1.rbi +2490 -0
- data/sorbet/rbi/gems/marcel@0.3.3.rbi +30 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +76 -0
- data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +47 -0
- data/sorbet/rbi/gems/mini_mime@1.0.2.rbi +71 -0
- data/sorbet/rbi/gems/mini_portile2@2.4.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.14.0.rbi +542 -0
- data/sorbet/rbi/gems/mocha@1.11.2.rbi +964 -0
- data/sorbet/rbi/gems/nio4r@2.5.2.rbi +89 -0
- data/sorbet/rbi/gems/nokogiri@1.10.9.rbi +1608 -0
- data/sorbet/rbi/gems/parallel@1.19.1.rbi +8 -0
- data/sorbet/rbi/gems/parlour@4.0.1.rbi +561 -0
- data/sorbet/rbi/gems/parser@2.7.1.4.rbi +1632 -0
- data/sorbet/rbi/gems/pry@0.13.1.rbi +8 -0
- data/sorbet/rbi/gems/rack-test@1.1.0.rbi +335 -0
- data/sorbet/rbi/gems/rack@2.2.2.rbi +1730 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +123 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +213 -0
- data/sorbet/rbi/gems/rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8 -0
- data/sorbet/rbi/gems/railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +869 -0
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +155 -0
- data/sorbet/rbi/gems/rake@13.0.1.rbi +841 -0
- data/sorbet/rbi/gems/rexml@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-performance@1.5.2.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-shopify@1.0.2.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.3.7.rbi +8 -0
- data/sorbet/rbi/gems/rubocop@0.82.0.rbi +8 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.10.1.rbi +8 -0
- data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +168 -0
- data/sorbet/rbi/gems/spoom@1.0.4.rbi +418 -0
- data/sorbet/rbi/gems/spring@2.1.0.rbi +160 -0
- data/sorbet/rbi/gems/sprockets-rails@3.2.1.rbi +431 -0
- data/sorbet/rbi/gems/sprockets@4.0.0.rbi +1132 -0
- data/sorbet/rbi/gems/tapioca@0.4.5.rbi +518 -0
- data/sorbet/rbi/gems/thor@1.0.1.rbi +892 -0
- data/sorbet/rbi/gems/tzinfo@2.0.2.rbi +547 -0
- data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
- data/sorbet/rbi/gems/websocket-driver@0.7.1.rbi +438 -0
- data/sorbet/rbi/gems/websocket-extensions@0.1.4.rbi +71 -0
- data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +8 -0
- data/sorbet/tapioca/require.rb +25 -0
- data/static/packwerk-check-demo.png +0 -0
- data/static/packwerk_check.gif +0 -0
- data/static/packwerk_check_violation.gif +0 -0
- data/static/packwerk_update.gif +0 -0
- data/static/packwerk_validate.gif +0 -0
- metadata +341 -0
@@ -0,0 +1,904 @@
|
|
1
|
+
# DO NOT EDIT MANUALLY
|
2
|
+
# This is an autogenerated file for types exported from the `activestorage` gem.
|
3
|
+
# Please instead update this file by running `dev typecheck update`.
|
4
|
+
|
5
|
+
# typed: true
|
6
|
+
|
7
|
+
module ActiveStorage
|
8
|
+
extend(::ActiveSupport::Autoload)
|
9
|
+
|
10
|
+
def analyzers; end
|
11
|
+
def analyzers=(val); end
|
12
|
+
def binary_content_type; end
|
13
|
+
def binary_content_type=(val); end
|
14
|
+
def content_types_allowed_inline; end
|
15
|
+
def content_types_allowed_inline=(val); end
|
16
|
+
def content_types_to_serve_as_binary; end
|
17
|
+
def content_types_to_serve_as_binary=(val); end
|
18
|
+
def draw_routes; end
|
19
|
+
def draw_routes=(val); end
|
20
|
+
def logger; end
|
21
|
+
def logger=(val); end
|
22
|
+
def paths; end
|
23
|
+
def paths=(val); end
|
24
|
+
def previewers; end
|
25
|
+
def previewers=(val); end
|
26
|
+
def queues; end
|
27
|
+
def queues=(val); end
|
28
|
+
def replace_on_assign_to_many; end
|
29
|
+
def replace_on_assign_to_many=(val); end
|
30
|
+
def routes_prefix; end
|
31
|
+
def routes_prefix=(val); end
|
32
|
+
def service_urls_expire_in; end
|
33
|
+
def service_urls_expire_in=(val); end
|
34
|
+
def track_variants; end
|
35
|
+
def track_variants=(val); end
|
36
|
+
def variable_content_types; end
|
37
|
+
def variable_content_types=(val); end
|
38
|
+
def variant_processor; end
|
39
|
+
def variant_processor=(val); end
|
40
|
+
def verifier; end
|
41
|
+
def verifier=(val); end
|
42
|
+
def web_image_content_types; end
|
43
|
+
def web_image_content_types=(val); end
|
44
|
+
|
45
|
+
class << self
|
46
|
+
def analyzers; end
|
47
|
+
def analyzers=(val); end
|
48
|
+
def binary_content_type; end
|
49
|
+
def binary_content_type=(val); end
|
50
|
+
def content_types_allowed_inline; end
|
51
|
+
def content_types_allowed_inline=(val); end
|
52
|
+
def content_types_to_serve_as_binary; end
|
53
|
+
def content_types_to_serve_as_binary=(val); end
|
54
|
+
def draw_routes; end
|
55
|
+
def draw_routes=(val); end
|
56
|
+
def gem_version; end
|
57
|
+
def logger; end
|
58
|
+
def logger=(val); end
|
59
|
+
def paths; end
|
60
|
+
def paths=(val); end
|
61
|
+
def previewers; end
|
62
|
+
def previewers=(val); end
|
63
|
+
def queues; end
|
64
|
+
def queues=(val); end
|
65
|
+
def railtie_helpers_paths; end
|
66
|
+
def railtie_namespace; end
|
67
|
+
def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end
|
68
|
+
def replace_on_assign_to_many; end
|
69
|
+
def replace_on_assign_to_many=(val); end
|
70
|
+
def routes_prefix; end
|
71
|
+
def routes_prefix=(val); end
|
72
|
+
def service_urls_expire_in; end
|
73
|
+
def service_urls_expire_in=(val); end
|
74
|
+
def table_name_prefix; end
|
75
|
+
def track_variants; end
|
76
|
+
def track_variants=(val); end
|
77
|
+
def use_relative_model_naming?; end
|
78
|
+
def variable_content_types; end
|
79
|
+
def variable_content_types=(val); end
|
80
|
+
def variant_processor; end
|
81
|
+
def variant_processor=(val); end
|
82
|
+
def verifier; end
|
83
|
+
def verifier=(val); end
|
84
|
+
def version; end
|
85
|
+
def web_image_content_types; end
|
86
|
+
def web_image_content_types=(val); end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob
|
91
|
+
def perform(blob); end
|
92
|
+
|
93
|
+
class << self
|
94
|
+
def queue_name; end
|
95
|
+
def rescue_handlers; end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
class ActiveStorage::Analyzer
|
100
|
+
def initialize(blob); end
|
101
|
+
|
102
|
+
def blob; end
|
103
|
+
def metadata; end
|
104
|
+
|
105
|
+
private
|
106
|
+
|
107
|
+
def download_blob_to_tempfile(&block); end
|
108
|
+
def logger; end
|
109
|
+
def tmpdir; end
|
110
|
+
|
111
|
+
class << self
|
112
|
+
def accept?(blob); end
|
113
|
+
def analyze_later?; end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer
|
118
|
+
def metadata; end
|
119
|
+
|
120
|
+
private
|
121
|
+
|
122
|
+
def read_image; end
|
123
|
+
def rotated_image?(image); end
|
124
|
+
|
125
|
+
class << self
|
126
|
+
def accept?(blob); end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
class ActiveStorage::Analyzer::NullAnalyzer < ::ActiveStorage::Analyzer
|
131
|
+
def metadata; end
|
132
|
+
|
133
|
+
class << self
|
134
|
+
def accept?(blob); end
|
135
|
+
def analyze_later?; end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer
|
140
|
+
def metadata; end
|
141
|
+
|
142
|
+
private
|
143
|
+
|
144
|
+
def angle; end
|
145
|
+
def computed_height; end
|
146
|
+
def display_aspect_ratio; end
|
147
|
+
def display_height_scale; end
|
148
|
+
def duration; end
|
149
|
+
def encoded_height; end
|
150
|
+
def encoded_width; end
|
151
|
+
def ffprobe_path; end
|
152
|
+
def height; end
|
153
|
+
def probe; end
|
154
|
+
def probe_from(file); end
|
155
|
+
def rotated?; end
|
156
|
+
def streams; end
|
157
|
+
def tags; end
|
158
|
+
def video_stream; end
|
159
|
+
def width; end
|
160
|
+
|
161
|
+
class << self
|
162
|
+
def accept?(blob); end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
class ActiveStorage::Attached
|
167
|
+
def initialize(name, record); end
|
168
|
+
|
169
|
+
def name; end
|
170
|
+
def record; end
|
171
|
+
|
172
|
+
private
|
173
|
+
|
174
|
+
def change; end
|
175
|
+
end
|
176
|
+
|
177
|
+
module ActiveStorage::Attached::Changes
|
178
|
+
extend(::ActiveSupport::Autoload)
|
179
|
+
end
|
180
|
+
|
181
|
+
class ActiveStorage::Attached::Changes::CreateMany
|
182
|
+
def initialize(name, record, attachables); end
|
183
|
+
|
184
|
+
def attachables; end
|
185
|
+
def attachments; end
|
186
|
+
def blobs; end
|
187
|
+
def name; end
|
188
|
+
def record; end
|
189
|
+
def save; end
|
190
|
+
def upload; end
|
191
|
+
|
192
|
+
private
|
193
|
+
|
194
|
+
def assign_associated_attachments; end
|
195
|
+
def build_subchange_from(attachable); end
|
196
|
+
def reset_associated_blobs; end
|
197
|
+
def subchanges; end
|
198
|
+
end
|
199
|
+
|
200
|
+
class ActiveStorage::Attached::Changes::CreateOne
|
201
|
+
def initialize(name, record, attachable); end
|
202
|
+
|
203
|
+
def attachable; end
|
204
|
+
def attachment; end
|
205
|
+
def blob; end
|
206
|
+
def name; end
|
207
|
+
def record; end
|
208
|
+
def save; end
|
209
|
+
def upload; end
|
210
|
+
|
211
|
+
private
|
212
|
+
|
213
|
+
def attachment_service_name; end
|
214
|
+
def build_attachment; end
|
215
|
+
def find_attachment; end
|
216
|
+
def find_or_build_attachment; end
|
217
|
+
def find_or_build_blob; end
|
218
|
+
end
|
219
|
+
|
220
|
+
class ActiveStorage::Attached::Changes::CreateOneOfMany < ::ActiveStorage::Attached::Changes::CreateOne
|
221
|
+
|
222
|
+
private
|
223
|
+
|
224
|
+
def find_attachment; end
|
225
|
+
end
|
226
|
+
|
227
|
+
class ActiveStorage::Attached::Changes::DeleteMany
|
228
|
+
def initialize(name, record); end
|
229
|
+
|
230
|
+
def attachables; end
|
231
|
+
def attachments; end
|
232
|
+
def blobs; end
|
233
|
+
def name; end
|
234
|
+
def record; end
|
235
|
+
def save; end
|
236
|
+
end
|
237
|
+
|
238
|
+
class ActiveStorage::Attached::Changes::DeleteOne
|
239
|
+
def initialize(name, record); end
|
240
|
+
|
241
|
+
def attachment; end
|
242
|
+
def name; end
|
243
|
+
def record; end
|
244
|
+
def save; end
|
245
|
+
end
|
246
|
+
|
247
|
+
class ActiveStorage::Attached::Many < ::ActiveStorage::Attached
|
248
|
+
def attach(*attachables); end
|
249
|
+
def attached?; end
|
250
|
+
def attachments; end
|
251
|
+
def blobs; end
|
252
|
+
def detach; end
|
253
|
+
def method_missing(method, *args, &block); end
|
254
|
+
|
255
|
+
private
|
256
|
+
|
257
|
+
def respond_to_missing?(name, include_private = T.unsafe(nil)); end
|
258
|
+
end
|
259
|
+
|
260
|
+
module ActiveStorage::Attached::Model
|
261
|
+
extend(::ActiveSupport::Concern)
|
262
|
+
|
263
|
+
mixes_in_class_methods(::ActiveStorage::Attached::Model::ClassMethods)
|
264
|
+
|
265
|
+
def attachment_changes; end
|
266
|
+
def changed_for_autosave?; end
|
267
|
+
def reload(*_); end
|
268
|
+
end
|
269
|
+
|
270
|
+
module ActiveStorage::Attached::Model::ClassMethods
|
271
|
+
def has_many_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil)); end
|
272
|
+
def has_one_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil)); end
|
273
|
+
|
274
|
+
private
|
275
|
+
|
276
|
+
def validate_service_configuration(association_name, service); end
|
277
|
+
end
|
278
|
+
|
279
|
+
class ActiveStorage::Attached::One < ::ActiveStorage::Attached
|
280
|
+
def attach(attachable); end
|
281
|
+
def attached?; end
|
282
|
+
def attachment; end
|
283
|
+
def blank?; end
|
284
|
+
def detach; end
|
285
|
+
def method_missing(method, *args, &block); end
|
286
|
+
def purge; end
|
287
|
+
def purge_later; end
|
288
|
+
|
289
|
+
private
|
290
|
+
|
291
|
+
def respond_to_missing?(name, include_private = T.unsafe(nil)); end
|
292
|
+
def write_attachment(attachment); end
|
293
|
+
end
|
294
|
+
|
295
|
+
class ActiveStorage::Attachment < ::ActiveRecord::Base
|
296
|
+
def autosave_associated_records_for_blob(*args); end
|
297
|
+
def autosave_associated_records_for_record(*args); end
|
298
|
+
def method_missing(method, *args, &block); end
|
299
|
+
def purge; end
|
300
|
+
def purge_later; end
|
301
|
+
|
302
|
+
private
|
303
|
+
|
304
|
+
def analyze_blob_later; end
|
305
|
+
def dependent; end
|
306
|
+
def identify_blob; end
|
307
|
+
def mirror_blob_later; end
|
308
|
+
def purge_dependent_blob_later; end
|
309
|
+
def respond_to_missing?(name, include_private = T.unsafe(nil)); end
|
310
|
+
|
311
|
+
class << self
|
312
|
+
def __callbacks; end
|
313
|
+
def _reflections; end
|
314
|
+
def _validators; end
|
315
|
+
def attribute_type_decorations; end
|
316
|
+
def defined_enums; end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
class ActiveStorage::BaseController < ::ActionController::Base
|
321
|
+
include(::ActiveStorage::SetCurrent)
|
322
|
+
|
323
|
+
|
324
|
+
private
|
325
|
+
|
326
|
+
def _layout(lookup_context, formats); end
|
327
|
+
|
328
|
+
class << self
|
329
|
+
def __callbacks; end
|
330
|
+
def _helpers; end
|
331
|
+
def middleware_stack; end
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
module ActiveStorage::BaseController::HelperMethods
|
336
|
+
include(::ActionController::Base::HelperMethods)
|
337
|
+
end
|
338
|
+
|
339
|
+
class ActiveStorage::BaseJob < ::ActiveJob::Base
|
340
|
+
end
|
341
|
+
|
342
|
+
class ActiveStorage::Blob < ::ActiveRecord::Base
|
343
|
+
include(::ActiveStorage::Blob::Analyzable)
|
344
|
+
include(::ActiveStorage::Blob::Identifiable)
|
345
|
+
include(::ActiveStorage::Blob::Representable)
|
346
|
+
|
347
|
+
def after_add_for_variant_records; end
|
348
|
+
def after_add_for_variant_records=(_); end
|
349
|
+
def after_add_for_variant_records?; end
|
350
|
+
def after_remove_for_variant_records; end
|
351
|
+
def after_remove_for_variant_records=(_); end
|
352
|
+
def after_remove_for_variant_records?; end
|
353
|
+
def autosave_associated_records_for_variant_records(*args); end
|
354
|
+
def before_add_for_variant_records; end
|
355
|
+
def before_add_for_variant_records=(_); end
|
356
|
+
def before_add_for_variant_records?; end
|
357
|
+
def before_remove_for_variant_records; end
|
358
|
+
def before_remove_for_variant_records=(_); end
|
359
|
+
def before_remove_for_variant_records?; end
|
360
|
+
def validate_associated_records_for_variant_records(*args); end
|
361
|
+
|
362
|
+
class << self
|
363
|
+
def __callbacks; end
|
364
|
+
def _reflections; end
|
365
|
+
def _validators; end
|
366
|
+
def after_add_for_variant_records; end
|
367
|
+
def after_add_for_variant_records=(value); end
|
368
|
+
def after_add_for_variant_records?; end
|
369
|
+
def after_remove_for_variant_records; end
|
370
|
+
def after_remove_for_variant_records=(value); end
|
371
|
+
def after_remove_for_variant_records?; end
|
372
|
+
def attribute_type_decorations; end
|
373
|
+
def before_add_for_variant_records; end
|
374
|
+
def before_add_for_variant_records=(value); end
|
375
|
+
def before_add_for_variant_records?; end
|
376
|
+
def before_remove_for_variant_records; end
|
377
|
+
def before_remove_for_variant_records=(value); end
|
378
|
+
def before_remove_for_variant_records?; end
|
379
|
+
def defined_enums; end
|
380
|
+
end
|
381
|
+
end
|
382
|
+
|
383
|
+
module ActiveStorage::Blob::Analyzable
|
384
|
+
def analyze; end
|
385
|
+
def analyze_later; end
|
386
|
+
def analyzed?; end
|
387
|
+
|
388
|
+
private
|
389
|
+
|
390
|
+
def analyzer; end
|
391
|
+
def analyzer_class; end
|
392
|
+
def extract_metadata_via_analyzer; end
|
393
|
+
end
|
394
|
+
|
395
|
+
module ActiveStorage::Blob::Identifiable
|
396
|
+
def identified?; end
|
397
|
+
def identify; end
|
398
|
+
|
399
|
+
private
|
400
|
+
|
401
|
+
def download_identifiable_chunk; end
|
402
|
+
def identify_content_type; end
|
403
|
+
def update_service_metadata; end
|
404
|
+
end
|
405
|
+
|
406
|
+
module ActiveStorage::Blob::Representable
|
407
|
+
extend(::ActiveSupport::Concern)
|
408
|
+
|
409
|
+
def preview(transformations); end
|
410
|
+
def previewable?; end
|
411
|
+
def representable?; end
|
412
|
+
def representation(transformations); end
|
413
|
+
def variable?; end
|
414
|
+
def variant(transformations); end
|
415
|
+
|
416
|
+
private
|
417
|
+
|
418
|
+
def variant_class; end
|
419
|
+
end
|
420
|
+
|
421
|
+
class ActiveStorage::BlobsController < ::ActiveStorage::BaseController
|
422
|
+
include(::ActiveStorage::SetBlob)
|
423
|
+
|
424
|
+
def show; end
|
425
|
+
|
426
|
+
private
|
427
|
+
|
428
|
+
def _layout(lookup_context, formats); end
|
429
|
+
|
430
|
+
class << self
|
431
|
+
def __callbacks; end
|
432
|
+
def _helpers; end
|
433
|
+
def middleware_stack; end
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
module ActiveStorage::BlobsController::HelperMethods
|
438
|
+
include(::ActionController::Base::HelperMethods)
|
439
|
+
include(::ActiveStorage::BaseController::HelperMethods)
|
440
|
+
end
|
441
|
+
|
442
|
+
class ActiveStorage::Current < ::ActiveSupport::CurrentAttributes
|
443
|
+
class << self
|
444
|
+
def host; end
|
445
|
+
def host=(attribute); end
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController
|
450
|
+
def create; end
|
451
|
+
|
452
|
+
private
|
453
|
+
|
454
|
+
def _layout(lookup_context, formats); end
|
455
|
+
def blob_args; end
|
456
|
+
def direct_upload_json(blob); end
|
457
|
+
|
458
|
+
class << self
|
459
|
+
def __callbacks; end
|
460
|
+
def _helpers; end
|
461
|
+
def middleware_stack; end
|
462
|
+
end
|
463
|
+
end
|
464
|
+
|
465
|
+
module ActiveStorage::DirectUploadsController::HelperMethods
|
466
|
+
include(::ActionController::Base::HelperMethods)
|
467
|
+
include(::ActiveStorage::BaseController::HelperMethods)
|
468
|
+
end
|
469
|
+
|
470
|
+
class ActiveStorage::DiskController < ::ActiveStorage::BaseController
|
471
|
+
include(::ActiveStorage::FileServer)
|
472
|
+
|
473
|
+
def show; end
|
474
|
+
def update; end
|
475
|
+
|
476
|
+
private
|
477
|
+
|
478
|
+
def _layout(lookup_context, formats); end
|
479
|
+
def acceptable_content?(token); end
|
480
|
+
def decode_verified_key; end
|
481
|
+
def decode_verified_token; end
|
482
|
+
def named_disk_service(name); end
|
483
|
+
|
484
|
+
class << self
|
485
|
+
def __callbacks; end
|
486
|
+
def _helpers; end
|
487
|
+
def middleware_stack; end
|
488
|
+
end
|
489
|
+
end
|
490
|
+
|
491
|
+
module ActiveStorage::DiskController::HelperMethods
|
492
|
+
include(::ActionController::Base::HelperMethods)
|
493
|
+
include(::ActiveStorage::BaseController::HelperMethods)
|
494
|
+
end
|
495
|
+
|
496
|
+
class ActiveStorage::Downloader
|
497
|
+
def initialize(service); end
|
498
|
+
|
499
|
+
def open(key, checksum:, name: T.unsafe(nil), tmpdir: T.unsafe(nil)); end
|
500
|
+
def service; end
|
501
|
+
|
502
|
+
private
|
503
|
+
|
504
|
+
def download(key, file); end
|
505
|
+
def open_tempfile(name, tmpdir = T.unsafe(nil)); end
|
506
|
+
def verify_integrity_of(file, checksum:); end
|
507
|
+
end
|
508
|
+
|
509
|
+
class ActiveStorage::Engine < ::Rails::Engine
|
510
|
+
end
|
511
|
+
|
512
|
+
class ActiveStorage::Error < ::StandardError
|
513
|
+
end
|
514
|
+
|
515
|
+
class ActiveStorage::FileNotFoundError < ::ActiveStorage::Error
|
516
|
+
end
|
517
|
+
|
518
|
+
module ActiveStorage::FileServer
|
519
|
+
|
520
|
+
private
|
521
|
+
|
522
|
+
def serve_file(path, content_type:, disposition:); end
|
523
|
+
end
|
524
|
+
|
525
|
+
class ActiveStorage::Filename
|
526
|
+
include(::Comparable)
|
527
|
+
|
528
|
+
def initialize(filename); end
|
529
|
+
|
530
|
+
def <=>(other); end
|
531
|
+
def as_json(*_); end
|
532
|
+
def base; end
|
533
|
+
def extension; end
|
534
|
+
def extension_with_delimiter; end
|
535
|
+
def extension_without_delimiter; end
|
536
|
+
def sanitized; end
|
537
|
+
def to_json; end
|
538
|
+
def to_s; end
|
539
|
+
|
540
|
+
class << self
|
541
|
+
def wrap(filename); end
|
542
|
+
end
|
543
|
+
end
|
544
|
+
|
545
|
+
class ActiveStorage::IntegrityError < ::ActiveStorage::Error
|
546
|
+
end
|
547
|
+
|
548
|
+
class ActiveStorage::InvariableError < ::ActiveStorage::Error
|
549
|
+
end
|
550
|
+
|
551
|
+
class ActiveStorage::LogSubscriber < ::ActiveSupport::LogSubscriber
|
552
|
+
def logger; end
|
553
|
+
def service_delete(event); end
|
554
|
+
def service_delete_prefixed(event); end
|
555
|
+
def service_download(event); end
|
556
|
+
def service_exist(event); end
|
557
|
+
def service_mirror(event); end
|
558
|
+
def service_streaming_download(event); end
|
559
|
+
def service_upload(event); end
|
560
|
+
def service_url(event); end
|
561
|
+
|
562
|
+
private
|
563
|
+
|
564
|
+
def debug(event, colored_message); end
|
565
|
+
def info(event, colored_message); end
|
566
|
+
def key_in(event); end
|
567
|
+
def log_prefix_for_service(event); end
|
568
|
+
end
|
569
|
+
|
570
|
+
class ActiveStorage::MirrorJob < ::ActiveStorage::BaseJob
|
571
|
+
def perform(key, checksum:); end
|
572
|
+
|
573
|
+
class << self
|
574
|
+
def queue_name; end
|
575
|
+
def rescue_handlers; end
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
class ActiveStorage::Preview
|
580
|
+
def initialize(blob, variation_or_variation_key); end
|
581
|
+
|
582
|
+
def blob; end
|
583
|
+
def image; end
|
584
|
+
def processed; end
|
585
|
+
def service_url(*args, &block); end
|
586
|
+
def url(**options); end
|
587
|
+
def variation; end
|
588
|
+
|
589
|
+
private
|
590
|
+
|
591
|
+
def previewer; end
|
592
|
+
def previewer_class; end
|
593
|
+
def process; end
|
594
|
+
def processed?; end
|
595
|
+
def variant; end
|
596
|
+
end
|
597
|
+
|
598
|
+
class ActiveStorage::Preview::UnprocessedError < ::StandardError
|
599
|
+
end
|
600
|
+
|
601
|
+
class ActiveStorage::Previewer
|
602
|
+
def initialize(blob); end
|
603
|
+
|
604
|
+
def blob; end
|
605
|
+
def preview(**options); end
|
606
|
+
|
607
|
+
private
|
608
|
+
|
609
|
+
def capture(*argv, to:); end
|
610
|
+
def download_blob_to_tempfile(&block); end
|
611
|
+
def draw(*argv); end
|
612
|
+
def instrument(operation, payload = T.unsafe(nil), &block); end
|
613
|
+
def logger; end
|
614
|
+
def open_tempfile; end
|
615
|
+
def tmpdir; end
|
616
|
+
|
617
|
+
class << self
|
618
|
+
def accept?(blob); end
|
619
|
+
end
|
620
|
+
end
|
621
|
+
|
622
|
+
class ActiveStorage::Previewer::MuPDFPreviewer < ::ActiveStorage::Previewer
|
623
|
+
def preview(**options); end
|
624
|
+
|
625
|
+
private
|
626
|
+
|
627
|
+
def draw_first_page_from(file, &block); end
|
628
|
+
|
629
|
+
class << self
|
630
|
+
def accept?(blob); end
|
631
|
+
def mutool_exists?; end
|
632
|
+
def mutool_path; end
|
633
|
+
end
|
634
|
+
end
|
635
|
+
|
636
|
+
class ActiveStorage::Previewer::PopplerPDFPreviewer < ::ActiveStorage::Previewer
|
637
|
+
def preview(**options); end
|
638
|
+
|
639
|
+
private
|
640
|
+
|
641
|
+
def draw_first_page_from(file, &block); end
|
642
|
+
|
643
|
+
class << self
|
644
|
+
def accept?(blob); end
|
645
|
+
def pdftoppm_exists?; end
|
646
|
+
def pdftoppm_path; end
|
647
|
+
end
|
648
|
+
end
|
649
|
+
|
650
|
+
class ActiveStorage::Previewer::VideoPreviewer < ::ActiveStorage::Previewer
|
651
|
+
def preview(**options); end
|
652
|
+
|
653
|
+
private
|
654
|
+
|
655
|
+
def draw_relevant_frame_from(file, &block); end
|
656
|
+
|
657
|
+
class << self
|
658
|
+
def accept?(blob); end
|
659
|
+
def ffmpeg_exists?; end
|
660
|
+
def ffmpeg_path; end
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
class ActiveStorage::PurgeJob < ::ActiveStorage::BaseJob
|
665
|
+
def perform(blob); end
|
666
|
+
|
667
|
+
class << self
|
668
|
+
def queue_name; end
|
669
|
+
def rescue_handlers; end
|
670
|
+
end
|
671
|
+
end
|
672
|
+
|
673
|
+
module ActiveStorage::Reflection
|
674
|
+
end
|
675
|
+
|
676
|
+
module ActiveStorage::Reflection::ActiveRecordExtensions
|
677
|
+
extend(::ActiveSupport::Concern)
|
678
|
+
|
679
|
+
mixes_in_class_methods(::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods)
|
680
|
+
end
|
681
|
+
|
682
|
+
module ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods
|
683
|
+
def reflect_on_all_attachments; end
|
684
|
+
def reflect_on_attachment(attachment); end
|
685
|
+
end
|
686
|
+
|
687
|
+
class ActiveStorage::Reflection::HasManyAttachedReflection < ::ActiveRecord::Reflection::MacroReflection
|
688
|
+
def macro; end
|
689
|
+
end
|
690
|
+
|
691
|
+
class ActiveStorage::Reflection::HasOneAttachedReflection < ::ActiveRecord::Reflection::MacroReflection
|
692
|
+
def macro; end
|
693
|
+
end
|
694
|
+
|
695
|
+
module ActiveStorage::Reflection::ReflectionExtension
|
696
|
+
def add_attachment_reflection(model, name, reflection); end
|
697
|
+
|
698
|
+
private
|
699
|
+
|
700
|
+
def reflection_class_for(macro); end
|
701
|
+
end
|
702
|
+
|
703
|
+
class ActiveStorage::RepresentationsController < ::ActiveStorage::BaseController
|
704
|
+
include(::ActiveStorage::SetBlob)
|
705
|
+
|
706
|
+
def show; end
|
707
|
+
|
708
|
+
private
|
709
|
+
|
710
|
+
def _layout(lookup_context, formats); end
|
711
|
+
|
712
|
+
class << self
|
713
|
+
def __callbacks; end
|
714
|
+
def _helpers; end
|
715
|
+
def middleware_stack; end
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
module ActiveStorage::RepresentationsController::HelperMethods
|
720
|
+
include(::ActionController::Base::HelperMethods)
|
721
|
+
include(::ActiveStorage::BaseController::HelperMethods)
|
722
|
+
end
|
723
|
+
|
724
|
+
class ActiveStorage::Service
|
725
|
+
extend(::ActiveSupport::Autoload)
|
726
|
+
|
727
|
+
def delete(key); end
|
728
|
+
def delete_prefixed(prefix); end
|
729
|
+
def download(key); end
|
730
|
+
def download_chunk(key, range); end
|
731
|
+
def exist?(key); end
|
732
|
+
def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:); end
|
733
|
+
def name; end
|
734
|
+
def name=(_); end
|
735
|
+
def open(*args, **options, &block); end
|
736
|
+
def public?; end
|
737
|
+
def update_metadata(key, **metadata); end
|
738
|
+
def upload(key, io, checksum: T.unsafe(nil), **options); end
|
739
|
+
def url(key, **options); end
|
740
|
+
def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:); end
|
741
|
+
|
742
|
+
private
|
743
|
+
|
744
|
+
def content_disposition_with(filename:, type: T.unsafe(nil)); end
|
745
|
+
def instrument(operation, payload = T.unsafe(nil), &block); end
|
746
|
+
def private_url(key, expires_in:, filename:, disposition:, content_type:, **_); end
|
747
|
+
def public_url(key, **_); end
|
748
|
+
def service_name; end
|
749
|
+
|
750
|
+
class << self
|
751
|
+
def build(configurator:, name:, service: T.unsafe(nil), **service_config); end
|
752
|
+
def configure(service_name, configurations); end
|
753
|
+
end
|
754
|
+
end
|
755
|
+
|
756
|
+
class ActiveStorage::Service::Configurator
|
757
|
+
def initialize(configurations); end
|
758
|
+
|
759
|
+
def build(service_name); end
|
760
|
+
def configurations; end
|
761
|
+
|
762
|
+
private
|
763
|
+
|
764
|
+
def config_for(name); end
|
765
|
+
def resolve(class_name); end
|
766
|
+
|
767
|
+
class << self
|
768
|
+
def build(service_name, configurations); end
|
769
|
+
end
|
770
|
+
end
|
771
|
+
|
772
|
+
class ActiveStorage::Service::Registry
|
773
|
+
def initialize(configurations); end
|
774
|
+
|
775
|
+
def fetch(name); end
|
776
|
+
|
777
|
+
private
|
778
|
+
|
779
|
+
def configurations; end
|
780
|
+
def configurator; end
|
781
|
+
def services; end
|
782
|
+
end
|
783
|
+
|
784
|
+
module ActiveStorage::SetBlob
|
785
|
+
extend(::ActiveSupport::Concern)
|
786
|
+
|
787
|
+
|
788
|
+
private
|
789
|
+
|
790
|
+
def set_blob; end
|
791
|
+
end
|
792
|
+
|
793
|
+
module ActiveStorage::SetCurrent
|
794
|
+
extend(::ActiveSupport::Concern)
|
795
|
+
end
|
796
|
+
|
797
|
+
module ActiveStorage::Transformers
|
798
|
+
extend(::ActiveSupport::Autoload)
|
799
|
+
end
|
800
|
+
|
801
|
+
class ActiveStorage::Transformers::Transformer
|
802
|
+
def initialize(transformations); end
|
803
|
+
|
804
|
+
def transform(file, format:); end
|
805
|
+
def transformations; end
|
806
|
+
|
807
|
+
private
|
808
|
+
|
809
|
+
def process(file, format:); end
|
810
|
+
end
|
811
|
+
|
812
|
+
class ActiveStorage::UnpreviewableError < ::ActiveStorage::Error
|
813
|
+
end
|
814
|
+
|
815
|
+
class ActiveStorage::UnrepresentableError < ::ActiveStorage::Error
|
816
|
+
end
|
817
|
+
|
818
|
+
module ActiveStorage::VERSION
|
819
|
+
end
|
820
|
+
|
821
|
+
ActiveStorage::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
|
822
|
+
|
823
|
+
ActiveStorage::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
|
824
|
+
|
825
|
+
ActiveStorage::VERSION::PRE = T.let(T.unsafe(nil), String)
|
826
|
+
|
827
|
+
ActiveStorage::VERSION::STRING = T.let(T.unsafe(nil), String)
|
828
|
+
|
829
|
+
ActiveStorage::VERSION::TINY = T.let(T.unsafe(nil), Integer)
|
830
|
+
|
831
|
+
class ActiveStorage::Variant
|
832
|
+
def initialize(blob, variation_or_variation_key); end
|
833
|
+
|
834
|
+
def blob; end
|
835
|
+
def content_type(*args, &block); end
|
836
|
+
def filename(*args, &block); end
|
837
|
+
def format(*args, &block); end
|
838
|
+
def image; end
|
839
|
+
def key; end
|
840
|
+
def processed; end
|
841
|
+
def service(*args, &block); end
|
842
|
+
def service_url(*args, &block); end
|
843
|
+
def url(expires_in: T.unsafe(nil), disposition: T.unsafe(nil)); end
|
844
|
+
def variation; end
|
845
|
+
|
846
|
+
private
|
847
|
+
|
848
|
+
def process; end
|
849
|
+
def processed?; end
|
850
|
+
def specification; end
|
851
|
+
end
|
852
|
+
|
853
|
+
class ActiveStorage::Variant::Specification < ::OpenStruct
|
854
|
+
end
|
855
|
+
|
856
|
+
class ActiveStorage::VariantRecord < ::ActiveRecord::Base
|
857
|
+
def autosave_associated_records_for_blob(*args); end
|
858
|
+
|
859
|
+
class << self
|
860
|
+
def __callbacks; end
|
861
|
+
def _reflections; end
|
862
|
+
def _validators; end
|
863
|
+
def attribute_type_decorations; end
|
864
|
+
def defined_enums; end
|
865
|
+
end
|
866
|
+
end
|
867
|
+
|
868
|
+
class ActiveStorage::VariantWithRecord
|
869
|
+
def initialize(blob, variation); end
|
870
|
+
|
871
|
+
def blob; end
|
872
|
+
def image; end
|
873
|
+
def process; end
|
874
|
+
def processed; end
|
875
|
+
def processed?; end
|
876
|
+
def service_url(*args, &block); end
|
877
|
+
def url(**options); end
|
878
|
+
def variation; end
|
879
|
+
|
880
|
+
private
|
881
|
+
|
882
|
+
def create_or_find_record(image:); end
|
883
|
+
def record; end
|
884
|
+
def transform_blob; end
|
885
|
+
end
|
886
|
+
|
887
|
+
class ActiveStorage::Variation
|
888
|
+
def initialize(transformations); end
|
889
|
+
|
890
|
+
def digest; end
|
891
|
+
def key; end
|
892
|
+
def transform(file, format: T.unsafe(nil), &block); end
|
893
|
+
def transformations; end
|
894
|
+
|
895
|
+
private
|
896
|
+
|
897
|
+
def transformer; end
|
898
|
+
|
899
|
+
class << self
|
900
|
+
def decode(key); end
|
901
|
+
def encode(transformations); end
|
902
|
+
def wrap(variator); end
|
903
|
+
end
|
904
|
+
end
|