mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-16 20:22:18 +00:00
Rename PremailerWebpackStrategy
-> PremailerBundledAssetStrategy
(#29934)
This commit is contained in:
parent
bf5d948237
commit
0d9ad96d3f
|
@ -97,7 +97,6 @@ Style/FetchEnvVar:
|
|||
- 'config/initializers/paperclip.rb'
|
||||
- 'config/initializers/vapid.rb'
|
||||
- 'lib/mastodon/redis_config.rb'
|
||||
- 'lib/premailer_webpack_strategy.rb'
|
||||
- 'lib/tasks/repo.rake'
|
||||
- 'spec/features/profile_spec.rb'
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../../lib/premailer_webpack_strategy'
|
||||
require_relative '../../lib/premailer_bundled_asset_strategy'
|
||||
|
||||
Premailer::Rails.config.merge!(remove_ids: true,
|
||||
adapter: :nokogiri,
|
||||
generate_text_part: false,
|
||||
css_to_attributes: false,
|
||||
strategies: [PremailerWebpackStrategy])
|
||||
strategies: [PremailerBundledAssetStrategy])
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module PremailerWebpackStrategy
|
||||
module PremailerBundledAssetStrategy
|
||||
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?
|
||||
asset_host = "#{Webpacker.dev_server.protocol}://#{Webpacker.dev_server.host_with_port}"
|
Loading…
Reference in a new issue