bullet_train-roles 0.1.5 → 0.1.6
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/Gemfile.lock +4 -1
- data/lib/bullet_train/roles/version.rb +1 -1
- data/lib/models/role.rb +3 -1
- data/lib/roles/support.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93fd2729ae287aa0389216798de23663aa3703bed3f5f11e571371c4b55bd30a
|
4
|
+
data.tar.gz: e094e75bec9daf0073e1d658dd0113b4743dfb7a138cf2f2e4eb34851ef85d23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a905f35fd471b0dfd2e82355f0ede399ac7d212825509ca180732392418d6af9d5821ae46808c85b183e89515f0aacd029142e1d3f9b23ea1e360a0c754fce9
|
7
|
+
data.tar.gz: 2cbcb69b7244c96854ae4841978ded8b7466e04c13a534de8819e35fd28a65b38c03e28f5dbdad9e039bfff5630702196d691f3e1b64490bab464c433d69e982
|
data/Gemfile.lock
CHANGED
@@ -9,7 +9,7 @@ GIT
|
|
9
9
|
PATH
|
10
10
|
remote: .
|
11
11
|
specs:
|
12
|
-
bullet_train-roles (0.1.
|
12
|
+
bullet_train-roles (0.1.6)
|
13
13
|
active_hash
|
14
14
|
activesupport
|
15
15
|
cancancan
|
@@ -106,6 +106,8 @@ GEM
|
|
106
106
|
nio4r (2.5.8)
|
107
107
|
nokogiri (1.12.5-arm64-darwin)
|
108
108
|
racc (~> 1.4)
|
109
|
+
nokogiri (1.12.5-x86_64-darwin)
|
110
|
+
racc (~> 1.4)
|
109
111
|
parallel (1.21.0)
|
110
112
|
parser (3.0.3.2)
|
111
113
|
ast (~> 2.4.1)
|
@@ -174,6 +176,7 @@ GEM
|
|
174
176
|
PLATFORMS
|
175
177
|
arm64-darwin-20
|
176
178
|
arm64-darwin-21
|
179
|
+
x86_64-darwin-21
|
177
180
|
|
178
181
|
DEPENDENCIES
|
179
182
|
active_hash!
|
data/lib/models/role.rb
CHANGED
@@ -172,7 +172,9 @@ class Role < ActiveYaml::Base
|
|
172
172
|
# If possible, use the team_id attribute because it saves us having to join all the way back to the sorce parent model
|
173
173
|
# In some scenarios this may be quicker, or if the parent model is in a different database shard, it may not even
|
174
174
|
# be possible to do the join
|
175
|
-
|
175
|
+
# using method_defined? will break with ActiveRecord 7 because now models have team_id defined if they include
|
176
|
+
# has_one :team, through: :membership
|
177
|
+
if @model.column_names.include?("#{parent_association}_id")
|
176
178
|
@condition = {"#{parent_association}_id".to_sym => @parent_ids}
|
177
179
|
else
|
178
180
|
@condition = {parent_association => {id: @parent_ids}}
|
data/lib/roles/support.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-roles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prabin Poudel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: byebug
|
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
215
|
- !ruby/object:Gem::Version
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
|
-
rubygems_version: 3.
|
218
|
+
rubygems_version: 3.3.0
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: Yaml-backed ApplicationHash for CanCan Roles
|