vigilante 1.0.5 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5369f1844a89ac4759629c0aabc4650ef51b91b
4
- data.tar.gz: d093d485cdf42ce0dd19c1b47556acf35e8d0036
3
+ metadata.gz: 1f2d45e60a17ae2b8f06c9b6aa47e876621072d5
4
+ data.tar.gz: cb9ff533bb9cc95b34e567986e1f8b5221dc62a6
5
5
  SHA512:
6
- metadata.gz: b4beae45e07d095276352d2b1241dc55f621b68676d03b55ec0f084f5dfe028c5246b13a3e530c182e07f124ada4f5acec086f137a2027fbfbe04eb12d397a60
7
- data.tar.gz: 851c2597a6282a22463d0acf1df3e8960ecbbfe86258ee3fd7585bdf11de2b0c2d71daa6cb498ab7f3c7374a4ee0b558a0c40e91fa55c7438390de5ac4fae3d7
6
+ metadata.gz: 1bdb0977b997234eee874f4850ffd5f5d724251f9d48be0c43095917a81d3a4aeb17d136cd7b940002e1d3f7a9a4f285bd843d02777be359520b52b3b65ed8a9
7
+ data.tar.gz: 4495f38059766ff6e73f6e9137bb925922d00f83f6c1a805ead89128c5ba739129dcfa8d674acc9da0feba17ae99b6b59a900db8721f344f0a1659c7d869aa8a
@@ -1,5 +1,5 @@
1
1
  rvm:
2
- - 1.8.7
3
- - 1.9.2
2
+ - 1.9.3
3
+ - 2.1.0
4
+ - 2.2.1
4
5
  - rbx
5
- - ree
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -4,14 +4,13 @@ module Vigilante
4
4
  module ActiveRecordExtensions
5
5
 
6
6
  def self.included(base)
7
- # puts "Vigilante::FinderHelper is being included in #{base.name}"
8
7
  base.extend ClassMethods
9
8
  end
10
9
 
11
10
  module ClassMethods
12
11
 
13
- def operator_extent(operator)
14
- extent = operator.permits.get_extent_of(self.name.underscore.pluralize, :show)
12
+ def accessible_extent(user)
13
+ extent = user.permits.get_extent_of(self.name.underscore.pluralize, :show)
15
14
  if extent.include?('*')
16
15
  nil
17
16
  else
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: vigilante 1.0.5 ruby lib
5
+ # stub: vigilante 1.0.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vigilante"
9
- s.version = "1.0.5"
9
+ s.version = "1.0.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -53,7 +53,6 @@ Gem::Specification.new do |s|
53
53
  "lib/vigilante/active_record_extensions.rb",
54
54
  "lib/vigilante/authorization.rb",
55
55
  "lib/vigilante/controller_extension.rb",
56
- "lib/vigilante/finder_helper.rb",
57
56
  "lib/vigilante/watched_operator.rb",
58
57
  "spec/controllers/application_controller_spec.rb",
59
58
  "spec/controllers/blogs_controller_spec.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vigilante
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Van der Auwera
@@ -95,7 +95,6 @@ files:
95
95
  - lib/vigilante/active_record_extensions.rb
96
96
  - lib/vigilante/authorization.rb
97
97
  - lib/vigilante/controller_extension.rb
98
- - lib/vigilante/finder_helper.rb
99
98
  - lib/vigilante/watched_operator.rb
100
99
  - spec/controllers/application_controller_spec.rb
101
100
  - spec/controllers/blogs_controller_spec.rb
@@ -1,24 +0,0 @@
1
- module Vigilante
2
- module FinderHelper
3
-
4
- def self.included(base)
5
- # puts "Vigilante::FinderHelper is being included in #{base.name}"
6
- base.extend ClassMethods
7
- end
8
-
9
- module ClassMethods
10
-
11
- def accessible_extent(user)
12
- extent = user.permits.get_extent_of(self.name.underscore.pluralize, :show)
13
- if extent.include?('*')
14
- nil
15
- else
16
- # fix: if extent is empty return 0 which would can be used in sql and not match anything
17
- extent.size == 0 ? '0' : extent.join(',')
18
- end
19
- end
20
-
21
- end
22
-
23
- end
24
- end