resizing 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -5
- data/lib/resizing/client.rb +10 -12
- data/lib/resizing/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16685748235707bfd7dd6fde028dd839e96952a1a7a578768711d92781426424
|
4
|
+
data.tar.gz: ad2ba8a809285bc463ffb63d8eff5a385935b0a4ebde595a0591580f94a10d50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c39810819ae6703a53854aac5599488f1d8370534b41cbe9e928130723564751423d1675569c20718d02fbf091fa0f2d02f0ba0f256034a36a7c3430f0873744
|
7
|
+
data.tar.gz: e661d0ac4b1de939ff7e617ec6ffb15f1287ea8323d723e841d27648216fd43851c5e4c5aaf253e213a71736a6605440fcc0bff9119381128b6ee5fb1f670542
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
**Merged pull requests:**
|
4
|
+
|
5
|
+
- v0.8.2 [\#53](https://github.com/jksy/resizing-gem/pull/53) ([jksy](https://github.com/jksy))
|
6
|
+
- raise APIError with message on response.body [\#52](https://github.com/jksy/resizing-gem/pull/52) ([jksy](https://github.com/jksy))
|
7
|
+
|
3
8
|
## [v0.8.1](https://github.com/jksy/resizing-gem/tree/v0.8.1) (2021-03-06)
|
4
9
|
|
5
10
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.8.0...v0.8.1)
|
@@ -28,7 +33,8 @@
|
|
28
33
|
|
29
34
|
**Merged pull requests:**
|
30
35
|
|
31
|
-
-
|
36
|
+
- v0.7.0 [\#43](https://github.com/jksy/resizing-gem/pull/43) ([jksy](https://github.com/jksy))
|
37
|
+
- APIError\#decoded\_body return hash always [\#42](https://github.com/jksy/resizing-gem/pull/42) ([jksy](https://github.com/jksy))
|
32
38
|
|
33
39
|
## [v0.6.0](https://github.com/jksy/resizing-gem/tree/v0.6.0) (2020-12-08)
|
34
40
|
|
@@ -64,7 +70,6 @@
|
|
64
70
|
|
65
71
|
**Merged pull requests:**
|
66
72
|
|
67
|
-
- v0.7.0 [\#43](https://github.com/jksy/resizing-gem/pull/43) ([jksy](https://github.com/jksy))
|
68
73
|
- fix raise error if tempfile is assinged [\#38](https://github.com/jksy/resizing-gem/pull/38) ([jksy](https://github.com/jksy))
|
69
74
|
|
70
75
|
## [v0.4.1](https://github.com/jksy/resizing-gem/tree/v0.4.1) (2020-10-01)
|
@@ -91,12 +96,11 @@
|
|
91
96
|
|
92
97
|
**Merged pull requests:**
|
93
98
|
|
94
|
-
-
|
99
|
+
- change version string when put request with mockclient [\#32](https://github.com/jksy/resizing-gem/pull/32) ([jksy](https://github.com/jksy))
|
95
100
|
- add delete method [\#31](https://github.com/jksy/resizing-gem/pull/31) ([jksy](https://github.com/jksy))
|
96
101
|
- Feature/add identifier to public [\#30](https://github.com/jksy/resizing-gem/pull/30) ([jksy](https://github.com/jksy))
|
97
102
|
- add identifier [\#29](https://github.com/jksy/resizing-gem/pull/29) ([jksy](https://github.com/jksy))
|
98
103
|
- Feature/refactor public [\#28](https://github.com/jksy/resizing-gem/pull/28) ([jksy](https://github.com/jksy))
|
99
|
-
- divide to PublicId class [\#27](https://github.com/jksy/resizing-gem/pull/27) ([jksy](https://github.com/jksy))
|
100
104
|
- fix some bug & errors [\#26](https://github.com/jksy/resizing-gem/pull/26) ([jksy](https://github.com/jksy))
|
101
105
|
- fix mockclient [\#25](https://github.com/jksy/resizing-gem/pull/25) ([jksy](https://github.com/jksy))
|
102
106
|
- fix raise no method presented, no cotent type is presented [\#24](https://github.com/jksy/resizing-gem/pull/24) ([jksy](https://github.com/jksy))
|
@@ -105,6 +109,11 @@
|
|
105
109
|
|
106
110
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.3.1...v0.3.2)
|
107
111
|
|
112
|
+
**Merged pull requests:**
|
113
|
+
|
114
|
+
- divide to PublicId class [\#27](https://github.com/jksy/resizing-gem/pull/27) ([jksy](https://github.com/jksy))
|
115
|
+
- fix raise error when call remove! with nil column [\#23](https://github.com/jksy/resizing-gem/pull/23) ([jksy](https://github.com/jksy))
|
116
|
+
|
108
117
|
## [v0.3.1](https://github.com/jksy/resizing-gem/tree/v0.3.1) (2020-09-11)
|
109
118
|
|
110
119
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.3.0...v0.3.1)
|
@@ -123,7 +132,6 @@
|
|
123
132
|
|
124
133
|
**Merged pull requests:**
|
125
134
|
|
126
|
-
- fix raise error when call remove! with nil column [\#23](https://github.com/jksy/resizing-gem/pull/23) ([jksy](https://github.com/jksy))
|
127
135
|
- version 0.2.0 [\#21](https://github.com/jksy/resizing-gem/pull/21) ([jksy](https://github.com/jksy))
|
128
136
|
- support f\_auto, q\_auto parameter [\#20](https://github.com/jksy/resizing-gem/pull/20) ([jksy](https://github.com/jksy))
|
129
137
|
|
data/lib/resizing/client.rb
CHANGED
@@ -157,10 +157,7 @@ module Resizing
|
|
157
157
|
when HTTP_STATUS_OK, HTTP_STATUS_CREATED
|
158
158
|
JSON.parse(response.body)
|
159
159
|
else
|
160
|
-
|
161
|
-
err = APIError.new("invalid http status code #{response.status}")
|
162
|
-
err.decoded_body = result
|
163
|
-
raise err
|
160
|
+
raise decode_error_from(response)
|
164
161
|
end
|
165
162
|
end
|
166
163
|
|
@@ -171,10 +168,7 @@ module Resizing
|
|
171
168
|
when HTTP_STATUS_OK, HTTP_STATUS_NOT_FOUND
|
172
169
|
JSON.parse(response.body)
|
173
170
|
else
|
174
|
-
|
175
|
-
err = APIError.new("invalid http status code #{response.status}")
|
176
|
-
err.decoded_body = result
|
177
|
-
raise err
|
171
|
+
raise decode_error_from(response)
|
178
172
|
end
|
179
173
|
end
|
180
174
|
|
@@ -185,11 +179,15 @@ module Resizing
|
|
185
179
|
when HTTP_STATUS_OK, HTTP_STATUS_NOT_FOUND
|
186
180
|
JSON.parse(response.body)
|
187
181
|
else
|
188
|
-
|
189
|
-
err = APIError.new("invalid http status code #{response.status}")
|
190
|
-
err.decoded_body = result
|
191
|
-
raise err
|
182
|
+
raise decode_error_from(response)
|
192
183
|
end
|
193
184
|
end
|
185
|
+
|
186
|
+
def decode_error_from response
|
187
|
+
result = JSON.parse(response.body) rescue {}
|
188
|
+
err = APIError.new(result['message'] || "invalid http status code #{response.status}")
|
189
|
+
err.decoded_body = result
|
190
|
+
err
|
191
|
+
end
|
194
192
|
end
|
195
193
|
end
|
data/lib/resizing/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resizing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Junichiro Kasuya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|