Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect default_options for HTTP::Chainable#request and HTTP::Chainable#build_request #515

Merged
merged 2 commits into from
Dec 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cache: bundler
before_install:
- gem update --system
- gem --version
- gem install bundler --no-rdoc --no-ri
- gem install bundler
ixti marked this conversation as resolved.
Show resolved Hide resolved
- bundle --version

install: bundle install --without development doc
Expand Down
16 changes: 6 additions & 10 deletions lib/http/chainable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,15 @@ def patch(uri, options = {}) # rubocop:disable Style/OptionHash
end

# Make an HTTP request with the given verb
# @param verb
# @param uri
# @option options [Hash]
def request(verb, uri, options = {}) # rubocop:disable Style/OptionHash
branch(options).request verb, uri
# @param (see Client#request)
def request(*args)
branch(default_options).request(*args)
end

# Prepare an HTTP request with the given verb
# @param verb
# @param uri
# @option options [Hash]
def build_request(verb, uri, options = {}) # rubocop:disable Style/OptionHash
branch(options).build_request verb, uri
# @param (see Client#build_request)
def build_request(*args)
branch(default_options).build_request(*args)
end

# @overload timeout(options = {})
Expand Down