the_role 1.6.8 → 1.6.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -10
- data/lib/the_role/engine.rb +4 -0
- data/lib/the_role/version.rb +1 -1
- data/the_role.gemspec +1 -1
- metadata +6 -11
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# gem 'the_role'
|
1
|
+
# gem 'the_role'
|
2
2
|
|
3
3
|
| Bye bye CanCan, I got The Role! | Description |
|
4
4
|
|:------------- |:-------------|
|
@@ -12,15 +12,6 @@ No more dependencies of Bootstrap, Less, Coffee. Just pure JS and CSS for admin
|
|
12
12
|
|:-------------:|
|
13
13
|
|![TheRole](https://github.com/the-teacher/the_role/raw/master/pic.png)|
|
14
14
|
|
15
|
-
|
16
|
-
### AssetsPipline
|
17
|
-
|
18
|
-
Add next line in **config/application.rb** (for production mode)
|
19
|
-
|
20
|
-
```ruby
|
21
|
-
config.assets.precompile += %w( admin_the_role.js admin_the_role.css )
|
22
|
-
```
|
23
|
-
|
24
15
|
### rubygems page
|
25
16
|
|
26
17
|
http://rubygems.org/gems/the_role
|
@@ -146,10 +137,14 @@ rake db:roles:test
|
|
146
137
|
|
147
138
|
#### Change your ApplicationController
|
148
139
|
|
140
|
+
**include TheRole::Requires** in your Application controller
|
141
|
+
|
149
142
|
Define aliases method for correctly work TheRole's controllers
|
150
143
|
|
151
144
|
``` ruby
|
152
145
|
class ApplicationController < ActionController::Base
|
146
|
+
include TheRole::Requires
|
147
|
+
|
153
148
|
protect_from_forgery
|
154
149
|
|
155
150
|
def access_denied
|
@@ -384,6 +379,8 @@ new_role_hash = {
|
|
384
379
|
|
385
380
|
### Changelog
|
386
381
|
|
382
|
+
* 1.6.9 - assets precompile addon
|
383
|
+
* 1.6.8 - doc, re dependencies
|
387
384
|
* 1.6.7 - Es locale (beta 0.2)
|
388
385
|
* 1.6.6 - Ru locale, localization (beta 0.1)
|
389
386
|
* 1.6.5 - has_section?, fixes, tests (alpha 0.3)
|
data/lib/the_role/engine.rb
CHANGED
@@ -3,6 +3,10 @@ require 'rails'
|
|
3
3
|
|
4
4
|
module TheRole
|
5
5
|
class Engine < Rails::Engine
|
6
|
+
initializer "TheRole precompile hook", :group => :all do |app|
|
7
|
+
app.config.assets.precompile += %w( admin_the_role.js admin_the_role.css )
|
8
|
+
end
|
9
|
+
|
6
10
|
config.to_prepare do
|
7
11
|
Role.send :include, TheRole::RoleModel if the_class_exists? :Role
|
8
12
|
User.send :include, TheRole::UserModel if the_class_exists? :User
|
data/lib/the_role/version.rb
CHANGED
data/the_role.gemspec
CHANGED
@@ -5,7 +5,7 @@ require "the_role/version"
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "the_role"
|
7
7
|
s.version = TheRole::VERSION
|
8
|
-
s.authors = ["Ilya N. Zykin"]
|
8
|
+
s.authors = ["Ilya N. Zykin [the-teacher], John Henderson [jhenderson]"]
|
9
9
|
s.email = ["zykin-ilya@ya.ru"]
|
10
10
|
s.homepage = "https://github.com/the-teacher/the_role"
|
11
11
|
s.summary = %q{Authorization lib for Rails 3 with Web Interface, aka CanCan killer}
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_role
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
- Ilya N. Zykin
|
8
|
+
- Ilya N. Zykin [the-teacher], John Henderson [jhenderson]
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &16822500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,12 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
24
|
+
version_requirements: *16822500
|
30
25
|
description: Authorization lib for Rails 3 with Web Interface, aka CanCan killer
|
31
26
|
email:
|
32
27
|
- zykin-ilya@ya.ru
|
@@ -96,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
91
|
version: '0'
|
97
92
|
requirements: []
|
98
93
|
rubyforge_project: the_role
|
99
|
-
rubygems_version: 1.8.
|
94
|
+
rubygems_version: 1.8.15
|
100
95
|
signing_key:
|
101
96
|
specification_version: 3
|
102
97
|
summary: Authorization lib for Rails 3 with Web Interface, aka CanCan killer
|