Skip to content

Commit

Permalink
Drop support for HTTP::Client argument in Down::Http.new
Browse files Browse the repository at this point in the history
  • Loading branch information
janko committed Sep 26, 2019
1 parent 898004d commit fd6b7bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions lib/down/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit fd6b7bf

Please sign in to comment.