cantango-core 0.1.9.1 → 0.1.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -5,24 +5,24 @@ group :default do
5
5
  gem 'cancan', '>= 1.4'
6
6
  gem 'sugar-high', '>= 0.6.0'
7
7
  gem 'sweetloader', '~> 0.1.5'
8
- gem 'hashie'
8
+ gem 'hashie', '~> 1.2'
9
9
  end
10
10
 
11
11
  group :test do
12
- gem 'require_all', '~> 1.2.0'
12
+ gem 'require_all', '~> 1.2.0'
13
13
 
14
14
 
15
- gem 'cancan', '>= 1.4'
15
+ gem 'cancan', '>= 1.4'
16
16
 
17
17
  # Data
18
18
  gem 'database_cleaner'
19
19
  gem 'factory_girl'
20
20
 
21
21
  # Adapters
22
- gem 'activerecord', '>= 3'
23
- gem 'datamapper', '>= 1.1'
24
- gem 'mongoid', '>= 2.2'
25
- gem 'mongo_mapper', '>= 0.9'
22
+ gem 'activerecord', '>= 3'
23
+ gem 'datamapper', '>= 1.1'
24
+ gem 'mongoid', '>= 2.2'
25
+ gem 'mongo_mapper', '>= 0.9'
26
26
 
27
27
  # Specs
28
28
  gem 'spork'
@@ -47,8 +47,8 @@ group :test do
47
47
  end
48
48
 
49
49
  group :development, :test do
50
- gem "rspec-rails", '>= 2.6.1' # needed in development to expose the rails generators
51
- gem 'forgery', '>= 0.3' # needed in development when using rake db:seed
50
+ gem "rspec-rails", '>= 2.6.1' # needed in development to expose the rails generators
51
+ gem 'forgery', '>= 0.3' # needed in development when using rake db:seed
52
52
  gem 'factory_girl'
53
53
  gem 'sqlite3'
54
54
  end
data/Gemfile.lock CHANGED
@@ -33,7 +33,7 @@ GEM
33
33
  arel (2.2.1)
34
34
  babosa (0.3.5)
35
35
  bcrypt-ruby (3.0.1)
36
- bson (1.4.0)
36
+ bson (1.5.1)
37
37
  builder (3.0.0)
38
38
  cancan (1.6.7)
39
39
  capybara (1.1.2)
@@ -134,8 +134,8 @@ GEM
134
134
  bundler (~> 1.0)
135
135
  git (>= 1.2.5)
136
136
  rake
137
- json (1.6.2)
138
- json_pure (1.6.1)
137
+ json (1.6.3)
138
+ json_pure (1.6.3)
139
139
  launchy (2.0.5)
140
140
  addressable (~> 2.2.6)
141
141
  mail (2.3.0)
@@ -151,8 +151,8 @@ GEM
151
151
  mime-types (1.17.2)
152
152
  mocha (0.10.0)
153
153
  metaclass (~> 0.0.1)
154
- mongo (1.4.0)
155
- bson (= 1.4.0)
154
+ mongo (1.5.1)
155
+ bson (= 1.5.1)
156
156
  mongo_mapper (0.10.1)
157
157
  activemodel (~> 3.0)
158
158
  activesupport (~> 3.0)
@@ -222,7 +222,7 @@ GEM
222
222
  railties (~> 3.0)
223
223
  rspec (~> 2.7.0)
224
224
  rubyzip (0.9.5)
225
- selenium-webdriver (2.14.0)
225
+ selenium-webdriver (2.15.0)
226
226
  childprocess (>= 0.2.1)
227
227
  ffi (~> 1.0.9)
228
228
  multi_json (~> 1.0.4)
@@ -232,11 +232,11 @@ GEM
232
232
  hike (~> 1.2)
233
233
  rack (~> 1.0)
234
234
  tilt (~> 1.1, != 1.3.0)
235
- sqlite3 (1.3.4)
235
+ sqlite3 (1.3.5)
236
236
  stringex (1.3.0)
237
- sugar-high (0.6.0)
237
+ sugar-high (0.6.2.1)
238
238
  activesupport (>= 3.0.1)
239
- sweetloader (0.1.5)
239
+ sweetloader (0.1.6)
240
240
  activesupport (>= 3.0.1)
241
241
  i18n
242
242
  test-unit (2.4.2)
@@ -270,7 +270,7 @@ DEPENDENCIES
270
270
  friendly_id
271
271
  generator-spec (>= 0.7.8)
272
272
  haml
273
- hashie
273
+ hashie (~> 1.2)
274
274
  jeweler (>= 1.6.4)
275
275
  launchy
276
276
  mocha
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.9.1
1
+ 0.1.9.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cantango-core}
8
- s.version = "0.1.9.1"
8
+ s.version = "0.1.9.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Kristian Mandrup}, %q{Stanislaw Pankevich}]
@@ -135,7 +135,7 @@ Store permissions in yaml file or key-value store}
135
135
  s.add_runtime_dependency(%q<cancan>, [">= 1.4"])
136
136
  s.add_runtime_dependency(%q<sugar-high>, [">= 0.6.0"])
137
137
  s.add_runtime_dependency(%q<sweetloader>, ["~> 0.1.5"])
138
- s.add_runtime_dependency(%q<hashie>, [">= 0"])
138
+ s.add_runtime_dependency(%q<hashie>, ["~> 1.2"])
139
139
  s.add_development_dependency(%q<rspec-rails>, [">= 2.6.1"])
140
140
  s.add_development_dependency(%q<forgery>, [">= 0.3"])
141
141
  s.add_development_dependency(%q<factory_girl>, [">= 0"])
@@ -150,7 +150,7 @@ Store permissions in yaml file or key-value store}
150
150
  s.add_dependency(%q<cancan>, [">= 1.4"])
151
151
  s.add_dependency(%q<sugar-high>, [">= 0.6.0"])
152
152
  s.add_dependency(%q<sweetloader>, ["~> 0.1.5"])
153
- s.add_dependency(%q<hashie>, [">= 0"])
153
+ s.add_dependency(%q<hashie>, ["~> 1.2"])
154
154
  s.add_dependency(%q<rspec-rails>, [">= 2.6.1"])
155
155
  s.add_dependency(%q<forgery>, [">= 0.3"])
156
156
  s.add_dependency(%q<factory_girl>, [">= 0"])
@@ -166,7 +166,7 @@ Store permissions in yaml file or key-value store}
166
166
  s.add_dependency(%q<cancan>, [">= 1.4"])
167
167
  s.add_dependency(%q<sugar-high>, [">= 0.6.0"])
168
168
  s.add_dependency(%q<sweetloader>, ["~> 0.1.5"])
169
- s.add_dependency(%q<hashie>, [">= 0"])
169
+ s.add_dependency(%q<hashie>, ["~> 1.2"])
170
170
  s.add_dependency(%q<rspec-rails>, [">= 2.6.1"])
171
171
  s.add_dependency(%q<forgery>, [">= 0.3"])
172
172
  s.add_dependency(%q<factory_girl>, [">= 0"])
@@ -18,6 +18,8 @@ describe CanTango::Ability::Base do
18
18
 
19
19
  subject { CanTango::Ability::Base.new @user }
20
20
 
21
+ specify { subject.candidate.should == @user }
22
+
21
23
  specify { subject.can?(:edit, Project).should be_true }
22
24
  specify { subject.cannot?(:publish, Project).should be_true }
23
25
 
@@ -21,7 +21,21 @@ describe CanTango::Ability::Executor::Modal do
21
21
  end
22
22
 
23
23
  specify { subject.ability.should be_a CanTango::Ability::Base }
24
+
24
25
  specify { subject.candidate.should be_a User }
26
+
27
+ describe 'candidate' do
28
+ it 'should be the user' do
29
+ subject.candidate.should == @user
30
+ end
31
+ end
32
+
33
+ describe 'ability candidate' do
34
+ it 'should be the user' do
35
+ subject.ability.candidate.should == @user
36
+ end
37
+ end
38
+
25
39
  specify { subject.modes.should == [:no_cache] }
26
40
  specify { subject.options[:modes].should == [:no_cache] }
27
41
  specify { subject.should respond_to :can? }
@@ -35,7 +49,28 @@ describe CanTango::Ability::Executor::Modal do
35
49
  end
36
50
 
37
51
  specify { subject.ability.should be_a CanTango::Ability::Base }
52
+
53
+ describe 'ability' do
54
+ it 'should be the ability passed in' do
55
+ subject.ability.should == @ability
56
+ end
57
+ end
58
+
38
59
  specify { subject.candidate.should be_a User }
60
+
61
+ describe 'candidate' do
62
+ it 'should be the user' do
63
+ subject.candidate.should == @user
64
+ end
65
+ end
66
+
67
+ describe 'ability candidate' do
68
+ it 'should be the user' do
69
+ subject.ability.candidate.should == @user
70
+ end
71
+ end
72
+
73
+
39
74
  specify { subject.modes.should == [:no_cache] }
40
75
  specify { subject.options[:modes].should == [:no_cache] }
41
76
  specify { subject.should respond_to :can? }
@@ -51,7 +86,21 @@ describe CanTango::Ability::Executor::Modal do
51
86
  specify { subject.should respond_to :can? }
52
87
  specify { subject.should respond_to :cannot? }
53
88
 
54
- describe 'rules should have been calculated' do
89
+ describe 'ability' do
90
+ it 'should be the ability passed in' do
91
+ subject.ability.should == @ability
92
+ end
93
+ end
94
+
95
+ describe 'candidate' do
96
+ it 'should be the user' do
97
+ subject.candidate.should == @user
98
+ end
99
+ end
100
+
101
+ specify { subject.modes.should include(:no_cache) }
102
+
103
+ describe 'rules should have been calculated' do
55
104
  specify { subject.rules.should_not be_empty }
56
105
  specify { subject.rules.size.should == 1 }
57
106
  specify { subject.rules.first.should be_a CanCan::Rule }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cantango-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.1
4
+ version: 0.1.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2011-12-08 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &70316354149600 !ruby/object:Gem::Requirement
17
+ requirement: &70297625071360 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.0.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70316354149600
25
+ version_requirements: *70297625071360
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: cancan
28
- requirement: &70316354147840 !ruby/object:Gem::Requirement
28
+ requirement: &70297625070560 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '1.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70316354147840
36
+ version_requirements: *70297625070560
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: sugar-high
39
- requirement: &70316354145320 !ruby/object:Gem::Requirement
39
+ requirement: &70297625069680 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.6.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70316354145320
47
+ version_requirements: *70297625069680
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: sweetloader
50
- requirement: &70316354143880 !ruby/object:Gem::Requirement
50
+ requirement: &70297625068300 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,21 +55,21 @@ dependencies:
55
55
  version: 0.1.5
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70316354143880
58
+ version_requirements: *70297625068300
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: hashie
61
- requirement: &70316354142600 !ruby/object:Gem::Requirement
61
+ requirement: &70297625067480 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
- - - ! '>='
64
+ - - ~>
65
65
  - !ruby/object:Gem::Version
66
- version: '0'
66
+ version: '1.2'
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *70316354142600
69
+ version_requirements: *70297625067480
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec-rails
72
- requirement: &70316354141360 !ruby/object:Gem::Requirement
72
+ requirement: &70297625066020 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 2.6.1
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70316354141360
80
+ version_requirements: *70297625066020
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: forgery
83
- requirement: &70316354139620 !ruby/object:Gem::Requirement
83
+ requirement: &70297625063380 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0.3'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70316354139620
91
+ version_requirements: *70297625063380
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: factory_girl
94
- requirement: &70316354138100 !ruby/object:Gem::Requirement
94
+ requirement: &70297625061920 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70316354138100
102
+ version_requirements: *70297625061920
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: sqlite3
105
- requirement: &70316354136420 !ruby/object:Gem::Requirement
105
+ requirement: &70297625046360 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *70316354136420
113
+ version_requirements: *70297625046360
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: rspec
116
- requirement: &70316354134360 !ruby/object:Gem::Requirement
116
+ requirement: &70297625045440 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: 2.6.0
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *70316354134360
124
+ version_requirements: *70297625045440
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: jeweler
127
- requirement: &70316354133260 !ruby/object:Gem::Requirement
127
+ requirement: &70297625044600 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ! '>='
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: 1.6.4
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *70316354133260
135
+ version_requirements: *70297625044600
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: bundler
138
- requirement: &70316354132300 !ruby/object:Gem::Requirement
138
+ requirement: &70297625043700 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ! '>='
@@ -143,10 +143,10 @@ dependencies:
143
143
  version: 1.1.rc
144
144
  type: :development
145
145
  prerelease: false
146
- version_requirements: *70316354132300
146
+ version_requirements: *70297625043700
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: rdoc
149
- requirement: &70316354131040 !ruby/object:Gem::Requirement
149
+ requirement: &70297625042260 !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
152
152
  - - ! '>='
@@ -154,10 +154,10 @@ dependencies:
154
154
  version: '0'
155
155
  type: :development
156
156
  prerelease: false
157
- version_requirements: *70316354131040
157
+ version_requirements: *70297625042260
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: rake
160
- requirement: &70316354129460 !ruby/object:Gem::Requirement
160
+ requirement: &70297625040440 !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ! '>='
@@ -165,7 +165,7 @@ dependencies:
165
165
  version: 0.9.2.2
166
166
  type: :development
167
167
  prerelease: false
168
- version_requirements: *70316354129460
168
+ version_requirements: *70297625040440
169
169
  description: ! 'Define your permission rules as role- or role group specific permits.
170
170
 
171
171
  Integrates well with multiple Devise user acounts.
@@ -295,7 +295,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
295
295
  version: '0'
296
296
  segments:
297
297
  - 0
298
- hash: -4320336098433723344
298
+ hash: 3380786207970925537
299
299
  required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  none: false
301
301
  requirements: