right_on 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 3ed9eb070b0aac90604d39af448f24eb80f69d1c7b43e70262ff163ebeb9b414
4
- data.tar.gz: 5645724ce29fb1167685bb8413b73c487313bd4c285d16ff879043eac3b5dc4b
2
+ SHA1:
3
+ metadata.gz: 305432803fdcefcb6756f2ba6711de9e35af49b8
4
+ data.tar.gz: a8b370dc3ad398e34f886c9d8d63d39111265c68
5
5
  SHA512:
6
- metadata.gz: de53dd0a3448bc3ed57e1621b179a4333c63f976f240f88812e0639c8cd7478ca10efef8cd3df2660ece487e9409f459e14147455d86a89590028c3588c7a8d5
7
- data.tar.gz: 0c8836a459c9073b6b38d01efcbc5ca6e533405dc6efde62f462eba10cf8920fe1ba20c29c3703d647a9399cbaedcc68de34f392911c983776e0b0d53676f8c6
6
+ metadata.gz: ece57f18a2b65d827a12599fe3d04c5a2603c5ae4bd204af8d6a5e5fb0143eba6fa689ad407ac8927a425198bb5e5390afeaab7be81d14745ac68a21c87438c6
7
+ data.tar.gz: d22b65a1d068cb522587d082d4d01fcf75bcb8c0d2c89ecfcae82e38d7577a8acd6e5e522b267725a2927e8bd7ee21f89be9d16e4351a477ffd60884b0964b6e
data/.gitignore CHANGED
@@ -2,3 +2,4 @@ pkg
2
2
  coverage
3
3
  Gemfile.lock
4
4
  tmp
5
+ vendor
data/.travis.yml CHANGED
@@ -3,6 +3,7 @@ rvm:
3
3
  - 2.3
4
4
  - 2.4
5
5
  - 2.5
6
+ - 2.6
6
7
  script: "bundle exec rake spec"
7
8
  gemfile:
8
9
  - gemfiles/rails4.gemfile
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
- ## Unreleased
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
 
@@ -9,10 +9,10 @@ module RightOn
9
9
  end
10
10
 
11
11
  def by_groups
12
- yaml_rights.each_pair.with_object({}) do |(group, right_names), hash|
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
- end
15
+ }.sort.to_h
16
16
  end
17
17
 
18
18
  private
@@ -1,3 +1,3 @@
1
1
  module RightOn
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -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.0
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: 2018-04-13 00:00:00.000000000 Z
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.7.3
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.