yandex_disk 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzJiNjlmZTg4ODAxNDRhM2RkNzE0NDMwNDgxNDgwMzRjZGU3N2EwOQ==
5
- data.tar.gz: !binary |-
6
- NDM5NjVmNmY3N2Q2NjhiMTllNTE4NDFjZjQxNjM2ZWJjMzk5YTc4Yg==
2
+ SHA1:
3
+ metadata.gz: 8b84478a6b95c570c0a7472ca3bf06483839ff15
4
+ data.tar.gz: 99b3ac060efe70d740ba907fb5cd3b0b047a7818
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YWVhZGNkZTg5MmUyMmI0MWNlZmJhZmFlMDY5NjdlYWY3MzYyNDdlMmY5ZDUy
10
- ZWEyOWY0ZWQyY2UzZTRmOGI2MTA5OWFiMzA5YzYxMzJjNTdkOTk5M2M5ZTRj
11
- Yjc5NDliYTVmMWNiYTlkMDJjZDU2YjU0ODQ0OGEwZDcwOTY4MWU=
12
- data.tar.gz: !binary |-
13
- OGU1YTAyZGRkM2MwYWQyY2Q5NzBiYjkxZjE1NWY2YTYwMjU5ZTdjMDA2ODgx
14
- OGNiMWQ4MGI1YTVkMDJlYjA0ZTZhOTQ4YjJlODA5ZjY2MGJjN2FjOTU5MmFj
15
- YzQyZGEwMWJjNDNiMzYwMDkwYzY4NTgzM2VkODZkYWUyNDc1ZWU=
6
+ metadata.gz: ac88a69c0c8d9f57c81c1a53abf2f04fea02f547de7b489d5627723c492e4cef215f2a456cfce748880d7154962bbca4fd99636cba5a971e0a56223b3164d7e7
7
+ data.tar.gz: 4be9b0e57ac2e4119168bfe7f62abc0e46a690f683454a6f0b531653e23d781f1ab8842cd0d163b851cd68411a1fcd256f938f02c57f8be82101c8fb48954ac0
@@ -1,5 +1,6 @@
1
1
  require 'net/http'
2
2
  require 'uri'
3
+ require 'openssl'
3
4
  require 'zlib'
4
5
  require 'base64'
5
6
  require 'rexml/document'
@@ -282,7 +283,8 @@ module YandexDisk
282
283
  # return true if successful
283
284
  def send_request(method, args = {})
284
285
  # headers
285
- headers = {'Authorization' => @token}
286
+ headers = {'Authorization' => @token,
287
+ 'User-Agent' => "Ruby client library v#{YandexDisk::VERSION}"}
286
288
  headers.merge!(args[:headers]) if args[:headers]
287
289
  uri = URI.parse(YandexDisk::API_URL)
288
290
  # path
@@ -1,5 +1,5 @@
1
1
  module YandexDisk
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  HOME_PAGE = 'https://github.com/denwwer/yandex_disk'
4
4
  API_URL = 'https://webdav.yandex.ru'
5
5
  # DON'T TURN ON DEBUG FOR PRODUCTION
@@ -8,9 +8,13 @@ module YandexDisk
8
8
  end
9
9
  end
10
10
 
11
- def read(foo)
11
+ def read(a, b = nil)
12
12
  if @file
13
- @file.read(@size)
13
+ if b
14
+ @file.read(@size, b)
15
+ else
16
+ @file.read(@size)
17
+ end
14
18
  end
15
19
  end
16
20
 
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yandex_disk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Murga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-01 00:00:00.000000000 Z
11
+ date: 2013-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: simplecov
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: fastimage
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: An easy-to-use client library for Yandex Disk API
@@ -77,17 +77,17 @@ require_paths:
77
77
  - lib
78
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 1.9.3
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 2.1.9
90
+ rubygems_version: 2.0.3
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: API for Yandex Disk