vigilante 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile.lock +41 -4
- data/Rakefile +2 -7
- data/VERSION +1 -1
- data/lib/generators/vigilante/install/install_generator.rb +2 -0
- data/lib/vigilante/authorization.rb +2 -0
- data/vigilante.gemspec +6 -8
- metadata +5 -32
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTFlNzRjZTM0MDcxNjlhMzM5ZjIyNjUyZjhkZDM3MWM1ZmUwM2Q2NA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MTE2ZmNjNDdkODYyODkzMDY4ZDc5ZjZhNzUzZWYxNmM1NmExNDcyNw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NjZmYmUwZjgyNzA4NjQ0MmQ5YjRmNWE4MTA2Mzg2YzY4Y2Y3YmVlOWRlNzUz
|
10
|
+
YzI3MGIwN2Y3MTY0NTAxMWRjNTUwN2MxZDBmMDM2OTFkY2RiNDlkZmQ5Zjkx
|
11
|
+
YmExZDgxYmY4MjU5YTA5MzViMDAwYzNkODcxODU3MTgxMWE0MzQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YjIxMzliZjQ1MWNiMzk1ZTVkYTY2YzFiYzI0MDdlZDU0NWEzOWJhMTg5MjRi
|
14
|
+
NWU5OWI3OTQ5YWJlMDI5Mjk1OWFiZTgzOGFhYWQ4NjQ4NzcwZjU4YTQ5Njhm
|
15
|
+
ZmZmNmQ2NTBhZDk1MzZhYWU1Njg4OTM5Yjg3YTAwNjU3YjM1NjU=
|
data/Gemfile.lock
CHANGED
@@ -28,23 +28,57 @@ GEM
|
|
28
28
|
activemodel (= 3.0.3)
|
29
29
|
activesupport (= 3.0.3)
|
30
30
|
activesupport (3.0.3)
|
31
|
+
addressable (2.3.6)
|
31
32
|
arel (2.0.6)
|
32
33
|
builder (2.1.2)
|
34
|
+
descendants_tracker (0.0.4)
|
35
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
33
36
|
diff-lcs (1.1.2)
|
34
37
|
erubis (2.6.6)
|
35
38
|
abstract (>= 1.0.0)
|
36
|
-
|
39
|
+
faraday (0.9.0)
|
40
|
+
multipart-post (>= 1.2, < 3)
|
41
|
+
git (1.2.6)
|
42
|
+
github_api (0.11.3)
|
43
|
+
addressable (~> 2.3)
|
44
|
+
descendants_tracker (~> 0.0.1)
|
45
|
+
faraday (~> 0.8, < 0.10)
|
46
|
+
hashie (>= 1.2)
|
47
|
+
multi_json (>= 1.7.5, < 2.0)
|
48
|
+
nokogiri (~> 1.6.0)
|
49
|
+
oauth2
|
50
|
+
hashie (3.0.0)
|
51
|
+
highline (1.6.21)
|
37
52
|
i18n (0.5.0)
|
38
|
-
jeweler (
|
39
|
-
|
53
|
+
jeweler (2.0.1)
|
54
|
+
builder
|
55
|
+
bundler (>= 1.0)
|
40
56
|
git (>= 1.2.5)
|
57
|
+
github_api
|
58
|
+
highline (>= 1.6.15)
|
59
|
+
nokogiri (>= 1.5.10)
|
41
60
|
rake
|
61
|
+
rdoc
|
62
|
+
json (1.8.1)
|
63
|
+
jwt (1.0.0)
|
42
64
|
mail (2.2.14)
|
43
65
|
activesupport (>= 2.3.6)
|
44
66
|
i18n (>= 0.4.0)
|
45
67
|
mime-types (~> 1.16)
|
46
68
|
treetop (~> 1.4.8)
|
47
69
|
mime-types (1.16)
|
70
|
+
mini_portile (0.6.0)
|
71
|
+
multi_json (1.10.1)
|
72
|
+
multi_xml (0.5.5)
|
73
|
+
multipart-post (2.0.0)
|
74
|
+
nokogiri (1.6.2.1)
|
75
|
+
mini_portile (= 0.6.0)
|
76
|
+
oauth2 (0.9.4)
|
77
|
+
faraday (>= 0.8, < 0.10)
|
78
|
+
jwt (~> 1.0)
|
79
|
+
multi_json (~> 1.3)
|
80
|
+
multi_xml (~> 0.5)
|
81
|
+
rack (~> 1.2)
|
48
82
|
polyglot (0.3.1)
|
49
83
|
rack (1.2.1)
|
50
84
|
rack-mount (0.6.13)
|
@@ -64,7 +98,9 @@ GEM
|
|
64
98
|
activesupport (= 3.0.3)
|
65
99
|
rake (>= 0.8.7)
|
66
100
|
thor (~> 0.14.4)
|
67
|
-
rake (
|
101
|
+
rake (10.3.2)
|
102
|
+
rdoc (4.1.1)
|
103
|
+
json (~> 1.4)
|
68
104
|
remarkable (4.0.0.alpha4)
|
69
105
|
rspec (>= 2.0.0.alpha11)
|
70
106
|
remarkable_activemodel (4.0.0.alpha4)
|
@@ -89,6 +125,7 @@ GEM
|
|
89
125
|
rspec (~> 2.4.0)
|
90
126
|
sqlite3-ruby (1.3.2)
|
91
127
|
thor (0.14.6)
|
128
|
+
thread_safe (0.3.4)
|
92
129
|
treetop (1.4.9)
|
93
130
|
polyglot (>= 0.3.1)
|
94
131
|
tzinfo (0.3.23)
|
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ rescue LoadError
|
|
7
7
|
end
|
8
8
|
|
9
9
|
require 'rake'
|
10
|
-
require '
|
10
|
+
require 'rdoc/task'
|
11
11
|
|
12
12
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
13
13
|
rdoc.rdoc_dir = 'rdoc'
|
@@ -27,7 +27,7 @@ begin
|
|
27
27
|
gem.email = "nathan@dixis.com"
|
28
28
|
gem.homepage = "http://github.com/vigilante"
|
29
29
|
gem.authors = ["Nathan Van der Auwera"]
|
30
|
-
gem.add_development_dependency "rails", ">= 3.0.0"
|
30
|
+
# gem.add_development_dependency "rails", ">= 3.0.0"
|
31
31
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
32
32
|
end
|
33
33
|
Jeweler::GemcutterTasks.new
|
@@ -39,10 +39,5 @@ end
|
|
39
39
|
require "rspec/core/rake_task"
|
40
40
|
RSpec::Core::RakeTask.new(:spec)
|
41
41
|
|
42
|
-
desc "Run all specs with rcov"
|
43
|
-
RSpec::Core::RakeTask.new("test_cov") do |t|
|
44
|
-
t.rcov = true
|
45
|
-
t.rcov_opts = %w{--rails --include views -Ispec --exclude gems\/,spec\/,features\/,seeds\/}
|
46
|
-
end
|
47
42
|
|
48
43
|
task :default => :spec
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -97,6 +97,8 @@ CODE
|
|
97
97
|
migration_template "create_ability_permissions.rb", "db/migrate/create_ability_permissions.rb"
|
98
98
|
migration_template "create_authorizations.rb", "db/migrate/create_authorizations.rb"
|
99
99
|
migration_template "create_authorization_extents.rb", "db/migrate/create_authorization_extents.rb"
|
100
|
+
migration_template "add_extent_flag_to_ability.rb", "db/migrate/add_extent_flag_to_ability.rb"
|
101
|
+
migration_template "add_importance_to_abilities.rb", "db/migrate/add_importance_to_abilities.rb"
|
100
102
|
end
|
101
103
|
|
102
104
|
end
|
@@ -121,6 +121,8 @@ module Vigilante
|
|
121
121
|
Rails.logger.debug "determine permissions ... "
|
122
122
|
@permits = get_protectee.permits
|
123
123
|
session[:permits] = @permits
|
124
|
+
elsif @permits.class.name != "PermissionHash"
|
125
|
+
@permits = PermissionHash.new(@permits)
|
124
126
|
end
|
125
127
|
@permits
|
126
128
|
end
|
data/vigilante.gemspec
CHANGED
@@ -2,14 +2,16 @@
|
|
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.3 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "vigilante"
|
8
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.3"
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
11
13
|
s.authors = ["Nathan Van der Auwera"]
|
12
|
-
s.date = "
|
14
|
+
s.date = "2014-06-04"
|
13
15
|
s.description = "Vigilante is a db-backed authorisation, completely configurable and dynamic; where permissions can be limited to extents."
|
14
16
|
s.email = "nathan@dixis.com"
|
15
17
|
s.extra_rdoc_files = [
|
@@ -124,29 +126,25 @@ Gem::Specification.new do |s|
|
|
124
126
|
"vigilante.gemspec"
|
125
127
|
]
|
126
128
|
s.homepage = "http://github.com/vigilante"
|
127
|
-
s.
|
128
|
-
s.rubygems_version = "1.8.25"
|
129
|
+
s.rubygems_version = "2.2.1"
|
129
130
|
s.summary = "Context-based, db-backed authorisation for your rails3 apps"
|
130
131
|
|
131
132
|
if s.respond_to? :specification_version then
|
132
|
-
s.specification_version =
|
133
|
+
s.specification_version = 4
|
133
134
|
|
134
135
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
135
136
|
s.add_runtime_dependency(%q<rails>, [">= 3.0.3"])
|
136
137
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
137
138
|
s.add_development_dependency(%q<rspec-rails>, [">= 2.4.0"])
|
138
|
-
s.add_development_dependency(%q<rails>, [">= 3.0.0"])
|
139
139
|
else
|
140
140
|
s.add_dependency(%q<rails>, [">= 3.0.3"])
|
141
141
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
142
142
|
s.add_dependency(%q<rspec-rails>, [">= 2.4.0"])
|
143
|
-
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
144
143
|
end
|
145
144
|
else
|
146
145
|
s.add_dependency(%q<rails>, [">= 3.0.3"])
|
147
146
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
148
147
|
s.add_dependency(%q<rspec-rails>, [">= 2.4.0"])
|
149
|
-
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
150
148
|
end
|
151
149
|
end
|
152
150
|
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vigilante
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nathan Van der Auwera
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-06-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: jeweler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec-rails
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,27 +48,10 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 2.4.0
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: rails
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 3.0.0
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 3.0.0
|
78
55
|
description: Vigilante is a db-backed authorisation, completely configurable and dynamic;
|
79
56
|
where permissions can be limited to extents.
|
80
57
|
email: nathan@dixis.com
|
@@ -191,29 +168,25 @@ files:
|
|
191
168
|
- vigilante.gemspec
|
192
169
|
homepage: http://github.com/vigilante
|
193
170
|
licenses: []
|
171
|
+
metadata: {}
|
194
172
|
post_install_message:
|
195
173
|
rdoc_options: []
|
196
174
|
require_paths:
|
197
175
|
- lib
|
198
176
|
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
-
none: false
|
200
177
|
requirements:
|
201
178
|
- - ! '>='
|
202
179
|
- !ruby/object:Gem::Version
|
203
180
|
version: '0'
|
204
|
-
segments:
|
205
|
-
- 0
|
206
|
-
hash: -2015582756874318279
|
207
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
|
-
none: false
|
209
182
|
requirements:
|
210
183
|
- - ! '>='
|
211
184
|
- !ruby/object:Gem::Version
|
212
185
|
version: '0'
|
213
186
|
requirements: []
|
214
187
|
rubyforge_project:
|
215
|
-
rubygems_version:
|
188
|
+
rubygems_version: 2.2.1
|
216
189
|
signing_key:
|
217
|
-
specification_version:
|
190
|
+
specification_version: 4
|
218
191
|
summary: Context-based, db-backed authorisation for your rails3 apps
|
219
192
|
test_files: []
|