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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 471b087194de0b75fe7d666e1c60719121906402
4
- data.tar.gz: e469f36315049f5407fe7a708af99831f721ebe2
3
+ metadata.gz: e1f880185b9ba2cee1a8f6592ca4cccf3142bd60
4
+ data.tar.gz: 921ea280eaa82168aaf50850676d2cff42b9d2c8
5
5
  SHA512:
6
- metadata.gz: 68c51c49f97c2b5f80ac4d0388cb3de18604d7a6f9ccc3ae6bf5b8fc568268416760d83eb9e438bba3f49e6547e158eb175fcaa76bb35ef2fc25b069cb45a0ba
7
- data.tar.gz: e4a03eadae6ad21ecb3ec891436773d63db5492c21a52da3673c9da2f6ddc46338f1ac89e57796eb372e073c78feeb37fddd52fae2355c7a3c3a2abd609b2927
6
+ metadata.gz: 27d2028c89d6c76de14e82f2181be9d18dde5d8d84b54ac87b28ac07d4af5089e81c6b85f862f4ac4019be61ee739a6995e6fd5765fcbdd1c852e256c1bafa3c
7
+ data.tar.gz: ab26fc4b78425f4305c31e2170b647acd75ad4d6d6f37c19c45a4bc1e759030a0c2f6631a35d598709e1d5194ff4579ab6a1bc29b8960f437b1b26e52f9c7fef
@@ -1,3 +1,7 @@
1
+ = 3.5.2 (Jan 14, 2015)
2
+ * Fixed regression in RolifyGenerator
3
+ * Updated dependencies
4
+
1
5
  = 3.5.0 (Jan 08, 2015)
2
6
  * Removed `has_role` method alias for `add_role`
3
7
  * Fixed regression in caching system
@@ -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, :inclusion => { :in => Rolify.resource_types }
44
+ validates :resource_type,
45
+ :inclusion => { :in => Rolify.resource_types },
46
+ :allow_nil => true
45
47
 
46
48
  scopify
47
49
  RUBY
@@ -42,7 +42,9 @@ module Mongoid
42
42
  },
43
43
  { :unique => true})
44
44
 
45
- validates :resource_type, :inclusion => { :in => Rolify.resource_types }
45
+ validates :resource_type,
46
+ :inclusion => { :in => Rolify.resource_types },
47
+ :allow_nil => true
46
48
 
47
49
  scopify
48
50
  RUBY
@@ -1,10 +1,9 @@
1
- require 'rolify/railtie' if defined?(Rails)
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/adapters/base'
6
+ require 'rolify/role'
8
7
 
9
8
  module Rolify
10
9
  extend Configure
@@ -1,4 +1,5 @@
1
1
  require "rolify/finders"
2
+ require "rolify/utils"
2
3
 
3
4
  module Rolify
4
5
  module Role
@@ -1,3 +1,3 @@
1
1
  module Rolify
2
- VERSION = "3.5.1"
2
+ VERSION = "3.5.2"
3
3
  end
@@ -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 'rake', '~> 10.3.2'
25
- s.add_development_dependency 'rspec', '2.99.0'
26
- s.add_development_dependency 'rspec-rails', '2.99.0'
27
- s.add_development_dependency 'bundler', '~> 1.7.0'
28
- s.add_development_dependency 'fuubar', '~> 1.3.3'
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.1
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-09 00:00:00.000000000 Z
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: rake
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 10.3.2
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: 10.3.2
40
+ version: 1.7.12
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: fuubar
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.99.0
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.99.0
54
+ version: 2.0.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec-rails
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.99.0
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: 2.99.0
68
+ version: 10.4.2
69
69
  - !ruby/object:Gem::Dependency
70
- name: bundler
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.7.0
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.7.0
82
+ version: 3.1.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: fuubar
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.3.3
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.3.3
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: http://eppo.github.com/rolify/
178
+ homepage: https://github.com/RolifyCommunity/rolify
179
179
  licenses:
180
180
  - MIT
181
181
  metadata: {}