jekyll-newsletter 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/newsletter.rb +3 -0
- 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: 9d99c011a9be0c4a4ac9aafb9dc903a5055d391f21333422207e56bca4faf7f9
|
4
|
+
data.tar.gz: 59626345ef4d427d8aeed2f51d6394e20d4587b4e3a8e527d2707f674296f763
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1598703726bddeaffc86745d9b1ade4f12cb05632dd18992878a522dca83285e1bd823532e708731e5f1b01b90a975fe346f69c0df539e99ba975921bb4d2d3c
|
7
|
+
data.tar.gz: c2d33e0b3f074ba26d14587171d12ce1db9113034104d23913aa2f647764b84b21ef8021f6b6e7f93af5580238d837d79eb3e01ca7eebb110b42cef7d9eec7ea
|
data/lib/jekyll/newsletter.rb
CHANGED
@@ -62,6 +62,7 @@ module Jekyll
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
# TODO: Refactor this mess
|
65
66
|
def config
|
66
67
|
@config ||= Jekyll::Utils.deep_merge_hashes(CONFIG,
|
67
68
|
(site.config['newsletter'] || {}).transform_keys(&:to_sym)).tap do |config|
|
@@ -78,6 +79,8 @@ module Jekyll
|
|
78
79
|
config[:delivery_method] = config[:delivery_method].to_sym
|
79
80
|
config[:options].transform_keys!(&:to_sym)
|
80
81
|
config[:options][:user_name] ||= config[:from].scan(/<([^>]+)>/)&.flatten&.first || config[:from]
|
82
|
+
config[:options][:domain] ||= config[:from].split('@').last
|
83
|
+
config[:options][:address] ||= "smtp.#{config[:options][:domain]}"
|
81
84
|
config[:delivery_method] = :logger unless production?
|
82
85
|
end.freeze
|
83
86
|
end
|