down 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1f7a1532b638ed92acdb3bdf74211dbd022e7a0de37d1fdbc25f665337d4bf1
4
- data.tar.gz: 7bbc2684d53e278376981b4dd4741c49bc0d8da0990ece28fb03776f39aea6fe
3
+ metadata.gz: 5845204de4f09b03621e6474e9f3032ae9c0ce9823dac21cfc8f435c184c4a30
4
+ data.tar.gz: f7f65817661dfc62c4ab74da59ef5f8ad6b90927c50b62da0bf77f833f79c139
5
5
  SHA512:
6
- metadata.gz: 6a3e62293c5fa1e5b43a5c835af3804ab8307babfb573179057ec279239b72a16ff74b2b2e96df9da033a3e4e13be4af6adeb8ec00dd73a27f75942b646419de
7
- data.tar.gz: d267672bb2468c8998e271ff3849908c7beead00d8b9777799e6bc0abd1ab51ccf14d5c567c16f3bb30a41eb3c57b66ffbc2755d333055fba972d327a865acb4
6
+ metadata.gz: 12b2ab829b2912913dc9ba6bfb77dcd8e9a8e909cc58cdc09b25567a936baf361657785a386766a4e6bc01d50c900240af7be694e88d4e68d829dfe0f5b09bef
7
+ data.tar.gz: '08ec832345fb6a41ba8888c15f3879a437dce282b809d236b08310dfd2ce9881df18cf663f6a11a69182af47dcc20d3bcf2688f4b32d278cfa5dbe75b9553417'
@@ -1,3 +1,7 @@
1
+ ## 5.0.1 (2019-12-20)
2
+
3
+ * In `Down::NetHttp` only use Addressable normalization if `URI.parse` fails (@coding-chimp)
4
+
1
5
  ## 5.0.0 (2019-09-26)
2
6
 
3
7
  * Change `ChunkedIO#each_chunk` to return chunks in original encoding (@janko)
data/README.md CHANGED
@@ -7,7 +7,7 @@ HTTP library.
7
7
  ## Installation
8
8
 
9
9
  ```rb
10
- gem "down", "~> 4.4"
10
+ gem "down", "~> 5.0"
11
11
  ```
12
12
 
13
13
  ## Downloading
@@ -142,7 +142,7 @@ module Down
142
142
  # or the next chunk. This is useful when you don't care about the size of
143
143
  # chunks and you want to minimize string allocations.
144
144
  #
145
- # With `length` argument returns maximum of that amount of bytes.
145
+ # With `maxlen` argument returns maximum of that amount of bytes.
146
146
  #
147
147
  # With `outbuf` argument each call will return that same string object,
148
148
  # where the value is replaced with retrieved content.
@@ -285,6 +285,8 @@ module Down
285
285
 
286
286
  # Makes sure that the URL is properly encoded.
287
287
  def addressable_normalize(url)
288
+ URI(url)
289
+ rescue URI::InvalidURIError
288
290
  addressable_uri = Addressable::URI.parse(url)
289
291
  addressable_uri.normalize.to_s
290
292
  end
@@ -1,5 +1,5 @@
1
1
  # frozen-string-literal: true
2
2
 
3
3
  module Down
4
- VERSION = "5.0.0"
4
+ VERSION = "5.0.1"
5
5
  end
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.0.0
4
+ version: 5.0.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-09-26 00:00:00.000000000 Z
11
+ date: 2019-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 3.0.3
164
+ rubygems_version: 3.1.1
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Robust streaming downloads using Net::HTTP, HTTP.rb or wget.