down 5.4.1 → 5.4.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 +4 -0
- data/down.gemspec +1 -1
- data/lib/down/httpx.rb +3 -1
- data/lib/down/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8a87deb869d776663b7fa4a32a87fcf73ffe2434e2fbe4fdef1ce7d6e48cf55
|
4
|
+
data.tar.gz: 294efe7598f57309b0cbc3a3190685663384c9b3374c9afa621e728205bc367e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d7d3f067b9de755a9976d572e668cad8d39e38968da71f209a5044debd3b0db14c7f70bf96b4237eae1da73178cdcafd454f28cc1bba34e6d92f02194ee94e0
|
7
|
+
data.tar.gz: 9638590a3e4ee48ccd9c6409aadd140182315a0a648896b52a14fd5419c67bba1a4266cf00e51ec9dca6b17e77520373373ef7693d8155bfeb5409078c3ca9f6
|
data/CHANGELOG.md
CHANGED
data/down.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_development_dependency "minitest", "~> 5.8"
|
21
21
|
spec.add_development_dependency "mocha", "~> 1.5"
|
22
22
|
spec.add_development_dependency "rake"
|
23
|
-
spec.add_development_dependency "httpx", "~> 0
|
23
|
+
spec.add_development_dependency "httpx", "~> 0", "< 2.0.0"
|
24
24
|
# http 5.0 drop support of ruby 2.3 and 2.4. We still support those versions.
|
25
25
|
if RUBY_VERSION >= "2.5"
|
26
26
|
spec.add_development_dependency "http", "~> 5.0"
|
data/lib/down/httpx.rb
CHANGED
@@ -14,12 +14,14 @@ module Down
|
|
14
14
|
|
15
15
|
USER_AGENT = "Down/#{Down::VERSION}"
|
16
16
|
|
17
|
+
BASIC_AUTH = HTTPX::VERSION >= "1.0.0" ? :basic_auth : :basic_authentication
|
18
|
+
|
17
19
|
def initialize(**options, &block)
|
18
20
|
@method = options.delete(:method) || :get
|
19
21
|
headers = options.delete(:headers) || {}
|
20
22
|
@client = HTTPX
|
21
23
|
.plugin(:follow_redirects, max_redirects: 2)
|
22
|
-
.plugin(
|
24
|
+
.plugin(BASIC_AUTH)
|
23
25
|
.plugin(:stream)
|
24
26
|
.with(
|
25
27
|
headers: { "user-agent": USER_AGENT }.merge(headers),
|
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.4.
|
4
|
+
version: 5.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -72,20 +72,20 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0
|
76
|
-
- - "
|
75
|
+
version: '0'
|
76
|
+
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 0.
|
78
|
+
version: 2.0.0
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - "~>"
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: '0
|
86
|
-
- - "
|
85
|
+
version: '0'
|
86
|
+
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 0.
|
88
|
+
version: 2.0.0
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: http
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
- !ruby/object:Gem::Version
|
183
183
|
version: '0'
|
184
184
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
185
|
+
rubygems_version: 3.5.3
|
186
186
|
signing_key:
|
187
187
|
specification_version: 4
|
188
188
|
summary: Robust streaming downloads using Net::HTTP, HTTP.rb or wget.
|