thecore_auth_commons 3.0.12 → 3.1.0
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/config/initializers/after_initialize.rb +1 -3
- data/db/seeds.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca809778683a4861e9df36ada9e3f545472be60eb4ff104ef2d284f9ad03dc31
|
4
|
+
data.tar.gz: 06a7c2c55bb8365cc95f4b07099f3295862c6773852147a93e22e3f17a6097aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf7b2840d9248b7184aa500288f32ba9557488451296aad914c3841ee912be87ad1fca249c094bfca5827362c97e9b0e488632c66546d3e50f9e8c6fd7f7d651
|
7
|
+
data.tar.gz: 2328fd3d524efb5b7b2039bb44ee2e5df3d72a1e4e1e0c81e72c3f8f00d21a2b12aa37e9c6bf2f4c410a646d67ab8bdacceb73b2dde48bf89e2d8149b623a3de
|
@@ -1,12 +1,10 @@
|
|
1
1
|
Rails.application.configure do
|
2
2
|
config.after_initialize do
|
3
3
|
# In development be sure to load all the namespaces
|
4
|
-
# in order to have working reflection
|
4
|
+
# in order to have working reflection
|
5
5
|
Zeitwerk::Loader.eager_load_all if Rails.env.development?
|
6
6
|
|
7
7
|
Ability.send(:include, ThecoreAuthCommonsCanCanCanConcern)
|
8
8
|
User.send(:include, ThecoreAuthCommonsUserConcern)
|
9
|
-
# User.devise_modules.delete(:recoverable) if ThecoreSettings::Setting.where(ns: :devise, key: :recoverable).first.present? && ThecoreSettings::Setting.where(ns: :devise, key: :recoverable).first.raw == "disable"
|
10
|
-
# User.devise_modules.delete(:registerable) if ThecoreSettings::Setting.where(ns: :devise, key: :registerable).first.present? && ThecoreSettings::Setting.where(ns: :devise, key: :registerable).first.raw == "disable"
|
11
9
|
end
|
12
10
|
end
|
data/db/seeds.rb
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
puts "Loading ThecoreAuthCommons seeds"
|
2
|
+
|
3
|
+
# Need this since in the rake task is not aeger loaded
|
4
|
+
Zeitwerk::Loader.eager_load_all
|
5
|
+
|
2
6
|
email = "admin@#{ENV["BASE_DOMAIN"].presence || "example.com"}"
|
3
7
|
psswd = ENV["ADMIN_PASSWORD"].presence || "changeme"
|
4
8
|
|
@@ -18,7 +22,11 @@ end
|
|
18
22
|
def fill table
|
19
23
|
model = table.to_s.classify.constantize
|
20
24
|
model.reset_column_information
|
21
|
-
|
25
|
+
puts " - Filling table #{table} with #{@values[table].count} elements:"
|
26
|
+
@values[table].each do |name|
|
27
|
+
puts " - Name: #{name}"
|
28
|
+
model.find_or_create_by name: name
|
29
|
+
end
|
22
30
|
end
|
23
31
|
|
24
32
|
fill :predicates
|
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: 3.0
|
4
|
+
version: 3.1.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: 2023-06-
|
11
|
+
date: 2023-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|