aegis 1.1.8 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/README.rdoc +58 -165
- data/Rakefile +20 -12
- data/VERSION +1 -1
- data/aegis.gemspec +85 -56
- data/lib/aegis.rb +9 -6
- data/lib/aegis/access_denied.rb +4 -0
- data/lib/aegis/action.rb +99 -0
- data/lib/aegis/compiler.rb +113 -0
- data/lib/aegis/has_role.rb +89 -110
- data/lib/aegis/parser.rb +110 -0
- data/lib/aegis/permissions.rb +164 -107
- data/lib/aegis/resource.rb +158 -0
- data/lib/aegis/role.rb +25 -55
- data/lib/aegis/sieve.rb +39 -0
- data/lib/rails/action_controller.rb +38 -0
- data/lib/rails/active_record.rb +1 -5
- data/spec/action_controller_spec.rb +100 -0
- data/spec/app_root/app/controllers/application_controller.rb +7 -0
- data/spec/app_root/app/controllers/reviews_controller.rb +36 -0
- data/spec/app_root/app/models/permissions.rb +14 -0
- data/spec/app_root/app/models/property.rb +5 -0
- data/spec/app_root/app/models/review.rb +5 -0
- data/{test → spec}/app_root/app/models/user.rb +1 -2
- data/{test → spec}/app_root/config/boot.rb +0 -0
- data/{test → spec}/app_root/config/database.yml +0 -0
- data/{test → spec}/app_root/config/environment.rb +0 -0
- data/{test → spec}/app_root/config/environments/in_memory.rb +0 -0
- data/{test → spec}/app_root/config/environments/mysql.rb +0 -0
- data/{test → spec}/app_root/config/environments/postgresql.rb +0 -0
- data/{test → spec}/app_root/config/environments/sqlite.rb +0 -0
- data/{test → spec}/app_root/config/environments/sqlite3.rb +0 -0
- data/spec/app_root/config/routes.rb +7 -0
- data/{test/app_root/db/migrate/20090408115228_create_users.rb → spec/app_root/db/migrate/001_create_users.rb} +2 -1
- data/spec/app_root/db/migrate/002_create_properties.rb +13 -0
- data/spec/app_root/db/migrate/003_create_reviews.rb +14 -0
- data/{test → spec}/app_root/lib/console_with_fixtures.rb +0 -0
- data/{test → spec}/app_root/log/.gitignore +0 -0
- data/{test → spec}/app_root/script/console +0 -0
- data/spec/controllers/reviews_controller_spec.rb +19 -0
- data/spec/has_role_spec.rb +177 -0
- data/spec/permissions_spec.rb +550 -0
- data/spec/rcov.opts +2 -0
- data/spec/spec.opts +4 -0
- data/{test/test_helper.rb → spec/spec_helper.rb} +6 -9
- metadata +73 -57
- data/lib/aegis/constants.rb +0 -6
- data/lib/aegis/normalization.rb +0 -26
- data/lib/aegis/permission_error.rb +0 -5
- data/lib/aegis/permission_evaluator.rb +0 -34
- data/test/app_root/app/controllers/application_controller.rb +0 -2
- data/test/app_root/app/models/old_soldier.rb +0 -6
- data/test/app_root/app/models/permissions.rb +0 -49
- data/test/app_root/app/models/soldier.rb +0 -5
- data/test/app_root/app/models/trust_fund_kid.rb +0 -5
- data/test/app_root/app/models/user_subclass.rb +0 -2
- data/test/app_root/app/models/veteran_soldier.rb +0 -6
- data/test/app_root/config/routes.rb +0 -4
- data/test/app_root/db/migrate/20090429075648_create_soldiers.rb +0 -14
- data/test/app_root/db/migrate/20091110075648_create_veteran_soldiers.rb +0 -14
- data/test/app_root/db/migrate/20091110075649_create_trust_fund_kids.rb +0 -15
- data/test/has_role_options_test.rb +0 -64
- data/test/has_role_test.rb +0 -54
- data/test/permissions_test.rb +0 -109
- data/test/validation_test.rb +0 -55
data/.gitignore
ADDED
data/README.rdoc
CHANGED
@@ -1,195 +1,88 @@
|
|
1
|
-
= Aegis -
|
1
|
+
= Aegis - A complete authorization solution for Rails
|
2
2
|
|
3
|
-
Aegis
|
3
|
+
Aegis is an authorization solution for Ruby on Rails that supports roles and a RESTish, resource-style declaration of
|
4
|
+
permission rules. Getting started with Aegis is easy and requires very little integration. As your authorization
|
5
|
+
requirements become more complex, Aegis will grow with you.
|
4
6
|
|
5
|
-
== Installation
|
6
|
-
|
7
|
-
Add the following to your <tt>Initializer.run</tt> block in your <tt>environment.rb</tt>:
|
8
|
-
config.gem 'aegis', :source => 'http://gemcutter.org'
|
9
|
-
Then do a
|
10
|
-
sudo rake gems:install
|
11
7
|
|
12
|
-
|
13
|
-
sudo gem sources -a http://gemcutter.org
|
14
|
-
sudo gem install aegis
|
8
|
+
== Getting started
|
15
9
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
# app/models/permissions.rb
|
21
|
-
class Permissions < Aegis::Permissions
|
22
|
-
|
23
|
-
role :guest
|
24
|
-
role :registered_user
|
25
|
-
role :moderator
|
26
|
-
role :administrator, :default_permission => :allow
|
27
|
-
|
28
|
-
permission :edit_post do |user, post|
|
29
|
-
allow :registered_user do
|
30
|
-
post.creator == user # a registered_user can only edit his own posts
|
31
|
-
end
|
32
|
-
allow :moderator
|
33
|
-
end
|
34
|
-
|
35
|
-
permission :read_post do |post|
|
36
|
-
allow :everyone
|
37
|
-
deny :guest do
|
38
|
-
post.private? # guests may not read private posts
|
39
|
-
end
|
40
|
-
end
|
10
|
+
All your permissions live in a single class <tt>Permissions</tt>.
|
11
|
+
Permissions are described using <tt>resources</tt>, similiar to your routes.
|
12
|
+
Your permission resources can match those in your routes, but don't have to.
|
41
13
|
|
42
|
-
|
14
|
+
Access to resources or individual actions can be granted or denied to specific roles.
|
43
15
|
|
16
|
+
class Permissions < Aegis::Permissions
|
44
17
|
|
45
|
-
|
46
|
-
|
18
|
+
role :user
|
19
|
+
role :admin
|
47
20
|
|
48
|
-
|
49
|
-
|
50
|
-
has_role
|
21
|
+
resources :projects do
|
22
|
+
allow :everyone
|
51
23
|
end
|
52
24
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
# app/views/posts/index.html.erb
|
57
|
-
@posts.each do |post|
|
58
|
-
<% if current_user.may_read_post? post %>
|
59
|
-
<%= render post %>
|
60
|
-
<% if current_user.may_edit_post? post %>
|
61
|
-
<%= link_to 'Edit', edit_post_path(post) %>
|
62
|
-
<% end %>
|
63
|
-
<% end %>
|
64
|
-
<% end %>
|
65
|
-
|
66
|
-
|
67
|
-
# app/controllers/posts_controller.rb
|
68
|
-
class PostsController
|
69
|
-
# ...
|
70
|
-
|
71
|
-
def update
|
72
|
-
@post = Post.find(params[:id])
|
73
|
-
current_user.may_edit_post! @post # raises an Aegis::PermissionError for unauthorized access
|
74
|
-
# ...
|
75
|
-
end
|
76
|
-
|
25
|
+
resources :users do
|
26
|
+
allow :admin
|
77
27
|
end
|
78
28
|
|
79
|
-
|
29
|
+
end
|
80
30
|
|
81
|
-
|
31
|
+
To give your user model a role, it needs to have an attribute +role_name+. The <tt>has_role</tt> macro wires everything together:
|
82
32
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
has_role
|
87
|
-
end
|
88
|
-
Aegis assumes that the corresponding database table has a string-valued column
|
89
|
-
called +role_name+. You may override the name with the <tt>:name_accessor =>
|
90
|
-
:my_role_column</tt> option.
|
33
|
+
class User < ActiveRecord::Base
|
34
|
+
has_role
|
35
|
+
end
|
91
36
|
|
92
|
-
You can
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<tt>User.new</tt> is called.
|
98
|
-
|
99
|
-
The roles and permissions themselves are defined in a class inheriting from
|
100
|
-
<b>Aegis::Permissions</b>. To define roles you create a model <tt>permissions.rb</tt>
|
101
|
-
and use the *role* method:
|
102
|
-
class Permissions < Aegis::Permissions
|
103
|
-
role 'role_name'
|
104
|
-
end
|
37
|
+
You can now check if a user has permission to access a given action in your controllers and views:
|
38
|
+
|
39
|
+
<% if current_user.may_update_project? @project %>
|
40
|
+
<%= link_to 'Edit', edit_project_path(@project) %>
|
41
|
+
<% end %>
|
105
42
|
|
106
|
-
|
107
|
-
override this with <tt>:default_permission => :allow</tt>, e.g.
|
108
|
-
role 'admin', :default_permission => :allow
|
43
|
+
You can protect all actions in a controller through an Aegis resource with a single line:
|
109
44
|
|
110
|
-
|
45
|
+
class ProjectsController
|
46
|
+
permissions :projects
|
47
|
+
end
|
111
48
|
|
112
|
-
Permissions are specified with the *permission* method and *allow* and *deny*
|
113
|
-
permission :do_something do
|
114
|
-
allow :role_a, :role_b
|
115
|
-
deny :role_c
|
116
|
-
end
|
117
49
|
|
118
|
-
|
119
|
-
and <b>User#may_do_something!</b>. The first one with the ? returns true for users with
|
120
|
-
+role_a+ and +role_b+, and false for users with +role_c+. The second one with the ! raises an
|
121
|
-
Aegis::PermissionError for +role_c+.
|
122
|
-
|
123
|
-
=== Normalization
|
124
|
-
|
125
|
-
Aegis will perform some normalization. For example, the permissions
|
126
|
-
+edit_something+ and +update_something+ will be the same, each granting both
|
127
|
-
<tt>may_edit_something?</tt> and <tt>may_update_something?</tt>. The following normalizations
|
128
|
-
are active:
|
129
|
-
* edit = update
|
130
|
-
* show = list = view = read
|
131
|
-
* delete = remove = destroy
|
132
|
-
|
133
|
-
=== Complex permissions (with parameters)
|
134
|
-
|
135
|
-
*allow* and *deny* can also take a block that may return +true+ or +false+
|
136
|
-
indicating if this really applies. So
|
137
|
-
permission :pull_april_fools_prank do
|
138
|
-
allow :everyone do
|
139
|
-
Date.today.month == 4 and Date.today.day == 1
|
140
|
-
end
|
141
|
-
end
|
142
|
-
will generate a <tt>may_pull_april_fools_prank?</tt> method that only returns true on
|
143
|
-
April 1.
|
144
|
-
|
145
|
-
This becomes more useful if you pass parameters to a <tt>may_...?</tt> method, which
|
146
|
-
are passed through to the permission block (together with the user object). This
|
147
|
-
way you can define more complex permissions like
|
148
|
-
permission :edit_post do |current_user, post|
|
149
|
-
allow :registered_user do
|
150
|
-
post.owner == current_user
|
151
|
-
end
|
152
|
-
allow :admin
|
153
|
-
end
|
154
|
-
which will permit admins and post owners to edit posts.
|
50
|
+
== Further reading
|
155
51
|
|
156
|
-
|
52
|
+
You are now familiar with the basic use case. Aegis can do a *lot* more than that.
|
53
|
+
There is an awesome {documentation wiki}[http://wiki.github.com/makandra/aegis/] with detailled information on many basic and advanced topics, including:
|
157
54
|
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
55
|
+
* {Defining roles and basic permissions}[http://wiki.github.com/makandra/aegis/defining-roles-and-basic-permissions]
|
56
|
+
* {Checking permissions}[http://wiki.github.com/makandra/aegis/checking-permissions]
|
57
|
+
* {Giving your user model a role}[http://wiki.github.com/makandra/aegis/giving-your-user-model-a-role]
|
58
|
+
* {Defining permissions with resources}[http://wiki.github.com/makandra/aegis/defining-permissions-with-resources]
|
59
|
+
* {Controller integration}[http://wiki.github.com/makandra/aegis/controller-integration]
|
60
|
+
* {Giving default access to superusers}[http://wiki.github.com/makandra/aegis/giving-default-access-to-superusers]
|
61
|
+
* {Distinguishing between reading and writing actions}[http://wiki.github.com/makandra/aegis/distinguishing-between-reading-and-writing-actions]
|
62
|
+
* {Aliasing actions}[http://wiki.github.com/makandra/aegis/aliasing-actions]
|
63
|
+
* {Checking permissions when no user is signed in}[http://wiki.github.com/makandra/aegis/checking-permissions-when-no-user-is-signed-in]
|
64
|
+
* {Handling denied permissions in your controllers}[http://wiki.github.com/makandra/aegis/handling-denied-permissions-in-your-controllers]
|
65
|
+
* {Changing behavior when a permission is undefined}[http://wiki.github.com/makandra/aegis/changing-behavior-when-a-permission-is-undefined]
|
66
|
+
* {Multiple roles per user}[http://wiki.github.com/makandra/aegis/multiple-roles-per-user]
|
67
|
+
* {Upgrading to Aegis 2}[http://wiki.github.com/makandra/aegis/upgrading-to-aegis-2]
|
164
68
|
|
165
|
-
If you want to grant +create_something+, +read_something+, +update_something+
|
166
|
-
and +destroy_something+ permissions all at once, just use
|
167
|
-
permission :crud_something do
|
168
|
-
allow :admin
|
169
|
-
end
|
170
|
-
|
171
|
-
If several permission blocks (or several allow and denies) apply to a certain
|
172
|
-
role, the later one always wins. That is
|
173
|
-
permission :do_something do
|
174
|
-
deny :everyone
|
175
|
-
allow :admin
|
176
|
-
end
|
177
|
-
will work as expected.
|
178
69
|
|
179
|
-
|
70
|
+
== Installation
|
180
71
|
|
181
|
-
|
72
|
+
Add the following to your <tt>Initializer.run</tt> block in your <tt>environment.rb</tt>:
|
73
|
+
config.gem 'aegis', :source => 'http://gemcutter.org'
|
74
|
+
Then do a
|
75
|
+
sudo rake gems:install
|
182
76
|
|
183
|
-
|
184
|
-
|
185
|
-
|
77
|
+
Alternatively, use
|
78
|
+
sudo gem sources -a http://gemcutter.org
|
79
|
+
sudo gem install aegis
|
186
80
|
|
187
|
-
We don't do multiple, parametrized roles like "leader for project #2" and "author of post #7".
|
188
|
-
That would be reinventing associations. Just use a single :user role and let your permission block
|
189
|
-
query regular associations and attributes.
|
190
81
|
|
191
|
-
|
82
|
+
== Credits
|
192
83
|
|
193
84
|
Henning Koch, Tobias Kraze
|
194
85
|
|
195
|
-
{
|
86
|
+
{gem-session.com}[http://gem-session.com/]
|
87
|
+
|
88
|
+
{www.makandra.de}[http://www.makandra.de/]
|
data/Rakefile
CHANGED
@@ -1,26 +1,34 @@
|
|
1
1
|
require 'rake'
|
2
|
-
require 'rake/
|
2
|
+
require 'rake/rdoctask'
|
3
|
+
require 'spec/rake/spectask'
|
3
4
|
|
4
|
-
desc 'Default:
|
5
|
-
task :default => :
|
5
|
+
desc 'Default: Run Aegis specs'
|
6
|
+
task :default => :spec
|
6
7
|
|
7
|
-
desc
|
8
|
-
Rake::
|
9
|
-
t.
|
10
|
-
t.
|
11
|
-
t.verbose = true
|
8
|
+
desc "Run Aegis specs"
|
9
|
+
Spec::Rake::SpecTask.new() do |t|
|
10
|
+
t.spec_opts = ['--options', "\"spec/spec.opts\""]
|
11
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
12
12
|
end
|
13
13
|
|
14
|
+
desc 'Generate documentation for the Aegis gem'
|
15
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'Aegis'
|
18
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
19
|
+
rdoc.rdoc_files.include('README')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
14
22
|
|
15
23
|
begin
|
16
24
|
require 'jeweler'
|
17
25
|
Jeweler::Tasks.new do |gemspec|
|
18
26
|
gemspec.name = "aegis"
|
19
|
-
gemspec.summary = "
|
20
|
-
gemspec.email = "
|
27
|
+
gemspec.summary = "Complete authorization solution for Rails"
|
28
|
+
gemspec.email = "henning.koch@makandra.de"
|
21
29
|
gemspec.homepage = "http://github.com/makandra/aegis"
|
22
|
-
gemspec.description = "Aegis is
|
23
|
-
gemspec.authors = ["Henning Koch"]
|
30
|
+
gemspec.description = "Aegis is an authorization solution for Ruby on Rails that supports roles and a RESTish, resource-style declaration of permission rules."
|
31
|
+
gemspec.authors = ["Henning Koch", "Tobias Kraze"]
|
24
32
|
end
|
25
33
|
rescue LoadError
|
26
34
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.0.0
|
data/aegis.gemspec
CHANGED
@@ -1,77 +1,106 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "
|
7
|
+
s.name = %q{aegis}
|
8
|
+
s.version = "2.0.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Henning Koch"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
11
|
+
s.authors = ["Henning Koch", "Tobias Kraze"]
|
12
|
+
s.date = %q{2010-05-02}
|
13
|
+
s.description = %q{Aegis is an authorization solution for Ruby on Rails that supports roles and a RESTish, resource-style declaration of permission rules.}
|
14
|
+
s.email = %q{henning.koch@makandra.de}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
19
|
+
".gitignore",
|
20
|
+
"MIT-LICENSE",
|
21
|
+
"README.rdoc",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"aegis.gemspec",
|
25
|
+
"lib/aegis.rb",
|
26
|
+
"lib/aegis/access_denied.rb",
|
27
|
+
"lib/aegis/action.rb",
|
28
|
+
"lib/aegis/compiler.rb",
|
29
|
+
"lib/aegis/has_role.rb",
|
30
|
+
"lib/aegis/parser.rb",
|
31
|
+
"lib/aegis/permissions.rb",
|
32
|
+
"lib/aegis/resource.rb",
|
33
|
+
"lib/aegis/role.rb",
|
34
|
+
"lib/aegis/sieve.rb",
|
35
|
+
"lib/rails/action_controller.rb",
|
36
|
+
"lib/rails/active_record.rb",
|
37
|
+
"spec/action_controller_spec.rb",
|
38
|
+
"spec/app_root/app/controllers/application_controller.rb",
|
39
|
+
"spec/app_root/app/controllers/reviews_controller.rb",
|
40
|
+
"spec/app_root/app/models/permissions.rb",
|
41
|
+
"spec/app_root/app/models/property.rb",
|
42
|
+
"spec/app_root/app/models/review.rb",
|
43
|
+
"spec/app_root/app/models/user.rb",
|
44
|
+
"spec/app_root/config/boot.rb",
|
45
|
+
"spec/app_root/config/database.yml",
|
46
|
+
"spec/app_root/config/environment.rb",
|
47
|
+
"spec/app_root/config/environments/in_memory.rb",
|
48
|
+
"spec/app_root/config/environments/mysql.rb",
|
49
|
+
"spec/app_root/config/environments/postgresql.rb",
|
50
|
+
"spec/app_root/config/environments/sqlite.rb",
|
51
|
+
"spec/app_root/config/environments/sqlite3.rb",
|
52
|
+
"spec/app_root/config/routes.rb",
|
53
|
+
"spec/app_root/db/migrate/001_create_users.rb",
|
54
|
+
"spec/app_root/db/migrate/002_create_properties.rb",
|
55
|
+
"spec/app_root/db/migrate/003_create_reviews.rb",
|
56
|
+
"spec/app_root/lib/console_with_fixtures.rb",
|
57
|
+
"spec/app_root/log/.gitignore",
|
58
|
+
"spec/app_root/script/console",
|
59
|
+
"spec/controllers/reviews_controller_spec.rb",
|
60
|
+
"spec/has_role_spec.rb",
|
61
|
+
"spec/permissions_spec.rb",
|
62
|
+
"spec/rcov.opts",
|
63
|
+
"spec/spec.opts",
|
64
|
+
"spec/spec_helper.rb"
|
62
65
|
]
|
63
|
-
s.homepage =
|
66
|
+
s.homepage = %q{http://github.com/makandra/aegis}
|
67
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
64
68
|
s.require_paths = ["lib"]
|
65
|
-
s.rubygems_version =
|
66
|
-
s.summary =
|
69
|
+
s.rubygems_version = %q{1.3.5}
|
70
|
+
s.summary = %q{Complete authorization solution for Rails}
|
71
|
+
s.test_files = [
|
72
|
+
"spec/app_root/app/models/user.rb",
|
73
|
+
"spec/app_root/app/models/property.rb",
|
74
|
+
"spec/app_root/app/models/review.rb",
|
75
|
+
"spec/app_root/app/models/permissions.rb",
|
76
|
+
"spec/app_root/app/controllers/application_controller.rb",
|
77
|
+
"spec/app_root/app/controllers/reviews_controller.rb",
|
78
|
+
"spec/app_root/config/boot.rb",
|
79
|
+
"spec/app_root/config/environment.rb",
|
80
|
+
"spec/app_root/config/environments/in_memory.rb",
|
81
|
+
"spec/app_root/config/environments/mysql.rb",
|
82
|
+
"spec/app_root/config/environments/postgresql.rb",
|
83
|
+
"spec/app_root/config/environments/sqlite.rb",
|
84
|
+
"spec/app_root/config/environments/sqlite3.rb",
|
85
|
+
"spec/app_root/config/routes.rb",
|
86
|
+
"spec/app_root/db/migrate/001_create_users.rb",
|
87
|
+
"spec/app_root/db/migrate/002_create_properties.rb",
|
88
|
+
"spec/app_root/db/migrate/003_create_reviews.rb",
|
89
|
+
"spec/app_root/lib/console_with_fixtures.rb",
|
90
|
+
"spec/action_controller_spec.rb",
|
91
|
+
"spec/has_role_spec.rb",
|
92
|
+
"spec/permissions_spec.rb",
|
93
|
+
"spec/spec_helper.rb",
|
94
|
+
"spec/controllers/reviews_controller_spec.rb"
|
95
|
+
]
|
67
96
|
|
68
97
|
if s.respond_to? :specification_version then
|
98
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
69
99
|
s.specification_version = 3
|
70
100
|
|
71
|
-
if Gem::Version.new(Gem::
|
101
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
72
102
|
else
|
73
103
|
end
|
74
104
|
else
|
75
105
|
end
|
76
106
|
end
|
77
|
-
|