brick_ftp 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2493a4c45ab215a268d388cb4b90802b854dac43502ed0b354bcf63bbf4e1741
4
- data.tar.gz: 634f7dde30378cf62549413e408531ed9a1a100bbc91513f7895567bea8955ec
3
+ metadata.gz: f89f5228f66c2b5a9b36d711b39ed799d41eb2257106a3306d15f87baff57859
4
+ data.tar.gz: e3e76df6a6829230a55168dd76e82d659967a232d5a19f8cde26ee0686ce3607
5
5
  SHA512:
6
- metadata.gz: 333fa26348ec6154b7820cc2a75eb17a08de0b3d62625a028b9040401761e2545b317f34e64b8a5ed5b327ef5a918eedd32b2f23c7787a0e9f6c29f39efdb0d0
7
- data.tar.gz: 39fec430bfab410417b928663bc9ebd226f981377b4680c2b5008c7b7c42660f3769d20563fc4b6abf5ce40869398da9ca78b2ae78f3a8c467ef5dce361be562
6
+ metadata.gz: a796baec9ec77b321d2856b59efcd7a45ccb665ae23df4cd4d82d1814894de43d4d4502000824ddc2eae00f89440fdaad0a7d7a300e99d0fe8c4930b968a7f30
7
+ data.tar.gz: 1eccf58c09d2ed1dd3c96ebb3ebf3bbae8675b9d5bf076f11793e96746fa7c03fd34e5413e098007a4ec27953755b7cf06780b4d033ad5896a2914b01347df0b
@@ -18,6 +18,20 @@ Files::User.new(params, api_key: 'YOUR_API_KEY')
18
18
  I will archive this repository after found official SDK.
19
19
 
20
20
 
21
+ [v2.0.3](https://github.com/koshigoe/brick_ftp/compare/v2.0.2...v2.0.3)
22
+ ----
23
+
24
+ [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v2.0.2...v2.0.3)
25
+
26
+ ### Enhancements:
27
+
28
+ ### Fixed Bugs:
29
+
30
+ - [#133](https://github.com/koshigoe/brick_ftp/pull/133) Fix to enable to delete folders recursively
31
+
32
+ ### Breaking Changes:
33
+
34
+
21
35
  [v2.0.2](https://github.com/koshigoe/brick_ftp/compare/v2.0.1...v2.0.2)
22
36
  ----
23
37
 
@@ -6,25 +6,23 @@ module BrickFTP
6
6
  module RESTfulAPI
7
7
  # Delete a file or folder
8
8
  #
9
- # @see https://developers.files.com/#delete-a-file-or-folder Delete a file or folder
9
+ # @see https://developers.files.com/#delete-file-folder Delete file/folder
10
10
  #
11
11
  class DeleteFolder
12
12
  include Command
13
13
 
14
14
  # Deletes a file or folder.
15
15
  #
16
- # Note that this operation works for both files and folders, but normally it will only work on empty folders.
17
- # If you want to recursively delete a folder and all its contents, send the request with a `Depth` header
18
- # with the value set to `infinity`.
16
+ # > If true, will recursively delete folers. Otherwise, will error on non-empty folders.
19
17
  #
20
18
  # @param [String] path Full path of the file or folder. Maximum of 550 characters.
21
19
  # @param [Boolean] recursive
22
20
  #
23
21
  def call(path, recursive: false)
24
- headers = {}
25
- headers = { 'Depth' => 'infinity' } if recursive
22
+ url = "/api/rest/v1/files/#{ERB::Util.url_encode(path)}"
23
+ url += '?recursive=true' if recursive
26
24
 
27
- client.delete("/api/rest/v1/files/#{ERB::Util.url_encode(path)}", headers)
25
+ client.delete(url)
28
26
  true
29
27
  end
30
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrickFTP
4
- VERSION = '2.0.2'
4
+ VERSION = '2.0.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick_ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - koshigoe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-13 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -264,7 +264,7 @@ homepage: https://github.com/koshigoe/brick_ftp
264
264
  licenses:
265
265
  - MIT
266
266
  metadata: {}
267
- post_install_message:
267
+ post_install_message:
268
268
  rdoc_options: []
269
269
  require_paths:
270
270
  - lib
@@ -279,8 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  requirements: []
282
- rubygems_version: 3.1.2
283
- signing_key:
282
+ rubygems_version: 3.1.4
283
+ signing_key:
284
284
  specification_version: 4
285
285
  summary: BrickFTP's REST API client.
286
286
  test_files: []