the_role 1.5.1 → 1.6.0

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.
Files changed (45) hide show
  1. data/Bye_bye_CanCan_I_got_the_Role.png +0 -0
  2. data/README.md +82 -92
  3. data/app/assets/javascripts/admin_the_role.js +3 -0
  4. data/app/assets/javascripts/bootstrap-dropdown.js +100 -0
  5. data/app/assets/stylesheets/admin_the_role.css +7 -0
  6. data/app/assets/stylesheets/alerts.less +58 -0
  7. data/app/assets/stylesheets/button-groups.less +191 -0
  8. data/app/assets/stylesheets/buttons.less +191 -0
  9. data/app/assets/stylesheets/custom.scss +3 -0
  10. data/app/assets/stylesheets/dropdowns.less +143 -0
  11. data/app/assets/stylesheets/forms.less +583 -0
  12. data/app/assets/stylesheets/grid.less +5 -0
  13. data/app/assets/stylesheets/headers.scss +15 -0
  14. data/app/assets/stylesheets/layouts.less +17 -0
  15. data/app/assets/stylesheets/mix.scss +41 -0
  16. data/app/assets/stylesheets/mixins.less +646 -0
  17. data/app/assets/stylesheets/reset.css +117 -0
  18. data/app/assets/stylesheets/role_set.less +136 -0
  19. data/app/assets/stylesheets/scaffolding.less +29 -0
  20. data/app/assets/stylesheets/variables.less +206 -0
  21. data/app/assets/stylesheets/wells.less +27 -0
  22. data/app/controllers/admin/role_sections_controller.rb +40 -17
  23. data/app/controllers/admin/roles_controller.rb +8 -6
  24. data/app/views/admin/roles/_role.html.haml +53 -0
  25. data/app/views/admin/roles/_sidebar.html.haml +8 -0
  26. data/app/views/admin/roles/edit.html.haml +2 -42
  27. data/app/views/admin/roles/index.haml +2 -15
  28. data/app/views/admin/roles/new.html.haml +5 -4
  29. data/app/views/layouts/the_role.html.haml +24 -0
  30. data/config/routes.rb +5 -1
  31. data/lib/the_role/engine.rb +2 -2
  32. data/lib/the_role/hash.rb +50 -14
  33. data/lib/the_role/modules/base.rb +4 -4
  34. data/lib/the_role/modules/controller_requires.rb +4 -15
  35. data/lib/the_role/modules/role_model.rb +14 -13
  36. data/lib/the_role/param_helper.rb +15 -0
  37. data/lib/the_role/version.rb +1 -1
  38. data/lib/the_role.rb +13 -11
  39. data/pic.png +0 -0
  40. data/the_role.gemspec +5 -2
  41. metadata +58 -16
  42. data/app/assets/stylesheets/the_role/form.css +0 -57
  43. data/app/assets/stylesheets/the_role/headers.css.scss +0 -15
  44. data/app/assets/stylesheets/the_role/style.css.scss +0 -75
  45. data/lib/the_role/modules/param_helper.rb +0 -7
@@ -1,42 +1,2 @@
1
- - content_for :title do
2
- = t('.title')
3
-
4
- - content_for :css do
5
- = stylesheet_link_tag 'the_role/style'
6
- = stylesheet_link_tag 'the_role/headers'
7
- = stylesheet_link_tag 'the_role/form'
8
-
9
- .the_role
10
- %p= flash[:notice]
11
-
12
- %h1= t('.title')
13
-
14
- %p= link_to raw(t('.back')), admin_roles_path
15
-
16
- %h2
17
- = @role.name
18
- \-
19
- = @role.title
20
-
21
- = form_for :role, :url => {:action=> :update }, :html => {:method => :put, :class => :the_form } do |f|
22
- = render :partial => 'form', :locals => {:f => f, :button => t('.update')}
23
-
24
- %h4= t('.create_section')
25
- - role = @role.to_hash
26
- = form_tag(admin_role_sections_path(@role), :method => :post, :class => :new_rule) do
27
- = text_field_tag :section_name
28
- = submit_tag t('.create_section')
29
-
30
- %h4= t('.create_access_rule')
31
- - unless @role.to_hash.empty?
32
- = form_tag(create_rule_admin_role_sections_path(@role), :method => :post, :class => :new_rule) do
33
- = text_field_tag :section_rule
34
-
35
- %select{ :name => :section_name }
36
- -role.each do |name, set|
37
- %option{ :value => name }
38
- = name
39
-
40
- %input{ :type => :submit, :value => t('.create_rule') }
41
- - else
42
- %p= t('.section_needs')
1
+ = render :partial => 'sidebar'
2
+ = render :partial => 'role', :locals => { :role => @role }
@@ -1,15 +1,2 @@
1
- - content_for :css do
2
- = stylesheet_link_tag 'the_role/style'
3
- = stylesheet_link_tag 'the_role/headers'
4
- = stylesheet_link_tag 'the_role/form'
5
-
6
- .the_role
7
- %h3= t('.list')
8
- %ul.index
9
- - @roles.each do |role|
10
- %li
11
- %p
12
- = link_to role.title, edit_admin_role_url(role)
13
- = link_to t('.delete'), admin_role_url(role), :method => :delete, :title => role.title, :confirm => t('the_role.delete_role'), :class => :delete
14
-
15
- %p= link_to t('.new'), new_admin_role_path
1
+ = render :partial => 'sidebar'
2
+ = render :partial => 'role', :locals => { :role => @roles.first }
@@ -1,6 +1,6 @@
1
- .the_role
2
- %p= link_to raw(t('.back')), admin_roles_path
1
+ = render :partial => 'sidebar'
3
2
 
3
+ .well
4
4
  - @role.errors.each do |field, message|
5
5
  %p
6
6
  = field
@@ -8,7 +8,8 @@
8
8
  = message
9
9
 
10
10
  .form
11
- %h5= raw t('.create')
11
+ %h3= raw t('.create')
12
+
12
13
  = form_for(@role, :url => admin_roles_path) do |f|
13
14
  %label= t('.name')
14
15
  %p= f.text_field :name
@@ -19,4 +20,4 @@
19
20
  %label= t('.description')
20
21
  %p= f.text_field :description
21
22
 
22
- = f.submit t('.new')
23
+ = f.submit t('.new'), :class => :btn
@@ -0,0 +1,24 @@
1
+ !!! 5
2
+ %html
3
+ %head
4
+ %meta{ :charset => 'utf-8' }
5
+ %title Bye bye, CanCan, I got the Role!
6
+ = stylesheet_link_tag 'admin_the_role'
7
+ = javascript_include_tag 'admin_the_role'
8
+ = csrf_meta_tags
9
+ %body
10
+ .the_role
11
+ %h3
12
+ = link_to 'The Role', 'https://github.com/the-teacher/the_role'
13
+ \|
14
+ Role system for Rails Apps
15
+ \|
16
+ User: #{current_user.try(:name) || current_user.id}
17
+ .crusty
18
+ .container
19
+ .row
20
+ .span3
21
+ .sidebar= yield :sidebar
22
+ .span9
23
+ .content= yield
24
+
data/config/routes.rb CHANGED
@@ -1,12 +1,16 @@
1
1
  Rails.application.routes.draw do
2
2
  namespace :admin do
3
- resources :roles do
3
+ resources :roles, :except => :show do
4
4
  resources :sections, :controller => :role_sections, :only => :none do
5
5
  collection do
6
6
  post :create
7
7
  post :create_rule
8
8
  end
9
+
9
10
  member do
11
+ put :rule_on
12
+ put :rule_off
13
+
10
14
  delete :destroy
11
15
  delete :destroy_rule
12
16
  end
@@ -8,5 +8,5 @@ module TheRole
8
8
  User.send :include, TheRole::UserModel if the_class_exists? :User
9
9
  ApplicationController.send :include, TheRole::Requires if the_class_exists? :ApplicationController
10
10
  end
11
- end#Engine
12
- end#TheRole
11
+ end
12
+ end
data/lib/the_role/hash.rb CHANGED
@@ -1,29 +1,65 @@
1
+ # load 'the_role/hash.rb' - UPDATE, BUT NOT RELOAD [for console testing]
2
+
1
3
  class Hash
2
- # load 'the_role/hash.rb' - UPDATE, BUT NOT RELOAD
4
+ # Puts message about potential compatibility problem
5
+ if respond_to? :underscorify_keys
6
+ puts "\nWARNING!\nHASH#underscorify_keys detected.\nIf now it's native active_support/core_ext/hash method,\nyou should to create new issue for https://github.com/the-teacher/the_role\n\n"
7
+ end
3
8
 
4
- # {'a b' => 1, "x y" => {'hello' => 1, :hello => 2} }.underscorify_keys => {:a_b=>1, :x_y=>{:hello=>2}}
5
- def underscorify_keys
6
- hash = {}
7
- self.each do |key, value|
8
- new_key = key.to_s.parameterize.underscore.to_sym
9
- hash[new_key] = self[key].is_a?(Hash) ? self[key].underscorify_keys : value
9
+ # RAILS 4 like methods for RAILS 3
10
+ # DEEP TRANSFORM HELPER METHODS
11
+ unless respond_to? :deep_transform_keys
12
+ def deep_transform_keys(&block)
13
+ result = {}
14
+ each do |key, value|
15
+ result[yield(key)] = value.is_a?(Hash) ? value.deep_transform_keys(&block) : value
16
+ end
17
+ result
10
18
  end
11
- hash
19
+
20
+ def deep_transform_keys!(&block)
21
+ keys.each do |key|
22
+ value = delete(key)
23
+ self[yield(key)] = value.is_a?(Hash) ? value.deep_transform_keys!(&block) : value
24
+ end
25
+ self
26
+ end
27
+ puts "TheRole => RAILS 4 like method **deep_transform_keys** mixed to HASH class"
12
28
  end
13
29
 
14
- def deep_reset(default = false)
15
- hash = dup
16
- hash.each do |key, value|
17
- hash[key] = hash[key].is_a?(Hash) ? hash[key].deep_reset(default) : default
30
+ # RAILS 4 like methods for RAILS 3
31
+ # DEEP TRANSFORM HELPER METHODS
32
+ unless respond_to? :deep_stringify_keys
33
+ def deep_stringify_keys
34
+ deep_transform_keys{ |key| key.to_s }
18
35
  end
19
- hash
36
+
37
+ def deep_stringify_keys!
38
+ deep_transform_keys!{ |key| key.to_s }
39
+ end
40
+ puts "TheRole => RAILS 4 like method **deep_stringify_keys** mixed to HASH class"
41
+ end
42
+
43
+ # Potential compatibility problem with RAILS_VERSION > 4.0
44
+ # But I hope nobody will create function with this name
45
+ def underscorify_keys
46
+ deep_transform_keys{ |key| TheRole::ParamHelper.prepare(key) }
20
47
  end
21
48
 
22
49
  def underscorify_keys!
23
50
  replace underscorify_keys
24
51
  end
25
52
 
26
- def deep_reset!(default = false)
53
+ # DEEP RESET VALUES
54
+ def deep_reset(default = nil)
55
+ hash = dup
56
+ hash.each do |key, value|
57
+ hash[key] = hash[key].is_a?(Hash) ? hash[key].deep_reset(default) : default
58
+ end
59
+ hash
60
+ end
61
+
62
+ def deep_reset!(default = nil)
27
63
  replace deep_reset(default)
28
64
  end
29
65
  end
@@ -4,8 +4,8 @@ module TheRole
4
4
  hash = role_hash
5
5
  section_name = param_prepare(section_name)
6
6
  rule_name = param_prepare(rule_name)
7
- return true if hash[:system] and hash[:system][:administrator]
8
- return true if hash[:moderator] and hash[:moderator][section_name]
7
+ return true if hash['system'] and hash['system']['administrator']
8
+ return true if hash['moderator'] and hash['moderator'][section_name]
9
9
  return false unless hash[section_name]
10
10
  return false unless hash[section_name].key? rule_name
11
11
  hash[section_name][rule_name]
@@ -13,11 +13,11 @@ module TheRole
13
13
 
14
14
  def moderator? section_name
15
15
  section_name = param_prepare(section_name)
16
- has_role? section_name, :any_crazy_name
16
+ has_role? section_name, 'any_crazy_name'
17
17
  end
18
18
 
19
19
  def admin?
20
- has_role? :any_crazy_name, :any_crazy_name
20
+ has_role? 'any_crazy_name', 'any_crazy_name'
21
21
  end
22
22
  end
23
23
  end
@@ -1,28 +1,17 @@
1
1
  module TheRole
2
2
  module Requires
3
3
  private
4
-
5
4
  def role_access_denied
6
5
  flash[:error] = t('the_role.access_denied')
7
6
  redirect_to root_path
8
7
  end
9
-
10
- # before_filter :role_require
11
- def role_require
12
- role_access_denied unless current_user.has_role?(controller_name, action_name)
13
- end
14
8
 
15
- # before_filter :simple_object_finder
16
- # define class variable for *owner_require* filter with Controller class name
17
- # @object_for_ownership_checking = @article
18
- def simple_object_finder
19
- variable_name = self.class.to_s.tableize.split('_').first.singularize.split('/').last
20
- @object_for_ownership_checking = self.instance_variable_get("@#{variable_name}")
9
+ def role_required
10
+ role_access_denied unless current_user.has_role?(controller_name, action_name)
21
11
  end
22
12
 
23
- # before_filter :owner_require
24
- def owner_require
25
- role_access_denied unless current_user.owner?(@object_for_ownership_checking)
13
+ def owner_required
14
+ role_access_denied unless current_user.owner?(@ownership_checking_object)
26
15
  end
27
16
  end
28
17
  end
@@ -17,9 +17,10 @@ module TheRole
17
17
  validates :name, :presence => true, :uniqueness => true
18
18
  validates :title, :presence => true, :uniqueness => true
19
19
  validates :description, :presence => true
20
+
20
21
  before_create do
21
- self.name = param_prepare(name)
22
- self.the_role = {}.to_yaml
22
+ self.name = param_prepare(name)
23
+ self.the_role = {}.to_json if self.the_role.blank?
23
24
  end
24
25
 
25
26
  # C
@@ -31,7 +32,7 @@ module TheRole
31
32
  return false if section_name.blank?
32
33
  return true if role[section_name]
33
34
  role[section_name] = {}
34
- update_attributes(:the_role => role.to_yaml)
35
+ update_attributes(:the_role => role.to_json)
35
36
  end
36
37
 
37
38
  def create_rule section_name, rule_name
@@ -41,16 +42,16 @@ module TheRole
41
42
  section_name = param_prepare(section_name)
42
43
  return true if role[section_name][rule_name]
43
44
  role[section_name][rule_name] = false
44
- update_attributes(:the_role => role.to_yaml)
45
+ update_attributes(:the_role => role.to_json)
45
46
  end
46
47
 
47
48
  # R
48
49
 
49
50
  def to_hash
50
- begin YAML::load(the_role) rescue {} end
51
+ begin JSON.load(the_role) rescue {} end
51
52
  end
52
53
 
53
- def to_yaml
54
+ def to_json
54
55
  the_role
55
56
  end
56
57
 
@@ -62,14 +63,14 @@ module TheRole
62
63
 
63
64
  # source_hash will be reset to false
64
65
  # except true items from new_role_hash
65
- # all keys will become symbols
66
+ # all keys will become 'strings'
66
67
  # look at lib/the_role/hash.rb to find definition of *underscorify_keys* method
67
68
  def update_role new_role_hash
68
69
  new_role_hash = new_role_hash.try(:to_hash) || {}
69
70
  new_role = new_role_hash.underscorify_keys
70
- role = to_hash.underscorify_keys.deep_reset
71
+ role = to_hash.underscorify_keys.deep_reset(false)
71
72
  role.deep_merge! new_role
72
- update_attributes(:the_role => role.to_yaml)
73
+ update_attributes(:the_role => role.to_json)
73
74
  end
74
75
 
75
76
  def rule_on section_name, rule_name
@@ -80,7 +81,7 @@ module TheRole
80
81
  return false unless role[section_name].key? rule_name
81
82
  return true if role[section_name][rule_name]
82
83
  role[section_name][rule_name] = true
83
- update_attributes(:the_role => role.to_yaml)
84
+ update_attributes(:the_role => role.to_json)
84
85
  end
85
86
 
86
87
  def rule_off section_name, rule_name
@@ -91,7 +92,7 @@ module TheRole
91
92
  return false unless role[section_name].key? rule_name
92
93
  return true unless role[section_name][rule_name]
93
94
  role[section_name][rule_name] = false
94
- update_attributes(:the_role => role.to_yaml)
95
+ update_attributes(:the_role => role.to_json)
95
96
  end
96
97
 
97
98
  # D
@@ -103,7 +104,7 @@ module TheRole
103
104
  return false if section_name.blank?
104
105
  return false unless role[section_name]
105
106
  role.delete section_name
106
- update_attributes(:the_role => role.to_yaml)
107
+ update_attributes(:the_role => role.to_json)
107
108
  end
108
109
 
109
110
  def delete_rule section_name, rule_name
@@ -113,7 +114,7 @@ module TheRole
113
114
  return false unless role[section_name]
114
115
  return false unless role[section_name].key? rule_name
115
116
  role[section_name].delete rule_name
116
- update_attributes(:the_role => role.to_yaml)
117
+ update_attributes(:the_role => role.to_json)
117
118
  end
118
119
  end
119
120
  end
@@ -0,0 +1,15 @@
1
+ require "active_support/inflector"
2
+
3
+ # TheRole::ParamHelper.prepare 'hello world'
4
+
5
+ module TheRole
6
+ module ParamHelper
7
+ def param_prepare param
8
+ param.to_s.parameterize.underscore
9
+ end
10
+
11
+ def self.prepare param
12
+ param.to_s.parameterize.underscore
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module TheRole
2
- VERSION = "1.5.1"
2
+ VERSION = "1.6.0"
3
3
  end
data/lib/the_role.rb CHANGED
@@ -1,16 +1,18 @@
1
- require "haml"
2
- require "sass"
1
+ require 'haml'
2
+ require 'sass'
3
+ require 'less-rails'
3
4
 
4
- require "the_role/hash"
5
- require "the_role/engine"
6
- require "the_role/version"
7
- require "the_role/the_class_exists"
5
+ require 'the_role/param_helper'
6
+ require 'the_role/hash'
8
7
 
9
- require "the_role/modules/base"
10
- require "the_role/modules/param_helper"
11
- require "the_role/modules/user_model"
12
- require "the_role/modules/role_model"
13
- require "the_role/modules/controller_requires"
8
+ require 'the_role/engine'
9
+ require 'the_role/version'
10
+ require 'the_role/the_class_exists'
11
+
12
+ require 'the_role/modules/base'
13
+ require 'the_role/modules/user_model'
14
+ require 'the_role/modules/role_model'
15
+ require 'the_role/modules/controller_requires'
14
16
 
15
17
  module TheRole
16
18
  # include TheRole::Base
data/pic.png CHANGED
Binary file
data/the_role.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.authors = ["Ilya N. Zykin"]
9
9
  s.email = ["zykin-ilya@ya.ru"]
10
10
  s.homepage = "https://github.com/the-teacher/the_role"
11
- s.summary = %q{TheRole, Role system with Web Interface, aka CanCan killer}
12
- s.description = %q{TheRole, Role system with Web Interface, aka CanCan killer}
11
+ s.summary = %q{Authorization lib for Rails 3 with Web Interface, aka CanCan killer}
12
+ s.description = %q{Authorization lib for Rails 3 with Web Interface, aka CanCan killer}
13
13
 
14
14
  s.rubyforge_project = "the_role"
15
15
 
@@ -22,4 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency 'sass'
23
23
  s.add_dependency 'sass-rails'
24
24
  s.add_dependency 'coffee-rails'
25
+ # less for tw bootstrap
26
+ s.add_dependency 'therubyracer'
27
+ s.add_dependency 'less-rails'
25
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_role
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-05 00:00:00.000000000Z
12
+ date: 2012-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml
16
- requirement: &73560920 !ruby/object:Gem::Requirement
16
+ requirement: &20233640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *73560920
24
+ version_requirements: *20233640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sass
27
- requirement: &73560710 !ruby/object:Gem::Requirement
27
+ requirement: &20327080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *73560710
35
+ version_requirements: *20327080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sass-rails
38
- requirement: &73560500 !ruby/object:Gem::Requirement
38
+ requirement: &20326120 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *73560500
46
+ version_requirements: *20326120
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: coffee-rails
49
- requirement: &73560290 !ruby/object:Gem::Requirement
49
+ requirement: &20324120 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,8 +54,30 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *73560290
58
- description: TheRole, Role system with Web Interface, aka CanCan killer
57
+ version_requirements: *20324120
58
+ - !ruby/object:Gem::Dependency
59
+ name: therubyracer
60
+ requirement: &20323460 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *20323460
69
+ - !ruby/object:Gem::Dependency
70
+ name: less-rails
71
+ requirement: &20322540 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *20322540
80
+ description: Authorization lib for Rails 3 with Web Interface, aka CanCan killer
59
81
  email:
60
82
  - zykin-ilya@ya.ru
61
83
  executables: []
@@ -64,19 +86,39 @@ extra_rdoc_files: []
64
86
  files:
65
87
  - .gitignore
66
88
  - .rvmrc.example
89
+ - Bye_bye_CanCan_I_got_the_Role.png
67
90
  - Gemfile
68
91
  - MIT-LICENSE
69
92
  - README.md
70
93
  - Rakefile
71
- - app/assets/stylesheets/the_role/form.css
72
- - app/assets/stylesheets/the_role/headers.css.scss
73
- - app/assets/stylesheets/the_role/style.css.scss
94
+ - app/assets/javascripts/admin_the_role.js
95
+ - app/assets/javascripts/bootstrap-dropdown.js
96
+ - app/assets/stylesheets/admin_the_role.css
97
+ - app/assets/stylesheets/alerts.less
98
+ - app/assets/stylesheets/button-groups.less
99
+ - app/assets/stylesheets/buttons.less
100
+ - app/assets/stylesheets/custom.scss
101
+ - app/assets/stylesheets/dropdowns.less
102
+ - app/assets/stylesheets/forms.less
103
+ - app/assets/stylesheets/grid.less
104
+ - app/assets/stylesheets/headers.scss
105
+ - app/assets/stylesheets/layouts.less
106
+ - app/assets/stylesheets/mix.scss
107
+ - app/assets/stylesheets/mixins.less
108
+ - app/assets/stylesheets/reset.css
109
+ - app/assets/stylesheets/role_set.less
110
+ - app/assets/stylesheets/scaffolding.less
111
+ - app/assets/stylesheets/variables.less
112
+ - app/assets/stylesheets/wells.less
74
113
  - app/controllers/admin/role_sections_controller.rb
75
114
  - app/controllers/admin/roles_controller.rb
76
115
  - app/views/admin/roles/_form.haml
116
+ - app/views/admin/roles/_role.html.haml
117
+ - app/views/admin/roles/_sidebar.html.haml
77
118
  - app/views/admin/roles/edit.html.haml
78
119
  - app/views/admin/roles/index.haml
79
120
  - app/views/admin/roles/new.html.haml
121
+ - app/views/layouts/the_role.html.haml
80
122
  - config/locales/en.yml
81
123
  - config/locales/ru.yml
82
124
  - config/routes.rb
@@ -87,9 +129,9 @@ files:
87
129
  - lib/the_role/hash.rb
88
130
  - lib/the_role/modules/base.rb
89
131
  - lib/the_role/modules/controller_requires.rb
90
- - lib/the_role/modules/param_helper.rb
91
132
  - lib/the_role/modules/role_model.rb
92
133
  - lib/the_role/modules/user_model.rb
134
+ - lib/the_role/param_helper.rb
93
135
  - lib/the_role/the_class_exists.rb
94
136
  - lib/the_role/version.rb
95
137
  - pic.png
@@ -117,5 +159,5 @@ rubyforge_project: the_role
117
159
  rubygems_version: 1.8.15
118
160
  signing_key:
119
161
  specification_version: 3
120
- summary: TheRole, Role system with Web Interface, aka CanCan killer
162
+ summary: Authorization lib for Rails 3 with Web Interface, aka CanCan killer
121
163
  test_files: []
@@ -1,57 +0,0 @@
1
- .the_role{
2
- .the_form{
3
- background:#EEE;
4
- padding:5px;
5
- margin:0 0 15px 0;
6
- border:2px solid gray;
7
- -moz-border-radius:5px;
8
- }
9
- .the_form label{
10
- display:block;
11
- }
12
- .the_form .input{
13
- border:1px solid #000;
14
- padding:2px 0 2px 5px;
15
- font-size:13pt;
16
- color:DarkBlue;
17
- }
18
- .the_form .textarea{
19
- font-size:13pt;
20
- padding:2px;
21
- }
22
- .the_form .message_textarea{
23
- font-size:13pt;
24
- padding:2px;
25
- border:1px solid black;
26
- height: 200px;
27
- }
28
- .the_form .submit{
29
- font-size:16pt;
30
- }
31
- .article_buttons{
32
- margin:0 0 10px 0;
33
- padding:0 0 5px 0;
34
- border-bottom:1px dashed gray;
35
- }
36
- .article_buttons input{
37
- margin-right:10px;
38
- }
39
- .submit_button{
40
- margin-bottom:10px;
41
- }
42
- .moderation_buttons{
43
- background:silver;
44
- margin:3px 3px 10px 3px;
45
- padding:5px;
46
- border:2px solid blue;
47
- }
48
- .delete_button{
49
- background: none repeat scroll 0 0 lightGrey;
50
- border: 1px dashed gray;
51
- padding: 5px 0;
52
- text-align: right;
53
- }
54
- .delete_button input{
55
- color:Crimson;
56
- }
57
- }
@@ -1,15 +0,0 @@
1
- .the_role{
2
- h1,h2,h3,h4,h5,h6{
3
- font-family: Verdana, Arial;
4
- color:#333;
5
- font-weight:normal;
6
- line-height:100%;
7
- margin-bottom:15px;
8
- }
9
- h1{font-size:3em;}
10
- h2{font-size:2.8em;}
11
- h3{font-size:2.6em;}
12
- h4{font-size:2.4em;}
13
- h5{font-size:2.2em;}
14
- h6{font-size:2em;}
15
- }