excon 0.91.0 → 0.92.0

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: e3237bec4b3a4d99c887994951fe0c763adc068f9d9a78bbfca7482f2bba9dbe
4
- data.tar.gz: 0b301cba65c7a58fa2de72be34c1b0897f3f9090e270f3d50590d57d5e232c7f
3
+ metadata.gz: e94b994dd5e152996acf5bc54698e735225399aee751f8c5dc4a28db3751f898
4
+ data.tar.gz: e29454b6a62eaf02f913f068462652dd59634c6f913c9a9b4035e85dfc7b3c43
5
5
  SHA512:
6
- metadata.gz: 7c6b1e569240678aabc96de9641f1936d1dad756b5effd9d05fb84971b4adc8a36ca81eb8e4c943641ef50b2ed24d323fdcc6e6165f06181447ec457483ce4de
7
- data.tar.gz: 28c1ed5018948f76e41f868fc5914da3c28c09629f9a77b5ede76c6828bc975b9d4d45f30e05d70ed1cdd34e4bb5a79a82863e7f12c6c3714fec9c8a6549cb1a
6
+ metadata.gz: 9ec4de187348bff1c5dbd90b659da2fe285045a59f06d37fbdcf04817cf0d59c2ff448bed29aa9fea3f33cfa5d0ce728ee881a7114a6732926351a6e7e4df845
7
+ data.tar.gz: c405469df8b0ac04dc189d94cad6a119516fddc8323fb42b4455e463f841502a80833491ecedc7733ea9867068b4c43106ecb32c2274525b93890b90d85ca323
data/lib/excon/socket.rb CHANGED
@@ -60,19 +60,18 @@ module Excon
60
60
  end
61
61
 
62
62
  def readline
63
- return legacy_readline if RUBY_VERSION.to_f <= 1.8_7
64
- buffer = String.new
65
- buffer << (read_nonblock(1) || raise(EOFError)) while buffer[-1] != "\n"
66
- buffer
67
- end
68
-
69
- def legacy_readline
70
- begin
71
- Timeout.timeout(@data[:read_timeout]) do
72
- @socket.readline
63
+ if @nonblock && RUBY_VERSION.to_f > 1.8_7
64
+ buffer = String.new
65
+ buffer << (read_nonblock(1) || raise(EOFError)) while buffer[-1] != "\n"
66
+ buffer
67
+ else # nonblock/legacy
68
+ begin
69
+ Timeout.timeout(@data[:read_timeout]) do
70
+ @socket.readline
71
+ end
72
+ rescue Timeout::Error
73
+ raise Excon::Errors::Timeout.new('read timeout reached')
73
74
  end
74
- rescue Timeout::Error
75
- raise Excon::Errors::Timeout.new('read timeout reached')
76
75
  end
77
76
  end
78
77
 
data/lib/excon/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Excon
3
- VERSION = '0.91.0'
3
+ VERSION = '0.92.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.91.0
4
+ version: 0.92.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dpiddy (Dan Peterson)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-02-03 00:00:00.000000000 Z
13
+ date: 2022-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec