rolify 3.5.1 → 3.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +4 -0
- data/lib/generators/active_record/rolify_generator.rb +3 -1
- data/lib/generators/mongoid/rolify_generator.rb +3 -1
- data/lib/rolify.rb +3 -4
- data/lib/rolify/role.rb +1 -0
- data/lib/rolify/version.rb +1 -1
- data/rolify.gemspec +12 -11
- data/spec/generators/rolify/rolify_activerecord_generator_spec.rb +1 -1
- data/spec/generators/rolify/rolify_mongoid_generator_spec.rb +1 -1
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1f880185b9ba2cee1a8f6592ca4cccf3142bd60
|
4
|
+
data.tar.gz: 921ea280eaa82168aaf50850676d2cff42b9d2c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27d2028c89d6c76de14e82f2181be9d18dde5d8d84b54ac87b28ac07d4af5089e81c6b85f862f4ac4019be61ee739a6995e6fd5765fcbdd1c852e256c1bafa3c
|
7
|
+
data.tar.gz: ab26fc4b78425f4305c31e2170b647acd75ad4d6d6f37c19c45a4bc1e759030a0c2f6631a35d598709e1d5194ff4579ab6a1bc29b8960f437b1b26e52f9c7fef
|
data/CHANGELOG.rdoc
CHANGED
@@ -41,7 +41,9 @@ module ActiveRecord
|
|
41
41
|
has_and_belongs_to_many :%{user_cname}, :join_table => :%{join_table}
|
42
42
|
belongs_to :resource, :polymorphic => true
|
43
43
|
|
44
|
-
validates :resource_type,
|
44
|
+
validates :resource_type,
|
45
|
+
:inclusion => { :in => Rolify.resource_types },
|
46
|
+
:allow_nil => true
|
45
47
|
|
46
48
|
scopify
|
47
49
|
RUBY
|
data/lib/rolify.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
require 'rolify/
|
2
|
-
require 'rolify/utils'
|
3
|
-
require 'rolify/role'
|
1
|
+
require 'rolify/adapters/base'
|
4
2
|
require 'rolify/configure'
|
5
3
|
require 'rolify/dynamic'
|
4
|
+
require 'rolify/railtie' if defined?(Rails)
|
6
5
|
require 'rolify/resource'
|
7
|
-
require 'rolify/
|
6
|
+
require 'rolify/role'
|
8
7
|
|
9
8
|
module Rolify
|
10
9
|
extend Configure
|
data/lib/rolify/role.rb
CHANGED
data/lib/rolify/version.rb
CHANGED
data/rolify.gemspec
CHANGED
@@ -4,26 +4,27 @@ require 'rolify/version'
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'rolify'
|
7
|
+
s.summary = %q{Roles library with resource scoping}
|
8
|
+
s.description = %q{Very simple Roles library without any authorization enforcement supporting scope on resource objects (instance or class). Supports ActiveRecord and Mongoid ORMs.}
|
7
9
|
s.version = Rolify::VERSION
|
8
10
|
s.platform = Gem::Platform::RUBY
|
11
|
+
s.homepage = 'https://github.com/RolifyCommunity/rolify'
|
12
|
+
s.rubyforge_project = s.name
|
13
|
+
|
9
14
|
s.license = 'MIT'
|
15
|
+
|
10
16
|
s.authors = ['Florent Monbillard']
|
11
17
|
s.email = ['f.monbillard@gmail.com']
|
12
|
-
s.homepage = 'http://eppo.github.com/rolify/'
|
13
|
-
s.summary = %q{Roles library with resource scoping}
|
14
|
-
s.description = %q{Very simple Roles library without any authorization enforcement supporting scope on resource objects (instance or class). Supports ActiveRecord and Mongoid ORMs.}
|
15
|
-
|
16
|
-
s.rubyforge_project = s.name
|
17
18
|
|
18
19
|
s.files = `git ls-files`.split("\n")
|
19
20
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
20
21
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
22
|
s.require_paths = ['lib']
|
22
23
|
|
23
|
-
s.add_development_dependency 'ammeter', '~> 1.1.2'
|
24
|
-
s.add_development_dependency '
|
25
|
-
s.add_development_dependency '
|
26
|
-
s.add_development_dependency '
|
27
|
-
s.add_development_dependency '
|
28
|
-
s.add_development_dependency '
|
24
|
+
s.add_development_dependency 'ammeter', '~> 1.1.2' # Spec generator
|
25
|
+
s.add_development_dependency 'bundler', '~> 1.7.12' # packaging feature
|
26
|
+
s.add_development_dependency 'fuubar', '~> 2.0.0' # instafailing RSpec progress bar formatter
|
27
|
+
s.add_development_dependency 'rake', '~> 10.4.2' # Tasks manager
|
28
|
+
s.add_development_dependency 'rspec', '3.1.0' # Behavior Driven Development
|
29
|
+
s.add_development_dependency 'rspec-rails', '3.1.0' # Rspec for Rails
|
29
30
|
end
|
@@ -46,7 +46,7 @@ describe Rolify::Generators::RolifyGenerator, :if => ENV['ADAPTER'] == 'active_r
|
|
46
46
|
it { should contain "class Role < ActiveRecord::Base" }
|
47
47
|
it { should contain "has_and_belongs_to_many :users, :join_table => :users_roles" }
|
48
48
|
it { should contain "belongs_to :resource, :polymorphic => true" }
|
49
|
-
it { should contain "validates :resource_type, :inclusion => { :in => Rolify.resource_types }" }
|
49
|
+
it { should contain "validates :resource_type, :inclusion => { :in => Rolify.resource_types }, :allow_nil => true" }
|
50
50
|
end
|
51
51
|
|
52
52
|
describe 'app/models/user.rb' do
|
@@ -56,7 +56,7 @@ RUBY
|
|
56
56
|
" { :resource_id => 1 }\n"
|
57
57
|
" },\n"
|
58
58
|
" { unique => true })"}
|
59
|
-
it { should contain "validates :resource_type, :inclusion => { :in => Rolify.resource_types }" }
|
59
|
+
it { should contain "validates :resource_type, :inclusion => { :in => Rolify.resource_types }, :allow_nil => true" }
|
60
60
|
end
|
61
61
|
|
62
62
|
describe 'app/models/user.rb' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rolify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florent Monbillard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ammeter
|
@@ -25,75 +25,75 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.7.12
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.7.12
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: fuubar
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.0.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 10.4.2
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 10.4.2
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 3.1.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: 3.1.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rspec-rails
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 3.1.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: 3.1.0
|
97
97
|
description: Very simple Roles library without any authorization enforcement supporting
|
98
98
|
scope on resource objects (instance or class). Supports ActiveRecord and Mongoid
|
99
99
|
ORMs.
|
@@ -175,7 +175,7 @@ files:
|
|
175
175
|
- spec/support/data.rb
|
176
176
|
- spec/support/schema.rb
|
177
177
|
- spec/support/stream_helpers.rb
|
178
|
-
homepage:
|
178
|
+
homepage: https://github.com/RolifyCommunity/rolify
|
179
179
|
licenses:
|
180
180
|
- MIT
|
181
181
|
metadata: {}
|