thredded_create_app 0.1.13 → 0.1.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 839482e4e53aa216336b96787c30befc798a7703
4
- data.tar.gz: db966ce9861f65c420e755831c6a7e536f9deb0b
3
+ metadata.gz: '0192d6123fe66987a3b0523882845a74a0379d69'
4
+ data.tar.gz: e1316bc7fa77e70e737c32b7b3cfa185468e8816
5
5
  SHA512:
6
- metadata.gz: 262fda0690bea54024a3004c6477c67c3c1b6e528a84918871ce86e3ad4d8d031e64a49c0c66795f69eb0cffffc1666fd3fcb52602ff5f2b5f2607709441a90e
7
- data.tar.gz: e66af9f678bb54c8de023e708091e917fabfe82eb0ceefd00281364efdd31e6f8c2361ebdf73d91df1c0a7856deaf6ae52f41442999c511e5e778f17d6b76fe1
6
+ metadata.gz: e5f9e0f3e35da8d736e87fa27b0db927b1aa9744b22cdda52ffe086fcc82e894da22638d007fee06147d1fb66137394111fd9fe63cc955c19e9d8533975a8a64
7
+ data.tar.gz: 8455840cf1f18b09036f4b160d54a43768e2ce262350acc6b6ff5a07d403d5a361fe09badc454a612aa5eac6b35045a04af8ff4631929d61a8157911bca2c143
@@ -27,13 +27,21 @@ module ThreddedCreateApp
27
27
  before: /\nend\n\z$/,
28
28
  content: indent(2, "\n" + roadie_production_config)
29
29
  replace 'app/views/layouts/mailer.html.erb',
30
- %r{<style>.*?</style>}m,
31
- "<%= stylesheet_link_tag 'email' %>"
30
+ %r{ *<style>.*?</style>\n}m,
31
+ indent(4, mailer_template_head)
32
32
  git_commit 'Add Roadie configuration'
33
33
  end
34
34
 
35
35
  private
36
36
 
37
+ def mailer_template_head
38
+ <<~'ERB'
39
+ <%# Ensure the stylesheet is referenced without a host so that the local
40
+ version is read by Roadie even if asset_host is set. %>
41
+ <link rel="stylesheet" href="<%= stylesheet_path('email', host: '') %>" />
42
+ ERB
43
+ end
44
+
37
45
  def roadie_development_config
38
46
  <<~'RUBY'
39
47
  # Set the default URL options for both Roadie and ActionMailer:
@@ -46,9 +54,6 @@ module ThreddedCreateApp
46
54
 
47
55
  def roadie_production_config
48
56
  <<~'RUBY'
49
- # Roadie requires that action_mailer.asset_host is nil, see:
50
- # https://github.com/Mange/roadie-rails/blob/9e3cb2ed59f4ec9fda252ad016b23e106983a440/README.md#known-issues
51
- config.action_mailer.asset_host = nil
52
57
  # Set the default URL options for both Roadie and ActionMailer:
53
58
  config.roadie.url_options = config.action_mailer.default_url_options = {
54
59
  host: ENV['APP_HOST'] || '[SET ME] myapp.herokuapp.com',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ThreddedCreateApp
4
- VERSION = '0.1.13'
4
+ VERSION = '0.1.14'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thredded_create_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy