bible270 0.16.0 → 0.16.1
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/app/mailers/bible270/notice_mailer.rb +15 -10
- data/lib/bible270/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5518f1eb25a21f7610ea80c8cd46e1d49690716bf98b5644fb3fa443f920a0e
|
|
4
|
+
data.tar.gz: 384ec828a091ed3c71abeb71a1d5b5f7d1cb7ff707f997511ca5e6d411cc5095
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f222369a58be11fb62c8fd76be668aad9010f76f3d88e9d9820d562eefce7becbe7e9b4fd7dd4dfa5e2408c256762fdd91da44942447328fa69782698e387789
|
|
7
|
+
data.tar.gz: c1f881c35558530bb27636a2fcd27a0f40ebb9cdc37e9f07cc10fda04aa78ddcfff65f8b210575c10640b46400616727e28ddc3b8594fd9cfa91dd19ac658a3b
|
|
@@ -35,23 +35,28 @@ module Bible270
|
|
|
35
35
|
|
|
36
36
|
# A mailer has no request, so the host is config.mailer_host or nothing. No
|
|
37
37
|
# link is better than a broken one.
|
|
38
|
+
#
|
|
39
|
+
# The mount prefix needs no help: a mounted engine's url_helpers already
|
|
40
|
+
# resolve it from the real mount point in routes.rb. Passing script_name from
|
|
41
|
+
# config.mount_at was worse than useless — ignored when blank, and overriding
|
|
42
|
+
# the true prefix when not, so a config that disagreed with routes.rb would
|
|
43
|
+
# have produced links to nowhere.
|
|
38
44
|
def day_url_for(day)
|
|
39
|
-
|
|
40
|
-
return nil if host.blank?
|
|
41
|
-
|
|
42
|
-
Bible270::Engine.routes.url_helpers.day_url(
|
|
43
|
-
day, host: host, protocol: host.start_with?('localhost') ? 'http' : 'https'
|
|
44
|
-
)
|
|
45
|
-
rescue StandardError
|
|
46
|
-
nil
|
|
45
|
+
engine_url(:day_url, day)
|
|
47
46
|
end
|
|
48
47
|
|
|
49
48
|
def admin_url_for(reader)
|
|
49
|
+
engine_url(:admin_reader_url, reader)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def engine_url(helper, *)
|
|
50
53
|
host = Bible270.config.mailer_host
|
|
51
54
|
return nil if host.blank?
|
|
52
55
|
|
|
53
|
-
Bible270::Engine.routes.url_helpers.
|
|
54
|
-
|
|
56
|
+
Bible270::Engine.routes.url_helpers.public_send(
|
|
57
|
+
helper, *,
|
|
58
|
+
host: host,
|
|
59
|
+
protocol: host.start_with?('localhost') ? 'http' : 'https'
|
|
55
60
|
)
|
|
56
61
|
rescue StandardError
|
|
57
62
|
nil
|
data/lib/bible270/version.rb
CHANGED