down 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +1 -0
- data/lib/down/errors.rb +3 -0
- data/lib/down/net_http.rb +3 -1
- data/lib/down/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1095c57cf19a452627af18374bc2a5b8db488edf1b0cb54ff52463bb3cd80cc9
|
4
|
+
data.tar.gz: 6c2d515848f66b359caa03270d8ab7e9250468ee945f07d954f71dfeb9aea157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4dd38131e47339dae85cf1ed0b2cf903de034a25a262b10588590774fe5904d46d8ee59415dbaa7a8ba997039da09339f7c47f22666d4fe0ed53da222a14172
|
7
|
+
data.tar.gz: a07b8d1eb3a4621f92d5547e45960861cd3000f609bc171631cc88138980715545463244ce8e4a1479c1bab309f1c1e76b1401c0b9d267f486784fc8355a7a97
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
+
## 5.2.1 (2021-04-26)
|
2
|
+
|
3
|
+
* Raise `Down::NotModified` on 304 response status in `Down::NetHttp#open` (@ellafeldmann)
|
4
|
+
|
1
5
|
## 5.2.0 (2020-09-20)
|
2
6
|
|
3
7
|
* Add `:uri_normalizer` option to `Down::NetHttp` (@janko)
|
4
8
|
|
5
|
-
* Add `:http_basic_authentication` option to `Down::NetHttp#
|
9
|
+
* Add `:http_basic_authentication` option to `Down::NetHttp#open` (@janko)
|
6
10
|
|
7
11
|
* Fix uninitialized instance variables warnings in `Down::ChunkedIO` (@janko)
|
8
12
|
|
data/README.md
CHANGED
data/lib/down/errors.rb
CHANGED
@@ -13,6 +13,9 @@ module Down
|
|
13
13
|
# raised when the number of redirects was larger than the specified maximum
|
14
14
|
class TooManyRedirects < Error; end
|
15
15
|
|
16
|
+
# raised when the requested resource has not been modified
|
17
|
+
class NotModified < Error; end
|
18
|
+
|
16
19
|
# raised when response returned 4xx or 5xx response
|
17
20
|
class ResponseError < Error
|
18
21
|
attr_reader :response
|
data/lib/down/net_http.rb
CHANGED
@@ -216,7 +216,9 @@ module Down
|
|
216
216
|
request_error!(exception)
|
217
217
|
end
|
218
218
|
|
219
|
-
if response.is_a?(Net::
|
219
|
+
if response.is_a?(Net::HTTPNotModified)
|
220
|
+
raise Down::NotModified
|
221
|
+
elsif response.is_a?(Net::HTTPRedirection)
|
220
222
|
raise Down::TooManyRedirects if follows_remaining == 0
|
221
223
|
|
222
224
|
# fail if redirect URI is not a valid http or https URL
|
data/lib/down/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: down
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email:
|
141
141
|
- janko.marohnic@gmail.com
|
142
142
|
executables: []
|
@@ -160,7 +160,7 @@ homepage: https://github.com/janko/down
|
|
160
160
|
licenses:
|
161
161
|
- MIT
|
162
162
|
metadata: {}
|
163
|
-
post_install_message:
|
163
|
+
post_install_message:
|
164
164
|
rdoc_options: []
|
165
165
|
require_paths:
|
166
166
|
- lib
|
@@ -175,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
179
|
-
signing_key:
|
178
|
+
rubygems_version: 3.2.3
|
179
|
+
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Robust streaming downloads using Net::HTTP, HTTP.rb or wget.
|
182
182
|
test_files: []
|