1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00
httparty/.travis.yml
Igor Springer 413df85838 Add support for Net::HTTP#write_timeout method (Ruby 2.6.0) (#647)
* Add support for `Net::HTTP#write_timeout` method (Ruby 2.6.0)

[The method](https://ruby-doc.org/stdlib-2.6/libdoc/net/http/rdoc/Net/HTTP.html#method-i-write_timeout-3D) was introduced in Ruby 2.6.0.

The gem already supports `open_timeout` & `read_timeout`, so it would be nice to provide support for `write_timeout` as well.

From the official documentation:

> Number of seconds to wait for one block to be written (via one write(2) call). Any number may be used, including Floats for fractional seconds. If the HTTP object cannot write data in this many seconds, it raises a Net::WriteTimeout exception. The default value is 60 seconds. Net::WriteTimeout is not raised on Windows.

* Introduce private `validate_timeout_argument` method to reduce duplication

* Introduce private `add_timeout?` method to reduce duplication

* Do not warn about `write_timeout` when set using the default `timeout` option

* Introduce private `from_ruby_version` method to reduce duplication
2019-03-20 18:52:02 +04:00

11 lines
173 B
YAML

language: ruby
rvm:
- 2.0.0
- 2.1.10
- 2.2.10
- 2.3.8
- 2.4.5
- 2.5.3
- 2.6.1
bundler_args: --without development
before_install: gem install bundler -v '< 2'