el_finder 1.0.4 → 1.0.5

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.
@@ -306,7 +306,7 @@ module ElFinder
306
306
  @response[:error] = 'Invalid Parameters' and return unless @target.file? && @current.directory?
307
307
  @response[:error] = 'Access Denied' and return unless perms_for(@target)[:read] == true && perms_for(@current)[:write] == true
308
308
  @response[:error] = 'No extractor available for this file type' and return if (extractor = @options[:extractors][mime_handler.for(@target)]).nil?
309
- cmd = ['cd', @current.shellescape, '&&', extractor.map(&:shellescape), @target.basename.shellescape].flatten.join(' ')
309
+ cmd = ['cd', @current.to_s.shellescape, '&&', extractor.map(&:shellescape), @target.basename.to_s.shellescape].flatten.join(' ')
310
310
  if system(cmd)
311
311
  @params[:tree] = true
312
312
  _open(@current)
@@ -323,7 +323,7 @@ module ElFinder
323
323
  extension = archiver.shift
324
324
  basename = @params[:name] || @targets.first.basename_without_extension
325
325
  archive = ElFinder::Pathname.new_with_root(@root, "#{basename}#{extension}").unique
326
- cmd = ['cd', @current.shellescape, '&&', archiver.map(&:shellescape), archive.shellescape, @targets.map{|t| t.basename.shellescape}].flatten.join(' ')
326
+ cmd = ['cd', @current.to_s.shellescape, '&&', archiver.map(&:shellescape), archive.to_s.shellescape, @targets.map{|t| t.basename.to_s.shellescape}].flatten.join(' ')
327
327
  if system(cmd)
328
328
  @response[:select] = [to_hash(archive)]
329
329
  _open(@current)
@@ -15,11 +15,6 @@ module ElFinder
15
15
  self.class.new(super(*args).to_s)
16
16
  end
17
17
 
18
- #
19
- def shellescape
20
- to_s.shellescape
21
- end
22
-
23
18
  #
24
19
  def rename(to)
25
20
  super(to)
@@ -1,3 +1,3 @@
1
1
  module ElFinder
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
@@ -83,10 +83,6 @@ class TestPathname < Test::Unit::TestCase
83
83
 
84
84
  ################################################################################
85
85
 
86
- def test_shellescape
87
- assert_respond_to ElFinder::Pathname.new_with_root(@vroot, 'foo.txt'), :shellescape
88
- end
89
-
90
86
  def test_basename_without_extension
91
87
  file = ElFinder::Pathname.new_with_root(@vroot, 'foo.txt')
92
88
  assert_respond_to file, :basename_without_extension
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: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 4
10
- version: 1.0.4
9
+ - 5
10
+ version: 1.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip Hallstrom