brick_ftp 0.5.0 → 0.5.1

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
  SHA1:
3
- metadata.gz: 67e27256028d06b5cb9167defaf94070389e78c7
4
- data.tar.gz: 5375380bdd23e8bb8c9e06fe40269783e360ae0b
3
+ metadata.gz: a234ab93a2769cded17e32e1eb09693ba4cb488f
4
+ data.tar.gz: 0c546aa7972b3138965444c8c6c35a483640b099
5
5
  SHA512:
6
- metadata.gz: 9120b3055417d1a7980ed09330934f89eab65f78a767a488662d8abcf022bea2b29945c09e706bbbfbd10427545c7eda980ea24f901fb60707a34f6873f1d221
7
- data.tar.gz: d35bb41e786805d6006bfa3ccf3685cbdf8db0e1398bd525d21bf8e5e6ba817d9e98dc4c7719582086488b92a85e20fb430568941da91e09fea536511f40eae6
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.0...master)
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
  ----
@@ -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
@@ -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 [String] path for source file.
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)
@@ -1,3 +1,3 @@
1
1
  module BrickFTP
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  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: 0.5.0
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-11 00:00:00.000000000 Z
11
+ date: 2017-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler