turnstile 0.1.0 → 0.1.1
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/Manifest +1 -0
- data/README.rdoc +3 -2
- data/Rakefile +2 -2
- data/lib/turnstile/authorization.rb +1 -1
- data/turnstile.gemspec +2 -2
- metadata +4 -4
data/Manifest
CHANGED
data/README.rdoc
CHANGED
@@ -46,11 +46,12 @@ An example of config file can be found in config/initializers/turnstile.rb in th
|
|
46
46
|
|
47
47
|
To set the model, so far it is hardcoded, so you need a string column called
|
48
48
|
user_role
|
49
|
-
|
49
|
+
|
50
|
+
and be sure to have a method that returns the current user using
|
50
51
|
current_user
|
51
52
|
|
52
53
|
= Controllers
|
53
|
-
For each controller that you want to
|
54
|
+
For each controller that you want to monitorate just call:
|
54
55
|
|
55
56
|
before_filter :verify_role_permissions!
|
56
57
|
|
data/Rakefile
CHANGED
@@ -2,12 +2,12 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('turnstile', '0.1.
|
5
|
+
Echoe.new('turnstile', '0.1.1') do |p|
|
6
6
|
p.description = "Simple authorization for rails"
|
7
7
|
p.url = "http://github.com/milare/turnstile"
|
8
8
|
p.author = "Bruno Milare"
|
9
9
|
p.email = "milare@gmail.com"
|
10
|
-
p.ignore_pattern = ["spec/*", "config/initializers/*"]
|
10
|
+
p.ignore_pattern = ["demo/**/*","spec/*", "config/initializers/*"]
|
11
11
|
p.development_dependencies = []
|
12
12
|
end
|
13
13
|
|
@@ -37,7 +37,7 @@ module Turnstile
|
|
37
37
|
# If the role is not found tries to define
|
38
38
|
# common names for guests
|
39
39
|
# The default role is used when there is no current role
|
40
|
-
def
|
40
|
+
def default_is(role_str)
|
41
41
|
role = Role.find(role_str.to_sym)
|
42
42
|
if !role
|
43
43
|
role ||= Role.find(:guest)
|
data/turnstile.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{turnstile}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Bruno Milare"]
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.description = %q{Simple authorization for rails}
|
11
11
|
s.email = %q{milare@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/turnstile.rb", "lib/turnstile/authorization.rb", "lib/turnstile/role.rb", "lib/turnstile/rule.rb"]
|
13
|
-
s.files = ["README.rdoc", "Rakefile", "lib/turnstile.rb", "lib/turnstile/authorization.rb", "lib/turnstile/role.rb", "lib/turnstile/rule.rb", "
|
13
|
+
s.files = ["README.rdoc", "Rakefile", "lib/turnstile.rb", "lib/turnstile/authorization.rb", "lib/turnstile/role.rb", "lib/turnstile/rule.rb", "turnstile.gemspec", "Manifest"]
|
14
14
|
s.homepage = %q{http://github.com/milare/turnstile}
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Turnstile", "--main", "README.rdoc"]
|
16
16
|
s.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turnstile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bruno Milare
|
@@ -38,8 +38,8 @@ files:
|
|
38
38
|
- lib/turnstile/authorization.rb
|
39
39
|
- lib/turnstile/role.rb
|
40
40
|
- lib/turnstile/rule.rb
|
41
|
-
- Manifest
|
42
41
|
- turnstile.gemspec
|
42
|
+
- Manifest
|
43
43
|
has_rdoc: true
|
44
44
|
homepage: http://github.com/milare/turnstile
|
45
45
|
licenses: []
|