role_play 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -1
- data/.travis.yml +7 -0
- data/CHANGELOG +7 -0
- data/Gemfile +2 -0
- data/README.markdown +5 -4
- data/ci/Gemfile-3.0 +5 -0
- data/ci/Gemfile-3.1 +5 -0
- data/ci/Gemfile-3.2 +5 -0
- data/lib/role_play.rb +2 -3
- data/role_play.gemspec +6 -3
- metadata +72 -50
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/CHANGELOG
ADDED
data/Gemfile
ADDED
data/README.markdown
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Install
|
2
2
|
=======
|
3
|
-
|
4
|
-
|
3
|
+
|
4
|
+
# from RubyGems:
|
5
5
|
$ gem install role_play
|
6
6
|
|
7
7
|
# or in your Gemfile
|
@@ -32,6 +32,7 @@ Now your model has these instance methods:
|
|
32
32
|
|
33
33
|
---
|
34
34
|
|
35
|
-
Tested in Ruby 1.9
|
35
|
+
Tested in Ruby 1.9 and Rails 3.x on Travis CI:
|
36
|
+
<http://travis-ci.org/mintdigital/role_play>
|
36
37
|
|
37
|
-
Copyright (c) 2008
|
38
|
+
Copyright (c) 2008 Mint Digital, released under the MIT license
|
data/ci/Gemfile-3.0
ADDED
data/ci/Gemfile-3.1
ADDED
data/ci/Gemfile-3.2
ADDED
data/lib/role_play.rb
CHANGED
@@ -7,9 +7,8 @@ module RolePlay
|
|
7
7
|
|
8
8
|
module ClassMethods
|
9
9
|
def has_roles(*roles)
|
10
|
-
|
11
|
-
|
12
|
-
class_inheritable_reader :available_roles
|
10
|
+
class_attribute :available_roles
|
11
|
+
self.available_roles = roles.flatten
|
13
12
|
|
14
13
|
has_many :role_assignments, :as => :roleable, :dependent => :destroy
|
15
14
|
has_many :roles, :through => :role_assignments
|
data/role_play.gemspec
CHANGED
@@ -1,17 +1,20 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
|
-
s.version = "1.
|
4
|
+
s.version = "1.2.0"
|
5
5
|
|
6
6
|
s.name = 'role_play'
|
7
7
|
s.summary = %q{Simple roles for ActiveRecord}
|
8
8
|
s.description = 'Rails 3-ified version of the beloved plugin'
|
9
|
-
s.authors = ["
|
9
|
+
s.authors = ["Mint Digital"]
|
10
10
|
s.email = 'hello@mintdigital.com'
|
11
11
|
s.homepage = %q{https://github.com/mintdigital/role_play}
|
12
12
|
s.files = `git ls-files`.split("\n")
|
13
13
|
s.test_files = `git ls-files -- {test}/*`.split("\n")
|
14
14
|
s.require_paths = ["lib"]
|
15
15
|
s.platform = Gem::Platform::RUBY
|
16
|
-
s.add_dependency('activerecord', '>= 3.0.
|
16
|
+
s.add_dependency('activerecord', '>= 3.0', '< 4.0')
|
17
|
+
s.add_dependency('railties', '>= 3.0', '< 4.0')
|
18
|
+
s.add_development_dependency('rake', '>= 0.8.7')
|
19
|
+
s.add_development_dependency('sqlite3')
|
17
20
|
end
|
metadata
CHANGED
@@ -1,51 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: role_play
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 1
|
8
|
-
- 3
|
9
|
-
version: 1.1.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
- Krzysztof Zylawy
|
7
|
+
authors:
|
13
8
|
- Mint Digital
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-01-27 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: activerecord
|
16
|
+
requirement: &70301719859880 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.0'
|
22
|
+
- - <
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '4.0'
|
25
|
+
type: :runtime
|
23
26
|
prerelease: false
|
24
|
-
|
27
|
+
version_requirements: *70301719859880
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: railties
|
30
|
+
requirement: &70301719858760 !ruby/object:Gem::Requirement
|
25
31
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
version: 3.0.3
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '3.0'
|
36
|
+
- - <
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '4.0'
|
34
39
|
type: :runtime
|
35
|
-
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: *70301719858760
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rake
|
44
|
+
requirement: &70301719857620 !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
46
|
+
requirements:
|
47
|
+
- - ! '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 0.8.7
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: *70301719857620
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: sqlite3
|
55
|
+
requirement: &70301719857080 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: *70301719857080
|
36
64
|
description: Rails 3-ified version of the beloved plugin
|
37
65
|
email: hello@mintdigital.com
|
38
66
|
executables: []
|
39
|
-
|
40
67
|
extensions: []
|
41
|
-
|
42
68
|
extra_rdoc_files: []
|
43
|
-
|
44
|
-
files:
|
69
|
+
files:
|
45
70
|
- .gitignore
|
71
|
+
- .travis.yml
|
72
|
+
- CHANGELOG
|
73
|
+
- Gemfile
|
46
74
|
- MIT-LICENSE
|
47
75
|
- README.markdown
|
48
76
|
- Rakefile
|
77
|
+
- ci/Gemfile-3.0
|
78
|
+
- ci/Gemfile-3.1
|
79
|
+
- ci/Gemfile-3.2
|
49
80
|
- install.rb
|
50
81
|
- lib/generators/role_play_migration/USAGE
|
51
82
|
- lib/generators/role_play_migration/role_play_migration_generator.rb
|
@@ -60,37 +91,28 @@ files:
|
|
60
91
|
- test/role_play_test.rb
|
61
92
|
- test/test_helper.rb
|
62
93
|
- uninstall.rb
|
63
|
-
has_rdoc: true
|
64
94
|
homepage: https://github.com/mintdigital/role_play
|
65
95
|
licenses: []
|
66
|
-
|
67
96
|
post_install_message:
|
68
97
|
rdoc_options: []
|
69
|
-
|
70
|
-
require_paths:
|
98
|
+
require_paths:
|
71
99
|
- lib
|
72
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
101
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
|
79
|
-
version: "0"
|
80
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ! '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
107
|
none: false
|
82
|
-
requirements:
|
83
|
-
- -
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
|
86
|
-
- 0
|
87
|
-
version: "0"
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
88
112
|
requirements: []
|
89
|
-
|
90
113
|
rubyforge_project:
|
91
|
-
rubygems_version: 1.
|
114
|
+
rubygems_version: 1.8.15
|
92
115
|
signing_key:
|
93
116
|
specification_version: 3
|
94
117
|
summary: Simple roles for ActiveRecord
|
95
118
|
test_files: []
|
96
|
-
|