brick_ftp 1.0.0.beta3 → 1.0.0.beta4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8979b3718a0b1f4f86c6b4e004fc08d06770f368de48078ce8bb77defdcf1526
4
- data.tar.gz: f70e17abc6fba41d18d7b86ba178506a0634845d07e885dcbce0756a833b15fa
3
+ metadata.gz: c6c6b3165a8552b7f0fab3a33fe4b12d2cb2d281a3832e9514ee4bf36944ea8f
4
+ data.tar.gz: 45428e94b811f1f6f851d6bea3ca90236e15c63f88c8f8f75a78e4a99a72f836
5
5
  SHA512:
6
- metadata.gz: 269f884c6e620f1eb20f7d8244c3d43ea992dc6716a44aa77651bdc6f0aedcbf8f0e7769d85a872a33aedf0585907121325e95ce81f8476d1365bc1b76f0f658
7
- data.tar.gz: add28dea4b6053ce155cbcca67276e42c246123594a2d999d359f622f8be2a16600bb9fd31d75e10ccf834fb5840248be41dab29665a70ca9d59c9c5c8d64839
6
+ metadata.gz: 5f1408585f19fff71ee378172c27244cd8cb242f75eb51be193670e891ad2e0e629f471ed34444926024e87a1c3e798997ae23c16fc36a9ca2f97c203837c3a8
7
+ data.tar.gz: 27b295c68abba82e58cea3898316655a51345eb7db1a53cf68e0119466090448fc0930c066374533827e8bc32c41c444c246538d8c692e782520142f1427b42b
@@ -2,10 +2,10 @@ Changelog
2
2
  ====
3
3
 
4
4
 
5
- [unreleased](https://github.com/koshigoe/brick_ftp/compare/v1.0.0.beta...master)
5
+ [unreleased](https://github.com/koshigoe/brick_ftp/compare/v1.0.0.beta4...master)
6
6
  ----
7
7
 
8
- [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v1.0.0.beta...master)
8
+ [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v1.0.0.beta4...master)
9
9
 
10
10
  ### Enhancements:
11
11
 
@@ -14,10 +14,10 @@ Changelog
14
14
  ### Breaking Changes:
15
15
 
16
16
 
17
- [v1.0.0.beta](https://github.com/koshigoe/brick_ftp/compare/v0.8.2...v1.0.0.beta)
17
+ [v1.0.0.beta](https://github.com/koshigoe/brick_ftp/compare/v0.8.2...v1.0.0.beta4)
18
18
  ----
19
19
 
20
- [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v0.8.2...v1.0.0.beta)
20
+ [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v0.8.2...v1.0.0.beta4)
21
21
 
22
22
  ### Enhancements:
23
23
 
@@ -30,13 +30,16 @@ Changelog
30
30
  - [Dropping support for Ruby 2.2](https://github.com/koshigoe/brick_ftp/pull/104)
31
31
  - Set `frozen_string_literal: true`
32
32
  - [#105](https://github.com/koshigoe/brick_ftp/pull/105) Re-design (huge change!)
33
- - Change to RPC like interface
34
- - Only support token authentication
33
+ - Simplyfy
34
+ - Support only token authentication
35
35
  - Remove unuseful implementations
36
36
  - Remove CLI
37
37
  - Remove Webhook
38
38
  - Remove Configuration
39
+ - Remove unnecessary dependencies
39
40
  - etc.
41
+ - [#111](https://github.com/koshigoe/brick_ftp/pull/111) Allow to upload file using `StringIO`
42
+ - ignore `chunk_size:` option if `io` is a `StringIO`
40
43
 
41
44
  [0.8.2](https://github.com/koshigoe/brick_ftp/compare/v0.8.1...v0.8.2)
42
45
  ----
data/README.md CHANGED
@@ -45,8 +45,8 @@ $ bin/console
45
45
 
46
46
  Name | Description
47
47
  --------------------- | -----------
48
- `BRICK_FTP_SUBDOMAIN` | Overwrite default subdomain
49
- `BRICK_FTP_API_KEY` | Overwrite default API key
48
+ `BRICK_FTP_SUBDOMAIN` | Default subdomain
49
+ `BRICK_FTP_API_KEY` | Default API key
50
50
 
51
51
 
52
52
  Development
@@ -30,7 +30,8 @@ module BrickFTP
30
30
  #
31
31
  # @param [String] path Full path of the file or folder. Maximum of 550 characters.
32
32
  # @param [IO] data
33
- # @param [Integer, nil] chunk_size the chunk sizes are required to be between 5 MB and 5 GB
33
+ # @param [Integer, nil] chunk_size the chunk sizes are required to be between 5 MB and 5 GB.
34
+ # This option is ignored if `data` is `StringIO`.
34
35
  # @return [BrickFTP::Types::File] File object
35
36
  #
36
37
  def call(path, data, chunk_size: nil)
@@ -11,8 +11,9 @@ module BrickFTP
11
11
 
12
12
  # Wrap IO object.
13
13
  #
14
- # @param [IO] io an IO object.
14
+ # @param [IO, StringIO] io an IO object.
15
15
  # @param [Integer] chunk_size Size of chunk.
16
+ # This option is ignored if `io` is `StringIO`.
16
17
  #
17
18
  def initialize(io, chunk_size: nil)
18
19
  @io = io
@@ -27,7 +28,7 @@ module BrickFTP
27
28
  def each(&block)
28
29
  return enum_for(__method__) unless block
29
30
 
30
- if chunk_size
31
+ if chunk_size && io.is_a?(IO)
31
32
  each_chunk(&block)
32
33
  else
33
34
  whole(&block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrickFTP
4
- VERSION = '1.0.0.beta3'
4
+ VERSION = '1.0.0.beta4'
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: 1.0.0.beta3
4
+ version: 1.0.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - koshigoe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-25 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  version: 1.3.1
289
289
  requirements: []
290
290
  rubyforge_project:
291
- rubygems_version: 2.7.6
291
+ rubygems_version: 2.7.3
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: BrickFTP's REST API client.