Rename PremailerWebpackStrategy
-> PremailerBundledAssetStrategy
(#29934)
This commit is contained in:
parent
bf5d948237
commit
0d9ad96d3f
3 changed files with 4 additions and 5 deletions
|
@ -97,7 +97,6 @@ Style/FetchEnvVar:
|
||||||
- 'config/initializers/paperclip.rb'
|
- 'config/initializers/paperclip.rb'
|
||||||
- 'config/initializers/vapid.rb'
|
- 'config/initializers/vapid.rb'
|
||||||
- 'lib/mastodon/redis_config.rb'
|
- 'lib/mastodon/redis_config.rb'
|
||||||
- 'lib/premailer_webpack_strategy.rb'
|
|
||||||
- 'lib/tasks/repo.rake'
|
- 'lib/tasks/repo.rake'
|
||||||
- 'spec/features/profile_spec.rb'
|
- 'spec/features/profile_spec.rb'
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative '../../lib/premailer_webpack_strategy'
|
require_relative '../../lib/premailer_bundled_asset_strategy'
|
||||||
|
|
||||||
Premailer::Rails.config.merge!(remove_ids: true,
|
Premailer::Rails.config.merge!(remove_ids: true,
|
||||||
adapter: :nokogiri,
|
adapter: :nokogiri,
|
||||||
generate_text_part: false,
|
generate_text_part: false,
|
||||||
css_to_attributes: false,
|
css_to_attributes: false,
|
||||||
strategies: [PremailerWebpackStrategy])
|
strategies: [PremailerBundledAssetStrategy])
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module PremailerWebpackStrategy
|
module PremailerBundledAssetStrategy
|
||||||
def load(url)
|
def load(url)
|
||||||
asset_host = ENV['CDN_HOST'] || ENV['WEB_DOMAIN'] || ENV['LOCAL_DOMAIN']
|
asset_host = ENV['CDN_HOST'] || ENV['WEB_DOMAIN'] || ENV.fetch('LOCAL_DOMAIN', nil)
|
||||||
|
|
||||||
if Webpacker.dev_server.running?
|
if Webpacker.dev_server.running?
|
||||||
asset_host = "#{Webpacker.dev_server.protocol}://#{Webpacker.dev_server.host_with_port}"
|
asset_host = "#{Webpacker.dev_server.protocol}://#{Webpacker.dev_server.host_with_port}"
|
Loading…
Reference in a new issue