monarchy 2.0.4 → 2.0.5

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
  SHA1:
3
- metadata.gz: 668e988a05baee787f7ede9df0c24c0625559a86
4
- data.tar.gz: 3e24077bf0b110a0db6afb69a6c75b013e24e67a
3
+ metadata.gz: 06424c3fd8fd9422b232967b61867089bc1411e4
4
+ data.tar.gz: 2d1fea1e4a50bbb1f64a02c156f16ee980bae7ea
5
5
  SHA512:
6
- metadata.gz: 32d61f36e24cac3b72e944d63aa2bf2758872f59adaaeaa8b3736308d3cfd543ad502c6f0c57bcb51ac8873068618bd964b651f1144065f0444d53d5aa5ccb0c
7
- data.tar.gz: e26d3ef36d35f622889578eb1f6afebc0dc9b3b1cc3d2987090f9555e87929e50670f8c7d600959cb74f907e90bc329b6d7ecf983a53ae08636bfe021077ea02
6
+ metadata.gz: fdc98fcda0e37b21191488d55daa1380698a89cb0c55cf147feeae57965862b47fa0f6214aa8ae33c986fa080a9f3c23a6364b8ba360a54fcbef46f215ae6e69
7
+ data.tar.gz: 63eb3b30a58961cf0561f866aea7c9812db0f14a12cb914c3b04ef9900250d25b47ad8ace94e5164c0c0d4583bfcdebfde5b6c43f089d1270542219f43796e9b
data/.codeclimate.yml CHANGED
@@ -21,6 +21,7 @@ ratings:
21
21
  - Gemfile.lock
22
22
  - "**.rb"
23
23
  exclude_paths:
24
- - spec/
25
- - dummy/
26
- - docs/
24
+ - "spec/"
25
+ - "dummy/"
26
+ - "docs/"
27
+ - "lib/generators/"
@@ -1 +1 @@
1
- future-release=2.0.4
1
+ future-release=2.0.5
data/CHANGELOG.md CHANGED
@@ -1,7 +1,15 @@
1
1
  # Change Log
2
2
 
3
- ## [2.0.4](https://github.com/Exelord/Monarchy/tree/2.0.4) (2016-11-06)
4
- [Full Changelog](https://github.com/Exelord/Monarchy/compare/v2.0.0-beta.1...2.0.4)
3
+ ## [2.0.5](https://github.com/Exelord/Monarchy/tree/2.0.5) (2016-11-10)
4
+ [Full Changelog](https://github.com/Exelord/Monarchy/compare/v2.0.4...2.0.5)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Accesible roles fix [\#62](https://github.com/Exelord/Monarchy/pull/62) ([PoslinskiNet](https://github.com/PoslinskiNet))
9
+ - Fix codeclimate [\#61](https://github.com/Exelord/Monarchy/pull/61) ([Exelord](https://github.com/Exelord))
10
+
11
+ ## [v2.0.4](https://github.com/Exelord/Monarchy/tree/v2.0.4) (2016-11-06)
12
+ [Full Changelog](https://github.com/Exelord/Monarchy/compare/v2.0.0-beta.1...v2.0.4)
5
13
 
6
14
  **Closed issues:**
7
15
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- monarchy (2.0.4)
4
+ monarchy (2.0.5)
5
5
  active_record_union (= 1.2.0)
6
6
  activerecord (>= 4.2.7.1)
7
7
  closure_tree (= 6.2.0)
@@ -58,7 +58,8 @@ module Monarchy
58
58
  resource_roles(resource).order('level desc')
59
59
  end
60
60
 
61
- accessible_roles.present? ? accessible_roles : descendant_role(resource)
61
+ return accessible_roles if accessible_roles.present?
62
+ inheritnce ? descendant_role(resource) : Monarchy.role_class.none
62
63
  end
63
64
 
64
65
  def resource_and_inheritance_roles(resource)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Monarchy
3
- VERSION = '2.0.4'
3
+ VERSION = '2.0.5'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monarchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Exelord
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-06 00:00:00.000000000 Z
11
+ date: 2016-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord