right_on 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +3 -1
- data/lib/right_on/by_group.rb +2 -2
- data/lib/right_on/version.rb +1 -1
- data/spec/by_group_spec.rb +8 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 305432803fdcefcb6756f2ba6711de9e35af49b8
|
4
|
+
data.tar.gz: a8b370dc3ad398e34f886c9d8d63d39111265c68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ece57f18a2b65d827a12599fe3d04c5a2603c5ae4bd204af8d6a5e5fb0143eba6fa689ad407ac8927a425198bb5e5390afeaab7be81d14745ac68a21c87438c6
|
7
|
+
data.tar.gz: d22b65a1d068cb522587d082d4d01fcf75bcb8c0d2c89ecfcae82e38d7577a8acd6e5e522b267725a2927e8bd7ee21f89be9d16e4351a477ffd60884b0964b6e
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,9 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
|
5
5
|
|
6
|
-
##
|
6
|
+
## 0.4.1
|
7
|
+
|
8
|
+
- [TT-4960] ByGroup will now return a hash sorted by role name
|
7
9
|
|
8
10
|
## 0.4.0
|
9
11
|
|
data/lib/right_on/by_group.rb
CHANGED
@@ -9,10 +9,10 @@ module RightOn
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def by_groups
|
12
|
-
yaml_rights.each_pair.with_object({})
|
12
|
+
yaml_rights.each_pair.with_object({}) { |(group, right_names), hash|
|
13
13
|
hash[group] = right_names
|
14
14
|
.flat_map { |right_name| right_name_to_rights(right_name) }
|
15
|
-
|
15
|
+
}.sort.to_h
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
data/lib/right_on/version.rb
CHANGED
data/spec/by_group_spec.rb
CHANGED
@@ -5,8 +5,15 @@ RightOn.rights_yaml 'db/rights_roles.yml'
|
|
5
5
|
describe RightOn::ByGroup do
|
6
6
|
let(:rights) { Bootstrap.various_rights_with_actions }
|
7
7
|
|
8
|
+
before do
|
9
|
+
rights
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should be sorted' do
|
13
|
+
expect(RightOn::ByGroup.rights.keys).to eq ['admin', 'general']
|
14
|
+
end
|
15
|
+
|
8
16
|
it 'should identify correct groups' do
|
9
|
-
rights # load rights
|
10
17
|
expect(RightOn::ByGroup.rights).to eq(
|
11
18
|
'general' => [
|
12
19
|
rights[:models],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: right_on
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Noack
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cancancan
|
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
270
|
rubyforge_project:
|
271
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.6.14.1
|
272
272
|
signing_key:
|
273
273
|
specification_version: 4
|
274
274
|
summary: Set of extensions to core rails to give rights and roles.
|