shrine-cloudinary 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shrine/storage/cloudinary.rb +6 -11
- data/shrine-cloudinary.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d22a8c603098b55d7f316eb3203e31bd97d372c46ed0cc6ba74ce280100e40a
|
4
|
+
data.tar.gz: c0cef847e8dd916b11d9edbea699b728c6344dde58e2f518dc830d21a873fd9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e27e178e8acdb0bd950ab2269bd7ba21b3d553f3c37f9806e65fa43a6775386bbb6478e1e06af93fec2c1abf91a2990daadcd8c218fd1696ea80b11686758097
|
7
|
+
data.tar.gz: fbabab23292519d2d661afe2b6cf00e83906caa6ff465099b13d9b8ab30c6998a508cfa96aba1c1896906874c4547e04363f80872a99d073febf67d6aef74f8b
|
@@ -95,12 +95,12 @@ class Shrine
|
|
95
95
|
if remote?(io)
|
96
96
|
uploader.upload(io.url, **options)
|
97
97
|
else
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
98
|
+
Shrine.with_file(io) do |file|
|
99
|
+
if large?(file)
|
100
|
+
uploader.upload_large(file, chunk_size: chunk_size, **options)
|
101
|
+
else
|
102
|
+
uploader.upload(file, **options)
|
103
|
+
end
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -121,11 +121,6 @@ class Shrine
|
|
121
121
|
{ resource_type: resource_type, type: type }
|
122
122
|
end
|
123
123
|
|
124
|
-
def make_rest_client_recognize_as_file!(io)
|
125
|
-
io.instance_eval { def path; "file"; end } unless io.respond_to?(:path)
|
126
|
-
io.instance_eval { def original_filename; "file"; end } if io.respond_to?(:original_filename)
|
127
|
-
end
|
128
|
-
|
129
124
|
def update_id!(result, id)
|
130
125
|
uploaded_id = result.fetch("public_id")
|
131
126
|
uploaded_id = uploaded_id.match("#{prefix}/").post_match if prefix
|
data/shrine-cloudinary.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "shrine-cloudinary"
|
3
|
-
gem.version = "1.1.
|
3
|
+
gem.version = "1.1.1"
|
4
4
|
|
5
5
|
gem.required_ruby_version = ">= 2.1"
|
6
6
|
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.require_path = "lib"
|
15
15
|
|
16
16
|
gem.add_dependency "shrine", ">= 3.0.0.rc", "< 4"
|
17
|
-
gem.add_dependency "cloudinary", "
|
17
|
+
gem.add_dependency "cloudinary", "~> 1.12"
|
18
18
|
gem.add_dependency "down", "~> 5.0"
|
19
19
|
gem.add_dependency "http", ">= 3.2", "< 5"
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shrine-cloudinary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|
@@ -34,16 +34,16 @@ dependencies:
|
|
34
34
|
name: cloudinary
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '1.12'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - "
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '1.12'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: down
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|