thecore_auth_commons 3.0.10 → 3.0.12

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: da21829f96bdeba3dc9336fdce604b5dedb850113c3f0b6c526bb18ffa9222f8
4
- data.tar.gz: 052bbf5d6913b0ebfdd5dab4ab9de5b3384c5b5066cbe1810c66a59de16bef85
3
+ metadata.gz: 75c8351339623ea4fd13daf13e0fa5c6bad69cec8a74b7222ccd228098c48e82
4
+ data.tar.gz: 070405ac9ed1fa492d2dfffdeca3e286835e89fccdaf4f27f00f4e98b83632e0
5
5
  SHA512:
6
- metadata.gz: 6222dff7f14dca92bc168b03fbde4ea2131d092e9a9d21d3d234d5664092073cc84e98ab8621cc23895da265c03af923aa8b3c28fd6344cc9757baaf54a86dc3
7
- data.tar.gz: 30d52a0f47cf832e32954689c423d8cdd871eeb004051271d25e207e1d795ab99f5112cf6edaa581de40da3dfab0eb18935ca3bd5df71d9469006078908d8a73
6
+ metadata.gz: b0636ff4d42321cccc6423e1f53cda949cc7fd64c2b86e4d856c47baf38243421c3de5c5c0525796c6c9a084da4fdb5e00db6dee092b4f6f63dbadd3bfc44aa1
7
+ data.tar.gz: 4f81899e74c48352921746583dc6a81362744bb57e3e417d658c9a4bd7ea0eb88381d853971ed64270430d7f59e00abe2feb5e0bb4a2931d6ffbca69681f43ba
@@ -12,9 +12,9 @@ class Permission < ApplicationRecord
12
12
  validates :target_id, presence: true
13
13
 
14
14
  def display_name
15
- p = (I18n.t "permissions.predicates.#{predicate.name}", default: predicate.name.titleize rescue nil)
15
+ pr = (I18n.t "permissions.predicates.#{predicate.name}", default: predicate.name.titleize rescue nil)
16
16
  a = (I18n.t "permissions.actions.#{action.name}", default: action.name.titleize rescue nil)
17
- m = (I18n.t "activerecord.models.#{target.name}", default: target.name.titleize rescue nil)
18
- [ p, a, m ].join(" ")
17
+ m = (I18n.t "activerecord.models.#{target.name}", count: 2, default: target.name.titleize rescue nil)
18
+ [ pr, a, m ].join(" ")
19
19
  end
20
20
  end
data/db/seeds.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  puts "Loading ThecoreAuthCommons seeds"
2
- email = "admin@#{ENV["BASE_DOMAIN"]}"
2
+ email = "admin@#{ENV["BASE_DOMAIN"].presence || "example.com"}"
3
3
  psswd = ENV["ADMIN_PASSWORD"].presence || "changeme"
4
4
 
5
5
  unless User.where(admin: true).exists?
@@ -12,7 +12,7 @@ end
12
12
  @values = {
13
13
  predicates: %i[can cannot],
14
14
  actions: %i[manage create read update destroy],
15
- targets: ApplicationRecord.subclasses.map {|d| d.to_s.underscore}.to_a.unshift(:all)
15
+ targets: ApplicationRecord.subclasses.map {|d| d.to_s.underscore}.to_a.unshift("all")
16
16
  }
17
17
 
18
18
  def fill table
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.10
4
+ version: 3.0.12
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-02-12 00:00:00.000000000 Z
11
+ date: 2023-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.4.6
228
+ rubygems_version: 3.4.10
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: Common Auth methods and models to be used in thecore components.