canard 0.4.1 → 0.4.2.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2MxZDQwMmE0ZmI0NDE0YzZjNTA0MWNiZWQ4YzRhZmRiNDc1YzMwMA==
5
+ data.tar.gz: !binary |-
6
+ Yzk2MTg0YzZiZWQyMTcwNmQ3OTBkN2UyZTVlMjQzMGVhY2Q2MDQwMA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ N2ZjYzkxZDk1NzFiNmVhN2I2Mzg5YTgwOGFkMjE1MjU1ZWFjOTUxODg0OTQx
10
+ ZGNiZDcwZjBhMTQ5ZjVmNzk1NWQ0NjFjZWYyZjE4NjhhM2NkYjI4NTM1MjRl
11
+ N2YwYzMzZTk3MDQ2YmZiMjFjZjg3NzlmY2ViNzBlODkyZDhhN2Y=
12
+ data.tar.gz: !binary |-
13
+ MzFhZjVjMGUxNjVhNTRkMjg4YjkxYTEwNzFhMjI1MDEyYTYxOWM2YzI1NWFh
14
+ MTc1ZjYyMTRiY2I5ODAxMWQ4NDE3NWZiNmRkYzgwNjUwNzE2MzAwYjgyMzgy
15
+ ZmQ3Yzk4OTlkMDJkOGE0ZjAyZTBkOGY1MjlkNmY5ZmI5ODgzNDE=
data/.gitignore CHANGED
@@ -3,6 +3,8 @@
3
3
  .bundle
4
4
  pkg/*
5
5
  .rvmrc
6
+ .ruby-version
7
+ .ruby-gemset
6
8
  Gemfile.lock
7
9
  *.sqlite3
8
10
  *.log
@@ -5,7 +5,7 @@ definitions gain their own folder and a little structure. The easiest way to get
5
5
  Canard generator. Canard progressively enhances the abilities of the model by applying role abilities on
6
6
  top of the models base abilities.
7
7
 
8
- A User model with :admin and :manger roles would be defined:
8
+ A User model with :admin and :manager roles would be defined:
9
9
 
10
10
  class User < ActiveRecord::Base
11
11
 
@@ -129,6 +129,11 @@ Add the canard gem to your Gemfile. In Gemfile:
129
129
 
130
130
  gem "canard"
131
131
 
132
+ Add the `roles_mask` field to your user table:
133
+
134
+ rails g migration add_roles_mask_to_users roles_mask:integer
135
+ rake db:migrate
136
+
132
137
  That's it!
133
138
 
134
139
  === Rails 2.x
data/TODO CHANGED
@@ -7,3 +7,4 @@
7
7
  * Add install generator to allow overriding of the default tests.
8
8
  * Make the Ability user referece configureable in Ability.
9
9
  * Add DataMapper support.
10
+ * Detect and use FactoryGirl syntax in generated spec.
@@ -1,6 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
  require "canard/version"
4
+ require 'rails'
4
5
 
5
6
  Gem::Specification.new do |s|
6
7
  s.name = "canard"
@@ -28,6 +29,11 @@ Gem::Specification.new do |s|
28
29
  s.add_development_dependency "mongoid", "~> 3.0"
29
30
  end
30
31
 
31
- s.add_runtime_dependency "cancan"
32
+ s.requirements << 'cancan for Rails3 and earlier or the Rails4 compatible cancancan fork.'
33
+ if Rails.version > '3'
34
+ s.add_runtime_dependency "cancancan"
35
+ else
36
+ s.add_runtime_dependency "cancan"
37
+ end
32
38
  s.add_runtime_dependency "role_model"
33
39
  end
@@ -4,7 +4,7 @@ require 'rails'
4
4
  module Canard
5
5
  class Railtie < Rails::Railtie
6
6
 
7
- initializer "carard.no_eager_loading", :before => 'before_eager_loading' do |app|
7
+ initializer "canard.no_eager_loading", :before => 'before_eager_loading' do |app|
8
8
  ActiveSupport::Dependencies.autoload_paths.reject!{ |path| Canard.load_paths.include?(path) }
9
9
  # Don't eagerload our configs, we'll deal with them ourselves
10
10
  app.config.eager_load_paths = app.config.eager_load_paths.reject do |path|
@@ -42,4 +42,4 @@ module Canard
42
42
  load File.expand_path('../../tasks/canard.rake', __FILE__)
43
43
  end
44
44
  end
45
- end
45
+ end
@@ -1,3 +1,3 @@
1
1
  module Canard
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2.pre"
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
5
- prerelease:
4
+ version: 0.4.2.pre
6
5
  platform: ruby
7
6
  authors:
8
7
  - James McCarthy
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-16 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: minitest
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: :development
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: rails
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: mongoid
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,15 +48,13 @@ 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: '3.0'
62
55
  - !ruby/object:Gem::Dependency
63
- name: cancan
56
+ name: cancancan
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: role_model
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ! '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ! '>='
92
81
  - !ruby/object:Gem::Version
@@ -168,27 +157,27 @@ files:
168
157
  - test/test_helper.rb
169
158
  homepage: https://github.com/james2m/canard
170
159
  licenses: []
160
+ metadata: {}
171
161
  post_install_message:
172
162
  rdoc_options: []
173
163
  require_paths:
174
164
  - lib
175
165
  required_ruby_version: !ruby/object:Gem::Requirement
176
- none: false
177
166
  requirements:
178
167
  - - ! '>='
179
168
  - !ruby/object:Gem::Version
180
169
  version: '0'
181
170
  required_rubygems_version: !ruby/object:Gem::Requirement
182
- none: false
183
171
  requirements:
184
- - - ! '>='
172
+ - - ! '>'
185
173
  - !ruby/object:Gem::Version
186
- version: '0'
187
- requirements: []
174
+ version: 1.3.1
175
+ requirements:
176
+ - cancan for Rails3 and earlier or the Rails4 compatible cancancan fork.
188
177
  rubyforge_project: canard
189
- rubygems_version: 1.8.24
178
+ rubygems_version: 2.1.11
190
179
  signing_key:
191
- specification_version: 3
180
+ specification_version: 4
192
181
  summary: Adds role based authorisation to Rails by combining RoleModel and CanCan.
193
182
  test_files:
194
183
  - test/abilities/administrators.rb