flexible_accessibility 0.2.99.pre → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +23 -0
- data/Gemfile +1 -12
- data/Gemfile.lock +22 -20
- data/LICENSE.txt +1 -1
- data/README.md +7 -2
- data/Rakefile +3 -25
- data/flexible_accessibility.gemspec +11 -56
- data/lib/flexible_accessibility/controller_methods.rb +33 -22
- data/lib/flexible_accessibility/exceptions.rb +12 -1
- data/lib/flexible_accessibility/filters.rb +12 -10
- data/lib/flexible_accessibility/permission.rb +3 -3
- data/lib/flexible_accessibility/resource.rb +1 -1
- data/lib/flexible_accessibility/utils.rb +4 -4
- metadata +79 -111
- data/.rvmrc +0 -1
- data/README.rdoc +0 -18
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
*.sublime-project
|
6
|
+
*.sublime-workspace
|
7
|
+
coverage
|
8
|
+
InstalledFiles
|
9
|
+
lib/bundler/man
|
10
|
+
pkg
|
11
|
+
rdoc
|
12
|
+
spec/reports
|
13
|
+
test/tmp
|
14
|
+
test/version_tmp
|
15
|
+
tmp
|
16
|
+
.rvmrc
|
17
|
+
.DS_Store
|
18
|
+
.idea
|
19
|
+
|
20
|
+
# YARD artifacts
|
21
|
+
.yardoc
|
22
|
+
_yardoc
|
23
|
+
doc/
|
data/Gemfile
CHANGED
@@ -1,14 +1,3 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
|
-
|
3
|
-
# Example:
|
4
|
-
# gem "activesupport", ">= 2.3.5"
|
2
|
+
gemspec
|
5
3
|
|
6
|
-
# Add dependencies to develop your gem here.
|
7
|
-
# Include everything needed to run rake, tests, features, etc.
|
8
|
-
group :development do
|
9
|
-
gem "shoulda", ">= 0"
|
10
|
-
gem "rdoc", "~> 3.12"
|
11
|
-
gem "bundler", "~> 1.0.0"
|
12
|
-
gem "jeweler", "~> 1.8.3"
|
13
|
-
gem "rcov", ">= 0"
|
14
|
-
end
|
data/Gemfile.lock
CHANGED
@@ -1,29 +1,31 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
flexible_accessibility (0.3.0)
|
5
|
+
|
1
6
|
GEM
|
2
7
|
remote: http://rubygems.org/
|
3
8
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
rake
|
9
|
-
rdoc
|
10
|
-
json (1.7.3)
|
11
|
-
rake (0.9.2.2)
|
12
|
-
rcov (1.0.0)
|
13
|
-
rdoc (3.12)
|
9
|
+
diff-lcs (1.2.4)
|
10
|
+
i18n (0.6.5)
|
11
|
+
json (1.8.0)
|
12
|
+
rdoc (4.0.1)
|
14
13
|
json (~> 1.4)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
rspec (2.14.1)
|
15
|
+
rspec-core (~> 2.14.0)
|
16
|
+
rspec-expectations (~> 2.14.0)
|
17
|
+
rspec-mocks (~> 2.14.0)
|
18
|
+
rspec-core (2.14.5)
|
19
|
+
rspec-expectations (2.14.2)
|
20
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
21
|
+
rspec-mocks (2.14.3)
|
20
22
|
|
21
23
|
PLATFORMS
|
22
24
|
ruby
|
23
25
|
|
24
26
|
DEPENDENCIES
|
25
|
-
bundler
|
26
|
-
|
27
|
-
|
28
|
-
rdoc
|
29
|
-
|
27
|
+
bundler
|
28
|
+
flexible_accessibility!
|
29
|
+
i18n
|
30
|
+
rdoc
|
31
|
+
rspec
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -9,5 +9,10 @@ Installation:
|
|
9
9
|
or add to your Gemfile
|
10
10
|
|
11
11
|
gem "flexible_accessibility", "~> 0.3.0"
|
12
|
-
|
13
|
-
======================
|
12
|
+
|
13
|
+
======================
|
14
|
+
|
15
|
+
## Copyright
|
16
|
+
Copyright (c) 2012 Sergey Awanesov and 7 Pikes, Inc.
|
17
|
+
|
18
|
+
![7pikes logo](https://github.com/7Pikes/flexible_accessibility/wiki/Logo.png)
|
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'bundler'
|
5
|
+
|
5
6
|
begin
|
6
7
|
Bundler.setup(:default, :development)
|
7
8
|
rescue Bundler::BundlerError => e
|
@@ -11,21 +12,6 @@ rescue Bundler::BundlerError => e
|
|
11
12
|
end
|
12
13
|
require 'rake'
|
13
14
|
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "flexible_accessibility"
|
18
|
-
gem.version = "0.2.99.pre"
|
19
|
-
gem.homepage = "http://github.com/mochnatiy/flexible_accessibility"
|
20
|
-
gem.license = "MIT"
|
21
|
-
gem.summary = %Q{Flexible access control system}
|
22
|
-
gem.description = %Q{Flexible access control system for your rails application. Based on analysis of controller actions}
|
23
|
-
gem.email = "sergey.awanesov@gmail.com"
|
24
|
-
gem.authors = ["Sergey Awanesov"]
|
25
|
-
# dependencies defined in Gemfile
|
26
|
-
end
|
27
|
-
Jeweler::RubygemsDotOrgTasks.new
|
28
|
-
|
29
15
|
require 'rake/testtask'
|
30
16
|
Rake::TestTask.new(:test) do |test|
|
31
17
|
test.libs << 'lib' << 'test'
|
@@ -33,16 +19,6 @@ Rake::TestTask.new(:test) do |test|
|
|
33
19
|
test.verbose = true
|
34
20
|
end
|
35
21
|
|
36
|
-
require 'rcov/rcovtask'
|
37
|
-
Rcov::RcovTask.new do |test|
|
38
|
-
test.libs << 'test'
|
39
|
-
test.pattern = 'test/**/test_*.rb'
|
40
|
-
test.verbose = true
|
41
|
-
test.rcov_opts << '--exclude "gems/*"'
|
42
|
-
end
|
43
|
-
|
44
|
-
task :default => :test
|
45
|
-
|
46
22
|
require 'rdoc/task'
|
47
23
|
Rake::RDocTask.new do |rdoc|
|
48
24
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
@@ -51,3 +27,5 @@ Rake::RDocTask.new do |rdoc|
|
|
51
27
|
rdoc.rdoc_files.include('README*')
|
52
28
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
29
|
end
|
30
|
+
|
31
|
+
task :default => :test
|
@@ -1,70 +1,25 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
5
2
|
|
6
3
|
Gem::Specification.new do |s|
|
7
4
|
s.name = "flexible_accessibility"
|
8
|
-
s.version = "0.
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
5
|
+
s.version = "0.3.0"
|
11
6
|
s.authors = ["Sergey Awanesov"]
|
12
7
|
s.date = "2012-09-05"
|
8
|
+
s.summary = "Flexible access control system"
|
13
9
|
s.description = "Flexible access control system for your rails application. Based on analysis of controller actions"
|
14
10
|
s.email = "sergey.awanesov@gmail.com"
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.md",
|
18
|
-
"README.rdoc"
|
19
|
-
]
|
20
|
-
s.files = [
|
21
|
-
".rvmrc",
|
22
|
-
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
|
-
"LICENSE.txt",
|
25
|
-
"README.md",
|
26
|
-
"README.rdoc",
|
27
|
-
"Rakefile",
|
28
|
-
"flexible_accessibility.gemspec",
|
29
|
-
"init.rb",
|
30
|
-
"lib/flexible_accessibility.rb",
|
31
|
-
"lib/flexible_accessibility/controller_methods.rb",
|
32
|
-
"lib/flexible_accessibility/exceptions.rb",
|
33
|
-
"lib/flexible_accessibility/filters.rb",
|
34
|
-
"lib/flexible_accessibility/permission.rb",
|
35
|
-
"lib/flexible_accessibility/resource.rb",
|
36
|
-
"lib/flexible_accessibility/utils.rb",
|
37
|
-
"test/helper.rb",
|
38
|
-
"test/test_flexible_accessibility.rb"
|
39
|
-
]
|
40
11
|
s.homepage = "http://github.com/mochnatiy/flexible_accessibility"
|
41
12
|
s.licenses = ["MIT"]
|
42
13
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = "1.8.24"
|
44
|
-
s.summary = "Flexible access control system"
|
45
14
|
|
46
|
-
|
47
|
-
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
48
17
|
|
49
|
-
|
50
|
-
|
51
|
-
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
52
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
53
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
54
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
55
|
-
else
|
56
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
57
|
-
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
58
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
59
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
60
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
61
|
-
end
|
62
|
-
else
|
63
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
64
|
-
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
65
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
66
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
67
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
68
|
-
end
|
69
|
-
end
|
18
|
+
s.rubygems_version = "1.8.24"
|
19
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
70
20
|
|
21
|
+
s.add_development_dependency 'i18n'
|
22
|
+
s.add_development_dependency 'rdoc'
|
23
|
+
s.add_development_dependency 'rspec'
|
24
|
+
s.add_development_dependency 'bundler'
|
25
|
+
end
|
@@ -2,42 +2,53 @@ module FlexibleAccessibility
|
|
2
2
|
module ControllerMethods
|
3
3
|
module ClassMethods
|
4
4
|
|
5
|
-
# Macro for
|
6
|
-
def
|
7
|
-
|
8
|
-
self.instance_variable_set
|
5
|
+
# Macro for define actions without authorization
|
6
|
+
def skip_authorization(args={})
|
7
|
+
valid_arguments = parse_and_validate_arguments(args)
|
8
|
+
self.instance_variable_set(:@_non_verifiable_routes, self.action_methods) if valid_arguments[:all]
|
9
|
+
self.instance_variable_set(:@_non_verifiable_routes, valid_arguments[:on]) unless valid_arguments[:on].nil?
|
10
|
+
self.instance_variable_set(:@_verifiable_routes, [])
|
9
11
|
end
|
10
12
|
|
11
|
-
# Macro for define authorization
|
12
|
-
def authorize
|
13
|
-
|
14
|
-
|
13
|
+
# Macro for define actions with authorization
|
14
|
+
def authorize(args={})
|
15
|
+
valid_arguments = parse_and_validate_arguments(args)
|
16
|
+
self.instance_variable_set(:@_verifiable_routes, valid_arguments[:only]) unless valid_arguments[:only].nil?
|
17
|
+
self.instance_variable_set(:@_verifiable_routes, self.action_methods - valid_arguments[:except]) unless valid_arguments[:except].nil?
|
18
|
+
self.instance_variable_set(:@_verifiable_routes, self.action_methods) if valid_arguments[:all]
|
19
|
+
self.instance_variable_set(:@_non_verifiable_routes, [])
|
15
20
|
end
|
16
21
|
|
17
22
|
private
|
18
|
-
#
|
19
|
-
def
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
+
# Parse arguments from macro calls
|
24
|
+
def parse_and_validate_arguments(args={})
|
25
|
+
result = {}
|
26
|
+
(result[:all] = true) and return result if args.to_s == "all" || args.to_s == "everywhere"
|
27
|
+
[:on, :only, :except].each do |key|
|
28
|
+
unless args[key].nil?
|
29
|
+
raise ActionsValueException unless args[key].instance_of?(Array)
|
30
|
+
result[key] = args[key].map!{ |v| v.to_s }.to_set
|
31
|
+
end
|
32
|
+
end
|
33
|
+
result
|
23
34
|
end
|
24
35
|
end
|
25
36
|
|
26
|
-
# Callback
|
27
|
-
def self.included
|
28
|
-
base.extend
|
29
|
-
base.helper_method
|
37
|
+
# Callback is needed for include methods and define helper method
|
38
|
+
def self.included(base)
|
39
|
+
base.extend(ClassMethods)
|
40
|
+
base.helper_method(:has_access?)
|
30
41
|
end
|
31
42
|
|
32
|
-
#
|
33
|
-
def has_access?
|
34
|
-
Permission.is_action_permitted_for_user?
|
43
|
+
# Check the url for each link in view to show it
|
44
|
+
def has_access?(permission, user)
|
45
|
+
Permission.is_action_permitted_for_user?(permission, user)
|
35
46
|
end
|
36
47
|
end
|
37
48
|
end
|
38
49
|
|
39
|
-
#
|
40
|
-
if defined?
|
50
|
+
# Include methods in ActionController::Base
|
51
|
+
if defined?(ActionController::Base)
|
41
52
|
ActionController::Base.class_eval do
|
42
53
|
include FlexibleAccessibility::ControllerMethods
|
43
54
|
end
|
@@ -43,4 +43,15 @@ module FlexibleAccessibility
|
|
43
43
|
"Current user is not logged in"
|
44
44
|
end
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
|
+
class ActionsValueException < FlexibleAccessibilityException
|
48
|
+
private
|
49
|
+
def message
|
50
|
+
I18n.t('flexible_accessibility.errors.incorrect_value_of_actions')
|
51
|
+
end
|
52
|
+
|
53
|
+
def default_message
|
54
|
+
"The value of any 'authorize' macro argument should be declared as Array"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -3,8 +3,8 @@ module FlexibleAccessibility
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
append_before_filter
|
7
|
-
append_before_filter
|
6
|
+
append_before_filter(:check_permission_to_route)
|
7
|
+
append_before_filter(:check_if_route_is_permitted)
|
8
8
|
end
|
9
9
|
|
10
10
|
private
|
@@ -22,24 +22,26 @@ module FlexibleAccessibility
|
|
22
22
|
def current_route
|
23
23
|
"#{current_resource}##{current_action}"
|
24
24
|
end
|
25
|
-
|
26
|
-
#
|
25
|
+
|
26
|
+
# We checks access to route and we expected the existing of current_user helper
|
27
27
|
def check_permission_to_route
|
28
|
-
if self.class.instance_variable_get(:@
|
28
|
+
if self.class.instance_variable_get(:@_verifiable_routes).include? current_action
|
29
29
|
raise UserNotLoggedInException.new(current_route, nil) if current_user.nil?
|
30
|
-
self.class.instance_variable_set
|
30
|
+
self.class.instance_variable_set(:@_route_permitted, Permission.is_action_permitted_for_user?(current_route, current_user))
|
31
|
+
elsif self.class.instance_variable_get(:@_non_verifiable_routes).include? current_action
|
32
|
+
self.class.instance_variable_set(:@_route_permitted, true)
|
31
33
|
else
|
32
|
-
self.class.instance_variable_set
|
34
|
+
self.class.instance_variable_set(:@_route_permitted, false)
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
36
38
|
# We checks @authorized variable state
|
37
|
-
def
|
38
|
-
raise AccessDeniedException.new(current_route, nil) unless self.class.instance_variable_get
|
39
|
+
def check_if_route_is_permitted
|
40
|
+
raise AccessDeniedException.new(current_route, nil) unless self.class.instance_variable_get(:@_route_permitted)
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
42
44
|
ActiveSupport.on_load(:action_controller) do
|
43
45
|
ActionController::Base.send(:include, Filters)
|
44
46
|
end
|
45
|
-
end
|
47
|
+
end
|
@@ -3,7 +3,7 @@ module FlexibleAccessibility
|
|
3
3
|
attr_reader :resource
|
4
4
|
attr_reader :actions
|
5
5
|
|
6
|
-
def initialize
|
6
|
+
def initialize(args={})
|
7
7
|
@resource = args[:resource]
|
8
8
|
@actions = args[:actions]
|
9
9
|
end
|
@@ -24,14 +24,14 @@ module FlexibleAccessibility
|
|
24
24
|
namespace = scope.first.to_s
|
25
25
|
scope.last.each do |resource|
|
26
26
|
resource = "#{namespace}/#{resource}" unless namespace == "default"
|
27
|
-
permissions << Permission.new(:resource => resource.gsub(/_controller/, ""), :actions => ApplicationResource.new(resource).klass.instance_variable_get(:@
|
27
|
+
permissions << Permission.new(:resource => resource.gsub(/_controller/, ""), :actions => ApplicationResource.new(resource).klass.instance_variable_get(:@_verifiable_routes))
|
28
28
|
end
|
29
29
|
end
|
30
30
|
permissions
|
31
31
|
end
|
32
32
|
|
33
33
|
def is_action_permitted? permission
|
34
|
-
self.is_action_permitted_for_user?
|
34
|
+
self.is_action_permitted_for_user?(permission, current_user)
|
35
35
|
end
|
36
36
|
|
37
37
|
def is_action_permitted_for_user? permission, user
|
@@ -3,7 +3,7 @@ module FlexibleAccessibility
|
|
3
3
|
attr_reader :controller
|
4
4
|
attr_reader :namespace
|
5
5
|
|
6
|
-
def initialize
|
6
|
+
def initialize(resource_string)
|
7
7
|
@controller = resource_string.split("/").last
|
8
8
|
@namespace = resource_string.split("/").first == @controller ? "default" : resource_string.split("/").first
|
9
9
|
end
|
@@ -6,14 +6,14 @@ module FlexibleAccessibility
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def get_controllers
|
9
|
-
get_controllers_recursive
|
9
|
+
get_controllers_recursive(@path)
|
10
10
|
end
|
11
11
|
|
12
12
|
# All controller clases placed in :default scope
|
13
|
-
def get_controllers_recursive
|
13
|
+
def get_controllers_recursive(path)
|
14
14
|
(Dir.new(path).entries - ["..", "."]).each do |entry|
|
15
|
-
if File.directory?
|
16
|
-
get_controllers_recursive
|
15
|
+
if File.directory?(path + entry)
|
16
|
+
get_controllers_recursive(path + entry + '/')
|
17
17
|
else
|
18
18
|
parent_directory = File.dirname(path + entry).split(/\//).last
|
19
19
|
container = parent_directory == "controllers" ? "default" : parent_directory
|
metadata
CHANGED
@@ -1,115 +1,92 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexible_accessibility
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 99
|
10
|
-
- pre
|
11
|
-
version: 0.2.99.pre
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.3.0
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Sergey Awanesov
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
-
none: false
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
hash: 3
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
version: "0"
|
31
|
-
version_requirements: *id001
|
32
|
-
name: shoulda
|
12
|
+
date: 2012-09-05 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
33
15
|
prerelease: false
|
34
16
|
type: :development
|
35
|
-
|
36
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
37
18
|
none: false
|
38
|
-
requirements:
|
39
|
-
- -
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
|
42
|
-
|
43
|
-
- 3
|
44
|
-
- 12
|
45
|
-
version: "3.12"
|
46
|
-
version_requirements: *id002
|
47
|
-
name: rdoc
|
48
|
-
prerelease: false
|
49
|
-
type: :development
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
24
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
- 0
|
60
|
-
- 0
|
61
|
-
version: 1.0.0
|
62
|
-
version_requirements: *id003
|
63
|
-
name: bundler
|
25
|
+
requirements:
|
26
|
+
- - ! '>='
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
name: i18n
|
30
|
+
- !ruby/object:Gem::Dependency
|
64
31
|
prerelease: false
|
65
32
|
type: :development
|
66
|
-
|
67
|
-
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
40
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
- 8
|
76
|
-
- 3
|
77
|
-
version: 1.8.3
|
78
|
-
version_requirements: *id004
|
79
|
-
name: jeweler
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
name: rdoc
|
46
|
+
- !ruby/object:Gem::Dependency
|
80
47
|
prerelease: false
|
81
48
|
type: :development
|
82
|
-
|
83
|
-
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
56
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
version: "0"
|
92
|
-
version_requirements: *id005
|
93
|
-
name: rcov
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
name: rspec
|
62
|
+
- !ruby/object:Gem::Dependency
|
94
63
|
prerelease: false
|
95
64
|
type: :development
|
96
|
-
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
name: bundler
|
78
|
+
description: Flexible access control system for your rails application. Based on analysis
|
79
|
+
of controller actions
|
97
80
|
email: sergey.awanesov@gmail.com
|
98
81
|
executables: []
|
99
|
-
|
100
82
|
extensions: []
|
101
|
-
|
102
|
-
|
103
|
-
-
|
104
|
-
- README.md
|
105
|
-
- README.rdoc
|
106
|
-
files:
|
107
|
-
- .rvmrc
|
83
|
+
extra_rdoc_files: []
|
84
|
+
files:
|
85
|
+
- .gitignore
|
108
86
|
- Gemfile
|
109
87
|
- Gemfile.lock
|
110
88
|
- LICENSE.txt
|
111
89
|
- README.md
|
112
|
-
- README.rdoc
|
113
90
|
- Rakefile
|
114
91
|
- flexible_accessibility.gemspec
|
115
92
|
- init.rb
|
@@ -123,39 +100,30 @@ files:
|
|
123
100
|
- test/helper.rb
|
124
101
|
- test/test_flexible_accessibility.rb
|
125
102
|
homepage: http://github.com/mochnatiy/flexible_accessibility
|
126
|
-
licenses:
|
103
|
+
licenses:
|
127
104
|
- MIT
|
128
105
|
post_install_message:
|
129
106
|
rdoc_options: []
|
130
|
-
|
131
|
-
require_paths:
|
107
|
+
require_paths:
|
132
108
|
- lib
|
133
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
134
110
|
none: false
|
135
|
-
requirements:
|
136
|
-
- -
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
|
139
|
-
|
140
|
-
- 0
|
141
|
-
version: "0"
|
142
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ! '>='
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
116
|
none: false
|
144
|
-
requirements:
|
145
|
-
- -
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
hash: 25
|
148
|
-
segments:
|
149
|
-
- 1
|
150
|
-
- 3
|
151
|
-
- 1
|
117
|
+
requirements:
|
118
|
+
- - ! '>'
|
119
|
+
- !ruby/object:Gem::Version
|
152
120
|
version: 1.3.1
|
153
121
|
requirements: []
|
154
|
-
|
155
122
|
rubyforge_project:
|
156
|
-
rubygems_version: 1.8.
|
123
|
+
rubygems_version: 1.8.23
|
157
124
|
signing_key:
|
158
125
|
specification_version: 3
|
159
126
|
summary: Flexible access control system
|
160
|
-
test_files:
|
161
|
-
|
127
|
+
test_files:
|
128
|
+
- test/helper.rb
|
129
|
+
- test/test_flexible_accessibility.rb
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use 1.8.7
|
data/README.rdoc
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
= flexible_accessibility
|
2
|
-
|
3
|
-
A simple library for setting access rules, based on analysis of current resources (e.g. controllers (with namespaces) and actions) that exists in application.
|
4
|
-
|
5
|
-
== Contributing to flexible_accessibility
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
-
* Fork the project.
|
10
|
-
* Start a feature/bugfix branch.
|
11
|
-
* Commit and push until you are happy with your contribution.
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright (c) 2012 Sergey Awanesov. See LICENSE.txt for further details.
|
18
|
-
|