uploadcare-rails 1.2.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +5 -16
  3. data/lib/generators/templates/uploadcare_config_template.erb +138 -0
  4. data/lib/generators/uploadcare_config_generator.rb +7 -4
  5. data/lib/uploadcare/errors/type_error.rb +7 -0
  6. data/lib/uploadcare/rails/action_view/uploadcare_include_tags.rb +48 -0
  7. data/lib/uploadcare/rails/action_view/uploadcare_uploader_tags.rb +57 -0
  8. data/lib/uploadcare/rails/active_record/mount_uploadcare_file.rb +62 -0
  9. data/lib/uploadcare/rails/active_record/mount_uploadcare_file_group.rb +58 -0
  10. data/lib/uploadcare/rails/api/rest/base.rb +14 -0
  11. data/lib/uploadcare/rails/api/rest/conversion_api.rb +42 -0
  12. data/lib/uploadcare/rails/api/rest/file_api.rb +69 -0
  13. data/lib/uploadcare/rails/api/rest/group_api.rb +48 -0
  14. data/lib/uploadcare/rails/api/rest/project_api.rb +27 -0
  15. data/lib/uploadcare/rails/api/rest/webhook_api.rb +45 -0
  16. data/lib/uploadcare/rails/api/upload/base.rb +13 -0
  17. data/lib/uploadcare/rails/api/upload/upload_api.rb +53 -0
  18. data/lib/uploadcare/rails/configuration.rb +57 -0
  19. data/lib/uploadcare/rails/engine.rb +13 -17
  20. data/lib/uploadcare/rails/jobs/delete_file_job.rb +14 -0
  21. data/lib/uploadcare/rails/jobs/store_file_job.rb +14 -0
  22. data/lib/uploadcare/rails/jobs/store_group_job.rb +14 -0
  23. data/lib/uploadcare/rails/objects/concerns/loadable.rb +46 -0
  24. data/lib/uploadcare/rails/objects/file.rb +40 -20
  25. data/lib/uploadcare/rails/objects/group.rb +51 -57
  26. data/lib/uploadcare/rails/services/files_count_extractor.rb +14 -0
  27. data/lib/uploadcare/rails/services/id_extractor.rb +15 -0
  28. data/lib/uploadcare/rails/transformations/image_transformations.rb +45 -0
  29. data/lib/uploadcare/rails/version.rb +3 -1
  30. data/lib/uploadcare/rails.rb +10 -0
  31. data/lib/uploadcare-rails.rb +27 -16
  32. data/spec/fixtures/kitten.jpeg +0 -0
  33. data/spec/fixtures/vcr_cassettes/conversion_api_convert_document.yml +62 -0
  34. data/spec/fixtures/vcr_cassettes/conversion_api_convert_document_with_error.yml +62 -0
  35. data/spec/fixtures/vcr_cassettes/conversion_api_convert_video.yml +62 -0
  36. data/spec/fixtures/vcr_cassettes/conversion_api_convert_video_with_error.yml +62 -0
  37. data/spec/fixtures/vcr_cassettes/conversion_api_get_document_conversion_status.yml +59 -0
  38. data/spec/fixtures/vcr_cassettes/conversion_api_get_video_conversion_status.yml +59 -0
  39. data/spec/fixtures/vcr_cassettes/file_api_copy_file.yml +60 -0
  40. data/spec/fixtures/vcr_cassettes/file_api_delete_file.yml +58 -0
  41. data/spec/fixtures/vcr_cassettes/file_api_delete_files.yml +58 -0
  42. data/spec/fixtures/vcr_cassettes/file_api_get_file.yml +58 -0
  43. data/spec/fixtures/vcr_cassettes/file_api_get_files.yml +61 -0
  44. data/spec/fixtures/vcr_cassettes/file_api_load_file.yml +57 -0
  45. data/spec/fixtures/vcr_cassettes/file_api_store_file.yml +58 -0
  46. data/spec/fixtures/vcr_cassettes/file_api_store_files.yml +57 -0
  47. data/spec/fixtures/vcr_cassettes/group_api_create_group.yml +57 -0
  48. data/spec/fixtures/vcr_cassettes/group_api_get_group.yml +52 -0
  49. data/spec/fixtures/vcr_cassettes/group_api_get_groups.yml +57 -0
  50. data/spec/fixtures/vcr_cassettes/group_api_store_group.yml +57 -0
  51. data/spec/fixtures/vcr_cassettes/project_api_get_project.yml +59 -0
  52. data/spec/fixtures/vcr_cassettes/upload_upload_many_files.yml +55 -0
  53. data/spec/fixtures/vcr_cassettes/upload_upload_one_file.yml +105 -0
  54. data/spec/fixtures/vcr_cassettes/upload_upload_one_file_from_cdn.yml +111 -0
  55. data/spec/fixtures/vcr_cassettes/webhook_api_create_webhook.yml +59 -0
  56. data/spec/fixtures/vcr_cassettes/webhook_api_delete_webhook.yml +57 -0
  57. data/spec/fixtures/vcr_cassettes/webhook_api_get_webhooks.yml +59 -0
  58. data/spec/fixtures/vcr_cassettes/webhook_api_update_webhook.yml +59 -0
  59. data/spec/generators/uploadcare_config_generator_spec.rb +18 -26
  60. data/spec/spec_helper.rb +17 -69
  61. data/spec/support/generators.rb +8 -5
  62. data/spec/support/vcr.rb +14 -0
  63. data/spec/tmp/config/initializers/uploadcare.rb +138 -0
  64. data/spec/uploadcare/rails/action_view/uploadcare_uploader_tags_spec.rb +40 -0
  65. data/spec/uploadcare/rails/action_view/uploadcare_widget_tags_spec.rb +46 -0
  66. data/spec/uploadcare/rails/active_record/mount_uploadcare_file_spec.rb +33 -0
  67. data/spec/uploadcare/rails/active_record/mount_uploadcare_group_spec.rb +32 -0
  68. data/spec/uploadcare/rails/api/rest/conversion_api_spec.rb +110 -0
  69. data/spec/uploadcare/rails/api/rest/file_api_spec.rb +85 -0
  70. data/spec/uploadcare/rails/api/rest/group_api_spec.rb +61 -0
  71. data/spec/uploadcare/rails/api/rest/project_api_spec.rb +33 -0
  72. data/spec/uploadcare/rails/api/rest/webhook_api_spec.rb +59 -0
  73. data/spec/uploadcare/rails/api/upload/upload_api_spec.rb +82 -0
  74. data/spec/uploadcare/rails/jobs/delete_file_job_spec.rb +15 -0
  75. data/spec/uploadcare/rails/jobs/store_file_job_spec.rb +15 -0
  76. data/spec/uploadcare/rails/jobs/store_group_job_spec.rb +15 -0
  77. data/spec/uploadcare/rails/objects/file_spec.rb +77 -0
  78. data/spec/uploadcare/rails/objects/group_spec.rb +87 -0
  79. data/spec/uploadcare/rails/services/id_extractor_spec.rb +26 -0
  80. data/spec/uploadcare/rails/transformations/image_transformations_spec.rb +120 -0
  81. data/spec/uploadcare/rails_spec.rb +7 -0
  82. metadata +129 -351
  83. data/config/initializers/uploadcare.rb +0 -26
  84. data/config/uploadcare_defaults.yml +0 -12
  85. data/lib/generators/templates/uploadcare_config_template.yml +0 -67
  86. data/lib/tasks/uploadcare_rails_tasks.rake +0 -4
  87. data/lib/uploadcare/rails/action_view/include_tags.rb +0 -47
  88. data/lib/uploadcare/rails/action_view/uploader_tags.rb +0 -76
  89. data/lib/uploadcare/rails/active_record/has_file.rb +0 -92
  90. data/lib/uploadcare/rails/active_record/has_group.rb +0 -89
  91. data/lib/uploadcare/rails/active_record/has_object.rb +0 -9
  92. data/lib/uploadcare/rails/formtastic/formtastic.rb +0 -73
  93. data/lib/uploadcare/rails/operations.rb +0 -57
  94. data/lib/uploadcare/rails/settings.rb +0 -81
  95. data/lib/uploadcare/rails/simple_form/simple_form.rb +0 -63
  96. data/spec/caching/file_caching_spec.rb +0 -26
  97. data/spec/caching/group_caching_spec.rb +0 -40
  98. data/spec/dummy/README.rdoc +0 -28
  99. data/spec/dummy/Rakefile +0 -6
  100. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  101. data/spec/dummy/app/assets/javascripts/post_with_collections.js +0 -2
  102. data/spec/dummy/app/assets/javascripts/posts.js +0 -2
  103. data/spec/dummy/app/assets/javascripts/posts_with_collection_and_files.js +0 -2
  104. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  105. data/spec/dummy/app/assets/stylesheets/post_with_collections.css +0 -4
  106. data/spec/dummy/app/assets/stylesheets/posts.css +0 -4
  107. data/spec/dummy/app/assets/stylesheets/posts_with_collection_and_files.css +0 -4
  108. data/spec/dummy/app/assets/stylesheets/scaffold.css +0 -56
  109. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  110. data/spec/dummy/app/controllers/post_with_collections_controller.rb +0 -58
  111. data/spec/dummy/app/controllers/posts_controller.rb +0 -58
  112. data/spec/dummy/app/controllers/posts_with_collection_and_files_controller.rb +0 -58
  113. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  114. data/spec/dummy/app/helpers/post_with_collections_helper.rb +0 -2
  115. data/spec/dummy/app/helpers/posts_helper.rb +0 -2
  116. data/spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb +0 -2
  117. data/spec/dummy/app/models/post.rb +0 -4
  118. data/spec/dummy/app/models/post_with_collection.rb +0 -4
  119. data/spec/dummy/app/models/posts_with_collection_and_file.rb +0 -4
  120. data/spec/dummy/app/views/layouts/application.html.erb +0 -16
  121. data/spec/dummy/app/views/post_with_collections/_form.html.erb +0 -25
  122. data/spec/dummy/app/views/post_with_collections/edit.html.erb +0 -6
  123. data/spec/dummy/app/views/post_with_collections/index.html.erb +0 -29
  124. data/spec/dummy/app/views/post_with_collections/new.html.erb +0 -5
  125. data/spec/dummy/app/views/post_with_collections/show.html.erb +0 -14
  126. data/spec/dummy/app/views/post_with_collections/show.json.jbuilder +0 -1
  127. data/spec/dummy/app/views/posts/_form.html.erb +0 -31
  128. data/spec/dummy/app/views/posts/edit.html.erb +0 -6
  129. data/spec/dummy/app/views/posts/index.html.erb +0 -37
  130. data/spec/dummy/app/views/posts/new.html.erb +0 -5
  131. data/spec/dummy/app/views/posts/post.json.builder +0 -1
  132. data/spec/dummy/app/views/posts/show.html.erb +0 -15
  133. data/spec/dummy/app/views/posts_with_collection_and_files/_form.html.erb +0 -27
  134. data/spec/dummy/app/views/posts_with_collection_and_files/edit.html.erb +0 -6
  135. data/spec/dummy/app/views/posts_with_collection_and_files/index.html.erb +0 -25
  136. data/spec/dummy/app/views/posts_with_collection_and_files/new.html.erb +0 -5
  137. data/spec/dummy/app/views/posts_with_collection_and_files/show.html.erb +0 -4
  138. data/spec/dummy/app/views/posts_with_collection_and_files/show.json.jbuilder +0 -1
  139. data/spec/dummy/bin/bundle +0 -3
  140. data/spec/dummy/bin/rails +0 -4
  141. data/spec/dummy/bin/rake +0 -4
  142. data/spec/dummy/config/application.rb +0 -23
  143. data/spec/dummy/config/boot.rb +0 -4
  144. data/spec/dummy/config/database.yml +0 -25
  145. data/spec/dummy/config/environment.rb +0 -5
  146. data/spec/dummy/config/environments/development.rb +0 -29
  147. data/spec/dummy/config/environments/production.rb +0 -80
  148. data/spec/dummy/config/environments/test.rb +0 -36
  149. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  150. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  151. data/spec/dummy/config/initializers/formtastic.rb +0 -111
  152. data/spec/dummy/config/initializers/inflections.rb +0 -16
  153. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  154. data/spec/dummy/config/initializers/secret_token.rb +0 -12
  155. data/spec/dummy/config/initializers/session_store.rb +0 -3
  156. data/spec/dummy/config/initializers/simple_form.rb +0 -167
  157. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  158. data/spec/dummy/config/locales/en.yml +0 -23
  159. data/spec/dummy/config/locales/simple_form.en.yml +0 -31
  160. data/spec/dummy/config/routes.rb +0 -63
  161. data/spec/dummy/config/uploadcare.yml +0 -64
  162. data/spec/dummy/config.ru +0 -4
  163. data/spec/dummy/db/migrate/20171012001801_create_tables.rb +0 -27
  164. data/spec/dummy/db/migrate/20181001132710_add_other_file_to_post.rb +0 -8
  165. data/spec/dummy/db/migrate/20181001141434_add_other_file_to_post_with_collections.rb +0 -8
  166. data/spec/dummy/db/schema.rb +0 -39
  167. data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +0 -13
  168. data/spec/dummy/public/404.html +0 -58
  169. data/spec/dummy/public/422.html +0 -58
  170. data/spec/dummy/public/500.html +0 -57
  171. data/spec/dummy/public/favicon.ico +0 -0
  172. data/spec/helpers/form_helpers_has_file_spec.rb +0 -30
  173. data/spec/helpers/form_helpers_has_group_spec.rb +0 -30
  174. data/spec/helpers/form_helpers_spec.rb +0 -33
  175. data/spec/helpers/formtastic_spec.rb +0 -25
  176. data/spec/helpers/include_tags_spec.rb +0 -54
  177. data/spec/helpers/simple_form_spec.rb +0 -25
  178. data/spec/helpers/uploader_tags_spec.rb +0 -21
  179. data/spec/models/has_both_file_and_group_spec.rb +0 -43
  180. data/spec/models/has_file_spec.rb +0 -46
  181. data/spec/models/has_group_spec.rb +0 -57
  182. data/spec/models/has_several_files_spec.rb +0 -55
  183. data/spec/models/has_several_groups_spec.rb +0 -62
  184. data/spec/objects/file_spec.rb +0 -27
  185. data/spec/objects/group_spec.rb +0 -51
  186. data/spec/operations_spec.rb +0 -28
  187. data/spec/uploadcare/rails/settings_spec.rb +0 -136
  188. data/spec/uploadcare_rails_settings_spec.rb +0 -56
  189. data/spec/view.png +0 -0
  190. data/spec/view2.jpg +0 -0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.uploadcare.com/convert/document/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"paths":["86c54d9a-3453-4b12-8dcc-49883ae8f084/document/-/format/pdf/"],"store":"0"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.6+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
+ Date:
17
+ - Fri, 23 Jul 2021 11:37:35 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:b616ace0f3e3b3e8bda844e3bceff181cb7291f8
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Fri, 23 Jul 2021 11:37:37 GMT
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - '179'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Vary:
40
+ - Accept
41
+ - Accept-Encoding
42
+ Warning:
43
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.6'
44
+ Access-Control-Allow-Origin:
45
+ - https://uploadcare.com
46
+ Allow:
47
+ - OPTIONS, POST
48
+ X-Xss-Protection:
49
+ - 1; mode=block
50
+ X-Content-Type-Options:
51
+ - nosniff
52
+ X-Frame-Options:
53
+ - SAMEORIGIN
54
+ X-Robots-Tag:
55
+ - noindex, nofollow, nosnippet, noarchive
56
+ body:
57
+ encoding: ASCII-8BIT
58
+ string: '{"result": [{"original_source": "86c54d9a-3453-4b12-8dcc-49883ae8f084/document/-/format/pdf/",
59
+ "token": 21201766, "uuid": "e8656549-6efd-4414-890c-708afd4f648f"}], "problems":
60
+ {}}'
61
+ recorded_at: Fri, 23 Jul 2021 11:37:37 GMT
62
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.uploadcare.com/convert/document/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"paths":["86c54d9a-3453-4b12-8dcc-49883ae8f084/document/-/format/jpg/"],"store":"0"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.6+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
+ Date:
17
+ - Fri, 23 Jul 2021 11:38:30 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:0108d88068fd4505dc2ec3b3844e09a2daf6aec4
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Fri, 23 Jul 2021 11:38:31 GMT
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - '176'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Vary:
40
+ - Accept
41
+ - Accept-Encoding
42
+ Warning:
43
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.6'
44
+ Access-Control-Allow-Origin:
45
+ - https://uploadcare.com
46
+ Allow:
47
+ - OPTIONS, POST
48
+ X-Xss-Protection:
49
+ - 1; mode=block
50
+ X-Content-Type-Options:
51
+ - nosniff
52
+ X-Frame-Options:
53
+ - SAMEORIGIN
54
+ X-Robots-Tag:
55
+ - noindex, nofollow, nosnippet, noarchive
56
+ body:
57
+ encoding: ASCII-8BIT
58
+ string: '{"result": [], "problems": {"86c54d9a-3453-4b12-8dcc-49883ae8f084/document/-/format/jpg/":
59
+ "the target_format is not a supported ''to'' format for this source file.
60
+ txt -> jpg"}}'
61
+ recorded_at: Fri, 23 Jul 2021 11:38:31 GMT
62
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.uploadcare.com/convert/video/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"paths":["169d4bf8-206d-4fa1-8aca-a3aaa73c5cf5/video/-/size/600x400/change_ratio/-/quality/best/-/format/ogg/-/cut/0:0:0.0/0:0:1.0/-/thumbs~2/1/"],"store":"0"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.6+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
+ Date:
17
+ - Fri, 23 Jul 2021 11:26:00 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:7c2887082ee653c999eef0b940574710c1b1ef44
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Fri, 23 Jul 2021 11:26:01 GMT
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - '322'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Vary:
40
+ - Accept
41
+ - Accept-Encoding
42
+ Warning:
43
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.6'
44
+ Access-Control-Allow-Origin:
45
+ - https://uploadcare.com
46
+ Allow:
47
+ - OPTIONS, POST
48
+ X-Xss-Protection:
49
+ - 1; mode=block
50
+ X-Content-Type-Options:
51
+ - nosniff
52
+ X-Frame-Options:
53
+ - SAMEORIGIN
54
+ X-Robots-Tag:
55
+ - noindex, nofollow, nosnippet, noarchive
56
+ body:
57
+ encoding: ASCII-8BIT
58
+ string: '{"result": [{"original_source": "169d4bf8-206d-4fa1-8aca-a3aaa73c5cf5/video/-/size/600x400/change_ratio/-/quality/best/-/format/ogg/-/cut/0:0:0.0/0:0:1.0/-/thumbs~2/1/",
59
+ "token": 913634844, "uuid": "1d12c37d-69b8-48d6-95cc-41c9605f10fd", "thumbnails_group_uuid":
60
+ "900dd627-0737-4753-b4be-c3e328669df7~2"}], "problems": {}}'
61
+ recorded_at: Fri, 23 Jul 2021 11:26:01 GMT
62
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.uploadcare.com/convert/video/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"paths":["169d4bf8-206d-4fa1-8aca-a3aaa73c5cf5/video/-/size/x/change_ratio/"],"store":"0"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.6+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
+ Date:
17
+ - Fri, 23 Jul 2021 11:26:02 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:0ae0de735340d881dfc02d569cb3c4094f50f5b9
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Fri, 23 Jul 2021 11:26:02 GMT
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - '227'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Vary:
40
+ - Accept
41
+ - Accept-Encoding
42
+ Warning:
43
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.6'
44
+ Access-Control-Allow-Origin:
45
+ - https://uploadcare.com
46
+ Allow:
47
+ - OPTIONS, POST
48
+ X-Xss-Protection:
49
+ - 1; mode=block
50
+ X-Content-Type-Options:
51
+ - nosniff
52
+ X-Frame-Options:
53
+ - SAMEORIGIN
54
+ X-Robots-Tag:
55
+ - noindex, nofollow, nosnippet, noarchive
56
+ body:
57
+ encoding: ASCII-8BIT
58
+ string: '{"result": [], "problems": {"169d4bf8-206d-4fa1-8aca-a3aaa73c5cf5/video/-/size/x/change_ratio/":
59
+ "CDN Path error: Mandatory argument \"OneOrTwoDimensionsDivisibleByFour(size)\"
60
+ not found while parsing \"size/x/change_ratio\""}}'
61
+ recorded_at: Fri, 23 Jul 2021 11:26:02 GMT
62
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.uploadcare.com/convert/document/status/21201727/
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.6+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
+ Date:
17
+ - Fri, 23 Jul 2021 11:37:37 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:d4867270b507545071e6c2092f45006013699f2c
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Fri, 23 Jul 2021 11:37:38 GMT
31
+ Content-Type:
32
+ - application/vnd.uploadcare-v0.6+json
33
+ Content-Length:
34
+ - '91'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Warning:
40
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.6'
41
+ Access-Control-Allow-Origin:
42
+ - https://uploadcare.com
43
+ Vary:
44
+ - Accept
45
+ Allow:
46
+ - GET, HEAD, OPTIONS
47
+ X-Xss-Protection:
48
+ - 1; mode=block
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Frame-Options:
52
+ - SAMEORIGIN
53
+ X-Robots-Tag:
54
+ - noindex, nofollow, nosnippet, noarchive
55
+ body:
56
+ encoding: ASCII-8BIT
57
+ string: '{"status":"finished","error":null,"result":{"uuid":"19f9a316-2b03-4df3-bf97-23ee4d92db8f"}}'
58
+ recorded_at: Fri, 23 Jul 2021 11:37:38 GMT
59
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.uploadcare.com/convert/video/status/913632082/
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.6+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.2)
16
+ Date:
17
+ - Fri, 23 Jul 2021 11:31:38 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:8ea50fe3b833028988450d93b21b84ac13818d2b
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Fri, 23 Jul 2021 11:31:39 GMT
31
+ Content-Type:
32
+ - application/vnd.uploadcare-v0.6+json
33
+ Content-Length:
34
+ - '156'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Warning:
40
+ - '199 Miscellaneous warning: Please use API version 0.5, not 0.6'
41
+ Access-Control-Allow-Origin:
42
+ - https://uploadcare.com
43
+ Vary:
44
+ - Accept
45
+ Allow:
46
+ - GET, HEAD, OPTIONS
47
+ X-Xss-Protection:
48
+ - 1; mode=block
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Frame-Options:
52
+ - SAMEORIGIN
53
+ X-Robots-Tag:
54
+ - noindex, nofollow, nosnippet, noarchive
55
+ body:
56
+ encoding: ASCII-8BIT
57
+ string: '{"status":"finished","error":null,"result":{"uuid":"3f2e57e7-2d3f-42b2-9b42-2da4cfa6551e","thumbnails_group_uuid":"4ed9e8ea-c22c-4a9f-bdd1-c4ce40ebaa8c~2"}}'
58
+ recorded_at: Fri, 23 Jul 2021 11:31:39 GMT
59
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,60 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.uploadcare.com/files/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"source":"d43e8281-a42a-4f30-9fee-4a166998d15a","store":false}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.5+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/3.0.0)
16
+ Date:
17
+ - Thu, 22 Jul 2021 07:21:10 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:9e0f878fa2180c0d1d5edb0ffabab206aaebb434
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: Created
28
+ headers:
29
+ Date:
30
+ - Thu, 22 Jul 2021 07:21:11 GMT
31
+ Content-Type:
32
+ - application/vnd.uploadcare-v0.5+json
33
+ Content-Length:
34
+ - '533'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Location:
40
+ - https://api.uploadcare.com/files/7bfa5998-cb01-4b83-893a-27b55b8e9bd9/
41
+ Access-Control-Allow-Origin:
42
+ - https://uploadcare.com
43
+ Vary:
44
+ - Accept
45
+ Allow:
46
+ - GET, HEAD, OPTIONS, POST
47
+ X-Xss-Protection:
48
+ - 1; mode=block
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Frame-Options:
52
+ - SAMEORIGIN
53
+ X-Robots-Tag:
54
+ - noindex, nofollow, nosnippet, noarchive
55
+ body:
56
+ encoding: ASCII-8BIT
57
+ string: '{"type":"file","result":{"datetime_removed":null,"datetime_stored":null,"datetime_uploaded":"2021-07-22T07:21:11.521628Z","image_info":null,"is_image":null,"is_ready":true,"mime_type":"application/octet-stream","original_file_url":"https://ucarecdn.com/7bfa5998-cb01-4b83-893a-27b55b8e9bd9/1702.png","original_filename":"-17.0\u00b0\u0421
58
+ (2).png","size":0,"url":"https://api.uploadcare.com/files/7bfa5998-cb01-4b83-893a-27b55b8e9bd9/","uuid":"7bfa5998-cb01-4b83-893a-27b55b8e9bd9","source":"/d43e8281-a42a-4f30-9fee-4a166998d15a/"}}'
59
+ recorded_at: Thu, 22 Jul 2021 07:21:11 GMT
60
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.5+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/3.0.0)
16
+ Date:
17
+ - Thu, 22 Jul 2021 07:01:53 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:138e027d6d720bba1393f3ae8d227ac9741394bd
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Thu, 22 Jul 2021 07:01:53 GMT
31
+ Content-Type:
32
+ - application/vnd.uploadcare-v0.5+json
33
+ Content-Length:
34
+ - '570'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Access-Control-Allow-Origin:
40
+ - https://uploadcare.com
41
+ Vary:
42
+ - Accept
43
+ Allow:
44
+ - DELETE, GET, HEAD, OPTIONS
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Robots-Tag:
52
+ - noindex, nofollow, nosnippet, noarchive
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: '{"datetime_removed":"2021-07-22T07:01:53.647062Z","datetime_stored":null,"datetime_uploaded":"2021-07-22T06:51:13.085531Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":null,"original_filename":"-17.0\u00b0\u0421
56
+ (2).png","size":514,"url":"https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/","uuid":"5ae54c37-754c-4982-8de4-3f242a88ce17","source":null}'
57
+ recorded_at: Thu, 22 Jul 2021 07:01:53 GMT
58
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.uploadcare.com/files/storage/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '["37d70281-cc30-4c59-b8d6-e11c472dec40"]'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.5+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/2.7.0)
16
+ Date:
17
+ - Thu, 22 Jul 2021 08:38:38 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:e05af6d220eaa34112d6b7b0bd03f8a22d9e109f
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Thu, 22 Jul 2021 08:38:39 GMT
31
+ Content-Type:
32
+ - application/vnd.uploadcare-v0.5+json
33
+ Content-Length:
34
+ - '611'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Access-Control-Allow-Origin:
40
+ - https://uploadcare.com
41
+ Vary:
42
+ - Accept
43
+ Allow:
44
+ - DELETE, OPTIONS, PUT
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Robots-Tag:
52
+ - noindex, nofollow, nosnippet, noarchive
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: '{"status":"ok","result":[{"datetime_removed":"2021-07-22T08:38:39.167191Z","datetime_stored":null,"datetime_uploaded":"2021-07-22T07:28:44.481441Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":null,"original_filename":"-17.0\u00b0\u0421
56
+ (2).png","size":514,"url":"https://api.uploadcare.com/files/37d70281-cc30-4c59-b8d6-e11c472dec40/","uuid":"37d70281-cc30-4c59-b8d6-e11c472dec40","source":null}],"problems":{}}'
57
+ recorded_at: Thu, 22 Jul 2021 08:38:39 GMT
58
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.5+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/3.0.0)
16
+ Date:
17
+ - Thu, 22 Jul 2021 07:01:51 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:d9638db72d751c7f8fe116dca66aa60470c3c505
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Thu, 22 Jul 2021 07:01:52 GMT
31
+ Content-Type:
32
+ - application/vnd.uploadcare-v0.5+json
33
+ Content-Length:
34
+ - '609'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Access-Control-Allow-Origin:
40
+ - https://uploadcare.com
41
+ Vary:
42
+ - Accept
43
+ Allow:
44
+ - DELETE, GET, HEAD, OPTIONS
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Robots-Tag:
52
+ - noindex, nofollow, nosnippet, noarchive
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: '{"datetime_removed":null,"datetime_stored":null,"datetime_uploaded":"2021-07-22T06:51:13.085531Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/5ae54c37-754c-4982-8de4-3f242a88ce17/1702.png","original_filename":"-17.0\u00b0\u0421
56
+ (2).png","size":514,"url":"https://api.uploadcare.com/files/5ae54c37-754c-4982-8de4-3f242a88ce17/","uuid":"5ae54c37-754c-4982-8de4-3f242a88ce17","source":null}'
57
+ recorded_at: Thu, 22 Jul 2021 07:01:52 GMT
58
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.uploadcare.com/files/
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/vnd.uploadcare-v0.5+json
14
+ User-Agent:
15
+ - UploadcareRuby/3.0.5/5d5bb5639e3f2df33674 (Ruby/3.0.0)
16
+ Date:
17
+ - Thu, 22 Jul 2021 07:17:44 GMT
18
+ Authorization:
19
+ - Uploadcare 5d5bb5639e3f2df33674:2c946903fe8c7869f6849b781c1505d00cecbd82
20
+ Connection:
21
+ - close
22
+ Host:
23
+ - api.uploadcare.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Thu, 22 Jul 2021 07:17:45 GMT
31
+ Content-Type:
32
+ - application/vnd.uploadcare-v0.5+json
33
+ Content-Length:
34
+ - '3841'
35
+ Connection:
36
+ - close
37
+ Server:
38
+ - nginx
39
+ Access-Control-Allow-Origin:
40
+ - https://uploadcare.com
41
+ Vary:
42
+ - Accept
43
+ Allow:
44
+ - GET, HEAD, OPTIONS, POST
45
+ X-Xss-Protection:
46
+ - 1; mode=block
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Robots-Tag:
52
+ - noindex, nofollow, nosnippet, noarchive
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: '{"next":null,"previous":null,"total":6,"per_page":100,"results":[{"datetime_removed":null,"datetime_stored":"2021-07-21T10:10:15.455617Z","datetime_uploaded":"2021-07-21T10:10:15.364863Z","image_info":{"width":82,"height":19,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/3542c513-5cf4-4adb-97b0-bfa7fbd31fb5/170.png","original_filename":"-17.0\u00b0\u0421.png","size":861,"url":"https://api.uploadcare.com/files/3542c513-5cf4-4adb-97b0-bfa7fbd31fb5/","uuid":"3542c513-5cf4-4adb-97b0-bfa7fbd31fb5","source":null},{"datetime_removed":null,"datetime_stored":"2021-07-21T10:30:47.059311Z","datetime_uploaded":"2021-07-21T10:30:46.967311Z","image_info":{"width":82,"height":19,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/64215d18-1356-42cb-ab8c-7542290b6e1b/170.png","original_filename":"-17.0\u00b0\u0421.png","size":861,"url":"https://api.uploadcare.com/files/64215d18-1356-42cb-ab8c-7542290b6e1b/","uuid":"64215d18-1356-42cb-ab8c-7542290b6e1b","source":null},{"datetime_removed":null,"datetime_stored":"2021-07-21T10:30:47.037717Z","datetime_uploaded":"2021-07-21T10:30:46.973279Z","image_info":{"width":55,"height":13,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/59af53a6-3995-4136-85c6-dcdd471237d1/1701.png","original_filename":"-17.0\u00b0\u0421
56
+ (1).png","size":987,"url":"https://api.uploadcare.com/files/59af53a6-3995-4136-85c6-dcdd471237d1/","uuid":"59af53a6-3995-4136-85c6-dcdd471237d1","source":null},{"datetime_removed":null,"datetime_stored":"2021-07-21T10:30:47.042454Z","datetime_uploaded":"2021-07-21T10:30:46.992745Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/8ee53f06-47b7-4b32-902b-51bb2a94ea06/1702.png","original_filename":"-17.0\u00b0\u0421
57
+ (2).png","size":514,"url":"https://api.uploadcare.com/files/8ee53f06-47b7-4b32-902b-51bb2a94ea06/","uuid":"8ee53f06-47b7-4b32-902b-51bb2a94ea06","source":null},{"datetime_removed":null,"datetime_stored":null,"datetime_uploaded":"2021-07-22T06:51:48.199541Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/7d1988a4-1bf5-4953-98ab-7ecd592dca90/1702.png","original_filename":"-17.0\u00b0\u0421
58
+ (2).png","size":514,"url":"https://api.uploadcare.com/files/7d1988a4-1bf5-4953-98ab-7ecd592dca90/","uuid":"7d1988a4-1bf5-4953-98ab-7ecd592dca90","source":null},{"datetime_removed":null,"datetime_stored":"2021-07-22T06:52:44.345836Z","datetime_uploaded":"2021-07-22T06:52:44.015656Z","image_info":{"width":48,"height":12,"format":"PNG","color_mode":"RGBA","geo_location":null,"orientation":null,"dpi":[72,72],"datetime_original":null,"sequence":false},"is_image":true,"is_ready":true,"mime_type":"image/png","original_file_url":"https://ucarecdn.com/d43e8281-a42a-4f30-9fee-4a166998d15a/1702.png","original_filename":"-17.0\u00b0\u0421
59
+ (2).png","size":514,"url":"https://api.uploadcare.com/files/d43e8281-a42a-4f30-9fee-4a166998d15a/","uuid":"d43e8281-a42a-4f30-9fee-4a166998d15a","source":null}]}'
60
+ recorded_at: Thu, 22 Jul 2021 07:17:45 GMT
61
+ recorded_with: VCR 6.0.0