files.com 1.0.288 → 1.0.289

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: 58866ec2b5f9506d6b6ae2b2ce2ba3aa5939777b5cf463501b18588f6d8ad0ac
4
- data.tar.gz: 9a290f4b1aaf7aa3f54117666c671ecdd33f506b750662eaab1354245172e6e6
3
+ metadata.gz: b5fcedfc3ee2646b9f303e65f2b19fd34f2f06c54474359db9624c6bd1f40214
4
+ data.tar.gz: 8dba97eecfc4c9a4adabbe6bc2518610f39715deed943878d7fb8a436416287b
5
5
  SHA512:
6
- metadata.gz: 28e9e19b3c7f835152e172ede524137bc253c562b2e40eb9398d35a3b209cf3c46e6f6ca2063e022c8118426d155ec7ee4249dbbf38326d804cb90c3eb9d46b5
7
- data.tar.gz: d1d1889dadbab8349a3cecf476656d92ae745337ba1538f2fa346905e86e801724e7a2dc14c6176fdb164f17c4b7f87c55f06f6afa3138dbf405b7b22499f372
6
+ metadata.gz: 87193e5da35ceb31f9b16c4faa318816c6b81895260f690c87587bd1ea15869717ecce7f67b614a4b9709aff67c56296e4d06f94d694e725823aa84030db394c
7
+ data.tar.gz: ff5e07f043dff736004a9312fb8066ad0d2816f64149ac86b24577cdac23cb4faf1e54d9c3ac6b1b3511a54974446000a9d84663a01ce14f68ec30c870fd2214
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.288
1
+ 1.0.289
data/files.com.gemspec CHANGED
@@ -14,9 +14,9 @@ Gem::Specification.new do |s|
14
14
  s.add_dependency 'addressable', ">= 2.8.0"
15
15
  s.add_dependency 'concurrent-ruby', ">= 1.1.3"
16
16
  s.add_dependency 'faraday', ">= 1.0.1"
17
- s.add_dependency 'net-http-persistent', ">= 4.0"
18
- s.add_dependency 'faraday-net_http_persistent', '>= 2.0'
19
17
  s.add_dependency 'faraday-multipart', ">= 1.0"
18
+ s.add_dependency 'faraday-net_http_persistent', '>= 2.0'
19
+ s.add_dependency 'net-http-persistent', ">= 4.0"
20
20
 
21
21
  s.files = `find *`.split("\n").uniq.sort.reject(&:empty?)
22
22
  s.executables = [ "files", "files-console" ]
@@ -161,8 +161,8 @@ module Files
161
161
  response.error! if response.code.to_i >= 300
162
162
  io.ready! if io.respond_to?(:ready!)
163
163
  io << chunk
164
- rescue => e
165
- io.set_error(e) if io.respond_to?(:set_error)
164
+ rescue StandardError => e
165
+ io.do_set_error(e) if io.respond_to?(:do_set_error)
166
166
  io.close
167
167
  end
168
168
  end
@@ -56,7 +56,6 @@ module Files
56
56
  end
57
57
  end
58
58
 
59
-
60
59
  class BadRequestError < APIError; end
61
60
  class AttachmentTooLargeError < BadRequestError; end
62
61
  class CannotDownloadDirectoryError < BadRequestError; end
@@ -25,10 +25,6 @@ module Files
25
25
  options[:client] || ApiClient.active_client
26
26
  end
27
27
 
28
- def self.copy(old_path, new_path)
29
- FileAction.copy(old_path, destination: new_path)
30
- end
31
-
32
28
  def self.copy_stream(*_args)
33
29
  raise NotImplementedError
34
30
  end
@@ -57,11 +53,6 @@ module Files
57
53
  exist?(path, options)
58
54
  end
59
55
 
60
- def self.find(path, params = {}, options = {})
61
- params[:action] = "stat"
62
- download(path, params, options)
63
- end
64
-
65
56
  def self.for_fd(*_args)
66
57
  raise NotImplementedError
67
58
  end
@@ -74,10 +65,6 @@ module Files
74
65
  File.find(path)
75
66
  end
76
67
 
77
- def self.get(path, params = {}, options = {})
78
- find(path, params, options)
79
- end
80
-
81
68
  def self.identical?(path1, path2)
82
69
  new(path1).crc32 == new(path2).crc32
83
70
  end
@@ -86,10 +73,6 @@ module Files
86
73
  new(path).stat
87
74
  end
88
75
 
89
- def self.move(old_path, new_path)
90
- FileAction.move(old_path, destination: new_path)
91
- end
92
-
93
76
  def self.mtime(path)
94
77
  new(path).mtime
95
78
  end
@@ -287,10 +270,6 @@ module Files
287
270
  @write_io.codepoints *args, &block
288
271
  end
289
272
 
290
- def copy(destination)
291
- File.copy(path, destination)
292
- end
293
-
294
273
  def ctime(*_args)
295
274
  mtime
296
275
  end
@@ -430,10 +409,6 @@ module Files
430
409
  stats
431
410
  end
432
411
 
433
- def move(destination)
434
- File.move(path, destination)
435
- end
436
-
437
412
  def mv(destination)
438
413
  File.move(path, destination)
439
414
  end
@@ -12,7 +12,7 @@ module Files
12
12
  read_io.content_length_promise.wait.value
13
13
  end
14
14
 
15
- def wait!(timeout=nil)
15
+ def wait!(timeout = nil)
16
16
  read_io.ready_promise.wait(timeout)
17
17
  error!
18
18
  self
@@ -29,6 +29,7 @@ module Files
29
29
 
30
30
  def close
31
31
  raise @with_error if @with_error
32
+
32
33
  super
33
34
  read_io.content_length_promise.try_set(nil)
34
35
  read_io.ready_promise.try_set(true)
@@ -38,7 +39,7 @@ module Files
38
39
  raise read_io.with_error if read_io.with_error
39
40
  end
40
41
 
41
- def set_error(e)
42
+ def do_set_error(e)
42
43
  read_io.with_error = e
43
44
  end
44
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.288
4
+ version: 1.0.289
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
@@ -53,19 +53,19 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.0.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: net-http-persistent
56
+ name: faraday-multipart
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '4.0'
61
+ version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '4.0'
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: faraday-net_http_persistent
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,19 +81,19 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: faraday-multipart
84
+ name: net-http-persistent
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1.0'
89
+ version: '4.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '1.0'
96
+ version: '4.0'
97
97
  description: The Files.com Ruby client.
98
98
  email:
99
99
  - support@files.com