yandex-disk 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +4 -0
- data/lib/yandex/disk/backup/storage.rb +2 -1
- data/lib/yandex/disk/client.rb +5 -0
- data/lib/yandex/disk/client/request.rb +2 -1
- data/lib/yandex/disk/client/request/private.rb +22 -0
- data/lib/yandex/disk/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 49c5fd34870aee8b6a9aabe8569786873e4af046de020a586ca2ec717ffa72ff
|
4
|
+
data.tar.gz: bf7021c848ae080d7750eb0008eb31d841694cbc92dcb777977e98bb6c67b790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b64347722911b99faaaacd9c834f0503b3806327dc85acdc63786b74ea7552515303966529982ee690947060f22190fcf57b4de9e8ff1a65e9188dc24aceab1
|
7
|
+
data.tar.gz: caea7c8100a03a8f4a039f612f3a877a5e42500cdb2993dd7e49e7e92f4ae978baca179edd3093f553f69a1deff9fa4c1c755e1e837d5efa223bb4f80c41b49f
|
data/README.md
CHANGED
@@ -51,6 +51,9 @@ disk.delete('/path/to/remote/file/or/dir') # returns `true` if everything is ok
|
|
51
51
|
# to make folder or file public
|
52
52
|
disk.make_public('/path/to/remote/dir/or/file') # returns hash with public url `=> { :public_url => "https://yadi.sk/i/B98Qjxxx3S5QJc" }` if everything is ok
|
53
53
|
|
54
|
+
# to make folder or file private
|
55
|
+
disk.make_private('/path/to/remote/dir/or/file') # returns true if everything is ok
|
56
|
+
|
54
57
|
# to get quotas
|
55
58
|
disk.space # returns hash like { :quota_available_bytes => 2488943615, :quota_used_bytes => 2488943615 }
|
56
59
|
|
@@ -98,3 +101,4 @@ export YANDEX_DISK_TOKEN=e5d4aaa4ec2246558b510f7fef25b7b1
|
|
98
101
|
|
99
102
|
- [@aishek (Alexandr Borisov)](https://github.com/aishek)
|
100
103
|
- [@ilyario (Пономарев Илья)](https://github.com/ilyario)
|
104
|
+
- [@vivanov77](https://github.com/vivanov77)
|
data/lib/yandex/disk/client.rb
CHANGED
@@ -2,4 +2,5 @@ module Yandex::Disk::Client::Request
|
|
2
2
|
autoload :Space, 'yandex/disk/client/request/space'
|
3
3
|
autoload :List, 'yandex/disk/client/request/list'
|
4
4
|
autoload :Publication, 'yandex/disk/client/request/publication'
|
5
|
-
|
5
|
+
autoload :Private, 'yandex/disk/client/request/private'
|
6
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class Yandex::Disk::Client::Request::Private
|
2
|
+
BODY =
|
3
|
+
'<propertyupdate xmlns="DAV:">
|
4
|
+
<set>
|
5
|
+
<prop>
|
6
|
+
<public_url xmlns="urn:yandex:disk:meta" />
|
7
|
+
</prop>
|
8
|
+
</set>
|
9
|
+
</propertyupdate>'
|
10
|
+
HEADERS = {
|
11
|
+
}
|
12
|
+
|
13
|
+
def initialize http, path
|
14
|
+
@http = http
|
15
|
+
@path = path
|
16
|
+
end
|
17
|
+
|
18
|
+
def perform
|
19
|
+
@http.run_request :proppatch, @path, BODY, HEADERS
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
data/lib/yandex/disk/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Korolev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -113,6 +113,7 @@ files:
|
|
113
113
|
- lib/yandex/disk/client.rb
|
114
114
|
- lib/yandex/disk/client/request.rb
|
115
115
|
- lib/yandex/disk/client/request/list.rb
|
116
|
+
- lib/yandex/disk/client/request/private.rb
|
116
117
|
- lib/yandex/disk/client/request/publication.rb
|
117
118
|
- lib/yandex/disk/client/request/space.rb
|
118
119
|
- lib/yandex/disk/version.rb
|
@@ -138,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
139
|
version: '0'
|
139
140
|
requirements: []
|
140
141
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.7.6
|
142
143
|
signing_key:
|
143
144
|
specification_version: 4
|
144
145
|
summary: Ruby client for Yandex.Disk with backup gem support
|