brick_ftp 0.5.0 → 0.5.1
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 +4 -4
- data/CHANGELOG.md +14 -1
- data/lib/brick_ftp/api/base.rb +7 -1
- data/lib/brick_ftp/client.rb +1 -1
- data/lib/brick_ftp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a234ab93a2769cded17e32e1eb09693ba4cb488f
|
|
4
|
+
data.tar.gz: 0c546aa7972b3138965444c8c6c35a483640b099
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbb6d3f3233ea40ed0cd5934d6b42302b02184c4dd101e7b19c342f124a054ee2c41ffaf2179d9b8e3f28d5d111969a64d969b058576541a0a3b01b9fc86568d
|
|
7
|
+
data.tar.gz: b5027966e98cdfeed34b07b0e1446c72e9bcb972ea00d3500f7378b69e80fda3f2a5fcd63a32b81ce8386dd92a6de5cea78abe0fc0b39d6773ae267af688d204
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,17 @@ Changelog
|
|
|
2
2
|
====
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
[unreleased](https://github.com/koshigoe/brick_ftp/compare/v0.5.
|
|
5
|
+
[unreleased](https://github.com/koshigoe/brick_ftp/compare/v0.5.1...master)
|
|
6
|
+
----
|
|
7
|
+
|
|
8
|
+
[Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v0.5.1...master)
|
|
9
|
+
|
|
10
|
+
### Enhancements:
|
|
11
|
+
|
|
12
|
+
### Fixed Bugs:
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
[v0.5.1](https://github.com/koshigoe/brick_ftp/compare/v0.5.0...v0.5.1)
|
|
6
16
|
----
|
|
7
17
|
|
|
8
18
|
[Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v0.5.0...master)
|
|
@@ -11,6 +21,9 @@ Changelog
|
|
|
11
21
|
|
|
12
22
|
### Fixed Bugs:
|
|
13
23
|
|
|
24
|
+
- [#67](https://github.com/koshigoe/brick_ftp/pull/67) Fix wrong API document.
|
|
25
|
+
- [#69](https://github.com/koshigoe/brick_ftp/pull/69) sanitize instance variable names (fixed by [terencedignon](https://github.com/terencedignon))
|
|
26
|
+
|
|
14
27
|
|
|
15
28
|
[v0.5.0](https://github.com/koshigoe/brick_ftp/compare/v0.4.2...v0.5.0)
|
|
16
29
|
----
|
data/lib/brick_ftp/api/base.rb
CHANGED
|
@@ -40,7 +40,7 @@ module BrickFTP
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def initialize(params = {})
|
|
43
|
-
params.each { |k, v| instance_variable_set(:"@#{k}", v) }
|
|
43
|
+
params.each { |k, v| instance_variable_set(:"@#{sanitize_instance_variable_name(k)}", v) }
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def update(params = {})
|
|
@@ -75,6 +75,12 @@ module BrickFTP
|
|
|
75
75
|
def to_json
|
|
76
76
|
as_json.to_json
|
|
77
77
|
end
|
|
78
|
+
|
|
79
|
+
private
|
|
80
|
+
|
|
81
|
+
def sanitize_instance_variable_name(name)
|
|
82
|
+
name.to_s.gsub(/\W/, '')
|
|
83
|
+
end
|
|
78
84
|
end
|
|
79
85
|
end
|
|
80
86
|
end
|
data/lib/brick_ftp/client.rb
CHANGED
|
@@ -354,7 +354,7 @@ module BrickFTP
|
|
|
354
354
|
# Upload file.
|
|
355
355
|
# @see https://brickftp.com/ja/docs/rest-api/file-uploading/
|
|
356
356
|
# @param path [String]
|
|
357
|
-
# @param source [
|
|
357
|
+
# @param source [IO] source `data` (not `path`) to upload
|
|
358
358
|
# @return [BrickFTP::API::FileUpload]
|
|
359
359
|
def upload_file(path:, source:)
|
|
360
360
|
BrickFTP::API::FileOperation::Upload.create(path: path, source: source)
|
data/lib/brick_ftp/version.rb
CHANGED
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: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- koshigoe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-12-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|