rails_type_id 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/.rubocop.yml +25 -0
- data/.ruby-version +1 -0
- data/README.md +46 -0
- data/Rakefile +16 -0
- data/lib/rails_type_id/concern.rb +129 -0
- data/lib/rails_type_id/require.rb +6 -0
- data/lib/rails_type_id/test_helper.rb +16 -0
- data/lib/rails_type_id/version.rb +6 -0
- data/lib/rails_type_id.rb +9 -0
- data/lib/tapioca/dsl/compilers/rails_type_id_compiler.rb +49 -0
- data/sig/rails_type_id.rbs +4 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
- data/sorbet/rbi/annotations/actionpack.rbi +430 -0
- data/sorbet/rbi/annotations/actionview.rbi +75 -0
- data/sorbet/rbi/annotations/activejob.rbi +44 -0
- data/sorbet/rbi/annotations/activemodel.rbi +89 -0
- data/sorbet/rbi/annotations/activerecord.rbi +98 -0
- data/sorbet/rbi/annotations/activesupport.rbi +468 -0
- data/sorbet/rbi/annotations/globalid.rbi +30 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/railties.rbi +61 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/dsl/.gitattributes +1 -0
- data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +21 -0
- data/sorbet/rbi/dsl/active_model/validations.rbi +26 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
- data/sorbet/rbi/dsl/rails_type_id/concern.rbi +22 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/actioncable@8.0.2.rbi +3133 -0
- data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +991 -0
- data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +2775 -0
- data/sorbet/rbi/gems/actionpack@8.0.2.rbi +21167 -0
- data/sorbet/rbi/gems/actiontext@8.0.2.rbi +1449 -0
- data/sorbet/rbi/gems/actionview@8.0.2.rbi +15789 -0
- data/sorbet/rbi/gems/activejob@8.0.2.rbi +2864 -0
- data/sorbet/rbi/gems/activemodel@8.0.2.rbi +6946 -0
- data/sorbet/rbi/gems/activerecord@8.0.2.rbi +42458 -0
- data/sorbet/rbi/gems/activestorage@8.0.2.rbi +2156 -0
- data/sorbet/rbi/gems/activesupport@8.0.2.rbi +21274 -0
- data/sorbet/rbi/gems/ast@2.4.3.rbi +586 -0
- data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
- data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
- data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +275 -0
- data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11734 -0
- data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
- data/sorbet/rbi/gems/date@3.4.1.rbi +403 -0
- data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
- data/sorbet/rbi/gems/erb@5.0.2.rbi +878 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
- data/sorbet/rbi/gems/globalid@1.2.1.rbi +742 -0
- data/sorbet/rbi/gems/i18n@1.14.7.rbi +2383 -0
- data/sorbet/rbi/gems/io-console@0.8.1.rbi +9 -0
- data/sorbet/rbi/gems/json@2.12.2.rbi +2287 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +323 -0
- data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
- data/sorbet/rbi/gems/loofah@2.24.1.rbi +1105 -0
- data/sorbet/rbi/gems/mail@2.8.1.rbi +8890 -0
- data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
- data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
- data/sorbet/rbi/gems/minitest@5.25.5.rbi +2231 -0
- data/sorbet/rbi/gems/net-imap@0.5.9.rbi +10285 -0
- data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
- data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
- data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +1240 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +177 -0
- data/sorbet/rbi/gems/nio4r@2.7.4.rbi +388 -0
- data/sorbet/rbi/gems/nokogiri@1.18.9.rbi +8548 -0
- data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
- data/sorbet/rbi/gems/parser@3.3.9.0.rbi +5537 -0
- data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
- data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
- data/sorbet/rbi/gems/prism@1.4.0.rbi +41790 -0
- data/sorbet/rbi/gems/psych@5.2.6.rbi +2542 -0
- data/sorbet/rbi/gems/racc@1.8.1.rbi +168 -0
- data/sorbet/rbi/gems/rack-session@2.1.1.rbi +722 -0
- data/sorbet/rbi/gems/rack-test@2.2.0.rbi +729 -0
- data/sorbet/rbi/gems/rack@3.2.0.rbi +5054 -0
- data/sorbet/rbi/gems/rackup@2.2.1.rbi +230 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +790 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +645 -0
- data/sorbet/rbi/gems/rails@8.0.2.rbi +9 -0
- data/sorbet/rbi/gems/railties@8.0.2.rbi +4014 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.3.0.rbi +3039 -0
- data/sorbet/rbi/gems/rbi@0.3.6.rbi +5162 -0
- data/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi +7895 -0
- data/sorbet/rbi/gems/rdoc@6.14.2.rbi +12944 -0
- data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3833 -0
- data/sorbet/rbi/gems/reline@0.6.2.rbi +9 -0
- data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
- data/sorbet/rbi/gems/rexml@3.4.1.rbi +5205 -0
- data/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi +7473 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi +2386 -0
- data/sorbet/rbi/gems/rubocop@1.79.1.rbi +63674 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
- data/sorbet/rbi/gems/spoom@1.7.5.rbi +5832 -0
- data/sorbet/rbi/gems/sqlite3@2.7.3.rbi +1989 -0
- data/sorbet/rbi/gems/stringio@3.1.7.rbi +9 -0
- data/sorbet/rbi/gems/tapioca@0.17.7.rbi +3692 -0
- data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
- data/sorbet/rbi/gems/timeout@0.4.3.rbi +157 -0
- data/sorbet/rbi/gems/typeid@0.2.2.rbi +239 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5919 -0
- data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
- data/sorbet/rbi/gems/uri@1.0.3.rbi +2354 -0
- data/sorbet/rbi/gems/useragent@0.16.11.rbi +9 -0
- data/sorbet/rbi/gems/uuid7@0.2.0.rbi +60 -0
- data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +1065 -0
- data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +117 -0
- data/sorbet/rbi/gems/with_model@2.2.0.rbi +282 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +430 -0
- data/sorbet/rbi/gems/yard@0.9.37.rbi +18512 -0
- data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1196 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +13 -0
- metadata +208 -0
@@ -0,0 +1,2156 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `activestorage` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem activestorage`.
|
6
|
+
|
7
|
+
|
8
|
+
class ActiveRecord::Base
|
9
|
+
include ::ActiveModel::ForbiddenAttributesProtection
|
10
|
+
include ::ActiveModel::AttributeAssignment
|
11
|
+
include ::ActiveModel::Access
|
12
|
+
include ::ActiveModel::Serialization
|
13
|
+
include ::ActiveStorage::Attached::Model
|
14
|
+
include ::ActiveStorage::Reflection::ActiveRecordExtensions
|
15
|
+
extend ::ActiveStorage::Attached::Model::ClassMethods
|
16
|
+
extend ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods
|
17
|
+
end
|
18
|
+
|
19
|
+
module ActiveRecord::Reflection
|
20
|
+
extend ::ActiveStorage::Reflection::ReflectionExtension
|
21
|
+
end
|
22
|
+
|
23
|
+
# :markup: markdown
|
24
|
+
# :include: ../README.md
|
25
|
+
#
|
26
|
+
# source://activestorage//lib/active_storage/gem_version.rb#3
|
27
|
+
module ActiveStorage
|
28
|
+
extend ::ActiveSupport::Autoload
|
29
|
+
|
30
|
+
# source://activestorage//lib/active_storage.rb#55
|
31
|
+
def analyzers; end
|
32
|
+
|
33
|
+
# source://activestorage//lib/active_storage.rb#55
|
34
|
+
def analyzers=(val); end
|
35
|
+
|
36
|
+
# source://activestorage//lib/active_storage.rb#61
|
37
|
+
def binary_content_type; end
|
38
|
+
|
39
|
+
# source://activestorage//lib/active_storage.rb#61
|
40
|
+
def binary_content_type=(val); end
|
41
|
+
|
42
|
+
# source://activestorage//lib/active_storage.rb#63
|
43
|
+
def content_types_allowed_inline; end
|
44
|
+
|
45
|
+
# source://activestorage//lib/active_storage.rb#63
|
46
|
+
def content_types_allowed_inline=(val); end
|
47
|
+
|
48
|
+
# source://activestorage//lib/active_storage.rb#62
|
49
|
+
def content_types_to_serve_as_binary; end
|
50
|
+
|
51
|
+
# source://activestorage//lib/active_storage.rb#62
|
52
|
+
def content_types_to_serve_as_binary=(val); end
|
53
|
+
|
54
|
+
# source://activestorage//lib/active_storage.rb#361
|
55
|
+
def draw_routes; end
|
56
|
+
|
57
|
+
# source://activestorage//lib/active_storage.rb#361
|
58
|
+
def draw_routes=(val); end
|
59
|
+
|
60
|
+
# source://activestorage//lib/active_storage.rb#48
|
61
|
+
def logger; end
|
62
|
+
|
63
|
+
# source://activestorage//lib/active_storage.rb#48
|
64
|
+
def logger=(val); end
|
65
|
+
|
66
|
+
# source://activestorage//lib/active_storage.rb#57
|
67
|
+
def paths; end
|
68
|
+
|
69
|
+
# source://activestorage//lib/active_storage.rb#57
|
70
|
+
def paths=(val); end
|
71
|
+
|
72
|
+
# source://activestorage//lib/active_storage.rb#54
|
73
|
+
def previewers; end
|
74
|
+
|
75
|
+
# source://activestorage//lib/active_storage.rb#54
|
76
|
+
def previewers=(val); end
|
77
|
+
|
78
|
+
# source://activestorage//lib/active_storage.rb#52
|
79
|
+
def queues; end
|
80
|
+
|
81
|
+
# source://activestorage//lib/active_storage.rb#52
|
82
|
+
def queues=(val); end
|
83
|
+
|
84
|
+
# source://activestorage//lib/active_storage.rb#362
|
85
|
+
def resolve_model_to_route; end
|
86
|
+
|
87
|
+
# source://activestorage//lib/active_storage.rb#362
|
88
|
+
def resolve_model_to_route=(val); end
|
89
|
+
|
90
|
+
# source://activestorage//lib/active_storage.rb#360
|
91
|
+
def routes_prefix; end
|
92
|
+
|
93
|
+
# source://activestorage//lib/active_storage.rb#360
|
94
|
+
def routes_prefix=(val); end
|
95
|
+
|
96
|
+
# source://activestorage//lib/active_storage.rb#356
|
97
|
+
def service_urls_expire_in; end
|
98
|
+
|
99
|
+
# source://activestorage//lib/active_storage.rb#356
|
100
|
+
def service_urls_expire_in=(val); end
|
101
|
+
|
102
|
+
# source://activestorage//lib/active_storage.rb#65
|
103
|
+
def supported_image_processing_methods; end
|
104
|
+
|
105
|
+
# source://activestorage//lib/active_storage.rb#65
|
106
|
+
def supported_image_processing_methods=(val); end
|
107
|
+
|
108
|
+
# source://activestorage//lib/active_storage.rb#357
|
109
|
+
def touch_attachment_records; end
|
110
|
+
|
111
|
+
# source://activestorage//lib/active_storage.rb#357
|
112
|
+
def touch_attachment_records=(val); end
|
113
|
+
|
114
|
+
# source://activestorage//lib/active_storage.rb#364
|
115
|
+
def track_variants; end
|
116
|
+
|
117
|
+
# source://activestorage//lib/active_storage.rb#364
|
118
|
+
def track_variants=(val); end
|
119
|
+
|
120
|
+
# source://activestorage//lib/active_storage.rb#354
|
121
|
+
def unsupported_image_processing_arguments; end
|
122
|
+
|
123
|
+
# source://activestorage//lib/active_storage.rb#354
|
124
|
+
def unsupported_image_processing_arguments=(val); end
|
125
|
+
|
126
|
+
# source://activestorage//lib/active_storage.rb#358
|
127
|
+
def urls_expire_in; end
|
128
|
+
|
129
|
+
# source://activestorage//lib/active_storage.rb#358
|
130
|
+
def urls_expire_in=(val); end
|
131
|
+
|
132
|
+
# source://activestorage//lib/active_storage.rb#59
|
133
|
+
def variable_content_types; end
|
134
|
+
|
135
|
+
# source://activestorage//lib/active_storage.rb#59
|
136
|
+
def variable_content_types=(val); end
|
137
|
+
|
138
|
+
# source://activestorage//lib/active_storage.rb#50
|
139
|
+
def variant_processor; end
|
140
|
+
|
141
|
+
# source://activestorage//lib/active_storage.rb#50
|
142
|
+
def variant_processor=(val); end
|
143
|
+
|
144
|
+
# source://activestorage//lib/active_storage.rb#49
|
145
|
+
def verifier; end
|
146
|
+
|
147
|
+
# source://activestorage//lib/active_storage.rb#49
|
148
|
+
def verifier=(val); end
|
149
|
+
|
150
|
+
# source://activestorage//lib/active_storage.rb#366
|
151
|
+
def video_preview_arguments; end
|
152
|
+
|
153
|
+
# source://activestorage//lib/active_storage.rb#366
|
154
|
+
def video_preview_arguments=(val); end
|
155
|
+
|
156
|
+
# source://activestorage//lib/active_storage.rb#60
|
157
|
+
def web_image_content_types; end
|
158
|
+
|
159
|
+
# source://activestorage//lib/active_storage.rb#60
|
160
|
+
def web_image_content_types=(val); end
|
161
|
+
|
162
|
+
class << self
|
163
|
+
# source://activestorage//lib/active_storage.rb#55
|
164
|
+
def analyzers; end
|
165
|
+
|
166
|
+
# source://activestorage//lib/active_storage.rb#55
|
167
|
+
def analyzers=(val); end
|
168
|
+
|
169
|
+
# source://activestorage//lib/active_storage.rb#61
|
170
|
+
def binary_content_type; end
|
171
|
+
|
172
|
+
# source://activestorage//lib/active_storage.rb#61
|
173
|
+
def binary_content_type=(val); end
|
174
|
+
|
175
|
+
# source://activestorage//lib/active_storage.rb#63
|
176
|
+
def content_types_allowed_inline; end
|
177
|
+
|
178
|
+
# source://activestorage//lib/active_storage.rb#63
|
179
|
+
def content_types_allowed_inline=(val); end
|
180
|
+
|
181
|
+
# source://activestorage//lib/active_storage.rb#62
|
182
|
+
def content_types_to_serve_as_binary; end
|
183
|
+
|
184
|
+
# source://activestorage//lib/active_storage.rb#62
|
185
|
+
def content_types_to_serve_as_binary=(val); end
|
186
|
+
|
187
|
+
# source://activestorage//lib/active_storage/deprecator.rb#4
|
188
|
+
def deprecator; end
|
189
|
+
|
190
|
+
# source://activestorage//lib/active_storage.rb#361
|
191
|
+
def draw_routes; end
|
192
|
+
|
193
|
+
# source://activestorage//lib/active_storage.rb#361
|
194
|
+
def draw_routes=(val); end
|
195
|
+
|
196
|
+
# Returns the currently loaded version of Active Storage as a +Gem::Version+.
|
197
|
+
#
|
198
|
+
# source://activestorage//lib/active_storage/gem_version.rb#5
|
199
|
+
def gem_version; end
|
200
|
+
|
201
|
+
# source://activestorage//lib/active_storage.rb#48
|
202
|
+
def logger; end
|
203
|
+
|
204
|
+
# source://activestorage//lib/active_storage.rb#48
|
205
|
+
def logger=(val); end
|
206
|
+
|
207
|
+
# source://activestorage//lib/active_storage.rb#57
|
208
|
+
def paths; end
|
209
|
+
|
210
|
+
# source://activestorage//lib/active_storage.rb#57
|
211
|
+
def paths=(val); end
|
212
|
+
|
213
|
+
# source://activestorage//lib/active_storage.rb#54
|
214
|
+
def previewers; end
|
215
|
+
|
216
|
+
# source://activestorage//lib/active_storage.rb#54
|
217
|
+
def previewers=(val); end
|
218
|
+
|
219
|
+
# source://activestorage//lib/active_storage.rb#52
|
220
|
+
def queues; end
|
221
|
+
|
222
|
+
# source://activestorage//lib/active_storage.rb#52
|
223
|
+
def queues=(val); end
|
224
|
+
|
225
|
+
# source://activestorage//lib/active_storage/engine.rb#26
|
226
|
+
def railtie_helpers_paths; end
|
227
|
+
|
228
|
+
# source://activestorage//lib/active_storage/engine.rb#26
|
229
|
+
def railtie_namespace; end
|
230
|
+
|
231
|
+
# source://activestorage//lib/active_storage/engine.rb#26
|
232
|
+
def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end
|
233
|
+
|
234
|
+
# source://activestorage//lib/active_storage.rb#362
|
235
|
+
def resolve_model_to_route; end
|
236
|
+
|
237
|
+
# source://activestorage//lib/active_storage.rb#362
|
238
|
+
def resolve_model_to_route=(val); end
|
239
|
+
|
240
|
+
# source://activestorage//lib/active_storage.rb#360
|
241
|
+
def routes_prefix; end
|
242
|
+
|
243
|
+
# source://activestorage//lib/active_storage.rb#360
|
244
|
+
def routes_prefix=(val); end
|
245
|
+
|
246
|
+
# source://activestorage//lib/active_storage.rb#356
|
247
|
+
def service_urls_expire_in; end
|
248
|
+
|
249
|
+
# source://activestorage//lib/active_storage.rb#356
|
250
|
+
def service_urls_expire_in=(val); end
|
251
|
+
|
252
|
+
# source://activestorage//lib/active_storage.rb#65
|
253
|
+
def supported_image_processing_methods; end
|
254
|
+
|
255
|
+
# source://activestorage//lib/active_storage.rb#65
|
256
|
+
def supported_image_processing_methods=(val); end
|
257
|
+
|
258
|
+
# source://activestorage//lib/active_storage/engine.rb#26
|
259
|
+
def table_name_prefix; end
|
260
|
+
|
261
|
+
# source://activestorage//lib/active_storage.rb#357
|
262
|
+
def touch_attachment_records; end
|
263
|
+
|
264
|
+
# source://activestorage//lib/active_storage.rb#357
|
265
|
+
def touch_attachment_records=(val); end
|
266
|
+
|
267
|
+
# source://activestorage//lib/active_storage.rb#364
|
268
|
+
def track_variants; end
|
269
|
+
|
270
|
+
# source://activestorage//lib/active_storage.rb#364
|
271
|
+
def track_variants=(val); end
|
272
|
+
|
273
|
+
# source://activestorage//lib/active_storage.rb#354
|
274
|
+
def unsupported_image_processing_arguments; end
|
275
|
+
|
276
|
+
# source://activestorage//lib/active_storage.rb#354
|
277
|
+
def unsupported_image_processing_arguments=(val); end
|
278
|
+
|
279
|
+
# source://activestorage//lib/active_storage.rb#358
|
280
|
+
def urls_expire_in; end
|
281
|
+
|
282
|
+
# source://activestorage//lib/active_storage.rb#358
|
283
|
+
def urls_expire_in=(val); end
|
284
|
+
|
285
|
+
# source://activestorage//lib/active_storage/engine.rb#26
|
286
|
+
def use_relative_model_naming?; end
|
287
|
+
|
288
|
+
# source://activestorage//lib/active_storage.rb#59
|
289
|
+
def variable_content_types; end
|
290
|
+
|
291
|
+
# source://activestorage//lib/active_storage.rb#59
|
292
|
+
def variable_content_types=(val); end
|
293
|
+
|
294
|
+
# source://activestorage//lib/active_storage.rb#50
|
295
|
+
def variant_processor; end
|
296
|
+
|
297
|
+
# source://activestorage//lib/active_storage.rb#50
|
298
|
+
def variant_processor=(val); end
|
299
|
+
|
300
|
+
# source://activestorage//lib/active_storage.rb#49
|
301
|
+
def verifier; end
|
302
|
+
|
303
|
+
# source://activestorage//lib/active_storage.rb#49
|
304
|
+
def verifier=(val); end
|
305
|
+
|
306
|
+
# Returns the currently loaded version of Active Storage as a +Gem::Version+.
|
307
|
+
#
|
308
|
+
# source://activestorage//lib/active_storage/version.rb#7
|
309
|
+
def version; end
|
310
|
+
|
311
|
+
# source://activestorage//lib/active_storage.rb#366
|
312
|
+
def video_preview_arguments; end
|
313
|
+
|
314
|
+
# source://activestorage//lib/active_storage.rb#366
|
315
|
+
def video_preview_arguments=(val); end
|
316
|
+
|
317
|
+
# source://activestorage//lib/active_storage.rb#60
|
318
|
+
def web_image_content_types; end
|
319
|
+
|
320
|
+
# source://activestorage//lib/active_storage.rb#60
|
321
|
+
def web_image_content_types=(val); end
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob
|
326
|
+
def perform(blob); end
|
327
|
+
|
328
|
+
class << self
|
329
|
+
private
|
330
|
+
|
331
|
+
def __class_attr_queue_name; end
|
332
|
+
def __class_attr_queue_name=(new_value); end
|
333
|
+
def __class_attr_rescue_handlers; end
|
334
|
+
def __class_attr_rescue_handlers=(new_value); end
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
338
|
+
# = Active Storage \Analyzer
|
339
|
+
#
|
340
|
+
# This is an abstract base class for analyzers, which extract metadata from blobs. See
|
341
|
+
# ActiveStorage::Analyzer::VideoAnalyzer for an example of a concrete subclass.
|
342
|
+
#
|
343
|
+
# source://activestorage//lib/active_storage/analyzer.rb#8
|
344
|
+
class ActiveStorage::Analyzer
|
345
|
+
# @return [Analyzer] a new instance of Analyzer
|
346
|
+
#
|
347
|
+
# source://activestorage//lib/active_storage/analyzer.rb#23
|
348
|
+
def initialize(blob); end
|
349
|
+
|
350
|
+
# Returns the value of attribute blob.
|
351
|
+
#
|
352
|
+
# source://activestorage//lib/active_storage/analyzer.rb#9
|
353
|
+
def blob; end
|
354
|
+
|
355
|
+
# Override this method in a concrete subclass. Have it return a Hash of metadata.
|
356
|
+
#
|
357
|
+
# @raise [NotImplementedError]
|
358
|
+
#
|
359
|
+
# source://activestorage//lib/active_storage/analyzer.rb#28
|
360
|
+
def metadata; end
|
361
|
+
|
362
|
+
private
|
363
|
+
|
364
|
+
# Downloads the blob to a tempfile on disk. Yields the tempfile.
|
365
|
+
#
|
366
|
+
# source://activestorage//lib/active_storage/analyzer.rb#34
|
367
|
+
def download_blob_to_tempfile(&block); end
|
368
|
+
|
369
|
+
# source://activestorage//lib/active_storage/analyzer.rb#46
|
370
|
+
def instrument(analyzer, &block); end
|
371
|
+
|
372
|
+
# source://activestorage//lib/active_storage/analyzer.rb#38
|
373
|
+
def logger; end
|
374
|
+
|
375
|
+
# source://activestorage//lib/active_storage/analyzer.rb#42
|
376
|
+
def tmpdir; end
|
377
|
+
|
378
|
+
class << self
|
379
|
+
# Implement this method in a concrete subclass. Have it return true when given a blob from which
|
380
|
+
# the analyzer can extract metadata.
|
381
|
+
#
|
382
|
+
# @return [Boolean]
|
383
|
+
#
|
384
|
+
# source://activestorage//lib/active_storage/analyzer.rb#13
|
385
|
+
def accept?(blob); end
|
386
|
+
|
387
|
+
# Implement this method in concrete subclasses. It will determine if blob analysis
|
388
|
+
# should be done in a job or performed inline. By default, analysis is enqueued in a job.
|
389
|
+
#
|
390
|
+
# @return [Boolean]
|
391
|
+
#
|
392
|
+
# source://activestorage//lib/active_storage/analyzer.rb#19
|
393
|
+
def analyze_later?; end
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#14
|
398
|
+
class ActiveStorage::Analyzer::AudioAnalyzer < ::ActiveStorage::Analyzer
|
399
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#19
|
400
|
+
def metadata; end
|
401
|
+
|
402
|
+
private
|
403
|
+
|
404
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#44
|
405
|
+
def audio_stream; end
|
406
|
+
|
407
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#29
|
408
|
+
def bit_rate; end
|
409
|
+
|
410
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#24
|
411
|
+
def duration; end
|
412
|
+
|
413
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#73
|
414
|
+
def ffprobe_path; end
|
415
|
+
|
416
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#52
|
417
|
+
def probe; end
|
418
|
+
|
419
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#56
|
420
|
+
def probe_from(file); end
|
421
|
+
|
422
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#34
|
423
|
+
def sample_rate; end
|
424
|
+
|
425
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#48
|
426
|
+
def streams; end
|
427
|
+
|
428
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#39
|
429
|
+
def tags; end
|
430
|
+
|
431
|
+
class << self
|
432
|
+
# source://activestorage//lib/active_storage/analyzer/audio_analyzer.rb#15
|
433
|
+
def accept?(blob); end
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#14
|
438
|
+
class ActiveStorage::Analyzer::ImageAnalyzer < ::ActiveStorage::Analyzer
|
439
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#19
|
440
|
+
def metadata; end
|
441
|
+
|
442
|
+
class << self
|
443
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer.rb#15
|
444
|
+
def accept?(blob); end
|
445
|
+
end
|
446
|
+
end
|
447
|
+
|
448
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#6
|
449
|
+
class ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick < ::ActiveStorage::Analyzer::ImageAnalyzer
|
450
|
+
private
|
451
|
+
|
452
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#12
|
453
|
+
def read_image; end
|
454
|
+
|
455
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#37
|
456
|
+
def rotated_image?(image); end
|
457
|
+
|
458
|
+
class << self
|
459
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/image_magick.rb#7
|
460
|
+
def accept?(blob); end
|
461
|
+
end
|
462
|
+
end
|
463
|
+
|
464
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#6
|
465
|
+
class ActiveStorage::Analyzer::ImageAnalyzer::Vips < ::ActiveStorage::Analyzer::ImageAnalyzer
|
466
|
+
private
|
467
|
+
|
468
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#12
|
469
|
+
def read_image; end
|
470
|
+
|
471
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#41
|
472
|
+
def rotated_image?(image); end
|
473
|
+
|
474
|
+
class << self
|
475
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#7
|
476
|
+
def accept?(blob); end
|
477
|
+
end
|
478
|
+
end
|
479
|
+
|
480
|
+
# source://activestorage//lib/active_storage/analyzer/image_analyzer/vips.rb#40
|
481
|
+
ActiveStorage::Analyzer::ImageAnalyzer::Vips::ROTATIONS = T.let(T.unsafe(nil), Regexp)
|
482
|
+
|
483
|
+
# source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#4
|
484
|
+
class ActiveStorage::Analyzer::NullAnalyzer < ::ActiveStorage::Analyzer
|
485
|
+
# source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#13
|
486
|
+
def metadata; end
|
487
|
+
|
488
|
+
class << self
|
489
|
+
# source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#5
|
490
|
+
def accept?(blob); end
|
491
|
+
|
492
|
+
# source://activestorage//lib/active_storage/analyzer/null_analyzer.rb#9
|
493
|
+
def analyze_later?; end
|
494
|
+
end
|
495
|
+
end
|
496
|
+
|
497
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#24
|
498
|
+
class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer
|
499
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#29
|
500
|
+
def metadata; end
|
501
|
+
|
502
|
+
private
|
503
|
+
|
504
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#55
|
505
|
+
def angle; end
|
506
|
+
|
507
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#82
|
508
|
+
def audio?; end
|
509
|
+
|
510
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#120
|
511
|
+
def audio_stream; end
|
512
|
+
|
513
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#90
|
514
|
+
def computed_height; end
|
515
|
+
|
516
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#128
|
517
|
+
def container; end
|
518
|
+
|
519
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#67
|
520
|
+
def display_aspect_ratio; end
|
521
|
+
|
522
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#104
|
523
|
+
def display_height_scale; end
|
524
|
+
|
525
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#63
|
526
|
+
def display_matrix; end
|
527
|
+
|
528
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#50
|
529
|
+
def duration; end
|
530
|
+
|
531
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#100
|
532
|
+
def encoded_height; end
|
533
|
+
|
534
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#96
|
535
|
+
def encoded_width; end
|
536
|
+
|
537
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#153
|
538
|
+
def ffprobe_path; end
|
539
|
+
|
540
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#42
|
541
|
+
def height; end
|
542
|
+
|
543
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#132
|
544
|
+
def probe; end
|
545
|
+
|
546
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#136
|
547
|
+
def probe_from(file); end
|
548
|
+
|
549
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#78
|
550
|
+
def rotated?; end
|
551
|
+
|
552
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#112
|
553
|
+
def side_data; end
|
554
|
+
|
555
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#124
|
556
|
+
def streams; end
|
557
|
+
|
558
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#108
|
559
|
+
def tags; end
|
560
|
+
|
561
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#86
|
562
|
+
def video?; end
|
563
|
+
|
564
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#116
|
565
|
+
def video_stream; end
|
566
|
+
|
567
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#34
|
568
|
+
def width; end
|
569
|
+
|
570
|
+
class << self
|
571
|
+
# source://activestorage//lib/active_storage/analyzer/video_analyzer.rb#25
|
572
|
+
def accept?(blob); end
|
573
|
+
end
|
574
|
+
end
|
575
|
+
|
576
|
+
# = Active Storage \Attached
|
577
|
+
#
|
578
|
+
# Abstract base class for the concrete ActiveStorage::Attached::One and ActiveStorage::Attached::Many
|
579
|
+
# classes that both provide proxy access to the blob association for a record.
|
580
|
+
#
|
581
|
+
# source://activestorage//lib/active_storage/attached.rb#10
|
582
|
+
class ActiveStorage::Attached
|
583
|
+
# @return [Attached] a new instance of Attached
|
584
|
+
#
|
585
|
+
# source://activestorage//lib/active_storage/attached.rb#13
|
586
|
+
def initialize(name, record); end
|
587
|
+
|
588
|
+
# Returns the value of attribute name.
|
589
|
+
#
|
590
|
+
# source://activestorage//lib/active_storage/attached.rb#11
|
591
|
+
def name; end
|
592
|
+
|
593
|
+
# Returns the value of attribute record.
|
594
|
+
#
|
595
|
+
# source://activestorage//lib/active_storage/attached.rb#11
|
596
|
+
def record; end
|
597
|
+
|
598
|
+
private
|
599
|
+
|
600
|
+
# source://activestorage//lib/active_storage/attached.rb#18
|
601
|
+
def change; end
|
602
|
+
end
|
603
|
+
|
604
|
+
# source://activestorage//lib/active_storage/attached/changes.rb#4
|
605
|
+
module ActiveStorage::Attached::Changes
|
606
|
+
extend ::ActiveSupport::Autoload
|
607
|
+
end
|
608
|
+
|
609
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#4
|
610
|
+
class ActiveStorage::Attached::Changes::CreateMany
|
611
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#7
|
612
|
+
def initialize(name, record, attachables, pending_uploads: T.unsafe(nil)); end
|
613
|
+
|
614
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#5
|
615
|
+
def attachables; end
|
616
|
+
|
617
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#14
|
618
|
+
def attachments; end
|
619
|
+
|
620
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#18
|
621
|
+
def blobs; end
|
622
|
+
|
623
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#5
|
624
|
+
def name; end
|
625
|
+
|
626
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#5
|
627
|
+
def pending_uploads; end
|
628
|
+
|
629
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#5
|
630
|
+
def record; end
|
631
|
+
|
632
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#26
|
633
|
+
def save; end
|
634
|
+
|
635
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#22
|
636
|
+
def upload; end
|
637
|
+
|
638
|
+
private
|
639
|
+
|
640
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#44
|
641
|
+
def assign_associated_attachments; end
|
642
|
+
|
643
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#36
|
644
|
+
def build_subchange_from(attachable); end
|
645
|
+
|
646
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#52
|
647
|
+
def persisted_or_new_attachments; end
|
648
|
+
|
649
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#48
|
650
|
+
def reset_associated_blobs; end
|
651
|
+
|
652
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#32
|
653
|
+
def subchanges; end
|
654
|
+
|
655
|
+
# source://activestorage//lib/active_storage/attached/changes/create_many.rb#40
|
656
|
+
def subchanges_without_blobs; end
|
657
|
+
end
|
658
|
+
|
659
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#7
|
660
|
+
class ActiveStorage::Attached::Changes::CreateOne
|
661
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#10
|
662
|
+
def initialize(name, record, attachable); end
|
663
|
+
|
664
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#8
|
665
|
+
def attachable; end
|
666
|
+
|
667
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#15
|
668
|
+
def attachment; end
|
669
|
+
|
670
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#19
|
671
|
+
def blob; end
|
672
|
+
|
673
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#8
|
674
|
+
def name; end
|
675
|
+
|
676
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#8
|
677
|
+
def record; end
|
678
|
+
|
679
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#48
|
680
|
+
def save; end
|
681
|
+
|
682
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#23
|
683
|
+
def upload; end
|
684
|
+
|
685
|
+
private
|
686
|
+
|
687
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#120
|
688
|
+
def attachment_service_name; end
|
689
|
+
|
690
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#64
|
691
|
+
def build_attachment; end
|
692
|
+
|
693
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#58
|
694
|
+
def find_attachment; end
|
695
|
+
|
696
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#54
|
697
|
+
def find_or_build_attachment; end
|
698
|
+
|
699
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one.rb#68
|
700
|
+
def find_or_build_blob; end
|
701
|
+
end
|
702
|
+
|
703
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#4
|
704
|
+
class ActiveStorage::Attached::Changes::CreateOneOfMany < ::ActiveStorage::Attached::Changes::CreateOne
|
705
|
+
private
|
706
|
+
|
707
|
+
# source://activestorage//lib/active_storage/attached/changes/create_one_of_many.rb#6
|
708
|
+
def find_attachment; end
|
709
|
+
end
|
710
|
+
|
711
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#4
|
712
|
+
class ActiveStorage::Attached::Changes::DeleteMany
|
713
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#7
|
714
|
+
def initialize(name, record); end
|
715
|
+
|
716
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#11
|
717
|
+
def attachables; end
|
718
|
+
|
719
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#15
|
720
|
+
def attachments; end
|
721
|
+
|
722
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#19
|
723
|
+
def blobs; end
|
724
|
+
|
725
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5
|
726
|
+
def name; end
|
727
|
+
|
728
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#5
|
729
|
+
def record; end
|
730
|
+
|
731
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_many.rb#23
|
732
|
+
def save; end
|
733
|
+
end
|
734
|
+
|
735
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#4
|
736
|
+
class ActiveStorage::Attached::Changes::DeleteOne
|
737
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#7
|
738
|
+
def initialize(name, record); end
|
739
|
+
|
740
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#11
|
741
|
+
def attachment; end
|
742
|
+
|
743
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5
|
744
|
+
def name; end
|
745
|
+
|
746
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#5
|
747
|
+
def record; end
|
748
|
+
|
749
|
+
# source://activestorage//lib/active_storage/attached/changes/delete_one.rb#15
|
750
|
+
def save; end
|
751
|
+
end
|
752
|
+
|
753
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#4
|
754
|
+
class ActiveStorage::Attached::Changes::DetachMany
|
755
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#7
|
756
|
+
def initialize(name, record, attachments); end
|
757
|
+
|
758
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5
|
759
|
+
def attachments; end
|
760
|
+
|
761
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#11
|
762
|
+
def detach; end
|
763
|
+
|
764
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5
|
765
|
+
def name; end
|
766
|
+
|
767
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_many.rb#5
|
768
|
+
def record; end
|
769
|
+
end
|
770
|
+
|
771
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#4
|
772
|
+
class ActiveStorage::Attached::Changes::DetachOne
|
773
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#7
|
774
|
+
def initialize(name, record, attachment); end
|
775
|
+
|
776
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5
|
777
|
+
def attachment; end
|
778
|
+
|
779
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#11
|
780
|
+
def detach; end
|
781
|
+
|
782
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5
|
783
|
+
def name; end
|
784
|
+
|
785
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#5
|
786
|
+
def record; end
|
787
|
+
|
788
|
+
private
|
789
|
+
|
790
|
+
# source://activestorage//lib/active_storage/attached/changes/detach_one.rb#19
|
791
|
+
def reset; end
|
792
|
+
end
|
793
|
+
|
794
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#4
|
795
|
+
class ActiveStorage::Attached::Changes::PurgeMany
|
796
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#7
|
797
|
+
def initialize(name, record, attachments); end
|
798
|
+
|
799
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5
|
800
|
+
def attachments; end
|
801
|
+
|
802
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5
|
803
|
+
def name; end
|
804
|
+
|
805
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#11
|
806
|
+
def purge; end
|
807
|
+
|
808
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#16
|
809
|
+
def purge_later; end
|
810
|
+
|
811
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#5
|
812
|
+
def record; end
|
813
|
+
|
814
|
+
private
|
815
|
+
|
816
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_many.rb#22
|
817
|
+
def reset; end
|
818
|
+
end
|
819
|
+
|
820
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#4
|
821
|
+
class ActiveStorage::Attached::Changes::PurgeOne
|
822
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#7
|
823
|
+
def initialize(name, record, attachment); end
|
824
|
+
|
825
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5
|
826
|
+
def attachment; end
|
827
|
+
|
828
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5
|
829
|
+
def name; end
|
830
|
+
|
831
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#11
|
832
|
+
def purge; end
|
833
|
+
|
834
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#16
|
835
|
+
def purge_later; end
|
836
|
+
|
837
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#5
|
838
|
+
def record; end
|
839
|
+
|
840
|
+
private
|
841
|
+
|
842
|
+
# source://activestorage//lib/active_storage/attached/changes/purge_one.rb#22
|
843
|
+
def reset; end
|
844
|
+
end
|
845
|
+
|
846
|
+
# source://activestorage//lib/active_storage/attached/many.rb#7
|
847
|
+
class ActiveStorage::Attached::Many < ::ActiveStorage::Attached
|
848
|
+
# source://activestorage//lib/active_storage/attached/many.rb#51
|
849
|
+
def attach(*attachables); end
|
850
|
+
|
851
|
+
# source://activestorage//lib/active_storage/attached/many.rb#66
|
852
|
+
def attached?; end
|
853
|
+
|
854
|
+
# source://activestorage//lib/active_storage/attached/many.rb#32
|
855
|
+
def attachments; end
|
856
|
+
|
857
|
+
# source://activestorage//lib/active_storage/attached/many.rb#37
|
858
|
+
def blobs; end
|
859
|
+
|
860
|
+
# source://activestorage//lib/active_storage/attached/many.rb#25
|
861
|
+
def detach(*_arg0, **_arg1, &_arg2); end
|
862
|
+
|
863
|
+
# source://activestorage//lib/active_storage/attached/many.rb#27
|
864
|
+
def method_missing(method, *_arg1, **_arg2, &_arg3); end
|
865
|
+
|
866
|
+
# source://activestorage//lib/active_storage/attached/many.rb#13
|
867
|
+
def purge(*_arg0, **_arg1, &_arg2); end
|
868
|
+
|
869
|
+
# source://activestorage//lib/active_storage/attached/many.rb#19
|
870
|
+
def purge_later(*_arg0, **_arg1, &_arg2); end
|
871
|
+
|
872
|
+
private
|
873
|
+
|
874
|
+
# source://activestorage//lib/active_storage/attached/many.rb#75
|
875
|
+
def detach_many; end
|
876
|
+
|
877
|
+
# source://activestorage//lib/active_storage/attached/many.rb#71
|
878
|
+
def purge_many; end
|
879
|
+
|
880
|
+
# source://activestorage//lib/active_storage/attached/many.rb#27
|
881
|
+
def respond_to_missing?(name, include_private = T.unsafe(nil)); end
|
882
|
+
end
|
883
|
+
|
884
|
+
# source://activestorage//lib/active_storage/attached/model.rb#9
|
885
|
+
module ActiveStorage::Attached::Model
|
886
|
+
extend ::ActiveSupport::Concern
|
887
|
+
|
888
|
+
mixes_in_class_methods ::ActiveStorage::Attached::Model::ClassMethods
|
889
|
+
|
890
|
+
# source://activestorage//lib/active_storage/attached/model.rb#281
|
891
|
+
def attachment_changes; end
|
892
|
+
|
893
|
+
# source://activestorage//lib/active_storage/attached/model.rb#285
|
894
|
+
def changed_for_autosave?; end
|
895
|
+
|
896
|
+
# source://activestorage//lib/active_storage/attached/model.rb#295
|
897
|
+
def reload(*_arg0); end
|
898
|
+
|
899
|
+
private
|
900
|
+
|
901
|
+
# source://activestorage//lib/active_storage/attached/model.rb#289
|
902
|
+
def initialize_dup(*_arg0); end
|
903
|
+
|
904
|
+
class << self
|
905
|
+
# source://activestorage//lib/active_storage/attached/model.rb#263
|
906
|
+
def validate_service_configuration(service_name, model_class, association_name); end
|
907
|
+
|
908
|
+
private
|
909
|
+
|
910
|
+
# source://activestorage//lib/active_storage/attached/model.rb#274
|
911
|
+
def validate_global_service_configuration(model_class); end
|
912
|
+
end
|
913
|
+
end
|
914
|
+
|
915
|
+
# source://activestorage//lib/active_storage/attached/model.rb#54
|
916
|
+
module ActiveStorage::Attached::Model::ClassMethods
|
917
|
+
# source://activestorage//lib/active_storage/attached/model.rb#210
|
918
|
+
def has_many_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end
|
919
|
+
|
920
|
+
# source://activestorage//lib/active_storage/attached/model.rb#108
|
921
|
+
def has_one_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end
|
922
|
+
end
|
923
|
+
|
924
|
+
# source://activestorage//lib/active_storage/attached/one.rb#7
|
925
|
+
class ActiveStorage::Attached::One < ::ActiveStorage::Attached
|
926
|
+
# source://activestorage//lib/active_storage/attached/one.rb#58
|
927
|
+
def attach(attachable); end
|
928
|
+
|
929
|
+
# source://activestorage//lib/active_storage/attached/one.rb#73
|
930
|
+
def attached?; end
|
931
|
+
|
932
|
+
# source://activestorage//lib/active_storage/attached/one.rb#33
|
933
|
+
def attachment; end
|
934
|
+
|
935
|
+
# source://activestorage//lib/active_storage/attached/one.rb#44
|
936
|
+
def blank?; end
|
937
|
+
|
938
|
+
# source://activestorage//lib/active_storage/attached/one.rb#25
|
939
|
+
def detach(*_arg0, **_arg1, &_arg2); end
|
940
|
+
|
941
|
+
# source://activestorage//lib/active_storage/attached/one.rb#27
|
942
|
+
def method_missing(method, *_arg1, **_arg2, &_arg3); end
|
943
|
+
|
944
|
+
# source://activestorage//lib/active_storage/attached/one.rb#13
|
945
|
+
def purge(*_arg0, **_arg1, &_arg2); end
|
946
|
+
|
947
|
+
# source://activestorage//lib/active_storage/attached/one.rb#19
|
948
|
+
def purge_later(*_arg0, **_arg1, &_arg2); end
|
949
|
+
|
950
|
+
private
|
951
|
+
|
952
|
+
# source://activestorage//lib/active_storage/attached/one.rb#82
|
953
|
+
def detach_one; end
|
954
|
+
|
955
|
+
# source://activestorage//lib/active_storage/attached/one.rb#78
|
956
|
+
def purge_one; end
|
957
|
+
|
958
|
+
# source://activestorage//lib/active_storage/attached/one.rb#27
|
959
|
+
def respond_to_missing?(name, include_private = T.unsafe(nil)); end
|
960
|
+
end
|
961
|
+
|
962
|
+
class ActiveStorage::Attachment < ::ActiveStorage::Record
|
963
|
+
include ::ActiveStorage::Attachment::GeneratedAttributeMethods
|
964
|
+
include ::ActiveStorage::Attachment::GeneratedAssociationMethods
|
965
|
+
|
966
|
+
def autosave_associated_records_for_blob(*args); end
|
967
|
+
def autosave_associated_records_for_record(*args); end
|
968
|
+
def method_missing(method, *_arg1, **_arg2, &_arg3); end
|
969
|
+
def preview(transformations); end
|
970
|
+
def purge; end
|
971
|
+
def purge_later; end
|
972
|
+
def representation(transformations); end
|
973
|
+
def signed_id(*_arg0, **_arg1, &_arg2); end
|
974
|
+
def validate_associated_records_for_blob(*args); end
|
975
|
+
def variant(transformations); end
|
976
|
+
|
977
|
+
private
|
978
|
+
|
979
|
+
def analyze_blob_later; end
|
980
|
+
def dependent; end
|
981
|
+
def mirror_blob_later; end
|
982
|
+
def named_variants; end
|
983
|
+
def purge_dependent_blob_later; end
|
984
|
+
def respond_to_missing?(name, include_private = T.unsafe(nil)); end
|
985
|
+
def transform_variants_later; end
|
986
|
+
def transformations_by_name(transformations); end
|
987
|
+
|
988
|
+
class << self
|
989
|
+
def with_all_variant_records(*args, **_arg1); end
|
990
|
+
|
991
|
+
private
|
992
|
+
|
993
|
+
def __class_attr___callbacks; end
|
994
|
+
def __class_attr___callbacks=(new_value); end
|
995
|
+
def __class_attr__reflections; end
|
996
|
+
def __class_attr__reflections=(new_value); end
|
997
|
+
def __class_attr__validators; end
|
998
|
+
def __class_attr__validators=(new_value); end
|
999
|
+
def __class_attr_defined_enums; end
|
1000
|
+
def __class_attr_defined_enums=(new_value); end
|
1001
|
+
end
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
module ActiveStorage::Attachment::GeneratedAssociationMethods
|
1005
|
+
def blob; end
|
1006
|
+
def blob=(value); end
|
1007
|
+
def blob_changed?; end
|
1008
|
+
def blob_previously_changed?; end
|
1009
|
+
def build_blob(*args, &block); end
|
1010
|
+
def create_blob(*args, &block); end
|
1011
|
+
def create_blob!(*args, &block); end
|
1012
|
+
def record; end
|
1013
|
+
def record=(value); end
|
1014
|
+
def record_changed?; end
|
1015
|
+
def record_previously_changed?; end
|
1016
|
+
def reload_blob; end
|
1017
|
+
def reload_record; end
|
1018
|
+
def reset_blob; end
|
1019
|
+
def reset_record; end
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
module ActiveStorage::Attachment::GeneratedAttributeMethods; end
|
1023
|
+
|
1024
|
+
class ActiveStorage::BaseController < ::ActionController::Base
|
1025
|
+
include ::ActiveStorage::SetCurrent
|
1026
|
+
|
1027
|
+
private
|
1028
|
+
|
1029
|
+
def _layout(lookup_context, formats, keys); end
|
1030
|
+
|
1031
|
+
class << self
|
1032
|
+
private
|
1033
|
+
|
1034
|
+
def __class_attr___callbacks; end
|
1035
|
+
def __class_attr___callbacks=(new_value); end
|
1036
|
+
def __class_attr_etag_with_template_digest; end
|
1037
|
+
def __class_attr_etag_with_template_digest=(new_value); end
|
1038
|
+
def __class_attr_middleware_stack; end
|
1039
|
+
def __class_attr_middleware_stack=(new_value); end
|
1040
|
+
end
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
class ActiveStorage::BaseJob < ::ActiveJob::Base; end
|
1044
|
+
module ActiveStorage::Blobs; end
|
1045
|
+
|
1046
|
+
class ActiveStorage::Blobs::ProxyController < ::ActiveStorage::BaseController
|
1047
|
+
include ::ActiveStorage::SetBlob
|
1048
|
+
include ::ActionController::Live
|
1049
|
+
include ::ActiveStorage::Streaming
|
1050
|
+
include ::ActiveStorage::DisableSession
|
1051
|
+
extend ::ActionController::Live::ClassMethods
|
1052
|
+
|
1053
|
+
def show; end
|
1054
|
+
|
1055
|
+
private
|
1056
|
+
|
1057
|
+
def _layout(lookup_context, formats, keys); end
|
1058
|
+
|
1059
|
+
class << self
|
1060
|
+
private
|
1061
|
+
|
1062
|
+
def __class_attr___callbacks; end
|
1063
|
+
def __class_attr___callbacks=(new_value); end
|
1064
|
+
def __class_attr_middleware_stack; end
|
1065
|
+
def __class_attr_middleware_stack=(new_value); end
|
1066
|
+
end
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
class ActiveStorage::Blobs::RedirectController < ::ActiveStorage::BaseController
|
1070
|
+
include ::ActiveStorage::SetBlob
|
1071
|
+
|
1072
|
+
def show; end
|
1073
|
+
|
1074
|
+
private
|
1075
|
+
|
1076
|
+
def _layout(lookup_context, formats, keys); end
|
1077
|
+
|
1078
|
+
class << self
|
1079
|
+
private
|
1080
|
+
|
1081
|
+
def __class_attr___callbacks; end
|
1082
|
+
def __class_attr___callbacks=(new_value); end
|
1083
|
+
def __class_attr_middleware_stack; end
|
1084
|
+
def __class_attr_middleware_stack=(new_value); end
|
1085
|
+
end
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
class ActiveStorage::Current < ::ActiveSupport::CurrentAttributes
|
1089
|
+
class << self
|
1090
|
+
def url_options; end
|
1091
|
+
def url_options=(value); end
|
1092
|
+
|
1093
|
+
private
|
1094
|
+
|
1095
|
+
def __class_attr_defaults; end
|
1096
|
+
def __class_attr_defaults=(new_value); end
|
1097
|
+
end
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController
|
1101
|
+
def create; end
|
1102
|
+
|
1103
|
+
private
|
1104
|
+
|
1105
|
+
def _layout(lookup_context, formats, keys); end
|
1106
|
+
def blob_args; end
|
1107
|
+
def direct_upload_json(blob); end
|
1108
|
+
|
1109
|
+
class << self
|
1110
|
+
private
|
1111
|
+
|
1112
|
+
def __class_attr_middleware_stack; end
|
1113
|
+
def __class_attr_middleware_stack=(new_value); end
|
1114
|
+
end
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
module ActiveStorage::DisableSession
|
1118
|
+
extend ::ActiveSupport::Concern
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
class ActiveStorage::DiskController < ::ActiveStorage::BaseController
|
1122
|
+
include ::ActiveStorage::FileServer
|
1123
|
+
|
1124
|
+
def show; end
|
1125
|
+
def update; end
|
1126
|
+
|
1127
|
+
private
|
1128
|
+
|
1129
|
+
def _layout(lookup_context, formats, keys); end
|
1130
|
+
def acceptable_content?(token); end
|
1131
|
+
def decode_verified_key; end
|
1132
|
+
def decode_verified_token; end
|
1133
|
+
def named_disk_service(name); end
|
1134
|
+
|
1135
|
+
class << self
|
1136
|
+
private
|
1137
|
+
|
1138
|
+
def __class_attr___callbacks; end
|
1139
|
+
def __class_attr___callbacks=(new_value); end
|
1140
|
+
def __class_attr_middleware_stack; end
|
1141
|
+
def __class_attr_middleware_stack=(new_value); end
|
1142
|
+
end
|
1143
|
+
end
|
1144
|
+
|
1145
|
+
# source://activestorage//lib/active_storage/downloader.rb#4
|
1146
|
+
class ActiveStorage::Downloader
|
1147
|
+
# @return [Downloader] a new instance of Downloader
|
1148
|
+
#
|
1149
|
+
# source://activestorage//lib/active_storage/downloader.rb#7
|
1150
|
+
def initialize(service); end
|
1151
|
+
|
1152
|
+
# source://activestorage//lib/active_storage/downloader.rb#11
|
1153
|
+
def open(key, checksum: T.unsafe(nil), verify: T.unsafe(nil), name: T.unsafe(nil), tmpdir: T.unsafe(nil)); end
|
1154
|
+
|
1155
|
+
# Returns the value of attribute service.
|
1156
|
+
#
|
1157
|
+
# source://activestorage//lib/active_storage/downloader.rb#5
|
1158
|
+
def service; end
|
1159
|
+
|
1160
|
+
private
|
1161
|
+
|
1162
|
+
# source://activestorage//lib/active_storage/downloader.rb#30
|
1163
|
+
def download(key, file); end
|
1164
|
+
|
1165
|
+
# source://activestorage//lib/active_storage/downloader.rb#20
|
1166
|
+
def open_tempfile(name, tmpdir = T.unsafe(nil)); end
|
1167
|
+
|
1168
|
+
# source://activestorage//lib/active_storage/downloader.rb#37
|
1169
|
+
def verify_integrity_of(file, checksum:); end
|
1170
|
+
end
|
1171
|
+
|
1172
|
+
# source://activestorage//lib/active_storage/engine.rb#25
|
1173
|
+
class ActiveStorage::Engine < ::Rails::Engine; end
|
1174
|
+
|
1175
|
+
# Generic base class for all Active Storage exceptions.
|
1176
|
+
#
|
1177
|
+
# source://activestorage//lib/active_storage/errors.rb#5
|
1178
|
+
class ActiveStorage::Error < ::StandardError; end
|
1179
|
+
|
1180
|
+
# Raised when ActiveStorage::Blob#download is called on a blob where the
|
1181
|
+
# backing file is no longer present in its service.
|
1182
|
+
#
|
1183
|
+
# source://activestorage//lib/active_storage/errors.rb#25
|
1184
|
+
class ActiveStorage::FileNotFoundError < ::ActiveStorage::Error; end
|
1185
|
+
|
1186
|
+
module ActiveStorage::FileServer
|
1187
|
+
private
|
1188
|
+
|
1189
|
+
def serve_file(path, content_type:, disposition:); end
|
1190
|
+
end
|
1191
|
+
|
1192
|
+
class ActiveStorage::Filename
|
1193
|
+
include ::Comparable
|
1194
|
+
|
1195
|
+
def initialize(filename); end
|
1196
|
+
|
1197
|
+
def <=>(other); end
|
1198
|
+
def as_json(*_arg0); end
|
1199
|
+
def base; end
|
1200
|
+
def extension; end
|
1201
|
+
def extension_with_delimiter; end
|
1202
|
+
def extension_without_delimiter; end
|
1203
|
+
def sanitized; end
|
1204
|
+
def to_s; end
|
1205
|
+
|
1206
|
+
class << self
|
1207
|
+
def wrap(filename); end
|
1208
|
+
end
|
1209
|
+
end
|
1210
|
+
|
1211
|
+
# = Active Storage \FixtureSet
|
1212
|
+
#
|
1213
|
+
# Fixtures are a way of organizing data that you want to test against; in
|
1214
|
+
# short, sample data.
|
1215
|
+
#
|
1216
|
+
# To learn more about fixtures, read the ActiveRecord::FixtureSet documentation.
|
1217
|
+
#
|
1218
|
+
# === YAML
|
1219
|
+
#
|
1220
|
+
# Like other Active Record-backed models, ActiveStorage::Attachment and
|
1221
|
+
# ActiveStorage::Blob records inherit from ActiveRecord::Base instances and
|
1222
|
+
# therefore can be populated by fixtures.
|
1223
|
+
#
|
1224
|
+
# Consider a hypothetical <tt>Article</tt> model class, its related
|
1225
|
+
# fixture data, as well as fixture data for related ActiveStorage::Attachment
|
1226
|
+
# and ActiveStorage::Blob records:
|
1227
|
+
#
|
1228
|
+
# # app/models/article.rb
|
1229
|
+
# class Article < ApplicationRecord
|
1230
|
+
# has_one_attached :thumbnail
|
1231
|
+
# end
|
1232
|
+
#
|
1233
|
+
# <code></code>
|
1234
|
+
#
|
1235
|
+
# # fixtures/active_storage/blobs.yml
|
1236
|
+
# first_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob filename: "first.png" %>
|
1237
|
+
#
|
1238
|
+
# <code></code>
|
1239
|
+
#
|
1240
|
+
# # fixtures/active_storage/attachments.yml
|
1241
|
+
# first_thumbnail_attachment:
|
1242
|
+
# name: thumbnail
|
1243
|
+
# record: first (Article)
|
1244
|
+
# blob: first_thumbnail_blob
|
1245
|
+
#
|
1246
|
+
# When processed, Active Record will insert database records for each fixture
|
1247
|
+
# entry and will ensure the Active Storage relationship is intact.
|
1248
|
+
#
|
1249
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#44
|
1250
|
+
class ActiveStorage::FixtureSet
|
1251
|
+
include ::ActiveSupport::Testing::FileFixtures
|
1252
|
+
include ::ActiveRecord::SecureToken
|
1253
|
+
extend ::ActiveRecord::SecureToken::ClassMethods
|
1254
|
+
|
1255
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#45
|
1256
|
+
def file_fixture_path; end
|
1257
|
+
|
1258
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#45
|
1259
|
+
def file_fixture_path?; end
|
1260
|
+
|
1261
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#70
|
1262
|
+
def prepare(instance, **attributes); end
|
1263
|
+
|
1264
|
+
class << self
|
1265
|
+
# Generate a YAML-encoded representation of an ActiveStorage::Blob
|
1266
|
+
# instance's attributes, resolve the file relative to the directory mentioned
|
1267
|
+
# by ActiveSupport::Testing::FileFixtures.file_fixture, and upload
|
1268
|
+
# the file to the Service
|
1269
|
+
#
|
1270
|
+
# === Examples
|
1271
|
+
#
|
1272
|
+
# # tests/fixtures/active_storage/blobs.yml
|
1273
|
+
# second_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob(
|
1274
|
+
# filename: "second.svg",
|
1275
|
+
# ) %>
|
1276
|
+
#
|
1277
|
+
# third_thumbnail_blob: <%= ActiveStorage::FixtureSet.blob(
|
1278
|
+
# filename: "third.svg",
|
1279
|
+
# content_type: "image/svg+xml",
|
1280
|
+
# service_name: "public"
|
1281
|
+
# ) %>
|
1282
|
+
#
|
1283
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#66
|
1284
|
+
def blob(filename:, **attributes); end
|
1285
|
+
|
1286
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#45
|
1287
|
+
def file_fixture_path; end
|
1288
|
+
|
1289
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#45
|
1290
|
+
def file_fixture_path=(value); end
|
1291
|
+
|
1292
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#45
|
1293
|
+
def file_fixture_path?; end
|
1294
|
+
|
1295
|
+
private
|
1296
|
+
|
1297
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#45
|
1298
|
+
def __class_attr_file_fixture_path; end
|
1299
|
+
|
1300
|
+
# source://activestorage//lib/active_storage/fixture_set.rb#45
|
1301
|
+
def __class_attr_file_fixture_path=(new_value); end
|
1302
|
+
end
|
1303
|
+
end
|
1304
|
+
|
1305
|
+
# Raised when uploaded or downloaded data does not match a precomputed checksum.
|
1306
|
+
# Indicates that a network error or a software bug caused data corruption.
|
1307
|
+
#
|
1308
|
+
# source://activestorage//lib/active_storage/errors.rb#21
|
1309
|
+
class ActiveStorage::IntegrityError < ::ActiveStorage::Error; end
|
1310
|
+
|
1311
|
+
# Raised when ActiveStorage::Blob#variant is called on a blob that isn't variable.
|
1312
|
+
# Use ActiveStorage::Blob#variable? to determine whether a blob is variable.
|
1313
|
+
#
|
1314
|
+
# source://activestorage//lib/active_storage/errors.rb#9
|
1315
|
+
class ActiveStorage::InvariableError < ::ActiveStorage::Error; end
|
1316
|
+
|
1317
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#6
|
1318
|
+
class ActiveStorage::LogSubscriber < ::ActiveSupport::LogSubscriber
|
1319
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#53
|
1320
|
+
def logger; end
|
1321
|
+
|
1322
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#21
|
1323
|
+
def preview(event); end
|
1324
|
+
|
1325
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#26
|
1326
|
+
def service_delete(event); end
|
1327
|
+
|
1328
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#31
|
1329
|
+
def service_delete_prefixed(event); end
|
1330
|
+
|
1331
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#14
|
1332
|
+
def service_download(event); end
|
1333
|
+
|
1334
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#36
|
1335
|
+
def service_exist(event); end
|
1336
|
+
|
1337
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#46
|
1338
|
+
def service_mirror(event); end
|
1339
|
+
|
1340
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#19
|
1341
|
+
def service_streaming_download(event); end
|
1342
|
+
|
1343
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#7
|
1344
|
+
def service_upload(event); end
|
1345
|
+
|
1346
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#41
|
1347
|
+
def service_url(event); end
|
1348
|
+
|
1349
|
+
private
|
1350
|
+
|
1351
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#62
|
1352
|
+
def debug(event, colored_message); end
|
1353
|
+
|
1354
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#58
|
1355
|
+
def info(event, colored_message); end
|
1356
|
+
|
1357
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#70
|
1358
|
+
def key_in(event); end
|
1359
|
+
|
1360
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#66
|
1361
|
+
def log_prefix_for_service(event); end
|
1362
|
+
|
1363
|
+
class << self
|
1364
|
+
private
|
1365
|
+
|
1366
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#12
|
1367
|
+
def __class_attr_log_levels; end
|
1368
|
+
|
1369
|
+
# source://activestorage//lib/active_storage/log_subscriber.rb#12
|
1370
|
+
def __class_attr_log_levels=(new_value); end
|
1371
|
+
end
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
class ActiveStorage::MirrorJob < ::ActiveStorage::BaseJob
|
1375
|
+
def perform(key, checksum:); end
|
1376
|
+
|
1377
|
+
class << self
|
1378
|
+
private
|
1379
|
+
|
1380
|
+
def __class_attr_queue_name; end
|
1381
|
+
def __class_attr_queue_name=(new_value); end
|
1382
|
+
def __class_attr_rescue_handlers; end
|
1383
|
+
def __class_attr_rescue_handlers=(new_value); end
|
1384
|
+
end
|
1385
|
+
end
|
1386
|
+
|
1387
|
+
class ActiveStorage::NamedVariant
|
1388
|
+
def initialize(transformations); end
|
1389
|
+
|
1390
|
+
def preprocessed; end
|
1391
|
+
def preprocessed?(record); end
|
1392
|
+
def transformations; end
|
1393
|
+
end
|
1394
|
+
|
1395
|
+
# Raised when a Previewer is unable to generate a preview image.
|
1396
|
+
#
|
1397
|
+
# source://activestorage//lib/active_storage/errors.rb#28
|
1398
|
+
class ActiveStorage::PreviewError < ::ActiveStorage::Error; end
|
1399
|
+
|
1400
|
+
class ActiveStorage::PreviewImageJob < ::ActiveStorage::BaseJob
|
1401
|
+
def perform(blob, variations); end
|
1402
|
+
|
1403
|
+
class << self
|
1404
|
+
private
|
1405
|
+
|
1406
|
+
def __class_attr_queue_name; end
|
1407
|
+
def __class_attr_queue_name=(new_value); end
|
1408
|
+
def __class_attr_rescue_handlers; end
|
1409
|
+
def __class_attr_rescue_handlers=(new_value); end
|
1410
|
+
end
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
# = Active Storage \Previewer
|
1414
|
+
#
|
1415
|
+
# This is an abstract base class for previewers, which generate images from blobs. See
|
1416
|
+
# ActiveStorage::Previewer::MuPDFPreviewer and ActiveStorage::Previewer::VideoPreviewer for
|
1417
|
+
# examples of concrete subclasses.
|
1418
|
+
#
|
1419
|
+
# source://activestorage//lib/active_storage/previewer.rb#9
|
1420
|
+
class ActiveStorage::Previewer
|
1421
|
+
# @return [Previewer] a new instance of Previewer
|
1422
|
+
#
|
1423
|
+
# source://activestorage//lib/active_storage/previewer.rb#18
|
1424
|
+
def initialize(blob); end
|
1425
|
+
|
1426
|
+
# Returns the value of attribute blob.
|
1427
|
+
#
|
1428
|
+
# source://activestorage//lib/active_storage/previewer.rb#10
|
1429
|
+
def blob; end
|
1430
|
+
|
1431
|
+
# Override this method in a concrete subclass. Have it yield an attachable preview image (i.e.
|
1432
|
+
# anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to
|
1433
|
+
# the underlying blob that is created.
|
1434
|
+
#
|
1435
|
+
# @raise [NotImplementedError]
|
1436
|
+
#
|
1437
|
+
# source://activestorage//lib/active_storage/previewer.rb#25
|
1438
|
+
def preview(**options); end
|
1439
|
+
|
1440
|
+
private
|
1441
|
+
|
1442
|
+
# source://activestorage//lib/active_storage/previewer.rb#78
|
1443
|
+
def capture(*argv, to:); end
|
1444
|
+
|
1445
|
+
# Downloads the blob to a tempfile on disk. Yields the tempfile.
|
1446
|
+
#
|
1447
|
+
# source://activestorage//lib/active_storage/previewer.rb#31
|
1448
|
+
def download_blob_to_tempfile(&block); end
|
1449
|
+
|
1450
|
+
# Executes a system command, capturing its binary output in a tempfile. Yields the tempfile.
|
1451
|
+
#
|
1452
|
+
# Use this method to shell out to a system library (e.g. muPDF or FFmpeg) for preview image
|
1453
|
+
# generation. The resulting tempfile can be used as the +:io+ value in an attachable Hash:
|
1454
|
+
#
|
1455
|
+
# def preview
|
1456
|
+
# download_blob_to_tempfile do |input|
|
1457
|
+
# draw "my-drawing-command", input.path, "--format", "png", "-" do |output|
|
1458
|
+
# yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png"
|
1459
|
+
# end
|
1460
|
+
# end
|
1461
|
+
# end
|
1462
|
+
#
|
1463
|
+
# The output tempfile is opened in the directory returned by #tmpdir.
|
1464
|
+
#
|
1465
|
+
# source://activestorage//lib/active_storage/previewer.rb#49
|
1466
|
+
def draw(*argv); end
|
1467
|
+
|
1468
|
+
# source://activestorage//lib/active_storage/previewer.rb#69
|
1469
|
+
def instrument(operation, payload = T.unsafe(nil), &block); end
|
1470
|
+
|
1471
|
+
# source://activestorage//lib/active_storage/previewer.rb#93
|
1472
|
+
def logger; end
|
1473
|
+
|
1474
|
+
# source://activestorage//lib/active_storage/previewer.rb#59
|
1475
|
+
def open_tempfile; end
|
1476
|
+
|
1477
|
+
# source://activestorage//lib/active_storage/previewer.rb#73
|
1478
|
+
def service_name; end
|
1479
|
+
|
1480
|
+
# source://activestorage//lib/active_storage/previewer.rb#97
|
1481
|
+
def tmpdir; end
|
1482
|
+
|
1483
|
+
class << self
|
1484
|
+
# Implement this method in a concrete subclass. Have it return true when given a blob from which
|
1485
|
+
# the previewer can generate an image.
|
1486
|
+
#
|
1487
|
+
# @return [Boolean]
|
1488
|
+
#
|
1489
|
+
# source://activestorage//lib/active_storage/previewer.rb#14
|
1490
|
+
def accept?(blob); end
|
1491
|
+
end
|
1492
|
+
end
|
1493
|
+
|
1494
|
+
# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#4
|
1495
|
+
class ActiveStorage::Previewer::MuPDFPreviewer < ::ActiveStorage::Previewer
|
1496
|
+
# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#27
|
1497
|
+
def preview(**options); end
|
1498
|
+
|
1499
|
+
private
|
1500
|
+
|
1501
|
+
# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#36
|
1502
|
+
def draw_first_page_from(file, &block); end
|
1503
|
+
|
1504
|
+
class << self
|
1505
|
+
# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#6
|
1506
|
+
def accept?(blob); end
|
1507
|
+
|
1508
|
+
# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#18
|
1509
|
+
def mutool_exists?; end
|
1510
|
+
|
1511
|
+
# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#14
|
1512
|
+
def mutool_path; end
|
1513
|
+
|
1514
|
+
# source://activestorage//lib/active_storage/previewer/mupdf_previewer.rb#10
|
1515
|
+
def pdf?(content_type); end
|
1516
|
+
end
|
1517
|
+
end
|
1518
|
+
|
1519
|
+
# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#4
|
1520
|
+
class ActiveStorage::Previewer::PopplerPDFPreviewer < ::ActiveStorage::Previewer
|
1521
|
+
# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#25
|
1522
|
+
def preview(**options); end
|
1523
|
+
|
1524
|
+
private
|
1525
|
+
|
1526
|
+
# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#34
|
1527
|
+
def draw_first_page_from(file, &block); end
|
1528
|
+
|
1529
|
+
class << self
|
1530
|
+
# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#6
|
1531
|
+
def accept?(blob); end
|
1532
|
+
|
1533
|
+
# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#10
|
1534
|
+
def pdf?(content_type); end
|
1535
|
+
|
1536
|
+
# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#18
|
1537
|
+
def pdftoppm_exists?; end
|
1538
|
+
|
1539
|
+
# source://activestorage//lib/active_storage/previewer/poppler_pdf_previewer.rb#14
|
1540
|
+
def pdftoppm_path; end
|
1541
|
+
end
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
# source://activestorage//lib/active_storage/previewer/video_previewer.rb#6
|
1545
|
+
class ActiveStorage::Previewer::VideoPreviewer < ::ActiveStorage::Previewer
|
1546
|
+
# source://activestorage//lib/active_storage/previewer/video_previewer.rb#23
|
1547
|
+
def preview(**options); end
|
1548
|
+
|
1549
|
+
private
|
1550
|
+
|
1551
|
+
# source://activestorage//lib/active_storage/previewer/video_previewer.rb#32
|
1552
|
+
def draw_relevant_frame_from(file, &block); end
|
1553
|
+
|
1554
|
+
class << self
|
1555
|
+
# source://activestorage//lib/active_storage/previewer/video_previewer.rb#8
|
1556
|
+
def accept?(blob); end
|
1557
|
+
|
1558
|
+
# source://activestorage//lib/active_storage/previewer/video_previewer.rb#12
|
1559
|
+
def ffmpeg_exists?; end
|
1560
|
+
|
1561
|
+
# source://activestorage//lib/active_storage/previewer/video_previewer.rb#18
|
1562
|
+
def ffmpeg_path; end
|
1563
|
+
end
|
1564
|
+
end
|
1565
|
+
|
1566
|
+
class ActiveStorage::PurgeJob < ::ActiveStorage::BaseJob
|
1567
|
+
def perform(blob); end
|
1568
|
+
|
1569
|
+
class << self
|
1570
|
+
private
|
1571
|
+
|
1572
|
+
def __class_attr_queue_name; end
|
1573
|
+
def __class_attr_queue_name=(new_value); end
|
1574
|
+
def __class_attr_rescue_handlers; end
|
1575
|
+
def __class_attr_rescue_handlers=(new_value); end
|
1576
|
+
end
|
1577
|
+
end
|
1578
|
+
|
1579
|
+
class ActiveStorage::Record < ::ActiveRecord::Base
|
1580
|
+
include ::ActiveStorage::Record::GeneratedAttributeMethods
|
1581
|
+
include ::ActiveStorage::Record::GeneratedAssociationMethods
|
1582
|
+
|
1583
|
+
class << self
|
1584
|
+
private
|
1585
|
+
|
1586
|
+
def __class_attr__validators; end
|
1587
|
+
def __class_attr__validators=(new_value); end
|
1588
|
+
def __class_attr_defined_enums; end
|
1589
|
+
def __class_attr_defined_enums=(new_value); end
|
1590
|
+
end
|
1591
|
+
end
|
1592
|
+
|
1593
|
+
module ActiveStorage::Record::GeneratedAssociationMethods; end
|
1594
|
+
module ActiveStorage::Record::GeneratedAttributeMethods; end
|
1595
|
+
|
1596
|
+
# source://activestorage//lib/active_storage/reflection.rb#4
|
1597
|
+
module ActiveStorage::Reflection; end
|
1598
|
+
|
1599
|
+
# source://activestorage//lib/active_storage/reflection.rb#49
|
1600
|
+
module ActiveStorage::Reflection::ActiveRecordExtensions
|
1601
|
+
extend ::ActiveSupport::Concern
|
1602
|
+
include GeneratedInstanceMethods
|
1603
|
+
|
1604
|
+
mixes_in_class_methods GeneratedClassMethods
|
1605
|
+
mixes_in_class_methods ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods
|
1606
|
+
|
1607
|
+
module GeneratedClassMethods
|
1608
|
+
def attachment_reflections; end
|
1609
|
+
def attachment_reflections=(value); end
|
1610
|
+
def attachment_reflections?; end
|
1611
|
+
end
|
1612
|
+
|
1613
|
+
module GeneratedInstanceMethods
|
1614
|
+
def attachment_reflections; end
|
1615
|
+
def attachment_reflections?; end
|
1616
|
+
end
|
1617
|
+
end
|
1618
|
+
|
1619
|
+
# source://activestorage//lib/active_storage/reflection.rb#56
|
1620
|
+
module ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods
|
1621
|
+
# Returns an array of reflection objects for all the attachments in the
|
1622
|
+
# class.
|
1623
|
+
#
|
1624
|
+
# source://activestorage//lib/active_storage/reflection.rb#59
|
1625
|
+
def reflect_on_all_attachments; end
|
1626
|
+
|
1627
|
+
# Returns the reflection object for the named +attachment+.
|
1628
|
+
#
|
1629
|
+
# User.reflect_on_attachment(:avatar)
|
1630
|
+
# # => the avatar reflection
|
1631
|
+
#
|
1632
|
+
# source://activestorage//lib/active_storage/reflection.rb#68
|
1633
|
+
def reflect_on_attachment(attachment); end
|
1634
|
+
end
|
1635
|
+
|
1636
|
+
# source://activestorage//lib/active_storage/reflection.rb#5
|
1637
|
+
class ActiveStorage::Reflection::HasAttachedReflection < ::ActiveRecord::Reflection::MacroReflection
|
1638
|
+
# source://activestorage//lib/active_storage/reflection.rb#10
|
1639
|
+
def named_variants; end
|
1640
|
+
|
1641
|
+
# source://activestorage//lib/active_storage/reflection.rb#6
|
1642
|
+
def variant(name, transformations); end
|
1643
|
+
end
|
1644
|
+
|
1645
|
+
# Holds all the metadata about a has_many_attached attachment as it was
|
1646
|
+
# specified in the Active Record class.
|
1647
|
+
#
|
1648
|
+
# source://activestorage//lib/active_storage/reflection.rb#25
|
1649
|
+
class ActiveStorage::Reflection::HasManyAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection
|
1650
|
+
# source://activestorage//lib/active_storage/reflection.rb#26
|
1651
|
+
def macro; end
|
1652
|
+
end
|
1653
|
+
|
1654
|
+
# Holds all the metadata about a has_one_attached attachment as it was
|
1655
|
+
# specified in the Active Record class.
|
1656
|
+
#
|
1657
|
+
# source://activestorage//lib/active_storage/reflection.rb#17
|
1658
|
+
class ActiveStorage::Reflection::HasOneAttachedReflection < ::ActiveStorage::Reflection::HasAttachedReflection
|
1659
|
+
# source://activestorage//lib/active_storage/reflection.rb#18
|
1660
|
+
def macro; end
|
1661
|
+
end
|
1662
|
+
|
1663
|
+
# source://activestorage//lib/active_storage/reflection.rb#31
|
1664
|
+
module ActiveStorage::Reflection::ReflectionExtension
|
1665
|
+
# source://activestorage//lib/active_storage/reflection.rb#32
|
1666
|
+
def add_attachment_reflection(model, name, reflection); end
|
1667
|
+
|
1668
|
+
private
|
1669
|
+
|
1670
|
+
# source://activestorage//lib/active_storage/reflection.rb#37
|
1671
|
+
def reflection_class_for(macro); end
|
1672
|
+
end
|
1673
|
+
|
1674
|
+
module ActiveStorage::Representations; end
|
1675
|
+
|
1676
|
+
class ActiveStorage::Representations::BaseController < ::ActiveStorage::BaseController
|
1677
|
+
include ::ActiveStorage::SetBlob
|
1678
|
+
|
1679
|
+
private
|
1680
|
+
|
1681
|
+
def _layout(lookup_context, formats, keys); end
|
1682
|
+
def blob_scope; end
|
1683
|
+
def set_representation; end
|
1684
|
+
|
1685
|
+
class << self
|
1686
|
+
private
|
1687
|
+
|
1688
|
+
def __class_attr___callbacks; end
|
1689
|
+
def __class_attr___callbacks=(new_value); end
|
1690
|
+
def __class_attr_middleware_stack; end
|
1691
|
+
def __class_attr_middleware_stack=(new_value); end
|
1692
|
+
end
|
1693
|
+
end
|
1694
|
+
|
1695
|
+
class ActiveStorage::Representations::ProxyController < ::ActiveStorage::Representations::BaseController
|
1696
|
+
include ::ActionController::Live
|
1697
|
+
include ::ActiveStorage::Streaming
|
1698
|
+
include ::ActiveStorage::DisableSession
|
1699
|
+
extend ::ActionController::Live::ClassMethods
|
1700
|
+
|
1701
|
+
def show; end
|
1702
|
+
|
1703
|
+
private
|
1704
|
+
|
1705
|
+
def _layout(lookup_context, formats, keys); end
|
1706
|
+
|
1707
|
+
class << self
|
1708
|
+
private
|
1709
|
+
|
1710
|
+
def __class_attr___callbacks; end
|
1711
|
+
def __class_attr___callbacks=(new_value); end
|
1712
|
+
def __class_attr_middleware_stack; end
|
1713
|
+
def __class_attr_middleware_stack=(new_value); end
|
1714
|
+
end
|
1715
|
+
end
|
1716
|
+
|
1717
|
+
class ActiveStorage::Representations::RedirectController < ::ActiveStorage::Representations::BaseController
|
1718
|
+
def show; end
|
1719
|
+
|
1720
|
+
private
|
1721
|
+
|
1722
|
+
def _layout(lookup_context, formats, keys); end
|
1723
|
+
|
1724
|
+
class << self
|
1725
|
+
private
|
1726
|
+
|
1727
|
+
def __class_attr_middleware_stack; end
|
1728
|
+
def __class_attr_middleware_stack=(new_value); end
|
1729
|
+
end
|
1730
|
+
end
|
1731
|
+
|
1732
|
+
# = Active Storage \Service
|
1733
|
+
#
|
1734
|
+
# Abstract class serving as an interface for concrete services.
|
1735
|
+
#
|
1736
|
+
# The available services are:
|
1737
|
+
#
|
1738
|
+
# * +Disk+, to manage attachments saved directly on the hard drive.
|
1739
|
+
# * +GCS+, to manage attachments through Google Cloud Storage.
|
1740
|
+
# * +S3+, to manage attachments through Amazon S3.
|
1741
|
+
# * +AzureStorage+, to manage attachments through Microsoft Azure Storage.
|
1742
|
+
# * +Mirror+, to be able to use several services to manage attachments.
|
1743
|
+
#
|
1744
|
+
# Inside a \Rails application, you can set-up your services through the
|
1745
|
+
# generated <tt>config/storage.yml</tt> file and reference one
|
1746
|
+
# of the aforementioned constant under the +service+ key. For example:
|
1747
|
+
#
|
1748
|
+
# local:
|
1749
|
+
# service: Disk
|
1750
|
+
# root: <%= Rails.root.join("storage") %>
|
1751
|
+
#
|
1752
|
+
# You can checkout the service's constructor to know which keys are required.
|
1753
|
+
#
|
1754
|
+
# Then, in your application's configuration, you can specify the service to
|
1755
|
+
# use like this:
|
1756
|
+
#
|
1757
|
+
# config.active_storage.service = :local
|
1758
|
+
#
|
1759
|
+
# If you are using Active Storage outside of a Ruby on \Rails application, you
|
1760
|
+
# can configure the service to use like this:
|
1761
|
+
#
|
1762
|
+
# ActiveStorage::Blob.service = ActiveStorage::Service.configure(
|
1763
|
+
# :local,
|
1764
|
+
# { local: {service: "Disk", root: Pathname("/tmp/foo/storage") } }
|
1765
|
+
# )
|
1766
|
+
#
|
1767
|
+
# source://activestorage//lib/active_storage/service.rb#43
|
1768
|
+
class ActiveStorage::Service
|
1769
|
+
extend ::ActiveSupport::Autoload
|
1770
|
+
|
1771
|
+
# Concatenate multiple files into a single "composed" file.
|
1772
|
+
#
|
1773
|
+
# @raise [NotImplementedError]
|
1774
|
+
#
|
1775
|
+
# source://activestorage//lib/active_storage/service.rb#96
|
1776
|
+
def compose(source_keys, destination_key, filename: T.unsafe(nil), content_type: T.unsafe(nil), disposition: T.unsafe(nil), custom_metadata: T.unsafe(nil)); end
|
1777
|
+
|
1778
|
+
# Delete the file at the +key+.
|
1779
|
+
#
|
1780
|
+
# @raise [NotImplementedError]
|
1781
|
+
#
|
1782
|
+
# source://activestorage//lib/active_storage/service.rb#101
|
1783
|
+
def delete(key); end
|
1784
|
+
|
1785
|
+
# Delete files at keys starting with the +prefix+.
|
1786
|
+
#
|
1787
|
+
# @raise [NotImplementedError]
|
1788
|
+
#
|
1789
|
+
# source://activestorage//lib/active_storage/service.rb#106
|
1790
|
+
def delete_prefixed(prefix); end
|
1791
|
+
|
1792
|
+
# Return the content of the file at the +key+.
|
1793
|
+
#
|
1794
|
+
# @raise [NotImplementedError]
|
1795
|
+
#
|
1796
|
+
# source://activestorage//lib/active_storage/service.rb#82
|
1797
|
+
def download(key); end
|
1798
|
+
|
1799
|
+
# Return the partial content in the byte +range+ of the file at the +key+.
|
1800
|
+
#
|
1801
|
+
# @raise [NotImplementedError]
|
1802
|
+
#
|
1803
|
+
# source://activestorage//lib/active_storage/service.rb#87
|
1804
|
+
def download_chunk(key, range); end
|
1805
|
+
|
1806
|
+
# Return +true+ if a file exists at the +key+.
|
1807
|
+
#
|
1808
|
+
# @raise [NotImplementedError]
|
1809
|
+
# @return [Boolean]
|
1810
|
+
#
|
1811
|
+
# source://activestorage//lib/active_storage/service.rb#111
|
1812
|
+
def exist?(key); end
|
1813
|
+
|
1814
|
+
# Returns a Hash of headers for +url_for_direct_upload+ requests.
|
1815
|
+
#
|
1816
|
+
# source://activestorage//lib/active_storage/service.rb#143
|
1817
|
+
def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end
|
1818
|
+
|
1819
|
+
# Returns the value of attribute name.
|
1820
|
+
#
|
1821
|
+
# source://activestorage//lib/active_storage/service.rb#46
|
1822
|
+
def name; end
|
1823
|
+
|
1824
|
+
# Sets the attribute name
|
1825
|
+
#
|
1826
|
+
# @param value the value to set the attribute name to.
|
1827
|
+
#
|
1828
|
+
# source://activestorage//lib/active_storage/service.rb#46
|
1829
|
+
def name=(_arg0); end
|
1830
|
+
|
1831
|
+
# source://activestorage//lib/active_storage/service.rb#91
|
1832
|
+
def open(*args, **options, &block); end
|
1833
|
+
|
1834
|
+
# @return [Boolean]
|
1835
|
+
#
|
1836
|
+
# source://activestorage//lib/active_storage/service.rb#147
|
1837
|
+
def public?; end
|
1838
|
+
|
1839
|
+
# Update metadata for the file identified by +key+ in the service.
|
1840
|
+
# Override in subclasses only if the service needs to store specific
|
1841
|
+
# metadata that has to be updated upon identification.
|
1842
|
+
#
|
1843
|
+
# source://activestorage//lib/active_storage/service.rb#78
|
1844
|
+
def update_metadata(key, **metadata); end
|
1845
|
+
|
1846
|
+
# Upload the +io+ to the +key+ specified. If a +checksum+ is provided, the service will
|
1847
|
+
# ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError.
|
1848
|
+
#
|
1849
|
+
# @raise [NotImplementedError]
|
1850
|
+
#
|
1851
|
+
# source://activestorage//lib/active_storage/service.rb#71
|
1852
|
+
def upload(key, io, checksum: T.unsafe(nil), **options); end
|
1853
|
+
|
1854
|
+
# Returns the URL for the file at the +key+. This returns a permanent URL for public files, and returns a
|
1855
|
+
# short-lived URL for private files. For private files you can provide the +disposition+ (+:inline+ or +:attachment+),
|
1856
|
+
# +filename+, and +content_type+ that you wish the file to be served with on request. Additionally, you can also provide
|
1857
|
+
# the amount of seconds the URL will be valid for, specified in +expires_in+.
|
1858
|
+
#
|
1859
|
+
# source://activestorage//lib/active_storage/service.rb#119
|
1860
|
+
def url(key, **options); end
|
1861
|
+
|
1862
|
+
# Returns a signed, temporary URL that a direct upload file can be PUT to on the +key+.
|
1863
|
+
# The URL will be valid for the amount of seconds specified in +expires_in+.
|
1864
|
+
# You must also provide the +content_type+, +content_length+, and +checksum+ of the file
|
1865
|
+
# that will be uploaded. All these attributes will be validated by the service upon upload.
|
1866
|
+
#
|
1867
|
+
# @raise [NotImplementedError]
|
1868
|
+
#
|
1869
|
+
# source://activestorage//lib/active_storage/service.rb#138
|
1870
|
+
def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: T.unsafe(nil)); end
|
1871
|
+
|
1872
|
+
private
|
1873
|
+
|
1874
|
+
# source://activestorage//lib/active_storage/service.rb#175
|
1875
|
+
def content_disposition_with(filename:, type: T.unsafe(nil)); end
|
1876
|
+
|
1877
|
+
# @raise [NotImplementedError]
|
1878
|
+
#
|
1879
|
+
# source://activestorage//lib/active_storage/service.rb#160
|
1880
|
+
def custom_metadata_headers(metadata); end
|
1881
|
+
|
1882
|
+
# source://activestorage//lib/active_storage/service.rb#164
|
1883
|
+
def instrument(operation, payload = T.unsafe(nil), &block); end
|
1884
|
+
|
1885
|
+
# @raise [NotImplementedError]
|
1886
|
+
#
|
1887
|
+
# source://activestorage//lib/active_storage/service.rb#152
|
1888
|
+
def private_url(key, expires_in:, filename:, disposition:, content_type:, **_arg5); end
|
1889
|
+
|
1890
|
+
# @raise [NotImplementedError]
|
1891
|
+
#
|
1892
|
+
# source://activestorage//lib/active_storage/service.rb#156
|
1893
|
+
def public_url(key, **_arg1); end
|
1894
|
+
|
1895
|
+
# source://activestorage//lib/active_storage/service.rb#170
|
1896
|
+
def service_name; end
|
1897
|
+
|
1898
|
+
class << self
|
1899
|
+
# Override in subclasses that stitch together multiple services and hence
|
1900
|
+
# need to build additional services using the configurator.
|
1901
|
+
#
|
1902
|
+
# Passes the configurator and all of the service's config as keyword args.
|
1903
|
+
#
|
1904
|
+
# See MirrorService for an example.
|
1905
|
+
#
|
1906
|
+
# source://activestorage//lib/active_storage/service.rb#62
|
1907
|
+
def build(configurator:, name:, service: T.unsafe(nil), **service_config); end
|
1908
|
+
|
1909
|
+
# Configure an Active Storage service by name from a set of configurations,
|
1910
|
+
# typically loaded from a YAML file. The Active Storage engine uses this
|
1911
|
+
# to set the global Active Storage service when the app boots.
|
1912
|
+
#
|
1913
|
+
# source://activestorage//lib/active_storage/service.rb#52
|
1914
|
+
def configure(service_name, configurations); end
|
1915
|
+
end
|
1916
|
+
end
|
1917
|
+
|
1918
|
+
# source://activestorage//lib/active_storage/service/configurator.rb#4
|
1919
|
+
class ActiveStorage::Service::Configurator
|
1920
|
+
# source://activestorage//lib/active_storage/service/configurator.rb#11
|
1921
|
+
def initialize(configurations); end
|
1922
|
+
|
1923
|
+
# source://activestorage//lib/active_storage/service/configurator.rb#15
|
1924
|
+
def build(service_name); end
|
1925
|
+
|
1926
|
+
# source://activestorage//lib/active_storage/service/configurator.rb#5
|
1927
|
+
def configurations; end
|
1928
|
+
|
1929
|
+
private
|
1930
|
+
|
1931
|
+
# source://activestorage//lib/active_storage/service/configurator.rb#23
|
1932
|
+
def config_for(name); end
|
1933
|
+
|
1934
|
+
# source://activestorage//lib/active_storage/service/configurator.rb#29
|
1935
|
+
def resolve(class_name); end
|
1936
|
+
|
1937
|
+
class << self
|
1938
|
+
# source://activestorage//lib/active_storage/service/configurator.rb#7
|
1939
|
+
def build(service_name, configurations); end
|
1940
|
+
end
|
1941
|
+
end
|
1942
|
+
|
1943
|
+
# source://activestorage//lib/active_storage/service/registry.rb#4
|
1944
|
+
class ActiveStorage::Service::Registry
|
1945
|
+
# source://activestorage//lib/active_storage/service/registry.rb#5
|
1946
|
+
def initialize(configurations); end
|
1947
|
+
|
1948
|
+
# source://activestorage//lib/active_storage/service/registry.rb#10
|
1949
|
+
def fetch(name); end
|
1950
|
+
|
1951
|
+
private
|
1952
|
+
|
1953
|
+
# source://activestorage//lib/active_storage/service/registry.rb#26
|
1954
|
+
def configurations; end
|
1955
|
+
|
1956
|
+
# source://activestorage//lib/active_storage/service/registry.rb#28
|
1957
|
+
def configurator; end
|
1958
|
+
|
1959
|
+
# source://activestorage//lib/active_storage/service/registry.rb#26
|
1960
|
+
def services; end
|
1961
|
+
end
|
1962
|
+
|
1963
|
+
module ActiveStorage::SetBlob
|
1964
|
+
extend ::ActiveSupport::Concern
|
1965
|
+
|
1966
|
+
private
|
1967
|
+
|
1968
|
+
def blob_scope; end
|
1969
|
+
def set_blob; end
|
1970
|
+
end
|
1971
|
+
|
1972
|
+
module ActiveStorage::SetCurrent
|
1973
|
+
extend ::ActiveSupport::Concern
|
1974
|
+
end
|
1975
|
+
|
1976
|
+
module ActiveStorage::Streaming
|
1977
|
+
extend ::ActiveSupport::Concern
|
1978
|
+
include ::ActionController::Rendering
|
1979
|
+
include ::ActionController::DataStreaming
|
1980
|
+
include ::ActionController::Live
|
1981
|
+
|
1982
|
+
mixes_in_class_methods ::ActionController::Rendering::ClassMethods
|
1983
|
+
mixes_in_class_methods ::ActionController::Live::ClassMethods
|
1984
|
+
|
1985
|
+
private
|
1986
|
+
|
1987
|
+
def send_blob_byte_range_data(blob, range_header, disposition: T.unsafe(nil)); end
|
1988
|
+
def send_blob_stream(blob, disposition: T.unsafe(nil)); end
|
1989
|
+
end
|
1990
|
+
|
1991
|
+
ActiveStorage::Streaming::DEFAULT_BLOB_STREAMING_DISPOSITION = T.let(T.unsafe(nil), String)
|
1992
|
+
|
1993
|
+
class ActiveStorage::TransformJob < ::ActiveStorage::BaseJob
|
1994
|
+
def perform(blob, transformations); end
|
1995
|
+
|
1996
|
+
class << self
|
1997
|
+
private
|
1998
|
+
|
1999
|
+
def __class_attr_queue_name; end
|
2000
|
+
def __class_attr_queue_name=(new_value); end
|
2001
|
+
def __class_attr_rescue_handlers; end
|
2002
|
+
def __class_attr_rescue_handlers=(new_value); end
|
2003
|
+
end
|
2004
|
+
end
|
2005
|
+
|
2006
|
+
# source://activestorage//lib/active_storage.rb#368
|
2007
|
+
module ActiveStorage::Transformers
|
2008
|
+
extend ::ActiveSupport::Autoload
|
2009
|
+
end
|
2010
|
+
|
2011
|
+
# = Active Storage \Transformers \Transformer
|
2012
|
+
#
|
2013
|
+
# A Transformer applies a set of transformations to an image.
|
2014
|
+
#
|
2015
|
+
# The following concrete subclasses are included in Active Storage:
|
2016
|
+
#
|
2017
|
+
# * ActiveStorage::Transformers::ImageProcessingTransformer:
|
2018
|
+
# backed by ImageProcessing, a common interface for MiniMagick and ruby-vips
|
2019
|
+
#
|
2020
|
+
# source://activestorage//lib/active_storage/transformers/transformer.rb#13
|
2021
|
+
class ActiveStorage::Transformers::Transformer
|
2022
|
+
# @return [Transformer] a new instance of Transformer
|
2023
|
+
#
|
2024
|
+
# source://activestorage//lib/active_storage/transformers/transformer.rb#16
|
2025
|
+
def initialize(transformations); end
|
2026
|
+
|
2027
|
+
# Applies the transformations to the source image in +file+, producing a target image in the
|
2028
|
+
# specified +format+. Yields an open Tempfile containing the target image. Closes and unlinks
|
2029
|
+
# the output tempfile after yielding to the given block. Returns the result of the block.
|
2030
|
+
#
|
2031
|
+
# source://activestorage//lib/active_storage/transformers/transformer.rb#23
|
2032
|
+
def transform(file, format:); end
|
2033
|
+
|
2034
|
+
# Returns the value of attribute transformations.
|
2035
|
+
#
|
2036
|
+
# source://activestorage//lib/active_storage/transformers/transformer.rb#14
|
2037
|
+
def transformations; end
|
2038
|
+
|
2039
|
+
private
|
2040
|
+
|
2041
|
+
# Returns an open Tempfile containing a transformed image in the given +format+.
|
2042
|
+
# All subclasses implement this method.
|
2043
|
+
#
|
2044
|
+
# @raise [NotImplementedError]
|
2045
|
+
#
|
2046
|
+
# source://activestorage//lib/active_storage/transformers/transformer.rb#36
|
2047
|
+
def process(file, format:); end
|
2048
|
+
end
|
2049
|
+
|
2050
|
+
# Raised when ActiveStorage::Blob#preview is called on a blob that isn't previewable.
|
2051
|
+
# Use ActiveStorage::Blob#previewable? to determine whether a blob is previewable.
|
2052
|
+
#
|
2053
|
+
# source://activestorage//lib/active_storage/errors.rb#13
|
2054
|
+
class ActiveStorage::UnpreviewableError < ::ActiveStorage::Error; end
|
2055
|
+
|
2056
|
+
# Raised when ActiveStorage::Blob#representation is called on a blob that isn't representable.
|
2057
|
+
# Use ActiveStorage::Blob#representable? to determine whether a blob is representable.
|
2058
|
+
#
|
2059
|
+
# source://activestorage//lib/active_storage/errors.rb#17
|
2060
|
+
class ActiveStorage::UnrepresentableError < ::ActiveStorage::Error; end
|
2061
|
+
|
2062
|
+
# source://activestorage//lib/active_storage/gem_version.rb#9
|
2063
|
+
module ActiveStorage::VERSION; end
|
2064
|
+
|
2065
|
+
# source://activestorage//lib/active_storage/gem_version.rb#10
|
2066
|
+
ActiveStorage::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
|
2067
|
+
|
2068
|
+
# source://activestorage//lib/active_storage/gem_version.rb#11
|
2069
|
+
ActiveStorage::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
|
2070
|
+
|
2071
|
+
# source://activestorage//lib/active_storage/gem_version.rb#13
|
2072
|
+
ActiveStorage::VERSION::PRE = T.let(T.unsafe(nil), T.untyped)
|
2073
|
+
|
2074
|
+
# source://activestorage//lib/active_storage/gem_version.rb#15
|
2075
|
+
ActiveStorage::VERSION::STRING = T.let(T.unsafe(nil), String)
|
2076
|
+
|
2077
|
+
# source://activestorage//lib/active_storage/gem_version.rb#12
|
2078
|
+
ActiveStorage::VERSION::TINY = T.let(T.unsafe(nil), Integer)
|
2079
|
+
|
2080
|
+
class ActiveStorage::VariantRecord < ::ActiveStorage::Record
|
2081
|
+
include ::ActiveStorage::VariantRecord::GeneratedAttributeMethods
|
2082
|
+
include ::ActiveStorage::VariantRecord::GeneratedAssociationMethods
|
2083
|
+
|
2084
|
+
def autosave_associated_records_for_blob(*args); end
|
2085
|
+
def autosave_associated_records_for_image_attachment(*args); end
|
2086
|
+
def autosave_associated_records_for_image_blob(*args); end
|
2087
|
+
|
2088
|
+
class << self
|
2089
|
+
def with_attached_image(*args, **_arg1); end
|
2090
|
+
|
2091
|
+
private
|
2092
|
+
|
2093
|
+
def __class_attr___callbacks; end
|
2094
|
+
def __class_attr___callbacks=(new_value); end
|
2095
|
+
def __class_attr__reflections; end
|
2096
|
+
def __class_attr__reflections=(new_value); end
|
2097
|
+
def __class_attr__validators; end
|
2098
|
+
def __class_attr__validators=(new_value); end
|
2099
|
+
def __class_attr_attachment_reflections; end
|
2100
|
+
def __class_attr_attachment_reflections=(new_value); end
|
2101
|
+
def __class_attr_defined_enums; end
|
2102
|
+
def __class_attr_defined_enums=(new_value); end
|
2103
|
+
end
|
2104
|
+
end
|
2105
|
+
|
2106
|
+
module ActiveStorage::VariantRecord::GeneratedAssociationMethods
|
2107
|
+
def blob; end
|
2108
|
+
def blob=(value); end
|
2109
|
+
def blob_changed?; end
|
2110
|
+
def blob_previously_changed?; end
|
2111
|
+
def build_blob(*args, &block); end
|
2112
|
+
def build_image_attachment(*args, &block); end
|
2113
|
+
def build_image_blob(*args, &block); end
|
2114
|
+
def create_blob(*args, &block); end
|
2115
|
+
def create_blob!(*args, &block); end
|
2116
|
+
def create_image_attachment(*args, &block); end
|
2117
|
+
def create_image_attachment!(*args, &block); end
|
2118
|
+
def create_image_blob(*args, &block); end
|
2119
|
+
def create_image_blob!(*args, &block); end
|
2120
|
+
def image; end
|
2121
|
+
def image=(attachable); end
|
2122
|
+
def image_attachment; end
|
2123
|
+
def image_attachment=(value); end
|
2124
|
+
def image_blob; end
|
2125
|
+
def image_blob=(value); end
|
2126
|
+
def reload_blob; end
|
2127
|
+
def reload_image_attachment; end
|
2128
|
+
def reload_image_blob; end
|
2129
|
+
def reset_blob; end
|
2130
|
+
def reset_image_attachment; end
|
2131
|
+
def reset_image_blob; end
|
2132
|
+
end
|
2133
|
+
|
2134
|
+
module ActiveStorage::VariantRecord::GeneratedAttributeMethods; end
|
2135
|
+
|
2136
|
+
class ActiveStorage::Variation
|
2137
|
+
def initialize(transformations); end
|
2138
|
+
|
2139
|
+
def content_type; end
|
2140
|
+
def default_to(defaults); end
|
2141
|
+
def digest; end
|
2142
|
+
def format; end
|
2143
|
+
def key; end
|
2144
|
+
def transform(file, &block); end
|
2145
|
+
def transformations; end
|
2146
|
+
|
2147
|
+
private
|
2148
|
+
|
2149
|
+
def transformer; end
|
2150
|
+
|
2151
|
+
class << self
|
2152
|
+
def decode(key); end
|
2153
|
+
def encode(transformations); end
|
2154
|
+
def wrap(variator); end
|
2155
|
+
end
|
2156
|
+
end
|