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 CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.2.2 (2013.03.08)
2
+
3
+ * Use rdoc/task instead of obsolete rake/rdoctask
4
+ * Fix compatibility with ActiveRecord 3.2.12
5
+
1
6
  == 1.2.1 (2012.02.01)
2
7
 
3
8
  * Remove use of ActiveSupport::Concern.
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
  gemspec
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
- require 'rake/rdoctask'
3
+ require 'rdoc/task'
4
4
 
5
5
  desc 'Default: run unit tests.'
6
6
  task :default => :test
@@ -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 :roleable_id, :roleable_type, :role_id
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
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.version = "1.2.1"
4
+ s.version = "1.2.2"
5
5
 
6
6
  s.name = 'role_play'
7
7
  s.summary = %q{Simple roles for ActiveRecord}
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.1
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: 2012-02-01 00:00:00.000000000 Z
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: &70267020196080 !ruby/object:Gem::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: *70267020196080
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: &70267020195240 !ruby/object:Gem::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: *70267020195240
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: &70267020194220 !ruby/object:Gem::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: *70267020194220
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: &70267020193700 !ruby/object:Gem::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: *70267020193700
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.15
141
+ rubygems_version: 1.8.25
116
142
  signing_key:
117
143
  specification_version: 3
118
144
  summary: Simple roles for ActiveRecord