heimdallr 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/heimdallr.gemspec +1 -1
- data/lib/heimdallr/proxy/collection.rb +4 -0
- data/lib/heimdallr/proxy/record.rb +4 -0
- data/spec/proxy_spec.rb +6 -0
- metadata +9 -9
data/heimdallr.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "heimdallr"
|
6
|
-
s.version = "1.0.
|
6
|
+
s.version = "1.0.1"
|
7
7
|
s.authors = ["Peter Zotov", "Boris Staal"]
|
8
8
|
s.email = ["whitequark@whitequark.org", "boris@roundlake.ru"]
|
9
9
|
s.homepage = "http://github.com/roundlake/heimdallr"
|
data/spec/proxy_spec.rb
CHANGED
@@ -109,6 +109,12 @@ describe Heimdallr::Proxy do
|
|
109
109
|
article.restrict(@looser).implicit.secrecy_level.should == nil
|
110
110
|
end
|
111
111
|
|
112
|
+
it "should answer if object is creatable" do
|
113
|
+
Article.restrict(@john).creatable?.should == true
|
114
|
+
Article.restrict(@admin).creatable?.should == true
|
115
|
+
Article.restrict(@looser).creatable?.should == true
|
116
|
+
end
|
117
|
+
|
112
118
|
it "should answer if object is modifiable" do
|
113
119
|
article = Article.create! :owner_id => @john.id, :content => 'test', :secrecy_level => 4
|
114
120
|
article.restrict(@john).modifiable?.should == true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heimdallr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2012-04-03 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
17
|
-
requirement: &
|
17
|
+
requirement: &70094345321720 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 3.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70094345321720
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activemodel
|
28
|
-
requirement: &
|
28
|
+
requirement: &70094345321100 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 3.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70094345321100
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rspec
|
39
|
-
requirement: &
|
39
|
+
requirement: &70094345320640 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70094345320640
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: activerecord
|
50
|
-
requirement: &
|
50
|
+
requirement: &70094345320060 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70094345320060
|
59
59
|
description: ! "Heimdallr aims to provide an easy to configure and efficient object-
|
60
60
|
and field-level access\n control solution, reusing proven patterns from gems like
|
61
61
|
CanCan and allowing one to manage permissions in a very\n fine-grained manner."
|