uploadcare-rails 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/config/initializers/uploadcare.rb +4 -4
  3. data/lib/uploadcare-rails.rb +7 -4
  4. data/lib/uploadcare/rails/action_view/include_tags.rb +1 -1
  5. data/lib/uploadcare/rails/active_record/has_file.rb +3 -3
  6. data/lib/uploadcare/rails/active_record/has_group.rb +3 -3
  7. data/lib/uploadcare/rails/formtastic/formtastic.rb +14 -0
  8. data/lib/uploadcare/rails/settings.rb +4 -5
  9. data/lib/uploadcare/rails/version.rb +1 -1
  10. data/spec/cassettes/Uploadcare_Rails_File/should_load_itself.yml +107 -0
  11. data/spec/cassettes/Uploadcare_Rails_Group/group_should_stay_loaded.yml +107 -0
  12. data/spec/cassettes/Uploadcare_Rails_Group/rails_cache_should_updates_after_load_call.yml +107 -0
  13. data/spec/cassettes/group_cahsing_file_load.yml +107 -0
  14. data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/deletes_file_after_destroy.yml +1283 -0
  15. data/spec/cassettes/has_uploadcare_file/object_with_uploadcare_file/stores_file_after_save.yml +381 -0
  16. data/spec/cassettes/has_uploadcare_group/object_attachment/contains_files_inside.yml +523 -0
  17. data/spec/cassettes/has_uploadcare_group_save.yml +543 -0
  18. data/spec/cassettes/load_group.yml +107 -0
  19. data/spec/dummy/db/migrate/20171012001801_create_tables.rb +27 -0
  20. data/spec/dummy/db/schema.rb +14 -15
  21. data/spec/dummy/db/test.sqlite3 +0 -0
  22. data/spec/dummy/log/test.log +2360 -0
  23. data/spec/dummy/tmp/cache/2AF/761/https%3A%2F%2Fucarecdn.com%2F595319d0-a113-459f-91bd-b29c7183467b%2F +0 -0
  24. data/spec/dummy/tmp/cache/301/D41/https%3A%2F%2Fucarecdn.com%2F81332043-fa2c-452f-936b-737d87ab2ae2%2F +0 -0
  25. data/spec/dummy/tmp/cache/30A/7C1/https%3A%2F%2Fucarecdn.com%2F39b34128-a001-46fd-9773-1b6ad46e6b9e%2F +0 -0
  26. data/spec/dummy/tmp/cache/340/A41/https%3A%2F%2Fucarecdn.com%2F090bcb5f-6d19-456c-b4a3-d753e690926f%2F +0 -0
  27. data/spec/dummy/tmp/cache/3AB/5A1/https%3A%2F%2Fucarecdn.com%2F7eb0161b-cebe-4316-946b-694de6f77ef9%2F +0 -0
  28. data/spec/dummy/tmp/cache/3FC/5C1/https%3A%2F%2Fucarecdn.com%2Fc3f0464b-ce9a-4281-8eaa-5c55783ccedf%2F +0 -0
  29. data/spec/dummy/tmp/cache/431/5C1/https%3A%2F%2Fucarecdn.com%2Fa1b1bb40-bd89-4f9c-b809-e84920f24a01%7E2%2F +0 -0
  30. data/spec/dummy/tmp/cache/44B/7A1/https%3A%2F%2Fucarecdn.com%2Fd6c785a8-9761-4602-88de-65ddb04ddc6a%7E2%2F +0 -0
  31. data/spec/generators/uploadcare_config_generator_spec.rb +39 -0
  32. data/spec/helpers/form_helpers_has_file_spec.rb +5 -5
  33. data/spec/helpers/form_helpers_has_group_spec.rb +6 -6
  34. data/spec/helpers/form_helpers_spec.rb +5 -5
  35. data/spec/helpers/formtastic_spec.rb +19 -26
  36. data/spec/helpers/include_tags_spec.rb +7 -7
  37. data/spec/helpers/simple_form_spec.rb +19 -27
  38. data/spec/helpers/uploader_tags_spec.rb +11 -5
  39. data/spec/objects/group_spec.rb +4 -4
  40. data/spec/support/generators.rb +38 -0
  41. data/spec/tmp/config/uploadcare.yml +71 -0
  42. data/spec/uploadcare/rails/settings_spec.rb +136 -0
  43. metadata +254 -198
  44. data/spec/dummy/db/migrate/20131119080328_create_posts.rb +0 -10
  45. data/spec/dummy/db/migrate/20131220083857_create_post_with_collections.rb +0 -10
  46. data/spec/dummy/db/migrate/20140320092807_create_posts_with_collection_and_files.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0113e45365a82f1af9474db0a516cae93dc19513
4
- data.tar.gz: 4fe03ac56616d9adcff45499832871d206f1d23d
3
+ metadata.gz: d808ca05ab7a22f1c10dba441ece7d68f619ce89
4
+ data.tar.gz: 22f9170d287b1415f1a286020ec70e4095f5a5bf
5
5
  SHA512:
6
- metadata.gz: 9a112c863d5016ae1d7b191e64cb2a8b0a0c3d86cbac74a18a04abf95e8dbfe37afd30fec8676a39c4afc84622a6aa2d98ff66178ce423d1616c9e473523716f
7
- data.tar.gz: de5e0f0f18f2e5ee4f8325bd8e80b368dcce7e7ac899d99fbd08708476005a93618892448bda5aa0dfddbf8c55e9d83506826c5f643d5793766720d589d02eaa
6
+ metadata.gz: de10bd156b54a9cde4ab685dcd1f8ccd382b8a00a4449d6866a299f38772e8da7e07d1d377c87b7afb22a73b9d97355bd1d7808b62e5541ae5181ea4d3986860
7
+ data.tar.gz: 845e606b08f94849ff2e361a790f24ec98ad8cf7ae885b9cd5612be0420a97508a70fd72ebbd2bf46f73963c600a3adc486816a473a78b40d462ff9281c09dff
@@ -14,10 +14,10 @@ config =
14
14
  eos
15
15
 
16
16
  {
17
- defaults: { public_key: :demopublickey, private_key: :demoprivatekey },
18
- development: { public_key: :demopublickey, private_key: :demoprivatekey },
19
- test: { public_key: :demopublickey, private_key: :demoprivatekey },
20
- production: { public_key: :demopublickey, private_key: :demoprivatekey }
17
+ defaults: { public_key: 'demopublickey', private_key: 'demoprivatekey' },
18
+ development: { public_key: 'demopublickey', private_key: 'demoprivatekey' },
19
+ test: { public_key: 'demopublickey', private_key: 'demoprivatekey' },
20
+ production: { public_key: 'demopublickey', private_key: 'demoprivatekey' }
21
21
  }
22
22
  end
23
23
 
@@ -1,12 +1,15 @@
1
- require 'uploadcare/rails/engine'
2
- require 'uploadcare/rails/settings'
3
- require 'uploadcare/rails/operations'
4
1
  require 'uploadcare'
5
2
 
3
+ require_relative 'uploadcare/rails/engine'
4
+ require_relative 'uploadcare/rails/settings'
5
+ require_relative 'uploadcare/rails/operations'
6
+ require_relative 'uploadcare/rails/objects/file'
7
+ require_relative 'uploadcare/rails/objects/group'
8
+
6
9
  module Uploadcare
7
10
  module Rails
8
11
  DEFAULT_SETTINGS = {
9
- widget_version: '2.9.0'
12
+ widget_version: '2.x'
10
13
  }
11
14
  end
12
15
  end
@@ -11,9 +11,9 @@ module Uploadcare::Rails::ActionView
11
11
 
12
12
  path =
13
13
  [
14
+ 'libs',
14
15
  'widget',
15
16
  settings[:version],
16
- 'uploadcare',
17
17
  ['uploadcare', minified, 'js'].compact.join('.')
18
18
  ].join('/')
19
19
 
@@ -76,11 +76,11 @@ module Uploadcare
76
76
  # before saving we checking what it is a actually file cdn url
77
77
  # or uuid. uuid will do.
78
78
  # group url or uuid should raise an erorr
79
- before_save "check_#{attribute}_for_uuid"
79
+ before_save "check_#{attribute}_for_uuid".to_sym
80
80
 
81
- after_save "store_#{attribute}" if UPLOADCARE_SETTINGS.store_after_save
81
+ after_save "store_#{attribute}".to_sym if UPLOADCARE_SETTINGS.store_after_save
82
82
 
83
- after_destroy "delete_#{attribute}" if UPLOADCARE_SETTINGS.delete_after_destroy
83
+ after_destroy "delete_#{attribute}".to_sym if UPLOADCARE_SETTINGS.delete_after_destroy
84
84
  end
85
85
  end
86
86
  end
@@ -71,11 +71,11 @@ module Uploadcare
71
71
  # before saving we checking what it is a actually file cdn url
72
72
  # or uuid. uuid will do.
73
73
  # group url or uuid should raise an erorr
74
- before_save "check_#{ attribute }_for_uuid"
74
+ before_save "check_#{ attribute }_for_uuid".to_sym
75
75
 
76
- after_save "store_#{ attribute }" if UPLOADCARE_SETTINGS.store_after_save
76
+ after_save "store_#{ attribute }".to_sym if UPLOADCARE_SETTINGS.store_after_save
77
77
 
78
- after_destroy "delete_#{ attribute }" if UPLOADCARE_SETTINGS.delete_after_destroy
78
+ after_destroy "delete_#{ attribute }".to_sym if UPLOADCARE_SETTINGS.delete_after_destroy
79
79
  end
80
80
  end
81
81
  end
@@ -44,6 +44,13 @@ module Uploadcare::Rails::Formtastic
44
44
  @options[:uploadcare][:multiple] = false
45
45
  super
46
46
  end
47
+
48
+ def input_html_options
49
+ super.tap do |opts|
50
+ opts[:data] ||= {}
51
+ opts[:data].merge!(multiple: false)
52
+ end
53
+ end
47
54
  end
48
55
 
49
56
  class UploadcareMultipleUploaderInput < Uploadcare::Rails::Formtastic::UploadcareInput
@@ -53,6 +60,13 @@ module Uploadcare::Rails::Formtastic
53
60
  @options[:uploadcare][:multiple] = true
54
61
  super
55
62
  end
63
+
64
+ def input_html_options
65
+ super.tap do |opts|
66
+ opts[:data] ||= {}
67
+ opts[:data].merge!(multiple: true)
68
+ end
69
+ end
56
70
  end
57
71
  end
58
72
 
@@ -31,10 +31,9 @@ module Uploadcare
31
31
  :path_value
32
32
  ]
33
33
 
34
-
35
34
  def initialize(config)
36
35
  # extract envaroments settings
37
- settings = config[::Rails.env]
36
+ settings = config.with_indifferent_access[::Rails.env]
38
37
  unless settings.present?
39
38
  raise ArgumentError, 'config is empty or not given at all'
40
39
  end
@@ -44,10 +43,10 @@ module Uploadcare
44
43
 
45
44
  # strip defaults suplied by uploadcare-ruby gem from private/pub key
46
45
  uc_defaults =
47
- Uploadcare::DEFAULT_SETTINGS.except!(:public_key, :private_key)
46
+ Uploadcare::DEFAULT_SETTINGS.except(:public_key, :private_key)
48
47
 
49
- defaults = Uploadcare::Rails::DEFAULT_SETTINGS.merge!(uc_defaults)
50
- settings = defaults.merge!(settings)
48
+ defaults = Uploadcare::Rails::DEFAULT_SETTINGS.merge(uc_defaults)
49
+ settings = defaults.merge(settings)
51
50
  super settings
52
51
 
53
52
  # validates settings atributes.
@@ -1,5 +1,5 @@
1
1
  module Uploadcare
2
2
  module Rails
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
5
5
  end
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.uploadcare.com/files/913a5ee4-123c-4076-bc66-3ff5a3966ac0/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.uploadcare-v0.3+json
12
+ User-Agent:
13
+ - uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
14
+ Date:
15
+ - Sat, 21 Oct 2017 13:40:36 -0000
16
+ Authorization:
17
+ - Uploadcare demopublickey:2b431797ef380a14b845622726f6194aba94d513
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Sat, 21 Oct 2017 13:40:36 GMT
27
+ Content-Type:
28
+ - application/vnd.uploadcare-v0.3+json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Server:
34
+ - nginx
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Vary:
40
+ - Accept
41
+ Warning:
42
+ - '199 Miscellaneous warning: You are using the demo account; Please use API
43
+ version 0.5, not 0.3'
44
+ Allow:
45
+ - GET, DELETE, HEAD, OPTIONS
46
+ Access-Control-Allow-Origin:
47
+ - https://uploadcare.com
48
+ X-Frame-Options:
49
+ - DENY
50
+ body:
51
+ encoding: UTF-8
52
+ string: '{"uuid":"913a5ee4-123c-4076-bc66-3ff5a3966ac0","original_file_url":null,"image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":null,"mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/913a5ee4-123c-4076-bc66-3ff5a3966ac0/","original_filename":"view.png","datetime_uploaded":"2017-10-21T13:40:26.646680Z","size":2785,"is_image":true,"datetime_removed":"2017-10-21T13:40:33.349320Z","source":null,"variations":null}'
53
+ http_version:
54
+ recorded_at: Sat, 21 Oct 2017 13:40:36 GMT
55
+ - request:
56
+ method: get
57
+ uri: https://api.uploadcare.com/files/f6536fd7-fc46-4563-ba22-89062c277b5d/
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ''
61
+ headers:
62
+ Accept:
63
+ - application/vnd.uploadcare-v0.3+json
64
+ User-Agent:
65
+ - uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
66
+ Date:
67
+ - Sun, 05 Nov 2017 09:23:09 -0000
68
+ Authorization:
69
+ - Uploadcare demopublickey:c52fc36c7b7cf983b0c0843f6077bef8231798d5
70
+ Accept-Encoding:
71
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
72
+ response:
73
+ status:
74
+ code: 200
75
+ message: OK
76
+ headers:
77
+ Date:
78
+ - Sun, 05 Nov 2017 09:23:09 GMT
79
+ Content-Type:
80
+ - application/vnd.uploadcare-v0.3+json
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ Server:
86
+ - nginx
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ X-Content-Type-Options:
90
+ - nosniff
91
+ Vary:
92
+ - Accept
93
+ Warning:
94
+ - '199 Miscellaneous warning: You are using the demo account; Please use API
95
+ version 0.5, not 0.3'
96
+ Allow:
97
+ - GET, DELETE, HEAD, OPTIONS
98
+ Access-Control-Allow-Origin:
99
+ - https://uploadcare.com
100
+ X-Frame-Options:
101
+ - DENY
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"uuid":"f6536fd7-fc46-4563-ba22-89062c277b5d","original_file_url":null,"image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":null,"mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/f6536fd7-fc46-4563-ba22-89062c277b5d/","original_filename":"view.png","datetime_uploaded":"2017-11-05T09:22:56.619173Z","size":2785,"is_image":true,"datetime_removed":"2017-11-05T09:23:06.067445Z","source":null,"variations":null}'
105
+ http_version:
106
+ recorded_at: Sun, 05 Nov 2017 09:23:09 GMT
107
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.uploadcare.com/groups/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.uploadcare-v0.3+json
12
+ User-Agent:
13
+ - uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
14
+ Date:
15
+ - Sat, 21 Oct 2017 13:40:30 -0000
16
+ Authorization:
17
+ - Uploadcare demopublickey:6d0e6e7e807fe6028034b8af440ef04f6be9afc5
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Sat, 21 Oct 2017 13:40:30 GMT
27
+ Content-Type:
28
+ - application/vnd.uploadcare-v0.3+json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Server:
34
+ - nginx
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Vary:
40
+ - Accept
41
+ Warning:
42
+ - '199 Miscellaneous warning: You are using the demo account; Please use API
43
+ version 0.5, not 0.3'
44
+ Allow:
45
+ - GET, HEAD, OPTIONS
46
+ Access-Control-Allow-Origin:
47
+ - https://uploadcare.com
48
+ X-Frame-Options:
49
+ - DENY
50
+ body:
51
+ encoding: UTF-8
52
+ string: '{"id":"a1b1bb40-bd89-4f9c-b809-e84920f24a01~2","datetime_created":"2017-10-21T13:40:29.035828Z","datetime_stored":null,"files_count":2,"cdn_url":"http://www.ucarecdn.com/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/","url":"https://api.uploadcare.com/groups/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/","files":[{"uuid":"83ce550d-f67e-4c1a-a4da-3d550224a8a5","original_file_url":"https://ucarecdn.com/83ce550d-f67e-4c1a-a4da-3d550224a8a5/view2.jpg","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"datetime_stored":null,"mime_type":"image/jpeg","is_ready":true,"url":"https://api.uploadcare.com/files/83ce550d-f67e-4c1a-a4da-3d550224a8a5/","original_filename":"view2.jpg","datetime_uploaded":"2017-10-21T13:40:28.343956Z","size":255570,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""},{"uuid":"8bd4d6b5-e844-42a7-b2b1-8814aa4ca713","original_file_url":"https://ucarecdn.com/8bd4d6b5-e844-42a7-b2b1-8814aa4ca713/view.png","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":null,"mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/8bd4d6b5-e844-42a7-b2b1-8814aa4ca713/","original_filename":"view.png","datetime_uploaded":"2017-10-21T13:40:28.362231Z","size":2785,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""}]}'
53
+ http_version:
54
+ recorded_at: Sat, 21 Oct 2017 13:40:30 GMT
55
+ - request:
56
+ method: get
57
+ uri: https://api.uploadcare.com/groups/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ''
61
+ headers:
62
+ Accept:
63
+ - application/vnd.uploadcare-v0.3+json
64
+ User-Agent:
65
+ - uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
66
+ Date:
67
+ - Sun, 05 Nov 2017 09:23:00 -0000
68
+ Authorization:
69
+ - Uploadcare demopublickey:204c039fd808e229e224f6950f750550f4962bf7
70
+ Accept-Encoding:
71
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
72
+ response:
73
+ status:
74
+ code: 200
75
+ message: OK
76
+ headers:
77
+ Date:
78
+ - Sun, 05 Nov 2017 09:23:01 GMT
79
+ Content-Type:
80
+ - application/vnd.uploadcare-v0.3+json
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ Server:
86
+ - nginx
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ X-Content-Type-Options:
90
+ - nosniff
91
+ Vary:
92
+ - Accept
93
+ Warning:
94
+ - '199 Miscellaneous warning: You are using the demo account; Please use API
95
+ version 0.5, not 0.3'
96
+ Allow:
97
+ - GET, HEAD, OPTIONS
98
+ Access-Control-Allow-Origin:
99
+ - https://uploadcare.com
100
+ X-Frame-Options:
101
+ - DENY
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"id":"d6c785a8-9761-4602-88de-65ddb04ddc6a~2","datetime_created":"2017-11-05T09:22:59.302130Z","datetime_stored":null,"files_count":2,"cdn_url":"http://www.ucarecdn.com/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/","url":"https://api.uploadcare.com/groups/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/","files":[{"uuid":"0b37b745-6637-49a1-9c00-3d8281a383e3","original_file_url":"https://ucarecdn.com/0b37b745-6637-49a1-9c00-3d8281a383e3/view2.jpg","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"datetime_stored":null,"mime_type":"image/jpeg","is_ready":true,"url":"https://api.uploadcare.com/files/0b37b745-6637-49a1-9c00-3d8281a383e3/","original_filename":"view2.jpg","datetime_uploaded":"2017-11-05T09:22:58.509252Z","size":255570,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""},{"uuid":"f839e2df-ddf8-4c10-9e7d-5a0777eddc93","original_file_url":"https://ucarecdn.com/f839e2df-ddf8-4c10-9e7d-5a0777eddc93/view.png","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":null,"mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/f839e2df-ddf8-4c10-9e7d-5a0777eddc93/","original_filename":"view.png","datetime_uploaded":"2017-11-05T09:22:58.526374Z","size":2785,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""}]}'
105
+ http_version:
106
+ recorded_at: Sun, 05 Nov 2017 09:23:01 GMT
107
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.uploadcare.com/groups/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.uploadcare-v0.3+json
12
+ User-Agent:
13
+ - uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
14
+ Date:
15
+ - Sat, 21 Oct 2017 13:40:29 -0000
16
+ Authorization:
17
+ - Uploadcare demopublickey:e50934c17d4521c962ab5fe06699affc5ef17637
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Sat, 21 Oct 2017 13:40:30 GMT
27
+ Content-Type:
28
+ - application/vnd.uploadcare-v0.3+json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Server:
34
+ - nginx
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Vary:
40
+ - Accept
41
+ Warning:
42
+ - '199 Miscellaneous warning: You are using the demo account; Please use API
43
+ version 0.5, not 0.3'
44
+ Allow:
45
+ - GET, HEAD, OPTIONS
46
+ Access-Control-Allow-Origin:
47
+ - https://uploadcare.com
48
+ X-Frame-Options:
49
+ - DENY
50
+ body:
51
+ encoding: UTF-8
52
+ string: '{"id":"a1b1bb40-bd89-4f9c-b809-e84920f24a01~2","datetime_created":"2017-10-21T13:40:29.035828Z","datetime_stored":null,"files_count":2,"cdn_url":"http://www.ucarecdn.com/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/","url":"https://api.uploadcare.com/groups/a1b1bb40-bd89-4f9c-b809-e84920f24a01~2/","files":[{"uuid":"83ce550d-f67e-4c1a-a4da-3d550224a8a5","original_file_url":"https://ucarecdn.com/83ce550d-f67e-4c1a-a4da-3d550224a8a5/view2.jpg","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"datetime_stored":null,"mime_type":"image/jpeg","is_ready":true,"url":"https://api.uploadcare.com/files/83ce550d-f67e-4c1a-a4da-3d550224a8a5/","original_filename":"view2.jpg","datetime_uploaded":"2017-10-21T13:40:28.343956Z","size":255570,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""},{"uuid":"8bd4d6b5-e844-42a7-b2b1-8814aa4ca713","original_file_url":"https://ucarecdn.com/8bd4d6b5-e844-42a7-b2b1-8814aa4ca713/view.png","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":null,"mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/8bd4d6b5-e844-42a7-b2b1-8814aa4ca713/","original_filename":"view.png","datetime_uploaded":"2017-10-21T13:40:28.362231Z","size":2785,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""}]}'
53
+ http_version:
54
+ recorded_at: Sat, 21 Oct 2017 13:40:30 GMT
55
+ - request:
56
+ method: get
57
+ uri: https://api.uploadcare.com/groups/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ''
61
+ headers:
62
+ Accept:
63
+ - application/vnd.uploadcare-v0.3+json
64
+ User-Agent:
65
+ - uploadcare-ruby/2.3.1.112/1.1.0/demopublickey
66
+ Date:
67
+ - Sun, 05 Nov 2017 09:22:59 -0000
68
+ Authorization:
69
+ - Uploadcare demopublickey:5d5c9d85a3f2d86a4b1559f3bfcf2fbc8425b921
70
+ Accept-Encoding:
71
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
72
+ response:
73
+ status:
74
+ code: 200
75
+ message: OK
76
+ headers:
77
+ Date:
78
+ - Sun, 05 Nov 2017 09:23:00 GMT
79
+ Content-Type:
80
+ - application/vnd.uploadcare-v0.3+json
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ Server:
86
+ - nginx
87
+ X-Xss-Protection:
88
+ - 1; mode=block
89
+ X-Content-Type-Options:
90
+ - nosniff
91
+ Vary:
92
+ - Accept
93
+ Warning:
94
+ - '199 Miscellaneous warning: You are using the demo account; Please use API
95
+ version 0.5, not 0.3'
96
+ Allow:
97
+ - GET, HEAD, OPTIONS
98
+ Access-Control-Allow-Origin:
99
+ - https://uploadcare.com
100
+ X-Frame-Options:
101
+ - DENY
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"id":"d6c785a8-9761-4602-88de-65ddb04ddc6a~2","datetime_created":"2017-11-05T09:22:59.302130Z","datetime_stored":null,"files_count":2,"cdn_url":"http://www.ucarecdn.com/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/","url":"https://api.uploadcare.com/groups/d6c785a8-9761-4602-88de-65ddb04ddc6a~2/","files":[{"uuid":"0b37b745-6637-49a1-9c00-3d8281a383e3","original_file_url":"https://ucarecdn.com/0b37b745-6637-49a1-9c00-3d8281a383e3/view2.jpg","image_info":{"orientation":1,"format":"JPEG","height":1162,"width":800,"geo_location":null,"datetime_original":null,"dpi":[72,72]},"datetime_stored":null,"mime_type":"image/jpeg","is_ready":true,"url":"https://api.uploadcare.com/files/0b37b745-6637-49a1-9c00-3d8281a383e3/","original_filename":"view2.jpg","datetime_uploaded":"2017-11-05T09:22:58.509252Z","size":255570,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""},{"uuid":"f839e2df-ddf8-4c10-9e7d-5a0777eddc93","original_file_url":"https://ucarecdn.com/f839e2df-ddf8-4c10-9e7d-5a0777eddc93/view.png","image_info":{"orientation":null,"format":"PNG","height":600,"width":800,"geo_location":null,"datetime_original":null,"dpi":null},"datetime_stored":null,"mime_type":"image/png","is_ready":true,"url":"https://api.uploadcare.com/files/f839e2df-ddf8-4c10-9e7d-5a0777eddc93/","original_filename":"view.png","datetime_uploaded":"2017-11-05T09:22:58.526374Z","size":2785,"is_image":true,"datetime_removed":null,"source":null,"variations":null,"default_effects":""}]}'
105
+ http_version:
106
+ recorded_at: Sun, 05 Nov 2017 09:23:00 GMT
107
+ recorded_with: VCR 3.0.3