thecore_auth_commons 2.4.0 → 3.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43a5cf46ed813af11c622a3dccf8dfed8a311594e090b1bd16f6c509a4e132b6
|
4
|
+
data.tar.gz: 30b64a1793b8840098e794254f6c769b716c687f072d21b7e8d2249203c7a6a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c49ee1ee0266fd7917263bde759464c0e2750032393bde2a1c43e07540145edb0860151585d61e2eb07164ce1162dd8505292e1d7a403aadb316f4bdf27ad49
|
7
|
+
data.tar.gz: 9e74976ea1c168e1f6c4fc71ac86e193da072c3396ce282eb9d34125dcf00b23a6b24a3da4bcea032978974b73759ac0d6e337d33baa4944e232701c0a6e5268
|
@@ -5,9 +5,6 @@ Rails.application.configure do
|
|
5
5
|
config.after_initialize do
|
6
6
|
# In development be sure to load all the namespaces
|
7
7
|
# in order to have working reflection and meta-programming.
|
8
|
-
if Rails.env.development?
|
9
|
-
Rails.configuration.eager_load_namespaces.each(&:eager_load!) if Rails.version.to_i == 5 #Rails 5
|
10
|
-
Zeitwerk::Loader.eager_load_all if Rails.version.to_i >= 6 #Rails 6
|
11
|
-
end
|
8
|
+
Zeitwerk::Loader.eager_load_all if Rails.env.development?
|
12
9
|
end
|
13
10
|
end
|
data/db/seeds.rb
CHANGED
@@ -4,7 +4,7 @@ psswd = ENV["ADMIN_PASSWORD"].presence || "changeme"
|
|
4
4
|
|
5
5
|
unless User.where(admin: true).exists?
|
6
6
|
u = User.find_or_initialize_by(email: email)
|
7
|
-
u.username = "Administrator"
|
7
|
+
u.username = "Administrator" if u.respond_to? :username=
|
8
8
|
u.password = u.password_confirmation = psswd
|
9
9
|
u.admin = true
|
10
10
|
u.save(validate: false)
|
@@ -4,11 +4,25 @@
|
|
4
4
|
# end
|
5
5
|
namespace :thecore do
|
6
6
|
namespace :db do
|
7
|
-
desc "Load seeds from thecore engines seed files, it also runs rails db:seed as last action"
|
7
|
+
desc "Load seeds from thecore engines seed files, it also runs rails db:seed as last action."
|
8
8
|
task seed: :environment do
|
9
9
|
Thecore::Base.thecore_engines.each { |engine| engine.send :load_seed }
|
10
10
|
Rake::Task["db:seed"].reenable
|
11
11
|
Rake::Task["db:seed"].invoke
|
12
12
|
end
|
13
|
+
desc "Creates DB if not exists, then init it with all Thecore compatible seeds."
|
14
|
+
task init: :environment do
|
15
|
+
Rake::Task["db:create"].reenable
|
16
|
+
Rake::Task["db:create"].invoke
|
17
|
+
Rake::Task["db:migrate"].reenable
|
18
|
+
Rake::Task["db:migrate"].invoke
|
19
|
+
Rake::Task["thecore:db:seed"].reenable
|
20
|
+
Rake::Task["thecore:db:seed"].invoke
|
21
|
+
end
|
22
|
+
desc "Keeps the DB updated by applying latest migrations and data seeding."
|
23
|
+
task update: :environment do
|
24
|
+
Rake::Task["thecore:db:init"].reenable
|
25
|
+
Rake::Task["thecore:db:init"].invoke
|
26
|
+
end
|
13
27
|
end
|
14
28
|
end
|
data/lib/thecore_auth_commons.rb
CHANGED
@@ -2,7 +2,7 @@ require 'devise'
|
|
2
2
|
require 'cancancan'
|
3
3
|
require 'kaminari'
|
4
4
|
require 'activerecord-nulldb-adapter'
|
5
|
-
require 'active_record/hierarchical_query'
|
5
|
+
# require 'active_record/hierarchical_query'
|
6
6
|
require 'abilities/thecore_auth_commons'
|
7
7
|
|
8
8
|
require "thecore_auth_commons/engine"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_auth_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.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: 2023-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7.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: '7.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: devise
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '4.
|
33
|
+
version: '4.8'
|
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: '4.
|
40
|
+
version: '4.8'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: cancancan
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.4'
|
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: '3.
|
54
|
+
version: '3.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: kaminari
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.2'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activerecord-nulldb-adapter
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.7'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: activerecord-hierarchical_query
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.3'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.3'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: sqlite3
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
156
|
- !ruby/object:Gem::Version
|
171
157
|
version: '0'
|
172
158
|
requirements: []
|
173
|
-
rubygems_version: 3.
|
159
|
+
rubygems_version: 3.4.1
|
174
160
|
signing_key:
|
175
161
|
specification_version: 4
|
176
162
|
summary: Common Auth methods and models to be used in thecore components.
|