Module: Studio::EmailImage
- Defined in:
- app/services/studio/email_image.rb
Overview
DEPRECATED NAME — this is Studio::EmailCatalog now. Every method here just forwards; there is no behavior in this file.
The METHOD surface is kept complete, for two reasons:
1. Engine 0.33 shipped this module as the registry's public name, so any
app already on 0.33 is calling it.
2. consumer-ci.yml runs each consumer's DEFAULT BRANCH suite against an
engine PR, and mcritchie-studio's test/integration/studio_email_image_test.rb
on `main` calls .url, .store and .record directly. Dropping any of them
reddens that lane from the moment the PR opens, and nothing inside the
engine PR can reach the consumer's main to fix it.
ONE thing did not survive: the VARIANTS CONSTANT. It was a frozen literal
hash, and the registry it stood for is now built at runtime, so a constant
cannot express it. The variants METHOD returns the same key => label shape
and is the supported replacement. Checked before dropping it: no consumer's
main names the constant — only .url, .store and .record — so consumer CI
stays green. A host that did reference it gets a NameError, not a silent
wrong answer.
Delete it once no consumer's main names it — the same staged retirement /admin/email_images is on.
Deliberately explicit rather than method_missing: a typo should still raise NoMethodError here, and the delegated surface should be readable as a list.
Constant Summary collapse
- PURPOSE =
EmailCatalog::PURPOSE
- ASPECT_RATIO =
EmailCatalog::ASPECT_RATIO
- MAX_WIDTH =
EmailCatalog::MAX_WIDTH
Class Method Summary collapse
- .app_owned?(key) ⇒ Boolean
- .default_asset_path(key) ⇒ Object
- .default_url(key) ⇒ Object
- .entries ⇒ Object
- .entry(key) ⇒ Object
- .keys ⇒ Object
- .known?(key) ⇒ Boolean
- .label(key) ⇒ Object
-
.mailer_asset_host ⇒ Object
Origin resolution.
- .mailer_port_suffix(options) ⇒ Object
- .mailer_protocol(options, host) ⇒ Object
- .preview_url(key) ⇒ Object
- .record(key) ⇒ Object
-
.register ⇒ Object
Registry.
- .registered?(key) ⇒ Boolean
- .reset! ⇒ Object
- .resolved_url(key) ⇒ Object
- .revert(key) ⇒ Object
- .source(key) ⇒ Object
-
.store(key, io:, content_type: nil) ⇒ Object
Writes.
- .table_ready? ⇒ Boolean
- .uploads_available? ⇒ Boolean
-
.url(key) ⇒ Object
Image resolution.
- .variants ⇒ Object
Class Method Details
.app_owned?(key) ⇒ Boolean
52 |
# File 'app/services/studio/email_image.rb', line 52 def app_owned?(key) = EmailCatalog.app_owned?(key) |
.default_asset_path(key) ⇒ Object
55 |
# File 'app/services/studio/email_image.rb', line 55 def default_asset_path(key) = EmailCatalog.default_asset_path(key) |
.default_url(key) ⇒ Object
54 |
# File 'app/services/studio/email_image.rb', line 54 def default_url(key) = EmailCatalog.default_url(key) |
.entries ⇒ Object
37 |
# File 'app/services/studio/email_image.rb', line 37 def entries = EmailCatalog.entries |
.entry(key) ⇒ Object
38 |
# File 'app/services/studio/email_image.rb', line 38 def entry(key) = EmailCatalog.entry(key) |
.keys ⇒ Object
39 |
# File 'app/services/studio/email_image.rb', line 39 def keys = EmailCatalog.keys |
.known?(key) ⇒ Boolean
40 |
# File 'app/services/studio/email_image.rb', line 40 def known?(key) = EmailCatalog.known?(key) |
.label(key) ⇒ Object
42 |
# File 'app/services/studio/email_image.rb', line 42 def label(key) = EmailCatalog.label(key) |
.mailer_asset_host ⇒ Object
Origin resolution. Delegated because 0.34's suite asserted these directly.
64 |
# File 'app/services/studio/email_image.rb', line 64 def mailer_asset_host = EmailCatalog.mailer_asset_host |
.mailer_port_suffix(options) ⇒ Object
66 |
# File 'app/services/studio/email_image.rb', line 66 def mailer_port_suffix() = EmailCatalog.mailer_port_suffix() |
.mailer_protocol(options, host) ⇒ Object
65 |
# File 'app/services/studio/email_image.rb', line 65 def mailer_protocol(, host) = EmailCatalog.mailer_protocol(, host) |
.preview_url(key) ⇒ Object
50 |
# File 'app/services/studio/email_image.rb', line 50 def preview_url(key) = EmailCatalog.preview_url(key) |
.record(key) ⇒ Object
53 |
# File 'app/services/studio/email_image.rb', line 53 def record(key) = EmailCatalog.record(key) |
.register ⇒ Object
Registry
36 |
# File 'app/services/studio/email_image.rb', line 36 def register(...) = EmailCatalog.register(...) |
.registered?(key) ⇒ Boolean
41 |
# File 'app/services/studio/email_image.rb', line 41 def registered?(key) = EmailCatalog.registered?(key) |
.reset! ⇒ Object
44 |
# File 'app/services/studio/email_image.rb', line 44 def reset! = EmailCatalog.reset! |
.resolved_url(key) ⇒ Object
49 |
# File 'app/services/studio/email_image.rb', line 49 def resolved_url(key) = EmailCatalog.resolved_url(key) |
.revert(key) ⇒ Object
59 |
# File 'app/services/studio/email_image.rb', line 59 def revert(key) = EmailCatalog.revert(key) |
.source(key) ⇒ Object
51 |
# File 'app/services/studio/email_image.rb', line 51 def source(key) = EmailCatalog.source(key) |
.store(key, io:, content_type: nil) ⇒ Object
Writes
58 |
# File 'app/services/studio/email_image.rb', line 58 def store(key, io:, content_type: nil) = EmailCatalog.store(key, io: io, content_type: content_type) |
.table_ready? ⇒ Boolean
61 |
# File 'app/services/studio/email_image.rb', line 61 def table_ready? = EmailCatalog.table_ready? |
.uploads_available? ⇒ Boolean
60 |
# File 'app/services/studio/email_image.rb', line 60 def uploads_available? = EmailCatalog.uploads_available? |
.url(key) ⇒ Object
Image resolution. url is the pre-registry contract — this app's own
image or nil — and must stay that way; see the note on EmailCatalog#url.
48 |
# File 'app/services/studio/email_image.rb', line 48 def url(key) = EmailCatalog.url(key) |
.variants ⇒ Object
43 |
# File 'app/services/studio/email_image.rb', line 43 def variants = EmailCatalog.variants |