yandex-disk 0.0.3 → 0.0.4

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: 594c2fe0e03043ccfe2c59729a979de1cc17546d
4
- data.tar.gz: ff19ea8d567b6275fce5f8e6df0bd1fff17d87a9
3
+ metadata.gz: 42f0c7884f42dcd37fefa77569a482362dfc6299
4
+ data.tar.gz: 671e00b8bd8266a902c279b358b99d7bb025f648
5
5
  SHA512:
6
- metadata.gz: 40aac5503188a974d66c4d04e7285fd4e9b1f6aee9436e755d34524958409428df61ea483a7125007e2cd90021ac7d511a52175f030020038fe4788386f7ad81
7
- data.tar.gz: b2015ab11b4b1e61a5ac60ade43fcbcdddd4a1784a33fed2adb4c19bffd7287492c6232f4d3bfd9518e519676aba10711d3b6d2510f5fc7cd08874f91e8e02dc
6
+ metadata.gz: 02063f9671ec83c4b79ee08f05c36f908aa79dc683e864a4378362cfac34888faebf02c1046c7c879089790df081c86243ff09132feb136da95873b61209ae50
7
+ data.tar.gz: 14eaa321bc25830b2a9ae6063e0d2b5f420c7638aeebaa892316bf6c5aa558a724add0b247ffb89cad8283683df6f4f4e49151b14ebfae83f7b06a7cd6c0cbc3
@@ -15,7 +15,7 @@ module Backup
15
15
  end
16
16
 
17
17
  def connection
18
- ::Yandex::Disk::Client.new(:access_token => access_token)
18
+ ::Yandex::Disk::Client.new(:access_token => access_token, :timeout => 500)
19
19
  end
20
20
 
21
21
  def transfer!
@@ -8,6 +8,7 @@ module Yandex
8
8
  class Client
9
9
 
10
10
  def initialize options={}
11
+ @timeout = options[:timeout] || 300
11
12
  @http = Faraday.new(:url => 'https://webdav.yandex.ru') do |builder|
12
13
  builder.request :authorization, "OAuth", options[:access_token]
13
14
 
@@ -86,6 +87,7 @@ module Yandex
86
87
  @http.put do |req|
87
88
  req.url dest
88
89
  req.headers['Content-Type'] = 'application/binary'
90
+ req.options[:timeout] = @timeout
89
91
  req.body = Faraday::UploadIO.new(src, '')
90
92
  end
91
93
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yandex
4
4
  module Disk
5
- VERSION = "0.0.3"
5
+ VERSION = "0.0.4"
6
6
  end
7
7
  end
@@ -18,7 +18,7 @@ class YandexDiskTest < MiniTest::Unit::TestCase
18
18
  end
19
19
 
20
20
  # def test_put_large_file
21
- # assert @disk.put('large-file.psd', '/large-file.psd')
21
+ # assert @disk.put('large-file.mov', '/large-file.mov')
22
22
  # end
23
23
 
24
24
  def test_put!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yandex-disk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Korolev