Skip to content
Browse files

Merge branch 'master' of git@github.com:makandra/aegis

  • Loading branch information...
2 parents 03fafad + c40fcff commit 250bce90f7d072434549b2e2110872b394d68c5f @henning-koch henning-koch committed
Showing with 16 additions and 17 deletions.
  1. +1 −1 VERSION
  2. +12 −13 aegis.gemspec
  3. +3 −3 lib/aegis/has_role.rb
View
2 VERSION
@@ -1 +1 @@
-2.4.0
+2.4.1
View
25 aegis.gemspec
@@ -1,15 +1,15 @@
# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# DO NOT EDIT THIS FILE
+# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{aegis}
- s.version = "2.4.0"
+ s.version = "2.4.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Henning Koch", "Tobias Kraze"]
- s.date = %q{2010-09-03}
+ s.date = %q{2010-09-08}
s.description = %q{Aegis is an authorization solution for Ruby on Rails that supports roles and a RESTish, resource-style declaration of permission rules.}
s.email = %q{henning.koch@makandra.de}
s.extra_rdoc_files = [
@@ -80,7 +80,13 @@ Also see http://wiki.github.com/makandra/aegis/controller-integration
s.rubygems_version = %q{1.3.6}
s.summary = %q{Complete authorization solution for Rails}
s.test_files = [
- "spec/app_root/app/controllers/application_controller.rb",
+ "spec/aegis/controller_spec.rb",
+ "spec/aegis/has_role_spec.rb",
+ "spec/aegis/loader_spec.rb",
+ "spec/aegis/permissions_spec.rb",
+ "spec/aegis/sieve_spec.rb",
+ "spec/aegis/spec/matchers_spec.rb",
+ "spec/app_root/app/controllers/application_controller.rb",
"spec/app_root/app/controllers/reviews_controller.rb",
"spec/app_root/app/controllers/songs_controller.rb",
"spec/app_root/app/models/permissions.rb",
@@ -100,13 +106,7 @@ Also see http://wiki.github.com/makandra/aegis/controller-integration
"spec/app_root/db/migrate/003_create_reviews.rb",
"spec/app_root/lib/console_with_fixtures.rb",
"spec/controllers/reviews_controller_spec.rb",
- "spec/spec_helper.rb",
- "spec/aegis/has_role_spec.rb",
- "spec/aegis/loader_spec.rb",
- "spec/aegis/permissions_spec.rb",
- "spec/aegis/sieve_spec.rb",
- "spec/aegis/spec/matchers_spec.rb",
- "spec/aegis/controller_spec.rb"
+ "spec/spec_helper.rb"
]
if s.respond_to? :specification_version then
@@ -119,4 +119,3 @@ Also see http://wiki.github.com/makandra/aegis/controller-integration
else
end
end
-
View
6 lib/aegis/has_role.rb
@@ -28,9 +28,9 @@ def has_role(options = {})
send :define_method, :has_role? do |role_name|
role_names.include?(role_name.to_s)
end
-
- metaclass ||= singleton_class
- metaclass.send :define_method, :validates_role do |*validate_options|
+
+ prototype = respond_to?(:singleton_class) ? singleton_class : metaclass
+ prototype.send :define_method, :validates_role do |*validate_options|
validate_options = validate_options[0] || {}
send :define_method, :validate_role do

0 comments on commit 250bce9

Please sign in to comment.
Something went wrong with that request. Please try again.