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 +4 -4
- data/lib/thredded_create_app/tasks/add_roadie.rb +10 -5
- data/lib/thredded_create_app/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0192d6123fe66987a3b0523882845a74a0379d69'
|
|
4
|
+
data.tar.gz: e1316bc7fa77e70e737c32b7b3cfa185468e8816
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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{
|
|
31
|
-
|
|
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',
|