net_http_timeout_errors 0.3.5 → 0.4.1

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: b9372241bffd0bf8bd4db6a8433c93e55c0271169e6027e98bc48217ff20da14
4
- data.tar.gz: 232a190a91c2c03b1603238a1e5ae3510feac7503c897af17f937b9ed21c11ba
3
+ metadata.gz: 943e742b7f7430cfd585b1457eae1f8b28708079e1a0067cf51c443f41fc6ca3
4
+ data.tar.gz: 4df52a53c4f55a55b89a7333993ae3beb6f0d5d34c739ffc54939399838b6089
5
5
  SHA512:
6
- metadata.gz: 4c626a3e3303fc35d27123dd9460933145e5443e0678ba4d972f17f892a9e76c8acd17f95c697ffdcefa42e0b9f0bd832c687d2f640cb9215d2c225db176d754
7
- data.tar.gz: a025be30eaf3f2e53a9397d36dcf0b12443496dafad550d6056125ea0ffc447c7f89186143faae661836433b897f43fab8d33485779bc2d47f44648adae1345d
6
+ metadata.gz: e6b0d0b56a9b844b4b099e7473a55ea866244bbcd3a55bd680f490d9e5b968a148a8ade64b4f23af306f20c21c790be321659dd4955258a5579d079ead8a1e80
7
+ data.tar.gz: 88b0ccf3caa8c6ba069b48b57662032bcf34e6e0fa35c96300092eb473e5659378cf904cb376249fa748ede611fd8766c6e5723254834515b2e3e5ff013da11d
@@ -0,0 +1,26 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ ruby-version: ["3.0", "2.7", "2.6"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby ${{ matrix.ruby-version }}
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
25
+ - name: Run tests
26
+ run: bundle exec rake
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ AllCops:
2
+ Exclude:
3
+ - "tmp/**/*"
4
+ inherit_gem:
5
+ barsoom_utils: shared_rubocop.yml
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.4.0
4
+
5
+ * Added `Errno::ECONNABORTED`.
6
+
7
+ ## 0.3.5 and earlier
8
+
9
+ * See Git history.
data/Gemfile CHANGED
@@ -1,4 +1,9 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in net_http_timeout_errors.gemspec
4
4
  gemspec
5
+
6
+ group :development do
7
+ gem "barsoom_utils", github: "barsoom/barsoom_utils"
8
+ gem "rubocop"
9
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2012 [Barsoom AB](http://barsoom.se)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -56,25 +56,4 @@ You may prefer about *this* library that it very explicitly raises a single exce
56
56
 
57
57
  ## License
58
58
 
59
- Copyright (c) 2012 [Barsoom AB](http://barsoom.se)
60
-
61
- MIT License
62
-
63
- Permission is hereby granted, free of charge, to any person obtaining
64
- a copy of this software and associated documentation files (the
65
- "Software"), to deal in the Software without restriction, including
66
- without limitation the rights to use, copy, modify, merge, publish,
67
- distribute, sublicense, and/or sell copies of the Software, and to
68
- permit persons to whom the Software is furnished to do so, subject to
69
- the following conditions:
70
-
71
- The above copyright notice and this permission notice shall be
72
- included in all copies or substantial portions of the Software.
73
-
74
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
75
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
76
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
77
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
78
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
79
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
80
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
59
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -6,4 +6,4 @@ Rake::TestTask.new do |t|
6
6
  t.pattern = "spec/*_spec.rb"
7
7
  end
8
8
 
9
- task :default => :test
9
+ task default: :test
@@ -1,3 +1,3 @@
1
1
  class NetHttpTimeoutErrors
2
- VERSION = "0.3.5"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -11,10 +11,13 @@ end
11
11
 
12
12
  class NetHttpTimeoutErrors
13
13
  def self.all
14
+ # Based on the errors listed in https://ruby-doc.org/stdlib-2.7.1/libdoc/net/http/rdoc/Net/HTTP.html#method-i-max_retries-3D.
14
15
  [
16
+ Net::ReadTimeout,
15
17
  EOFError,
16
- Errno::ECONNREFUSED,
17
18
  Errno::ECONNRESET,
19
+ Errno::ECONNABORTED,
20
+ Errno::ECONNREFUSED,
18
21
  Errno::EHOSTUNREACH,
19
22
  Errno::EINVAL,
20
23
  Errno::ENETUNREACH,
@@ -23,7 +26,6 @@ class NetHttpTimeoutErrors
23
26
  Net::HTTPBadResponse,
24
27
  Net::HTTPHeaderSyntaxError,
25
28
  Net::ProtocolError,
26
- Net::ReadTimeout,
27
29
  SocketError,
28
30
  Timeout::Error, # Also covers subclasses like Net::OpenTimeout.
29
31
  ]
@@ -1,17 +1,17 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/net_http_timeout_errors/version', __FILE__)
2
+ require File.expand_path("../lib/net_http_timeout_errors/version", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Henrik Nyh"]
6
- gem.email = ["henrik@nyh.se"]
5
+ gem.authors = [ "Henrik Nyh" ]
6
+ gem.email = [ "henrik@nyh.se" ]
7
7
  gem.summary = %q{Provides a list of Net::HTTP timeout errors.}
8
8
  gem.homepage = "https://github.com/barsoom/net_http_timeout_errors"
9
+ gem.license = "MIT"
10
+ gem.metadata = { "rubygems_mfa_required" => "true" }
9
11
 
10
12
  gem.files = `git ls-files`.split($\)
11
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
12
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = "net_http_timeout_errors"
14
- gem.require_paths = ["lib"]
14
+ gem.require_paths = [ "lib" ]
15
15
  gem.version = NetHttpTimeoutErrors::VERSION
16
16
 
17
17
  gem.add_development_dependency "rake"
@@ -31,13 +31,11 @@ describe NetHttpTimeoutErrors, ".conflate" do
31
31
  end
32
32
 
33
33
  it "keeps the original error" do
34
- begin
35
- NetHttpTimeoutErrors.conflate do
36
- raise some_timeout_error
37
- end
38
- rescue => e
39
- assert_instance_of some_timeout_error, e.original_error
34
+ NetHttpTimeoutErrors.conflate do
35
+ raise some_timeout_error
40
36
  end
37
+ rescue => e
38
+ assert_instance_of some_timeout_error, e.original_error
41
39
  end
42
40
  end
43
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net_http_timeout_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -45,8 +45,12 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".github/workflows/ci.yml"
48
49
  - ".gitignore"
50
+ - ".rubocop.yml"
51
+ - CHANGELOG.md
49
52
  - Gemfile
53
+ - LICENSE.txt
50
54
  - README.md
51
55
  - Rakefile
52
56
  - lib/net_http_timeout_errors.rb
@@ -54,8 +58,10 @@ files:
54
58
  - net_http_timeout_errors.gemspec
55
59
  - spec/net_http_timeout_errors_spec.rb
56
60
  homepage: https://github.com/barsoom/net_http_timeout_errors
57
- licenses: []
58
- metadata: {}
61
+ licenses:
62
+ - MIT
63
+ metadata:
64
+ rubygems_mfa_required: 'true'
59
65
  post_install_message:
60
66
  rdoc_options: []
61
67
  require_paths:
@@ -71,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
77
  - !ruby/object:Gem::Version
72
78
  version: '0'
73
79
  requirements: []
74
- rubygems_version: 3.0.2
80
+ rubygems_version: 3.2.31
75
81
  signing_key:
76
82
  specification_version: 4
77
83
  summary: Provides a list of Net::HTTP timeout errors.
78
- test_files:
79
- - spec/net_http_timeout_errors_spec.rb
84
+ test_files: []