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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e25eaeebd866fe407bcb39282937568f1c5489feb0b3ac479d92c2b19d8920c
4
- data.tar.gz: 151e9d28039d7698a32e25ff7b1dae39c32e871ed295809f11a586c5f6221bcc
3
+ metadata.gz: a8a87deb869d776663b7fa4a32a87fcf73ffe2434e2fbe4fdef1ce7d6e48cf55
4
+ data.tar.gz: 294efe7598f57309b0cbc3a3190685663384c9b3374c9afa621e728205bc367e
5
5
  SHA512:
6
- metadata.gz: 3ee68adf94333adcb92f9453ec0c65e23437458e6586f0078471ba8b5691d3ca0b5e377656a16fb6750ee585f255cd5af38218dbf873fd6b7e5e9ec1997a8997
7
- data.tar.gz: 49f80f1b039ba67e86e1515aac927382249f2bdca33cb8d71e8be8753d82d6f69c56d010be4521c2e661a51662adb698478348949fc01ac22e1419212cfc640c
6
+ metadata.gz: 1d7d3f067b9de755a9976d572e668cad8d39e38968da71f209a5044debd3b0db14c7f70bf96b4237eae1da73178cdcafd454f28cc1bba34e6d92f02194ee94e0
7
+ data.tar.gz: 9638590a3e4ee48ccd9c6409aadd140182315a0a648896b52a14fd5419c67bba1a4266cf00e51ec9dca6b17e77520373373ef7693d8155bfeb5409078c3ca9f6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 5.4.2 (2024-04-19)
2
+
3
+ * Add support for HTTPX 1.x (@HoneyryderChuck)
4
+
1
5
  ## 5.4.1 (2023-05-20)
2
6
 
3
7
  * Handle additional params in `Content-Disposition` header (@janko)
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.22", ">= 0.22.2"
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(:basic_authentication)
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
@@ -1,5 +1,5 @@
1
1
  # frozen-string-literal: true
2
2
 
3
3
  module Down
4
- VERSION = "5.4.1"
4
+ VERSION = "5.4.2"
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.4.1
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: 2023-05-20 00:00:00.000000000 Z
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.22'
76
- - - ">="
75
+ version: '0'
76
+ - - "<"
77
77
  - !ruby/object:Gem::Version
78
- version: 0.22.2
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.22'
86
- - - ">="
85
+ version: '0'
86
+ - - "<"
87
87
  - !ruby/object:Gem::Version
88
- version: 0.22.2
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.4.12
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.