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 +4 -4
- data/.travis.yml +3 -3
- data/VERSION +1 -1
- data/lib/vigilante/active_record_extensions.rb +2 -3
- data/vigilante.gemspec +2 -3
- metadata +1 -2
- data/lib/vigilante/finder_helper.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f2d45e60a17ae2b8f06c9b6aa47e876621072d5
|
4
|
+
data.tar.gz: cb9ff533bb9cc95b34e567986e1f8b5221dc62a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bdb0977b997234eee874f4850ffd5f5d724251f9d48be0c43095917a81d3a4aeb17d136cd7b940002e1d3f7a9a4f285bd843d02777be359520b52b3b65ed8a9
|
7
|
+
data.tar.gz: 4495f38059766ff6e73f6e9137bb925922d00f83f6c1a805ead89128c5ba739129dcfa8d674acc9da0feba17ae99b6b59a900db8721f344f0a1659c7d869aa8a
|
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
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
|
14
|
-
extent =
|
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
|
data/vigilante.gemspec
CHANGED
@@ -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
|
+
# 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.
|
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.
|
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
|