thecore_background_jobs 1.1.12 → 2.0.3
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 +5 -5
- data/README.md +1 -3
- data/lib/thecore_background_jobs.rb +1 -2
- data/lib/thecore_background_jobs/engine.rb +2 -2
- data/lib/thecore_background_jobs/version.rb +1 -1
- metadata +10 -16
- data/app/assets/config/thecore_background_jobs_manifest.js +0 -0
- data/config/initializers/thecore_background_jobs_after_initialize.rb +0 -6
- data/config/initializers/thecore_background_jobs_rails_admin_config.rb +0 -0
- data/config/initializers/thecore_background_jobs_static_links.rb +0 -4
- data/lib/abilities_thecore_background_jobs_concern.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4a2328b93d0be36b133d6702117aa136cbf95b84e7623edf9e5535582b5115b2
|
4
|
+
data.tar.gz: 8a486dda92275081f50a48ee3ff57bff3501581929acbcddf25e3fb425b6e04b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 453b0d9e3d245b9b53a14b31a59c014f54bdeef4e522f18a126e82ba2908bdeffda8ea71ad491a70558aaeebf27473b19419b86113dc2177ed49587736df5a5e
|
7
|
+
data.tar.gz: fe29fc3aa9afee9b34ee5579abb217cd3d20e38f6f1af1dc70f17bf0fd00c86397f252eb8ea43a3ad0f2516a651152da7976269f236a20bdca0848ab52d859fd
|
data/README.md
CHANGED
@@ -24,8 +24,6 @@ The following script asks for the installation directory of the main Thecore App
|
|
24
24
|
|
25
25
|
[Service]
|
26
26
|
WorkingDirectory=$APPPATH
|
27
|
-
Environment=SECRET_KEY_BASE=$(grep "SECRET_KEY_BASE" /etc/apache2/bancolini-confs/$APPNAME.conf|awk -F " " '{print $3}')
|
28
|
-
Environment=$(echo $APPNAME | awk '{print toupper($0)}')_DATABASE_PASSWORD=$APPNAME
|
29
27
|
ExecStart=$BUNDLEBIN exec "sidekiq -e production"
|
30
28
|
User=${SUDO_USER:-$(whoami)}
|
31
29
|
Type=simple
|
@@ -60,7 +58,7 @@ And you can manually test it in rails console:
|
|
60
58
|
If you'd like to have the scheduled job run repeatedly, then add
|
61
59
|
**config/sidekiq.yml** with content like:
|
62
60
|
|
63
|
-
|
61
|
+
schedule:
|
64
62
|
hello_world:
|
65
63
|
cron: '0 * * * * *' # Runs once per minute
|
66
64
|
class: HelloWorld
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require '
|
1
|
+
require 'thecore_backend_commons'
|
2
2
|
module ThecoreBackgroundJobs
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
|
5
5
|
initializer 'thecore_background_jobs.add_to_migrations' do |app|
|
6
|
-
unless app.root.to_s
|
6
|
+
unless app.root.to_s.match root.to_s
|
7
7
|
# APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
|
8
8
|
config.paths['db/migrate'].expanded.each do |expanded_path|
|
9
9
|
app.config.paths['db/migrate'] << expanded_path
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_background_jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.3
|
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: 2021-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: thecore_backend_commons
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sidekiq
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sidekiq-scheduler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sidekiq-failures
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,13 +76,8 @@ files:
|
|
76
76
|
- MIT-LICENSE
|
77
77
|
- README.md
|
78
78
|
- Rakefile
|
79
|
-
- app/assets/config/thecore_background_jobs_manifest.js
|
80
79
|
- app/workers/demo_worker.rb
|
81
|
-
- config/initializers/thecore_background_jobs_after_initialize.rb
|
82
|
-
- config/initializers/thecore_background_jobs_rails_admin_config.rb
|
83
|
-
- config/initializers/thecore_background_jobs_static_links.rb
|
84
80
|
- config/routes.rb
|
85
|
-
- lib/abilities_thecore_background_jobs_concern.rb
|
86
81
|
- lib/admin_constraint.rb
|
87
82
|
- lib/tasks/thecore_background_jobs_tasks.rake
|
88
83
|
- lib/thecore_background_jobs.rb
|
@@ -107,8 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
102
|
- !ruby/object:Gem::Version
|
108
103
|
version: '0'
|
109
104
|
requirements: []
|
110
|
-
|
111
|
-
rubygems_version: 2.6.14
|
105
|
+
rubygems_version: 3.0.3
|
112
106
|
signing_key:
|
113
107
|
specification_version: 4
|
114
108
|
summary: Thecorized thecore_background_jobs
|
File without changes
|
File without changes
|
@@ -1,23 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'active_support/concern'
|
3
|
-
|
4
|
-
module ThecoreBackgroundJobAbilitiesConcern
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
included do
|
7
|
-
def thecore_background_jobs_abilities user
|
8
|
-
if user
|
9
|
-
# if the user is logged in, it can do certain tasks regardless his role
|
10
|
-
if user.admin?
|
11
|
-
# if the user is an admin, it can do a lot of things, usually
|
12
|
-
end
|
13
|
-
|
14
|
-
if user.has_role? :role
|
15
|
-
# a specific role, brings specific powers
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# include the extension
|
23
|
-
TheCoreAbilities.send(:include, ThecoreBackgroundJobAbilitiesConcern)
|