flexible_accessibility 0.3.3 → 0.3.4
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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/flexible_accessibility.gemspec +2 -2
- data/lib/flexible_accessibility/utils.rb +7 -5
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'flexible_accessibility'
|
5
|
-
s.version = '0.3.
|
5
|
+
s.version = '0.3.4'
|
6
6
|
s.authors = ['Sergey Avanesov']
|
7
|
-
s.date = '2014-01-
|
7
|
+
s.date = '2014-01-14'
|
8
8
|
s.summary = 'Flexible access control system'
|
9
9
|
s.description = 'Flexible access control system for your rails application. Based on analysis of controller actions'
|
10
10
|
s.email = 'sergey.awanesov@gmail.com'
|
@@ -19,14 +19,16 @@ module FlexibleAccessibility
|
|
19
19
|
private
|
20
20
|
# All controller classes placed in :default scope
|
21
21
|
def app_controllers_recursive(path)
|
22
|
-
(Dir.
|
22
|
+
(Dir.entries(path) - ['..', '.']).each do |entry|
|
23
23
|
if File.directory?(path + entry)
|
24
24
|
app_controllers_recursive(path + entry + '/')
|
25
25
|
else
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
if File.extname(entry) == '.rb'
|
27
|
+
parent_directory = File.dirname(path + entry).split(/\//).last
|
28
|
+
container = parent_directory == 'controllers' ? 'default' : parent_directory
|
29
|
+
@controllers[container.to_sym] ||= []
|
30
|
+
@controllers[container.to_sym] << File.basename(path + entry, '.*') unless File.basename(path + entry, '.*') == 'application_controller'
|
31
|
+
end
|
30
32
|
end
|
31
33
|
end
|
32
34
|
@controllers
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: flexible_accessibility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Sergey Avanesov
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
prerelease: false
|