omniai 1.6.2 → 1.6.4

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: ee3875380bef07417246342465e621d52dcaf30bf7fff0beb99e341cb61d5258
4
- data.tar.gz: 9bc2db4fd5dbdc456810753e0738c4da0481670c84d3c18f6f7ca310cd0d5514
3
+ metadata.gz: a3c40ccbf59a89846731fb7e3b1a47c4d2ecc944ea2cb45e56b4911bdc301c13
4
+ data.tar.gz: fdcd923f1ccb0db66630e48d0230c406ac1d72eb8602bee2872e4d02d10ce081
5
5
  SHA512:
6
- metadata.gz: d61725b7ed361b560d90a5887084dcaee519dca4b509fbf0a4335f10106647a577b6f852c51fd2341fa9f3be361e29d5341fd1572f068317f278651fbe6323e9
7
- data.tar.gz: 7ed311f56483076821f7906f30c6ebc8ce21798f4a03bf2bfaab4d5bab66c56c5f9a61ffb95cc32f988e91bcac32d90fc1b15df0bca14a0e7bbfe858037b510b
6
+ metadata.gz: d1cdb9d2b81d286a593c0f2becff6249c4e33e8143b4d158f3d48204dc4ca0fc6e627804722a52db69121bd5b223ae7d407eeac912d4830d7093eddfae089304
7
+ data.tar.gz: 1b0f10832178feb1304da5d12abe1bd9613df52ffa8eb2edf1678668cdb3425487e90323774ca8e092b95002f83001eb4b560bc0c8536bc133222842b67986ff
@@ -59,7 +59,7 @@ module OmniAI
59
59
  #
60
60
  # @return [HTTP::Response]
61
61
  def request!
62
- response = HTTP.get(@uri)
62
+ response = HTTP.follow.get(@uri)
63
63
  raise FetchError, response.flush unless response.status.success?
64
64
 
65
65
  response
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = '1.6.2'
4
+ VERSION = '1.6.4'
5
5
  end
data/lib/omniai.rb CHANGED
@@ -17,12 +17,18 @@ module OmniAI
17
17
 
18
18
  # An error that wraps an HTTP::Response for non-OK requests.
19
19
  class HTTPError < Error
20
+ # @return [HTTP::Response]
20
21
  attr_accessor :response
21
22
 
22
23
  # @param response [HTTP::Response]
23
24
  def initialize(response)
24
- super("status=#{response.status.inspect} headers=#{response.headers.inspect} body=#{response.body}")
25
+ super("status=#{response.status} body=#{response.body}")
26
+
25
27
  @response = response
26
28
  end
29
+
30
+ def inspect
31
+ "#<#{self.class} status=#{@response.status} body=#{@response.body}>"
32
+ end
27
33
  end
28
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-18 00:00:00.000000000 Z
11
+ date: 2024-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event_stream_parser