From fd6b7bfa666e3ca67ed72b06eb9463d2021e3cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janko=20Marohni=C4=87?= Date: Thu, 26 Sep 2019 15:16:10 +0200 Subject: [PATCH] Drop support for HTTP::Client argument in Down::Http.new --- CHANGELOG.md | 2 ++ lib/down/http.rb | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa3b378..f01a242 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ * Halve memory allocation for `ChunkedIO#read` without arguments (@janko) +* Drop support for `HTTP::Client` argument in `Down::HTTP.new` (@janko) + ## 4.8.1 (2019-05-01) * Make `ChunkedIO#read`/`#readpartial` with length always return strings in binary encoding (@janko) diff --git a/lib/down/http.rb b/lib/down/http.rb index 563077b..2db3867 100644 --- a/lib/down/http.rb +++ b/lib/down/http.rb @@ -13,11 +13,6 @@ module Down class Http < Backend # Initializes the backend with common defaults. def initialize(options = {}, &block) - if options.is_a?(HTTP::Client) - warn "[Down] Passing an HTTP::Client object to Down::Http#initialize is deprecated and won't be supported in Down 5. Use the block initialization instead." - options = options.default_options.to_hash - end - @method = options.delete(:method) || :get @client = HTTP .headers("User-Agent" => "Down/#{Down::VERSION}")