easy_roles 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/easy_roles.gemspec +2 -2
- data/lib/easy_roles.rb +2 -2
- metadata +2 -2
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('easy_roles', '0.1.
|
5
|
+
Echoe.new('easy_roles', '0.1.3') do |p|
|
6
6
|
p.description = "Easy role authorization in rails"
|
7
7
|
p.url = "http://github.com/platform45/easy_roles"
|
8
8
|
p.author = "Platform45"
|
data/easy_roles.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{easy_roles}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Platform45"]
|
9
|
-
s.date = %q{2009-10-
|
9
|
+
s.date = %q{2009-10-14}
|
10
10
|
s.description = %q{Easy role authorization in rails}
|
11
11
|
s.email = %q{ryan@platform45.com}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/easy_roles.rb"]
|
data/lib/easy_roles.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
module EasyRoles
|
2
2
|
def self.included(base)
|
3
3
|
base.extend ClassMethods
|
4
|
+
base.send :alias_method_chain, :method_missing, :roles
|
4
5
|
end
|
5
6
|
|
6
7
|
module ClassMethods
|
7
8
|
def easy_roles(name)
|
8
9
|
serialize name.to_sym, Array
|
9
10
|
before_validation_on_create :make_default_roles
|
10
|
-
self.superclass.send :alias_method_chain, :method_missing, :roles
|
11
11
|
|
12
12
|
class_eval <<-EOC
|
13
13
|
def has_role?(role)
|
@@ -50,4 +50,4 @@ end
|
|
50
50
|
|
51
51
|
class ActiveRecord::Base
|
52
52
|
include EasyRoles
|
53
|
-
end
|
53
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_roles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Platform45
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-14 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|