yadisk-client 1.10.2 → 1.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +14 -0
  3. data/.github/workflows/CI.yml +50 -0
  4. data/Gemfile +0 -9
  5. data/Gemfile.lock +18 -38
  6. data/README.md +12 -3
  7. data/lib/yadisk/resources/disk.rb +5 -6
  8. data/lib/yadisk/version.rb +1 -1
  9. data/yadisk.gemspec +9 -1
  10. metadata +112 -35
  11. data/spec/lib/yadisk/client_spec.rb +0 -19
  12. data/spec/lib/yadisk/disk_spec.rb +0 -226
  13. data/spec/lib/yadisk/errors_spec.rb +0 -16
  14. data/spec/lib/yadisk/operations_spec.rb +0 -23
  15. data/spec/lib/yadisk/public_spec.rb +0 -51
  16. data/spec/lib/yadisk/trash_spec.rb +0 -72
  17. data/spec/spec_helper.rb +0 -24
  18. data/spec/support/cassette_helpers.rb +0 -23
  19. data/spec/test_data/test_file.txt +0 -1
  20. data/spec/vcr/disk/DELETE_delete.yml +0 -50
  21. data/spec/vcr/disk/ERROR_info.yml +0 -48
  22. data/spec/vcr/disk/GET_download.yml +0 -52
  23. data/spec/vcr/disk/GET_get_meta.yml +0 -52
  24. data/spec/vcr/disk/GET_info.yml +0 -52
  25. data/spec/vcr/disk/GET_list_public.yml +0 -52
  26. data/spec/vcr/disk/GET_upload.yml +0 -48
  27. data/spec/vcr/disk/PATCH_update_meta.yml +0 -54
  28. data/spec/vcr/disk/POST_copy.yml +0 -50
  29. data/spec/vcr/disk/POST_move.yml +0 -50
  30. data/spec/vcr/disk/POST_upload_by_url.yml +0 -52
  31. data/spec/vcr/disk/PUT_create_dir.yml +0 -50
  32. data/spec/vcr/disk/PUT_publish.yml +0 -54
  33. data/spec/vcr/disk/PUT_unpublish.yml +0 -54
  34. data/spec/vcr/operations/GET_status.yml +0 -52
  35. data/spec/vcr/trash/DELETE_delete.yml +0 -50
  36. data/spec/vcr/trash/DELETE_delete_error.yml +0 -49
  37. data/spec/vcr/trash/GET_list.yml +0 -51
  38. data/spec/vcr/trash/PUT_restore.yml +0 -51
  39. data/spec/vcr_setup.rb +0 -35
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://cloud-api.yandex.net/v1/disk
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Wed, 05 Oct 2022 14:32:12 GMT
27
- Content-Type:
28
- - application/json; charset=utf-8
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- Vary:
34
- - Accept-Encoding
35
- Access-Control-Allow-Methods:
36
- - GET, OPTIONS
37
- Access-Control-Allow-Credentials:
38
- - 'true'
39
- Yandex-Cloud-Request-Id:
40
- - omitted
41
- Cache-Control:
42
- - no-cache
43
- Access-Control-Allow-Origin:
44
- - "*"
45
- Access-Control-Allow-Headers:
46
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
47
- Authorization
48
- body:
49
- encoding: UTF-8
50
- string: '{"items":[{"key":"value"}]}'
51
- recorded_at: Wed, 05 Oct 2022 14:32:12 GMT
52
- recorded_with: VCR 6.1.0
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://cloud-api.yandex.net/v1/disk/resources/public
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Wed, 05 Oct 2022 14:32:17 GMT
27
- Content-Type:
28
- - application/json; charset=utf-8
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- Vary:
34
- - Accept-Encoding
35
- Access-Control-Allow-Methods:
36
- - GET, OPTIONS
37
- Access-Control-Allow-Credentials:
38
- - 'true'
39
- Yandex-Cloud-Request-Id:
40
- - omitted
41
- Cache-Control:
42
- - no-cache
43
- Access-Control-Allow-Origin:
44
- - "*"
45
- Access-Control-Allow-Headers:
46
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
47
- Authorization
48
- body:
49
- encoding: UTF-8
50
- string: '{"items":[{"key":"value"}]}'
51
- recorded_at: Wed, 05 Oct 2022 14:32:18 GMT
52
- recorded_with: VCR 6.1.0
@@ -1,48 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://cloud-api.yandex.net/v1/disk/resources/upload?path=remote_file.txt
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 409
21
- message: CONFLICT
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Wed, 05 Oct 2022 14:32:12 GMT
27
- Content-Type:
28
- - application/json
29
- Content-Length:
30
- - '177'
31
- Connection:
32
- - keep-alive
33
- Access-Control-Allow-Credentials:
34
- - 'true'
35
- Yandex-Cloud-Request-Id:
36
- - omitted
37
- Cache-Control:
38
- - no-cache
39
- Access-Control-Allow-Origin:
40
- - "*"
41
- Access-Control-Allow-Headers:
42
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
43
- Authorization
44
- body:
45
- encoding: UTF-8
46
- string: '{"items":[{"key":"value"}]}'
47
- recorded_at: Wed, 05 Oct 2022 14:32:12 GMT
48
- recorded_with: VCR 6.1.0
@@ -1,54 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: patch
5
- uri: https://cloud-api.yandex.net/v1/disk/resources?path=remote_file.txt
6
- body:
7
- encoding: UTF-8
8
- string: '{"custom_properties":{"key_one":"value_1","key_two":"value_2"}}'
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Content-Type:
15
- - application/json
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:32:14 GMT
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- Vary:
36
- - Accept-Encoding
37
- Access-Control-Allow-Methods:
38
- - PUT, PATCH, DELETE, GET, OPTIONS
39
- Access-Control-Allow-Credentials:
40
- - 'true'
41
- Yandex-Cloud-Request-Id:
42
- - omitted
43
- Cache-Control:
44
- - no-cache
45
- Access-Control-Allow-Origin:
46
- - "*"
47
- Access-Control-Allow-Headers:
48
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
49
- Authorization
50
- body:
51
- encoding: UTF-8
52
- string: '{"items":[{"key":"value"}]}'
53
- recorded_at: Wed, 05 Oct 2022 14:32:14 GMT
54
- recorded_with: VCR 6.1.0
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://cloud-api.yandex.net/v1/disk/resources/copy?from=remote_file.txt&path=remote_file_copy.txt
6
- body:
7
- encoding: UTF-8
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 409
23
- message: CONFLICT
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:32:16 GMT
29
- Content-Type:
30
- - application/json
31
- Content-Length:
32
- - '187'
33
- Connection:
34
- - keep-alive
35
- Access-Control-Allow-Credentials:
36
- - 'true'
37
- Yandex-Cloud-Request-Id:
38
- - omitted
39
- Cache-Control:
40
- - no-cache
41
- Access-Control-Allow-Origin:
42
- - "*"
43
- Access-Control-Allow-Headers:
44
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
45
- Authorization
46
- body:
47
- encoding: UTF-8
48
- string: '{"items":[{"key":"value"}]}'
49
- recorded_at: Wed, 05 Oct 2022 14:32:16 GMT
50
- recorded_with: VCR 6.1.0
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://cloud-api.yandex.net/v1/disk/resources/move?from=remote_file_copy.txt&path=remote_file_new_name.txt
6
- body:
7
- encoding: UTF-8
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 409
23
- message: CONFLICT
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:32:17 GMT
29
- Content-Type:
30
- - application/json
31
- Content-Length:
32
- - '195'
33
- Connection:
34
- - keep-alive
35
- Access-Control-Allow-Credentials:
36
- - 'true'
37
- Yandex-Cloud-Request-Id:
38
- - omitted
39
- Cache-Control:
40
- - no-cache
41
- Access-Control-Allow-Origin:
42
- - "*"
43
- Access-Control-Allow-Headers:
44
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
45
- Authorization
46
- body:
47
- encoding: UTF-8
48
- string: '{"items":[{"key":"value"}]}'
49
- recorded_at: Wed, 05 Oct 2022 14:32:17 GMT
50
- recorded_with: VCR 6.1.0
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://cloud-api.yandex.net/v1/disk/resources/upload?path=uploaded_by_url.png&url=https://www.example.com/image.png
6
- body:
7
- encoding: UTF-8
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 202
23
- message: ACCEPTED
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:32:13 GMT
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- Content-Length:
32
- - '156'
33
- Connection:
34
- - keep-alive
35
- Access-Control-Allow-Methods:
36
- - PUT, POST, GET, OPTIONS
37
- Access-Control-Allow-Credentials:
38
- - 'true'
39
- Yandex-Cloud-Request-Id:
40
- - omitted
41
- Cache-Control:
42
- - no-cache
43
- Access-Control-Allow-Origin:
44
- - "*"
45
- Access-Control-Allow-Headers:
46
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
47
- Authorization
48
- body:
49
- encoding: UTF-8
50
- string: '{"items":[{"key":"value"}]}'
51
- recorded_at: Wed, 05 Oct 2022 14:32:13 GMT
52
- recorded_with: VCR 6.1.0
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: put
5
- uri: https://cloud-api.yandex.net/v1/disk/resources?path=test_dir
6
- body:
7
- encoding: UTF-8
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 409
23
- message: CONFLICT
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:32:15 GMT
29
- Content-Type:
30
- - application/json
31
- Content-Length:
32
- - '251'
33
- Connection:
34
- - keep-alive
35
- Access-Control-Allow-Credentials:
36
- - 'true'
37
- Yandex-Cloud-Request-Id:
38
- - omitted
39
- Cache-Control:
40
- - no-cache
41
- Access-Control-Allow-Origin:
42
- - "*"
43
- Access-Control-Allow-Headers:
44
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
45
- Authorization
46
- body:
47
- encoding: UTF-8
48
- string: '{"items":[{"key":"value"}]}'
49
- recorded_at: Wed, 05 Oct 2022 14:32:15 GMT
50
- recorded_with: VCR 6.1.0
@@ -1,54 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: put
5
- uri: https://cloud-api.yandex.net/v1/disk/resources/publish?path=remote_file.txt
6
- body:
7
- encoding: UTF-8
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:32:18 GMT
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- Vary:
36
- - Accept-Encoding
37
- Access-Control-Allow-Methods:
38
- - PUT, OPTIONS
39
- Access-Control-Allow-Credentials:
40
- - 'true'
41
- Yandex-Cloud-Request-Id:
42
- - omitted
43
- Cache-Control:
44
- - no-cache
45
- Access-Control-Allow-Origin:
46
- - "*"
47
- Access-Control-Allow-Headers:
48
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
49
- Authorization
50
- body:
51
- encoding: UTF-8
52
- string: '{"items":[{"key":"value"}]}'
53
- recorded_at: Wed, 05 Oct 2022 14:32:18 GMT
54
- recorded_with: VCR 6.1.0
@@ -1,54 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: put
5
- uri: https://cloud-api.yandex.net/v1/disk/resources/unpublish?path=remote_file.txt
6
- body:
7
- encoding: UTF-8
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:32:19 GMT
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- Vary:
36
- - Accept-Encoding
37
- Access-Control-Allow-Methods:
38
- - PUT, OPTIONS
39
- Access-Control-Allow-Credentials:
40
- - 'true'
41
- Yandex-Cloud-Request-Id:
42
- - omitted
43
- Cache-Control:
44
- - no-cache
45
- Access-Control-Allow-Origin:
46
- - "*"
47
- Access-Control-Allow-Headers:
48
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
49
- Authorization
50
- body:
51
- encoding: UTF-8
52
- string: '{"items":[{"key":"value"}]}'
53
- recorded_at: Wed, 05 Oct 2022 14:32:19 GMT
54
- recorded_with: VCR 6.1.0
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://cloud-api.yandex.net/v1/disk/operations/a6e706d94c4adcd17298c1eed06729f9e9217569e6376a51c38de74d8d6367c5
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Mon, 03 Oct 2022 18:41:25 GMT
27
- Content-Type:
28
- - application/json; charset=utf-8
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- Vary:
34
- - Accept-Encoding
35
- Access-Control-Allow-Methods:
36
- - GET, OPTIONS
37
- Access-Control-Allow-Credentials:
38
- - 'true'
39
- Yandex-Cloud-Request-Id:
40
- - omitted
41
- Cache-Control:
42
- - no-cache
43
- Access-Control-Allow-Origin:
44
- - "*"
45
- Access-Control-Allow-Headers:
46
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
47
- Authorization
48
- body:
49
- encoding: UTF-8
50
- string: '{"status":"in-progress"}'
51
- recorded_at: Mon, 03 Oct 2022 18:41:25 GMT
52
- recorded_with: VCR 6.1.0
@@ -1,50 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: delete
5
- uri: https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash:/remote_file.txt_f7fc32168f3b30e60994fd2e82af7d230dab5c91
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 204
21
- message: NO CONTENT
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Wed, 05 Oct 2022 14:34:13 GMT
27
- Content-Type:
28
- - application/json; charset=utf-8
29
- Content-Length:
30
- - '0'
31
- Connection:
32
- - keep-alive
33
- Access-Control-Allow-Methods:
34
- - GET, DELETE, OPTIONS
35
- Access-Control-Allow-Credentials:
36
- - 'true'
37
- Yandex-Cloud-Request-Id:
38
- - omitted
39
- Cache-Control:
40
- - no-cache
41
- Access-Control-Allow-Origin:
42
- - "*"
43
- Access-Control-Allow-Headers:
44
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
45
- Authorization
46
- body:
47
- encoding: UTF-8
48
- string: ''
49
- recorded_at: Wed, 05 Oct 2022 14:34:14 GMT
50
- recorded_with: VCR 6.1.0
@@ -1,49 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: delete
5
- uri: https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash:/remote_file.txt_ade2b12db666598e14c09a28a55a11cee8ae14e7
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v1.10.2
12
- Authorization:
13
- - "[**********]"
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
- response:
19
- status:
20
- code: 404
21
- message: NOT FOUND
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Wed, 05 Oct 2022 14:23:35 GMT
27
- Content-Type:
28
- - application/json
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- Vary:
34
- - Accept-Encoding
35
- Access-Control-Allow-Credentials:
36
- - 'true'
37
- Yandex-Cloud-Request-Id:
38
- - omitted
39
- Cache-Control:
40
- - no-cache
41
- Access-Control-Allow-Origin:
42
- - "*"
43
- Access-Control-Allow-Headers:
44
- - Accept-Language, Accept, X-Uid, X-HTTP-Method, X-Requested-With, Content-Type,
45
- Authorization
46
- body:
47
- encoding: UTF-8
48
- string: '{"items":[{"key":"value"}]}'
49
- recorded_at: Wed, 05 Oct 2022 14:23:35 GMT