el_finder 1.1.10 → 1.1.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eea143a3e8aeae3a74506bcce33cbd769b1ddffd
4
+ data.tar.gz: 4f38f1cc2865aec2e9d704cf45fbc571e89223fc
5
+ SHA512:
6
+ metadata.gz: 104a777a29d8fd73709e86aad6cc6401409e075a68c34fc37ecea0b9696835fbf603f8d8851c38ee936a24f3270d60180b15a93c116429930181ed67ab09fbf4
7
+ data.tar.gz: 56ef0f8bd5192cdb089d7d7b9043524d7bad73573eeffde08c223bb041fa7c2f12b0618245ca4932beba38cd4cf5ed7e6a74439d598fc09857f06953f1a2443c
data/README.md CHANGED
@@ -11,9 +11,11 @@ open-source file manager for web, written in JavaScript using jQuery UI.
11
11
 
12
12
  ## Note regarding 2.x API:
13
13
 
14
- FYI, I'm working on a pure 2.x API implementation. Nothing to release yet, and the holidays are in the way,
14
+ 8 months ago I said: FYI, I'm working on a pure 2.x API implementation. Nothing to release yet, and the holidays are in the way,
15
15
  but wanted to "get the word out."
16
16
 
17
+ Today: No update :/
18
+
17
19
  ## Requirements:
18
20
 
19
21
  The gem, by default, relies upon the 'image_size' ruby gem and ImageMagick's 'mogrify' and 'convert' commands.
@@ -132,6 +134,11 @@ on where you installed the various js/css files.
132
134
 
133
135
  * That's it. I think. If not, check out the example rails application at http://github.com/phallstrom/el_finder-rails-example.
134
136
 
137
+ ## Using with very large file systems
138
+
139
+ @gudata added a configuration option to not load child directories. This breaks V1, but if you are using V2
140
+ it should work and speed up the responsiveness quite a bit. To enable it set `:tree_sub_folders` to `false`.
141
+
135
142
  ## License:
136
143
 
137
144
  (The MIT License)
@@ -32,6 +32,7 @@ module ElFinder
32
32
  :thumbs_directory => '.thumbs',
33
33
  :thumbs_size => 48,
34
34
  :thumbs_at_once => 5,
35
+ :tree_sub_folders => true, # list sub/sub folders in the tree
35
36
  }
36
37
 
37
38
  # Initializes new instance.
@@ -551,8 +552,8 @@ module ElFinder
551
552
 
552
553
  #
553
554
  def tree_for(root)
554
- root.child_directories.
555
- reject{ |child|
555
+ root.child_directories(@options[:tree_sub_folders]).
556
+ reject{ |child|
556
557
  ( @options[:thumbs] && child.to_s == @thumb_directory.to_s ) || perms_for(child)[:hidden]
557
558
  }.
558
559
  sort_by{|e| e.basename.to_s.downcase}.
@@ -1,5 +1,5 @@
1
1
  # Represents ElFinder namespace.
2
2
  module ElFinder
3
3
  # Gem version.
4
- VERSION = '1.1.10'
4
+ VERSION = '1.1.11'
5
5
  end
@@ -75,6 +75,27 @@ class TestElFinder < Test::Unit::TestCase
75
75
  assert_equal 'sample.zip', r[:cdc].last[:name]
76
76
  end
77
77
 
78
+ # by default we list the subfolders in the tree
79
+ def test_list_nested_items
80
+ h, r = @elfinder.run(:cmd => 'open', :init => 'true', :target => '', :tree => true)
81
+ assert_equal 1, r[:tree][:dirs].count
82
+ end
83
+
84
+ # trun off loading the subfolders in the tree
85
+ def test_list_root_items
86
+ elfinder = ElFinder::Connector.new({
87
+ :root => @vroot,
88
+ :url => '/elfinder',
89
+ :tree_sub_folders => false,
90
+ :original_filename_method => lambda {|file| File.basename(file.path)}
91
+ })
92
+
93
+ h, r = elfinder.run(:cmd => 'open', :init => 'true', :target => '', :tree => true)
94
+ assert_equal 0, r[:tree][:dirs].count
95
+ end
96
+
97
+
98
+
78
99
  def test_cwd_name_for_root
79
100
  h, r = @elfinder.run(:cmd => 'open', :init => 'true', :target => '')
80
101
  assert r[:cwd][:name], 'Home'
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: el_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
5
- prerelease:
4
+ version: 1.1.11
6
5
  platform: ruby
7
6
  authors:
8
7
  - Philip Hallstrom
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-30 00:00:00.000000000 Z
11
+ date: 2013-12-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: image_size
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.0.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.0.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: yard
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: redcarpet
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -107,28 +100,27 @@ files:
107
100
  homepage: http://github.com/phallstrom/el_finder
108
101
  licenses:
109
102
  - MIT
103
+ metadata: {}
110
104
  post_install_message:
111
105
  rdoc_options: []
112
106
  require_paths:
113
107
  - lib
114
108
  required_ruby_version: !ruby/object:Gem::Requirement
115
- none: false
116
109
  requirements:
117
- - - ! '>='
110
+ - - '>='
118
111
  - !ruby/object:Gem::Version
119
112
  version: '0'
120
113
  required_rubygems_version: !ruby/object:Gem::Requirement
121
- none: false
122
114
  requirements:
123
- - - ! '>='
115
+ - - '>='
124
116
  - !ruby/object:Gem::Version
125
117
  version: '0'
126
118
  requirements:
127
119
  - ImageMagick
128
120
  rubyforge_project: el_finder
129
- rubygems_version: 1.8.24
121
+ rubygems_version: 2.1.11
130
122
  signing_key:
131
- specification_version: 3
123
+ specification_version: 4
132
124
  summary: elFinder server side connector for Ruby.
133
125
  test_files:
134
126
  - test/el_finder/test_image.rb