thecore_auth_commons 2.4.0 → 3.0.0

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: 4acad495feb9d92eff86dd20afd5a7611d245c8d74c7e9d3f2b6f1debe85c64e
4
- data.tar.gz: 91c1a713d685027a6d900f109daf8d661b1a72a36970f1f61676c5be2b8fca07
3
+ metadata.gz: 71a108f53a31865e9f1cbec4148112f45a5c67c1b0cb2f6a4669829b25d8b7d9
4
+ data.tar.gz: abd0e2dc3956a2e1fc5aa3202bf7071c95c461a4e5fdcd17df0cb76ea039a054
5
5
  SHA512:
6
- metadata.gz: 573be777ba6886dd931f9e5b5269079ae49cb3ba396bb662609dd337bfe37eb3e1202cc534fb8e1c6d066ea38db0dcb22bfcd7b4a139ec4fd6db9585d2f1f308
7
- data.tar.gz: d135e49ad91e14d6ca45bb66752a8a9b4db6bc677d5b0518c0fc89c9abb29ad0e69d4e7b872974e84b30bc55b452f282b5c62be87695df5b9a794413e3b1d3e8
6
+ metadata.gz: e2a54c12e4e1736de8373d2fab53c75fcb64658feb5622b71027e8083771fc17295f25256d935113fc419f1a12755ac0d2edb1a44741d829ebdee519666f58b9
7
+ data.tar.gz: 9bb72b0314bdaa92d8268f1db984c0fc31407304a281a44bd5c02d2f0dae4532c5f254171fe92fb2e21f5b3698f7be937c7dfd999bb8748732c43a43bcfd5d5d
@@ -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
@@ -1,3 +1,4 @@
1
1
  module ThecoreAuthCommons
2
- VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`.chomp}"
2
+ # VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`.chomp}"
3
+ VERSION = "3.0.0"
3
4
  end
@@ -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: 2.4.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-20 00:00:00.000000000 Z
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: '6.0'
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: '6.0'
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.7'
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.7'
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.1'
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.1'
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.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.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.0.3.1
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.