paperclip-azure 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/paperclip/storage/azure.rb +16 -10
- data/paperclip-azure.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6ce779207ed37f3fafc0fac09ad624fc67e5aa5
|
4
|
+
data.tar.gz: 8847ab129675e2456346f221f9c670db161998a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd6e124e7ce7b410c9a8976cb77420ab967863c32cd5511914e13050b39216d044ef98ddcb53bcb09c7e9386a0498a5ad4960c2b54c07521c9e96f0e77d0eae2
|
7
|
+
data.tar.gz: cf78db036595d70aa52bbd3bb81c3b0c3e8f361e63b787769f635697fcf3e8feb2d0a6511462dfbb5ae7e94c2b0d1ba2e72a00893a0b54f89e3b0be394b61dae
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.8
|
@@ -129,22 +129,28 @@ module Paperclip
|
|
129
129
|
|
130
130
|
require 'azure/core/http/retry_policy' # For Some Reason, All Other Loading Locations Fail
|
131
131
|
service.filters << ::Azure::Core::Http::RetryPolicy.new do |response, retry_data|
|
132
|
-
status_code =
|
133
|
-
|
132
|
+
status_code = case
|
133
|
+
when !response.nil?
|
134
|
+
response.status_code
|
135
|
+
when !retry_data[:error].nil?
|
136
|
+
retry_data[:error].status_code
|
137
|
+
else
|
138
|
+
500
|
139
|
+
end
|
140
|
+
status_code = 500 if status_code == 0
|
141
|
+
retry_data[:count] ||= 0
|
134
142
|
|
135
|
-
|
143
|
+
unless (status_code >= 300 && status_code < 500 && status_code != 408) ||
|
136
144
|
status_code == 501 ||
|
137
145
|
status_code == 505 ||
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
else
|
142
|
-
@retry_count += 1
|
146
|
+
retry_data[:error].description == 'Blob type of the blob reference doesn\'t match blob type of the blob.' ||
|
147
|
+
retry_data[:count] >= 5
|
148
|
+
retry_data[:count] += 1
|
143
149
|
|
144
|
-
sleep ((2
|
150
|
+
sleep ((2** retry_data[:count]) - 1) * 5
|
145
151
|
end
|
146
152
|
|
147
|
-
|
153
|
+
retry_data[:count] > 0
|
148
154
|
end
|
149
155
|
|
150
156
|
instances[options] = service
|
data/paperclip-azure.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "paperclip-azure"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jordan Yaker", "Supportify, Inc."]
|