thecore_background_jobs 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c9c5ce397743040c676c50e2ff7526b52e8a59dfce3944244ac747b675a8edf
4
- data.tar.gz: 79cb52050b3a2fb7933e71e2e44df1222e85473a73cedc94528498a8c45ea543
3
+ metadata.gz: fd7c37d9c19471417017d79ffd5b8a02dcb594fb2c8e6103958b58093fde23d9
4
+ data.tar.gz: ac87a1589246976f3a4792f7063fd5dc8a4cfe314541654ec86bfcf1fcd6bc41
5
5
  SHA512:
6
- metadata.gz: c4c1cbd68f019f47a0e1a1274e3c7b9fe57b486a2d5ea56d1b77ac135a402e58a63a699ad050a9d91286498c1bb48f689b8567883707f38c0e9a2425a1db1fe6
7
- data.tar.gz: 103d8b64ed5dc79632d8394c9b2751567250c99592899e41b524c7cef0d0643e735f204d673be40cfd2eef961082a5b2e8c4ee88774b85e3d6cc21429f808494
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
- delivery_options = { domain: Settings.ns(:smtp).domain, address: Settings.ns(:smtp).address, port: Settings.ns(:smtp).port.to_i, enable_starttls_auto: (Settings.ns(:smtp).enable_starttls_auto == "true")}
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: Settings.ns(:smtp).user_name}) unless Settings.ns(:smtp).user_name.blank?
14
- delivery_options.merge!({password: Settings.ns(:smtp).password}) unless Settings.ns(:smtp).password.blank?
15
- delivery_options.merge!({authentication: Settings.ns(:smtp).authentication}) unless Settings.ns(:smtp).authentication.blank?
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
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: 2022-09-19 00:00:00.000000000 Z
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.0.3.1
122
+ rubygems_version: 3.1.6
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Thecorized thecore_background_jobs