infield 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e38ea40e467d3cbeb1bdffa874079e8e239b5848a0b29c92950af25e29be7cc
4
- data.tar.gz: fe0209155165140aa4b0b00c42522fa17140e9b16c0b11a5934efd88e174a0e5
3
+ metadata.gz: 2740909fa23076f115a2b77efeb50beaf0e41d94b87ea19499fb0542066a3cdb
4
+ data.tar.gz: 03bcbc9f9041698357e7d761dcc1a186345ad3029a95a9b367bd13271dc2aba2
5
5
  SHA512:
6
- metadata.gz: 851bfaa811aa0420cb11e538849e96799f2ea806620c918ee4b883d708a95343ebc4f94845d008d163d788a925037a98c4577bbaa79fd2a5c737b5740979c455
7
- data.tar.gz: 883a1530b0d8b9924d2c11d9103e6ac8b0aebcd93586f5a5fd40bbff4451b6f79658c0229d448190acf9795ea3e3c81fbd2ed23a8a8836b51b8daa7df3c9bcdc
6
+ metadata.gz: 8185fe69d7d489ea72b2d62c4a0487dc5385be714b71a1c21ccd2b4c9f5a01ba6d6e99cc5ca3fc12648816b8e9dc15d0550c6170515a8cf406daef0c410f06bf
7
+ data.tar.gz: 4f208e424bed118a16b949a54a42222bcc72f01d11352484d9d32ef783ae04c9d18ddcd9094e52a5e1863a0a53eab6e4b15fa8bda74a38cd7bf82f3cbb840a06
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.3
1
+ 2.7.8
@@ -12,10 +12,20 @@ module Infield
12
12
 
13
13
  # Handles spinning up a thread to process work
14
14
  module Runner
15
+ # The list of errors ::Net::HTTP is known to raise
16
+ # See https://github.com/ruby/ruby/blob/b0c639f249165d759596f9579fa985cb30533de6/lib/bundler/fetcher.rb#L281-L286
17
+ HTTP_ERRORS = [
18
+ Timeout::Error, EOFError, SocketError, Errno::ENETDOWN, Errno::ENETUNREACH,
19
+ Errno::EINVAL, Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EAGAIN,
20
+ Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
21
+ Zlib::BufError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED
22
+ ].freeze
23
+
15
24
  class << self
16
25
  attr_reader :queue
17
26
 
18
27
  def enqueue(message)
28
+ @queue ||= Queue.new
19
29
  return if @queue.size >= @queue_limit
20
30
  @queue << message
21
31
  end
@@ -65,6 +75,7 @@ module Infield
65
75
  default_api_params.merge(messages: messages).to_json,
66
76
  { 'Content-Type' => 'application/json', 'Authorization' => "bearer #{Infield.api_key}" })
67
77
  end
78
+ rescue *HTTP_ERRORS => e
68
79
  end
69
80
  end
70
81
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Infield
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.8'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infield
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infield
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  requirements: []
52
- rubygems_version: 3.4.19
52
+ rubygems_version: 3.1.6
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Send deprecation warnings to Infield