cando 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -5
- data/Gemfile.lock +24 -25
- data/README.md +5 -1
- data/VERSION +1 -1
- data/cando.gemspec +17 -17
- data/spec/cando_spec.rb +2 -2
- metadata +19 -19
data/Gemfile
CHANGED
@@ -3,17 +3,17 @@ source "http://rubygems.org"
|
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
5
|
|
6
|
-
gem "sequel"
|
7
|
-
gem "rake"
|
6
|
+
gem "sequel", "~> 4.10.0"
|
7
|
+
gem "rake", "~> 10.3.2"
|
8
8
|
|
9
9
|
# Add dependencies to develop your gem here.
|
10
10
|
# Include everything needed to run rake, tests, features, etc.
|
11
11
|
group :development do
|
12
|
-
gem "rspec", "~> 2.
|
13
|
-
gem "rdoc", "~>
|
12
|
+
gem "rspec", "~> 2.14.1"
|
13
|
+
gem "rdoc", "~> 4.1.1"
|
14
14
|
gem "bundler", "~> 1.0"
|
15
15
|
gem "jeweler", "~> 2.0.1"
|
16
|
-
gem "simplecov", "
|
16
|
+
gem "simplecov", "~> 0.8.1"
|
17
17
|
end
|
18
18
|
|
19
19
|
group :test do
|
data/Gemfile.lock
CHANGED
@@ -5,7 +5,7 @@ GEM
|
|
5
5
|
builder (3.2.2)
|
6
6
|
descendants_tracker (0.0.4)
|
7
7
|
thread_safe (~> 0.3, >= 0.3.1)
|
8
|
-
diff-lcs (1.
|
8
|
+
diff-lcs (1.2.5)
|
9
9
|
docile (1.1.3)
|
10
10
|
faraday (0.9.0)
|
11
11
|
multipart-post (>= 1.2, < 3)
|
@@ -30,40 +30,39 @@ GEM
|
|
30
30
|
rake
|
31
31
|
rdoc
|
32
32
|
json (1.8.1)
|
33
|
-
jwt (0.
|
34
|
-
|
35
|
-
|
36
|
-
multi_json (1.10.0)
|
33
|
+
jwt (1.0.0)
|
34
|
+
mini_portile (0.6.0)
|
35
|
+
multi_json (1.10.1)
|
37
36
|
multi_xml (0.5.5)
|
38
37
|
multipart-post (2.0.0)
|
39
38
|
mysql (2.9.1)
|
40
|
-
nokogiri (1.6.1)
|
41
|
-
mini_portile (
|
42
|
-
oauth2 (0.9.
|
39
|
+
nokogiri (1.6.2.1)
|
40
|
+
mini_portile (= 0.6.0)
|
41
|
+
oauth2 (0.9.4)
|
43
42
|
faraday (>= 0.8, < 0.10)
|
44
|
-
jwt (~>
|
43
|
+
jwt (~> 1.0)
|
45
44
|
multi_json (~> 1.3)
|
46
45
|
multi_xml (~> 0.5)
|
47
46
|
rack (~> 1.2)
|
48
47
|
rack (1.5.2)
|
49
|
-
rake (10.3.
|
50
|
-
rdoc (
|
48
|
+
rake (10.3.2)
|
49
|
+
rdoc (4.1.1)
|
51
50
|
json (~> 1.4)
|
52
|
-
rspec (2.
|
53
|
-
rspec-core (~> 2.
|
54
|
-
rspec-expectations (~> 2.
|
55
|
-
rspec-mocks (~> 2.
|
56
|
-
rspec-core (2.
|
57
|
-
rspec-expectations (2.
|
58
|
-
diff-lcs (
|
59
|
-
rspec-mocks (2.
|
51
|
+
rspec (2.14.1)
|
52
|
+
rspec-core (~> 2.14.0)
|
53
|
+
rspec-expectations (~> 2.14.0)
|
54
|
+
rspec-mocks (~> 2.14.0)
|
55
|
+
rspec-core (2.14.8)
|
56
|
+
rspec-expectations (2.14.5)
|
57
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
58
|
+
rspec-mocks (2.14.6)
|
60
59
|
sequel (4.10.0)
|
61
60
|
simplecov (0.8.2)
|
62
61
|
docile (~> 1.1.0)
|
63
62
|
multi_json
|
64
63
|
simplecov-html (~> 0.8.0)
|
65
64
|
simplecov-html (0.8.0)
|
66
|
-
thread_safe (0.3.
|
65
|
+
thread_safe (0.3.4)
|
67
66
|
|
68
67
|
PLATFORMS
|
69
68
|
ruby
|
@@ -72,8 +71,8 @@ DEPENDENCIES
|
|
72
71
|
bundler (~> 1.0)
|
73
72
|
jeweler (~> 2.0.1)
|
74
73
|
mysql
|
75
|
-
rake
|
76
|
-
rdoc (~>
|
77
|
-
rspec (~> 2.
|
78
|
-
sequel
|
79
|
-
simplecov
|
74
|
+
rake (~> 10.3.2)
|
75
|
+
rdoc (~> 4.1.1)
|
76
|
+
rspec (~> 2.14.1)
|
77
|
+
sequel (~> 4.10.0)
|
78
|
+
simplecov (~> 0.8.1)
|
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
# CanDo
|
1
|
+
# CanDo
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/soundcloud/cando.svg?branch=master)](https://travis-ci.org/soundcloud/cando)
|
4
|
+
[![Dependency Status](https://gemnasium.com/soundcloud/cando.svg)](https://gemnasium.com/soundcloud/cando)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/cando.svg)](http://badge.fury.io/rb/cando)
|
2
6
|
|
3
7
|
CanDo is a small gem to implement a simple user access system based on users, roles &
|
4
8
|
capabilites, where:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/cando.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "cando"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Bornkessel"]
|
12
|
-
s.date = "2014-05-
|
12
|
+
s.date = "2014-05-28"
|
13
13
|
s.description = "CanDo is a small gem to implement a simple user access system based on users, roles & capabilites, where:\n\n each user can have 0, 1 or many roles\n each role can have 0, 1 or many capabilites\n\nUsers have capabilities by getting roles assigned (role == collection of capabilities). Within the code, the can helper method can be used to test whether a user has a certain capability or not (see below for a working code example)."
|
14
14
|
s.email = "daniel@soundcloud.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -46,30 +46,30 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.specification_version = 3
|
47
47
|
|
48
48
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
-
s.add_runtime_dependency(%q<sequel>, ["
|
50
|
-
s.add_runtime_dependency(%q<rake>, ["
|
51
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.
|
52
|
-
s.add_development_dependency(%q<rdoc>, ["~>
|
49
|
+
s.add_runtime_dependency(%q<sequel>, ["~> 4.10.0"])
|
50
|
+
s.add_runtime_dependency(%q<rake>, ["~> 10.3.2"])
|
51
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.14.1"])
|
52
|
+
s.add_development_dependency(%q<rdoc>, ["~> 4.1.1"])
|
53
53
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
54
54
|
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
55
|
-
s.add_development_dependency(%q<simplecov>, ["
|
55
|
+
s.add_development_dependency(%q<simplecov>, ["~> 0.8.1"])
|
56
56
|
else
|
57
|
-
s.add_dependency(%q<sequel>, ["
|
58
|
-
s.add_dependency(%q<rake>, ["
|
59
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
60
|
-
s.add_dependency(%q<rdoc>, ["~>
|
57
|
+
s.add_dependency(%q<sequel>, ["~> 4.10.0"])
|
58
|
+
s.add_dependency(%q<rake>, ["~> 10.3.2"])
|
59
|
+
s.add_dependency(%q<rspec>, ["~> 2.14.1"])
|
60
|
+
s.add_dependency(%q<rdoc>, ["~> 4.1.1"])
|
61
61
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
62
62
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
63
|
-
s.add_dependency(%q<simplecov>, ["
|
63
|
+
s.add_dependency(%q<simplecov>, ["~> 0.8.1"])
|
64
64
|
end
|
65
65
|
else
|
66
|
-
s.add_dependency(%q<sequel>, ["
|
67
|
-
s.add_dependency(%q<rake>, ["
|
68
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
69
|
-
s.add_dependency(%q<rdoc>, ["~>
|
66
|
+
s.add_dependency(%q<sequel>, ["~> 4.10.0"])
|
67
|
+
s.add_dependency(%q<rake>, ["~> 10.3.2"])
|
68
|
+
s.add_dependency(%q<rspec>, ["~> 2.14.1"])
|
69
|
+
s.add_dependency(%q<rdoc>, ["~> 4.1.1"])
|
70
70
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
71
71
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
72
|
-
s.add_dependency(%q<simplecov>, ["
|
72
|
+
s.add_dependency(%q<simplecov>, ["~> 0.8.1"])
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
data/spec/cando_spec.rb
CHANGED
@@ -6,7 +6,7 @@ describe "CanDo module methods" do
|
|
6
6
|
it { expect{ CanDo.cannot_block{|x| x} }.to raise_error(CanDo::ConfigCannotBlockError) }
|
7
7
|
it { expect{ CanDo.cannot_block{|x,y,z| x} }.to raise_error(CanDo::ConfigCannotBlockError) }
|
8
8
|
|
9
|
-
it { expect{ CanDo.cannot_block{|x,y| x} }.to_not raise_error
|
9
|
+
it { expect{ CanDo.cannot_block{|x,y| x} }.to_not raise_error }
|
10
10
|
end
|
11
11
|
|
12
12
|
context "CanDo.cannot_block executes in the current context" do
|
@@ -135,7 +135,7 @@ describe "CanDo module methods" do
|
|
135
135
|
end
|
136
136
|
|
137
137
|
it { expect{ can("user", :undefined_capability){} }.to raise_error(DummyException) }
|
138
|
-
it { expect{ can("user", :undefined_capability)}.to_not raise_error
|
138
|
+
it { expect{ can("user", :undefined_capability)}.to_not raise_error }
|
139
139
|
end
|
140
140
|
end
|
141
141
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cando
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,40 +9,40 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sequel
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 4.10.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 4.10.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rake
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
37
|
+
version: 10.3.2
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 10.3.2
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: rspec
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.
|
53
|
+
version: 2.14.1
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.14.1
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rdoc
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 4.1.1
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: 4.1.1
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: bundler
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,17 +112,17 @@ dependencies:
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 0.8.1
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: 0.8.1
|
126
126
|
description: ! "CanDo is a small gem to implement a simple user access system based
|
127
127
|
on users, roles & capabilites, where:\n\n each user can have 0, 1 or many roles\n
|
128
128
|
\ each role can have 0, 1 or many capabilites\n\nUsers have capabilities by getting
|
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash:
|
172
|
+
hash: 1763904056640544602
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|
175
175
|
requirements:
|