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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flexible_accessibility (0.3.3)
4
+ flexible_accessibility (0.3.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/README.md CHANGED
@@ -8,7 +8,7 @@ Installation:
8
8
 
9
9
  or add to your Gemfile
10
10
 
11
- gem 'flexible_accessibility', '0.3.3'
11
+ gem 'flexible_accessibility', '~> 0.3.4'
12
12
 
13
13
  then do
14
14
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'flexible_accessibility'
5
- s.version = '0.3.3'
5
+ s.version = '0.3.4'
6
6
  s.authors = ['Sergey Avanesov']
7
- s.date = '2014-01-08'
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.new(path).entries - ['..', '.']).each do |entry|
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
- parent_directory = File.dirname(path + entry).split(/\//).last
27
- container = parent_directory == 'controllers' ? 'default' : parent_directory
28
- @controllers[container.to_sym] = [] unless @controllers.has_key? container.to_sym
29
- @controllers[container.to_sym] << File.basename(path + entry, '.*') unless File.basename(path + entry, '.*') == 'application_controller'
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.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-08 00:00:00.000000000 Z
12
+ date: 2014-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  prerelease: false