rolypoly 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Rolypoly
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/rolypoly.png)](http://badge.fury.io/rb/rolypoly)
4
+ [![Build Status](https://travis-ci.org/sportngin/rolypoly.png)](https://travis-ci.org/sportngin/rolypoly)
5
+
3
6
  Allow certain roles access to certain controller actions.
4
7
 
5
8
  ## Installation
@@ -14,16 +14,16 @@ module Rolypoly
14
14
  end
15
15
  end
16
16
  end
17
+
18
+ unless sub.method_defined? :current_roles
19
+ define_method(:current_roles) { [] }
20
+ end
17
21
  end
18
22
 
19
23
  def rolypoly_check_role_access!
20
24
  failed_role_check! unless rolypoly_role_access?
21
25
  end
22
26
 
23
- def current_roles # OVERRIDE
24
- []
25
- end
26
-
27
27
  def failed_role_check!
28
28
  raise Rolypoly::FailedRoleCheckError
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module Rolypoly
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rolypoly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-03 00:00:00.000000000 Z
12
+ date: 2013-09-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  segments:
99
99
  - 0
100
- hash: -2134864263053242356
100
+ hash: -110535233046243393
101
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  none: false
103
103
  requirements:
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  segments:
108
108
  - 0
109
- hash: -2134864263053242356
109
+ hash: -110535233046243393
110
110
  requirements: []
111
111
  rubyforge_project:
112
112
  rubygems_version: 1.8.25