role_play 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/Gemfile +1 -1
- data/Rakefile +1 -1
- data/lib/role_assignment.rb +1 -1
- data/lib/role_play.rb +1 -1
- data/role_play.gemspec +1 -1
- metadata +37 -11
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
gemspec
|
data/Rakefile
CHANGED
data/lib/role_assignment.rb
CHANGED
@@ -2,5 +2,5 @@ class RoleAssignment < ActiveRecord::Base
|
|
2
2
|
belongs_to :roleable, :polymorphic => true
|
3
3
|
belongs_to :role
|
4
4
|
validates_uniqueness_of :role_id, :scope => [:roleable_id, :roleable_type]
|
5
|
-
validates_presence_of :
|
5
|
+
validates_presence_of :roleable, :roleable_type, :role
|
6
6
|
end
|
data/lib/role_play.rb
CHANGED
@@ -11,7 +11,7 @@ module RolePlay
|
|
11
11
|
class_attribute :available_roles
|
12
12
|
self.available_roles = roles.flatten
|
13
13
|
|
14
|
-
has_many :role_assignments, :as => :roleable, :dependent => :destroy
|
14
|
+
has_many :role_assignments, :as => :roleable, :dependent => :destroy, :inverse_of => :roleable
|
15
15
|
has_many :roles, :through => :role_assignments
|
16
16
|
|
17
17
|
available_roles.each do |role|
|
data/role_play.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: role_play
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -24,10 +24,18 @@ dependencies:
|
|
24
24
|
version: '4.0'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements:
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
33
|
+
- - <
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '4.0'
|
28
36
|
- !ruby/object:Gem::Dependency
|
29
37
|
name: railties
|
30
|
-
requirement:
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
31
39
|
none: false
|
32
40
|
requirements:
|
33
41
|
- - ! '>='
|
@@ -38,10 +46,18 @@ dependencies:
|
|
38
46
|
version: '4.0'
|
39
47
|
type: :runtime
|
40
48
|
prerelease: false
|
41
|
-
version_requirements:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- - <
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '4.0'
|
42
58
|
- !ruby/object:Gem::Dependency
|
43
59
|
name: rake
|
44
|
-
requirement:
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
45
61
|
none: false
|
46
62
|
requirements:
|
47
63
|
- - ! '>='
|
@@ -49,10 +65,15 @@ dependencies:
|
|
49
65
|
version: 0.8.7
|
50
66
|
type: :development
|
51
67
|
prerelease: false
|
52
|
-
version_requirements:
|
68
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 0.8.7
|
53
74
|
- !ruby/object:Gem::Dependency
|
54
75
|
name: sqlite3
|
55
|
-
requirement:
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
56
77
|
none: false
|
57
78
|
requirements:
|
58
79
|
- - ! '>='
|
@@ -60,7 +81,12 @@ dependencies:
|
|
60
81
|
version: '0'
|
61
82
|
type: :development
|
62
83
|
prerelease: false
|
63
|
-
version_requirements:
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
64
90
|
description: Rails 3-ified version of the beloved plugin
|
65
91
|
email: hello@mintdigital.com
|
66
92
|
executables: []
|
@@ -112,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
138
|
version: '0'
|
113
139
|
requirements: []
|
114
140
|
rubyforge_project:
|
115
|
-
rubygems_version: 1.8.
|
141
|
+
rubygems_version: 1.8.25
|
116
142
|
signing_key:
|
117
143
|
specification_version: 3
|
118
144
|
summary: Simple roles for ActiveRecord
|