thecore_background_jobs 3.0.7 → 3.0.8
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/README.md +1 -28
- data/lib/thecore_background_jobs/version.rb +1 -1
- 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: 5ef0854179005fa5db9adc99359e32a5eeb905a0a3987f45518d68a2a57da2f1
|
4
|
+
data.tar.gz: a06f5ba367aeae7e2490e4b7c6a1904a5c78385c703d42ca03b103017d29cffb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b6d1fafe7e426a444e62e3f74e9aa3c631fe56246fe0b56542c4535eaddb99ae843c20a7516a09cfbcc9bfe0abe1b3aa648f958b9f6b74679b751a6f60097c5
|
7
|
+
data.tar.gz: 3f4443667f7d48237544e9910a36f94d0142f45df8860c84790aa517ae9f817f34efafe95f6c87b8722fa27e5fffa655cb66c9f68199022d9d1d98b26debcdac
|
data/README.md
CHANGED
@@ -1,28 +1 @@
|
|
1
|
-
|
2
|
-
Short description and motivation.
|
3
|
-
|
4
|
-
## Usage
|
5
|
-
How to use my plugin.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
Add this line to your application's Gemfile:
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem "thecore_background_jobs"
|
12
|
-
```
|
13
|
-
|
14
|
-
And then execute:
|
15
|
-
```bash
|
16
|
-
$ bundle
|
17
|
-
```
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
```bash
|
21
|
-
$ gem install thecore_background_jobs
|
22
|
-
```
|
23
|
-
|
24
|
-
## Contributing
|
25
|
-
Contribution directions go here.
|
26
|
-
|
27
|
-
## License
|
28
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
1
|
+
This is part of Thecore framework: https://github.com/gabrieletassoni/thecore/tree/release/3
|
@@ -7,11 +7,25 @@ require "thecore_background_jobs/engine"
|
|
7
7
|
module ThecoreBackgroundJobs
|
8
8
|
# Your code goes here...
|
9
9
|
def self.email_setup
|
10
|
-
|
10
|
+
# Fill variables with the correct values
|
11
|
+
domain = ThecoreSettings::Setting.where(ns: :smtp, key: :domain).first.raw
|
12
|
+
address = ThecoreSettings::Setting.where(ns: :smtp, key: :address).first.raw
|
13
|
+
port = ThecoreSettings::Setting.where(ns: :smtp, key: :port).first.raw.to_i
|
14
|
+
enable_starttls_auto = ThecoreSettings::Setting.where(ns: :smtp, key: :enable_starttls_auto).first.raw == "true"
|
15
|
+
user_name = ThecoreSettings::Setting.where(ns: :smtp, key: :user_name).first.raw
|
16
|
+
password = ThecoreSettings::Setting.where(ns: :smtp, key: :password).first.raw
|
17
|
+
authentication = ThecoreSettings::Setting.where(ns: :smtp, key: :authentication).first.raw
|
18
|
+
|
19
|
+
delivery_options = {
|
20
|
+
domain: domain,
|
21
|
+
address: address,
|
22
|
+
port: port,
|
23
|
+
enable_starttls_auto: enable_starttls_auto
|
24
|
+
}
|
11
25
|
# Other Options
|
12
|
-
delivery_options.merge!({user_name:
|
13
|
-
delivery_options.merge!({password:
|
14
|
-
delivery_options.merge!({authentication:
|
26
|
+
delivery_options.merge!({user_name: user_name}) unless user_name.blank?
|
27
|
+
delivery_options.merge!({password: password}) unless password.blank?
|
28
|
+
delivery_options.merge!({authentication: authentication}) unless authentication.blank? || authentication == "none"
|
15
29
|
delivery_options
|
16
30
|
end
|
17
31
|
|
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: 3.0.
|
4
|
+
version: 3.0.8
|
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: redis-namespace
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.5.16
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Background workers for Thecore
|