effective_resources 1.13.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/effective_resources.rb +2 -2
- data/lib/effective_resources/effective_gem.rb +12 -1
- data/lib/effective_resources/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: f21136f9833dbd9036cad7cb495972fef7601e9a53aa0a531f316fc270d898bb
|
4
|
+
data.tar.gz: 043bcdba74212c6c195539bd4a6991acf44be982660885a2d33f8908ebef572b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afbfc06d0319bfd759a924dea4bc8e8b47c0d772d88f2bddb6925bf926032b97553d9049ac97f398e7a48515c0154d2db4268eb8c7b55e43c87f99dd146c9cad
|
7
|
+
data.tar.gz: e71929d4829aa0624ff5314a8e87cb9f4369c0ce20b7e1be55f5da57af243a5c3e4d0fc3de91356883c49ce9064260d2ede78d238b8a9e209628369f2f1eeb77
|
@@ -44,8 +44,8 @@ EffectiveResources.setup do |config|
|
|
44
44
|
# config.mailer_layout = 'effective_mailer_layout'
|
45
45
|
|
46
46
|
# Default From
|
47
|
-
config.mailer_sender = "
|
47
|
+
config.mailer_sender = '"Info" <info@example.com>'
|
48
48
|
|
49
49
|
# Send Admin correspondence To
|
50
|
-
config.mailer_admin = "admin@example.com
|
50
|
+
config.mailer_admin = '"Admin" <admin@example.com>'
|
51
51
|
end
|
@@ -3,13 +3,24 @@
|
|
3
3
|
module EffectiveGem
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
+
EXCLUDED_GETTERS = [
|
7
|
+
:config, :setup, :send_email, :parent_mailer_class,
|
8
|
+
:deliver_method, :mailer_layout, :mailer_sender, :mailer_admin
|
9
|
+
]
|
10
|
+
|
6
11
|
included do
|
7
12
|
raise("expected self.config_keys method") unless respond_to?(:config_keys)
|
8
13
|
|
9
|
-
|
14
|
+
# Define getters
|
15
|
+
(config_keys - EXCLUDED_GETTERS).each do |key|
|
10
16
|
self.singleton_class.define_method(key) { config()[key] }
|
17
|
+
end
|
18
|
+
|
19
|
+
# Define setters
|
20
|
+
config_keys.each do |key|
|
11
21
|
self.singleton_class.define_method("#{key}=") { |value| config()[key] = value }
|
12
22
|
end
|
23
|
+
|
13
24
|
end
|
14
25
|
|
15
26
|
module ClassMethods
|