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,51 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://cloud-api.yandex.net/v1/disk/trash/resources?path=/
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:34:55 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, DELETE, 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:34:55 GMT
@@ -1,51 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: put
5
- uri: https://cloud-api.yandex.net/v1/disk/trash/resources/restore?path=trash:/remote_file.txt_ade2b12db666598e14c09a28a55a11cee8ae14e7
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: 201
23
- message: CREATED
24
- headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Wed, 05 Oct 2022 14:23:34 GMT
29
- Content-Type:
30
- - application/json; charset=utf-8
31
- Content-Length:
32
- - '121'
33
- Connection:
34
- - keep-alive
35
- Access-Control-Allow-Methods:
36
- - PUT, 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:23:34 GMT
data/spec/vcr_setup.rb DELETED
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "vcr"
4
- require "webmock"
5
- require "webmock/rspec"
6
- require "addressable/uri"
7
-
8
- VCR.configure do |config|
9
- config.uri_parser = Addressable::URI
10
- config.cassette_library_dir = "spec/vcr"
11
- config.hook_into :webmock
12
- config.configure_rspec_metadata!
13
-
14
- config.filter_sensitive_data("[**********]") {|data|
15
- data.dig(:request, :headers, "Authorization", 0)
16
- }
17
-
18
- config.filter_sensitive_data("omitted") {|data|
19
- data.dig(:response, :headers, "Yandex-Cloud-Request-Id", 0)
20
- }
21
-
22
- config.filter_sensitive_data('{"items":[{"key":"value"}]}') {|data|
23
- data["response"]["body"]
24
- }
25
-
26
- config.before_record do |r|
27
- r.response.body.force_encoding(Encoding::UTF_8)
28
- end
29
-
30
- config.default_cassette_options = {
31
- record: :new_episodes,
32
- re_record_interval: 259_200,
33
- match_requests_on: %i[method uri body]
34
- }
35
- end