el_finder 1.0.15 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -491,8 +491,7 @@ module ElFinder
491
491
 
492
492
  #
493
493
  def tree_for(root)
494
- root.children.
495
- select{ |child| child.directory? }.
494
+ root.child_directories.
496
495
  reject{ |child| @options[:thumbs] && child.to_s == @thumb_directory.to_s }.
497
496
  sort_by{|e| e.basename.to_s.downcase}.
498
497
  map { |child|
@@ -99,6 +99,10 @@ module ElFinder
99
99
  end # of to_s
100
100
  alias_method :to_str, :to_s
101
101
 
102
+ # We cheat and use the ::Pathname to keep this speedy.
103
+ def child_directories(with_directory=true)
104
+ @path.children(with_directory).select{ |child| child.directory? }.map{|e| self.class.new(@root, e)}
105
+ end
102
106
 
103
107
  #
104
108
  def children(with_directory=true)
@@ -1,3 +1,3 @@
1
1
  module ElFinder
2
- VERSION = '1.0.15'
2
+ VERSION = '1.0.16'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: el_finder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 15
10
- version: 1.0.15
9
+ - 16
10
+ version: 1.0.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip Hallstrom
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-02 00:00:00 -07:00
18
+ date: 2011-07-07 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency