effective_resources 1.10.0 → 1.10.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/lib/effective_resources/version.rb +1 -1
- data/lib/effective_resources.rb +4 -5
- 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: 536afe56ae331c14920c56f2eb625812127f0b0ad9f57696b8dce9cc198b6840
|
|
4
|
+
data.tar.gz: 99afc3984fd065ae8014bb031ea16a9138fce77e3ec0861b140a7d18e6f5e5fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd3e83bde7a2a01e86e9588d1998249c5e1f8882bceb679e4c32d4bafbb409b419125cc7bcca2ab4fe358bce0e707f79f7f1a5f1ef4628228dc897a9c74ca510
|
|
7
|
+
data.tar.gz: 659aab8c923fd9a5b33cb21335251c038f7af37e141c5312fea317bf0a2a9fbb2f673a12cec5b8170a3e57a50e27dcaec21a76af4b69bfdb0143ea7fdcced82b
|
data/lib/effective_resources.rb
CHANGED
|
@@ -36,7 +36,10 @@ module EffectiveResources
|
|
|
36
36
|
|
|
37
37
|
# Email
|
|
38
38
|
def self.deliver_method
|
|
39
|
-
config[:deliver_method]
|
|
39
|
+
return config[:deliver_method] if config[:deliver_method].present?
|
|
40
|
+
|
|
41
|
+
rails = Rails.application.config
|
|
42
|
+
(rails.respond_to?(:active_job) && rails.active_job.queue_adapter) ? :deliver_later : :deliver_now
|
|
40
43
|
end
|
|
41
44
|
|
|
42
45
|
def self.mailer_layout
|
|
@@ -106,10 +109,6 @@ module EffectiveResources
|
|
|
106
109
|
end
|
|
107
110
|
end
|
|
108
111
|
|
|
109
|
-
def self.deliver_method
|
|
110
|
-
config = Rails.application.config
|
|
111
|
-
(config.respond_to?(:active_job) && config.active_job.queue_adapter) ? :deliver_later : :deliver_now
|
|
112
|
-
end
|
|
113
112
|
|
|
114
113
|
def self.advance_date(date, business_days: 1, holidays: [:ca, :observed])
|
|
115
114
|
raise('business_days must be an integer <= 365') unless business_days.kind_of?(Integer) && business_days <= 365
|