thecore_background_jobs 2.2.4 → 2.2.5
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/thecore_background_jobs.rb +18 -4
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd7c37d9c19471417017d79ffd5b8a02dcb594fb2c8e6103958b58093fde23d9
|
|
4
|
+
data.tar.gz: ac87a1589246976f3a4792f7063fd5dc8a4cfe314541654ec86bfcf1fcd6bc41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cc5197dfcf9092baecc0264821130e9ff00d9245b5f2a9258f7924f39db5bcc003b561ed54e5d5ac5d8cef162c1b43d7ea1d7b59f5aa90d6e1a48db587448fb
|
|
7
|
+
data.tar.gz: 2cb70b6be9a466d0400e73f677f267a0d5f584e8c0ef72517e63e6a97e2ca07d38dc8394cb0a776eb707251ad532f6a16d073b6750ede6068ede110c2ae4768d
|
|
@@ -8,11 +8,25 @@ require "thecore_background_jobs/engine"
|
|
|
8
8
|
module ThecoreBackgroundJobs
|
|
9
9
|
# Your code goes here...
|
|
10
10
|
def self.email_setup
|
|
11
|
-
|
|
11
|
+
# Fill variables with the correct values
|
|
12
|
+
domain = ThecoreSettings::Setting.where(ns: :smtp, key: :domain).first.raw
|
|
13
|
+
address = ThecoreSettings::Setting.where(ns: :smtp, key: :address).first.raw
|
|
14
|
+
port = ThecoreSettings::Setting.where(ns: :smtp, key: :port).first.raw.to_i
|
|
15
|
+
enable_starttls_auto = ThecoreSettings::Setting.where(ns: :smtp, key: :enable_starttls_auto).first.raw == "true"
|
|
16
|
+
user_name = ThecoreSettings::Setting.where(ns: :smtp, key: :user_name).first.raw
|
|
17
|
+
password = ThecoreSettings::Setting.where(ns: :smtp, key: :password).first.raw
|
|
18
|
+
authentication = ThecoreSettings::Setting.where(ns: :smtp, key: :authentication).first.raw
|
|
19
|
+
|
|
20
|
+
delivery_options = {
|
|
21
|
+
domain: domain,
|
|
22
|
+
address: address,
|
|
23
|
+
port: port,
|
|
24
|
+
enable_starttls_auto: enable_starttls_auto
|
|
25
|
+
}
|
|
12
26
|
# Other Options
|
|
13
|
-
delivery_options.merge!({user_name:
|
|
14
|
-
delivery_options.merge!({password:
|
|
15
|
-
delivery_options.merge!({authentication:
|
|
27
|
+
delivery_options.merge!({user_name: user_name}) unless user_name.blank?
|
|
28
|
+
delivery_options.merge!({password: password}) unless password.blank?
|
|
29
|
+
delivery_options.merge!({authentication: authentication}) unless authentication.blank? || authentication == "none"
|
|
16
30
|
delivery_options
|
|
17
31
|
end
|
|
18
32
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thecore_background_jobs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gabriele Tassoni
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thecore_backend_commons
|
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
120
|
version: '0'
|
|
121
121
|
requirements: []
|
|
122
|
-
rubygems_version: 3.
|
|
122
|
+
rubygems_version: 3.1.6
|
|
123
123
|
signing_key:
|
|
124
124
|
specification_version: 4
|
|
125
125
|
summary: Thecorized thecore_background_jobs
|