ae_network_connection_exception 1.5.0 → 1.5.1
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 +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +8 -4
- data/Rakefile +8 -11
- data/ae_network_connection_exception.gemspec +21 -16
- data/lib/ae_network_connection_exception.rb +22 -27
- data/lib/ae_network_connection_exception/version.rb +3 -1
- data/test/{unit/ae_network_connection_exception_test.rb → ae_network_connection_exception_test.rb} +62 -21
- data/test/test_helper.rb +21 -27
- metadata +113 -17
- data/.circleci/config.yml +0 -30
- data/.gitignore +0 -16
- data/.ruby-version +0 -1
- data/Appraisals +0 -11
- data/Gemfile +0 -12
- data/gemfiles/ruby_2.3.3.gemfile +0 -11
- data/gemfiles/ruby_2.5.3.gemfile +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc450ad55db0a8f4cb215456febc78863952696f9377e414319cbec89c48487
|
4
|
+
data.tar.gz: 29e33ec6b78d8c20dfcb83461e59bba418da66eb4baeeab8f73003b5196318ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a0d4961997581c28d8b134a8f99377c7797da61f66271451890ab12c05372a09b6cb3c76442cd6dc9765ea745275099e7d0d067aa352b34fd1281f6fc4f0d83
|
7
|
+
data.tar.gz: f723b4bb0993cd613bae796e27d45b23a87f4f9f269bfb65ca214501e1c4b481cea0fa4faa5b0f564d629a19364ac6c4afa6614be2a0999a1787c18c08c1d51d
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# AeNetworkConnectionException
|
2
2
|
|
3
|
-
|
3
|
+
Catch exceptions related to establishing a network connection and return a generic error.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -19,17 +19,21 @@ Or install it yourself as:
|
|
19
19
|
$ gem install ae_network_connection_exception
|
20
20
|
|
21
21
|
## Usage
|
22
|
-
|
22
|
+
|
23
|
+
```ruby
|
23
24
|
AeNetworkConnectionException.try do
|
24
25
|
# your code that will make a network call
|
25
26
|
end
|
26
27
|
```
|
27
28
|
|
28
|
-
If your network call failed to
|
29
|
+
If your network call failed to establish a network connection, an exception of this type will be thrown:
|
30
|
+
```ruby
|
31
|
+
AeNetworkConnectionException::ConnectionNotEstablished
|
32
|
+
```
|
29
33
|
|
30
34
|
## Contributing
|
31
35
|
|
32
|
-
1. Fork it (
|
36
|
+
1. Fork it (https://github.com/appfolio/ae_network_connection_exception/fork)
|
33
37
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
34
38
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
35
39
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
@@ -1,24 +1,21 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'bundler'
|
4
|
+
|
3
5
|
begin
|
4
6
|
Bundler.setup(:default, :development)
|
5
7
|
rescue Bundler::BundlerError => e
|
6
|
-
|
7
|
-
|
8
|
+
warn e.message
|
9
|
+
warn 'Run `bundle install` to install missing gems'
|
8
10
|
exit e.status_code
|
9
11
|
end
|
10
12
|
|
11
|
-
require '
|
12
|
-
require 'af_gems/appraisal'
|
13
|
+
require 'rake/testtask'
|
13
14
|
|
14
15
|
Rake::TestTask.new(:test) do |test|
|
15
16
|
test.libs << 'lib' << 'test'
|
16
|
-
test.pattern = 'test
|
17
|
+
test.pattern = 'test/**/*_test.rb'
|
17
18
|
test.verbose = true
|
18
19
|
end
|
19
20
|
|
20
|
-
task :
|
21
|
-
|
22
|
-
namespace :test do
|
23
|
-
AfGems::RubyAppraisalTask.new(:all, [ 'ruby-2.3.3', 'ruby-2.5.3' ])
|
24
|
-
end
|
21
|
+
task default: :test
|
@@ -1,21 +1,26 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
require 'ae_network_connection_exception/version'
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/ae_network_connection_exception/version'
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
6
|
+
spec.name = 'ae_network_connection_exception'
|
8
7
|
spec.version = AeNetworkConnectionException::VERSION
|
9
|
-
spec.
|
10
|
-
spec.email =
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
15
|
-
|
16
|
-
spec.
|
17
|
-
spec.require_paths = ["lib"]
|
8
|
+
spec.author = 'Appfolio, Inc.'
|
9
|
+
spec.email = 'opensource@appfolio.com'
|
10
|
+
spec.summary = 'Provides sane exceptions for network failures'
|
11
|
+
spec.description = 'Catch exceptions related to establishing a network connection and return a generic error.'
|
12
|
+
spec.homepage = 'https://github.com/appfolio/ae_network_connection_exception'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
spec.files = Dir['**/*'].select { |f| f[%r{^(lib/|test/|Rakefile$|README.md$|LICENSE.txt$|\w+\.*gemspec)}] }
|
15
|
+
spec.require_paths = ['lib']
|
18
16
|
|
19
|
-
spec.add_development_dependency
|
20
|
-
spec.add_development_dependency
|
17
|
+
spec.add_development_dependency('appraisal', '~> 2.2')
|
18
|
+
spec.add_development_dependency('bundler', ['>= 1.7', '< 3.0'])
|
19
|
+
spec.add_development_dependency('minitest', '~> 5.0')
|
20
|
+
spec.add_development_dependency('minitest-reporters', '~> 1.4')
|
21
|
+
spec.add_development_dependency('rake', '~> 10.0')
|
22
|
+
spec.add_development_dependency('rest-client', '~> 2.0')
|
23
|
+
spec.add_development_dependency('rubocop', '~> 0.80')
|
24
|
+
spec.add_development_dependency('rubocop-minitest', '~> 0.6.2')
|
25
|
+
spec.add_development_dependency('simplecov', '~> 0.17')
|
21
26
|
end
|
@@ -1,37 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'net/http'
|
4
|
+
require 'socket'
|
4
5
|
|
5
6
|
module AeNetworkConnectionException
|
6
7
|
class ConnectionNotEstablished < StandardError
|
7
8
|
end
|
8
9
|
|
9
|
-
OTHER_EXCEPTIONS = []
|
10
|
-
if defined?(RestClient::Exceptions::OpenTimeout)
|
11
|
-
OTHER_EXCEPTIONS << RestClient::Exceptions::OpenTimeout
|
12
|
-
end
|
13
|
-
OTHER_EXCEPTIONS.freeze
|
14
|
-
|
15
10
|
class << self
|
16
11
|
def try
|
17
12
|
yield
|
18
|
-
rescue SocketError, Net::OpenTimeout, *
|
19
|
-
# SocketError happens when we fail to connect to a socket.
|
20
|
-
#
|
21
|
-
|
13
|
+
rescue SocketError, Net::OpenTimeout, *other_exceptions
|
14
|
+
# SocketError happens when we fail to connect to a socket.
|
15
|
+
# Common problems here are DNS resolution (i.e. getaddrinfo).
|
16
|
+
# Net::OpenTimeout happens when we are unable to establish an HTTP connection before the open_timeout.
|
22
17
|
raise ConnectionNotEstablished
|
23
18
|
rescue Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
|
24
|
-
# Errno::ECONNREFUSED happens when we can not connect to the port
|
25
|
-
# Errno::ETIMEDOUT happens when we timeout durring the tcp handshake
|
26
|
-
#
|
19
|
+
# Errno::ECONNREFUSED happens when we can not connect to the port.
|
20
|
+
# Errno::ETIMEDOUT happens when we timeout durring the tcp handshake.
|
21
|
+
# Errno::ETIMEDOUT can also happen after we have established a connection and are waiting for a response.
|
27
22
|
# Because of this, we also check that the sys call that was made is connect(2).
|
28
|
-
# Errno::* Exceptions have the following error message format
|
29
|
-
#
|
30
|
-
|
23
|
+
# Errno::* Exceptions have the following error message format:
|
24
|
+
# "#{Message string} - #{syscall} for "#{host}" port #{port}"
|
31
25
|
raise_if_exception_message_matches(e, /connect\(2\)/)
|
32
26
|
rescue Errno::ECONNRESET => e
|
33
|
-
# Errno::ECONNRESET happens when the connection is reset. This can happen during
|
34
|
-
|
27
|
+
# Errno::ECONNRESET happens when the connection is reset. This can happen during SSL negotiation.
|
35
28
|
raise_if_exception_message_matches(e, /SSL_connect/)
|
36
29
|
end
|
37
30
|
|
@@ -42,7 +35,7 @@ module AeNetworkConnectionException
|
|
42
35
|
Errno::ECONNREFUSED.new('Connection refused - connect(2) for "example.com" port 443'),
|
43
36
|
Errno::ETIMEDOUT.new('Connection timed out - connect(2) for "example.com" port 443'),
|
44
37
|
Net::OpenTimeout.new('message'),
|
45
|
-
Errno::ECONNRESET.new('Connection reset by peer - SSL_connect'
|
38
|
+
Errno::ECONNRESET.new('Connection reset by peer - SSL_connect'),
|
46
39
|
Errno::EHOSTUNREACH.new('No route to host - connect(2) for "example.com" port 443'),
|
47
40
|
Errno::ENETUNREACH.new('Network is unreachable - connect(2) for "example.com" port 443')
|
48
41
|
]
|
@@ -50,12 +43,14 @@ module AeNetworkConnectionException
|
|
50
43
|
|
51
44
|
private
|
52
45
|
|
46
|
+
def other_exceptions
|
47
|
+
defined?(RestClient::Exceptions::OpenTimeout) ? [RestClient::Exceptions::OpenTimeout] : []
|
48
|
+
end
|
49
|
+
|
53
50
|
def raise_if_exception_message_matches(exception, pattern)
|
54
|
-
if exception.message =~ pattern
|
55
|
-
|
56
|
-
|
57
|
-
raise exception
|
58
|
-
end
|
51
|
+
raise ConnectionNotEstablished if exception.message =~ pattern
|
52
|
+
|
53
|
+
raise exception
|
59
54
|
end
|
60
55
|
end
|
61
56
|
end
|
data/test/{unit/ae_network_connection_exception_test.rb → ae_network_connection_exception_test.rb}
RENAMED
@@ -1,12 +1,14 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'test_helper'
|
3
4
|
|
4
5
|
module AeNetworkConnectionException
|
5
6
|
class AeNetworkConnectionExceptionTest < Minitest::Test
|
6
|
-
def
|
7
|
-
|
8
|
-
|
7
|
+
def test_that_it_has_a_version_number
|
8
|
+
refute_nil ::AeNetworkConnectionException::VERSION
|
9
|
+
end
|
9
10
|
|
11
|
+
def test_connection_not_established_exception
|
10
12
|
parent_exception = AeNetworkConnectionException::ConnectionNotEstablished.new('Parent Message')
|
11
13
|
|
12
14
|
assert_nil parent_exception.cause
|
@@ -15,16 +17,15 @@ module AeNetworkConnectionException
|
|
15
17
|
begin
|
16
18
|
child_exception = nil
|
17
19
|
begin
|
18
|
-
raise StandardError
|
19
|
-
rescue => e
|
20
|
+
raise StandardError, 'New Child Message'
|
21
|
+
rescue StandardError => e
|
20
22
|
child_exception = e
|
21
|
-
|
23
|
+
AeNetworkConnectionException::ConnectionNotEstablished.new('New Parent Message')
|
22
24
|
end
|
23
|
-
rescue AeNetworkConnectionException::ConnectionNotEstablished =>
|
24
|
-
|
25
|
+
rescue AeNetworkConnectionException::ConnectionNotEstablished => e
|
25
26
|
refute_nil child_exception
|
26
|
-
assert_equal child_exception,
|
27
|
-
assert_equal 'New Parent Message, cause => StandardError: New Child Message',
|
27
|
+
assert_equal child_exception, e.cause
|
28
|
+
assert_equal 'New Parent Message, cause => StandardError: New Child Message', e.message
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
@@ -43,31 +44,71 @@ module AeNetworkConnectionException
|
|
43
44
|
assert_connection_not_established_thrown_for(e)
|
44
45
|
end
|
45
46
|
|
46
|
-
|
47
|
-
assert_connection_not_established_not_thrown_for(
|
47
|
+
econnreset = Errno::ECONNRESET.new('Connection timed out - connect(2) for "example.com" port 443')
|
48
|
+
assert_connection_not_established_not_thrown_for(econnreset)
|
49
|
+
etimeout = Errno::ETIMEDOUT.new('Connection timed out - recvfrom(2) for "example.com" port 443')
|
50
|
+
assert_connection_not_established_not_thrown_for(etimeout)
|
48
51
|
end
|
49
52
|
|
50
|
-
def
|
51
|
-
|
53
|
+
def test_ae_network_connection_exception_try__raises_connection_not_establised_exception_rest_client_open_timeout
|
54
|
+
open_timeout = RestClient::Exceptions::OpenTimeout.new
|
55
|
+
assert_connection_not_established_thrown_for(open_timeout)
|
52
56
|
end
|
53
57
|
|
54
58
|
def test_exception_signatures
|
55
|
-
expected_signatures
|
59
|
+
assert_equal expected_signatures.size, AeNetworkConnectionException.exception_signatures.size
|
60
|
+
|
61
|
+
expected_signatures.each do |e|
|
62
|
+
assert_includes AeNetworkConnectionException.exception_signatures, e
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_rest_client_not_defined
|
67
|
+
old = RestClient::Exceptions::OpenTimeout
|
68
|
+
RestClient::Exceptions.send(:remove_const, :OpenTimeout)
|
69
|
+
|
70
|
+
assert_empty AeNetworkConnectionException.send(:other_exceptions)
|
71
|
+
ensure
|
72
|
+
RestClient::Exceptions.const_set(:OpenTimeout, old)
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
def expected_signatures
|
78
|
+
[
|
56
79
|
SocketError.new('getaddrinfo: Name or service not known'),
|
57
80
|
Errno::ECONNREFUSED.new('Connection refused - connect(2) for "example.com" port 443'),
|
58
81
|
Errno::ETIMEDOUT.new('Connection timed out - connect(2) for "example.com" port 443'),
|
59
82
|
Net::OpenTimeout.new('message'),
|
60
|
-
Errno::ECONNRESET.new('Connection reset by peer - SSL_connect'
|
83
|
+
Errno::ECONNRESET.new('Connection reset by peer - SSL_connect'),
|
61
84
|
Errno::EHOSTUNREACH.new('No route to host - connect(2) for "example.com" port 443'),
|
62
85
|
Errno::ENETUNREACH.new('Network is unreachable - connect(2) for "example.com" port 443')
|
63
86
|
]
|
87
|
+
end
|
64
88
|
|
65
|
-
|
89
|
+
def assert_connection_not_established_thrown_for(exception)
|
90
|
+
e = return_raised_error do
|
91
|
+
AeNetworkConnectionException.try do
|
92
|
+
raise exception
|
93
|
+
end
|
94
|
+
end
|
95
|
+
assert_equal AeNetworkConnectionException::ConnectionNotEstablished, e.class
|
96
|
+
assert_equal exception, e.cause
|
97
|
+
end
|
66
98
|
|
67
|
-
|
68
|
-
|
99
|
+
def assert_connection_not_established_not_thrown_for(exception)
|
100
|
+
e = return_raised_error do
|
101
|
+
AeNetworkConnectionException.try do
|
102
|
+
raise exception
|
103
|
+
end
|
69
104
|
end
|
105
|
+
assert_equal exception, e
|
106
|
+
end
|
107
|
+
|
108
|
+
def return_raised_error
|
109
|
+
yield
|
110
|
+
rescue StandardError => e
|
111
|
+
e
|
70
112
|
end
|
71
113
|
end
|
72
114
|
end
|
73
|
-
|
data/test/test_helper.rb
CHANGED
@@ -1,32 +1,26 @@
|
|
1
|
-
|
2
|
-
require 'minitest/autorun'
|
3
|
-
require 'ae_network_connection_exception'
|
1
|
+
# frozen_string_literal: true
|
4
2
|
|
5
|
-
|
3
|
+
require 'bundler'
|
6
4
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
assert_equal AeNetworkConnectionException::ConnectionNotEstablished, e.class
|
15
|
-
assert_equal exception, e.cause
|
16
|
-
end
|
17
|
-
|
18
|
-
def assert_connection_not_established_not_thrown_for(exception)
|
19
|
-
e = return_raised_error do
|
20
|
-
AeNetworkConnectionException.try do
|
21
|
-
raise exception
|
22
|
-
end
|
23
|
-
end
|
24
|
-
assert_equal exception, e
|
25
|
-
end
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
warn e.message
|
9
|
+
warn 'Run `bundle install` to install missing gems'
|
10
|
+
exit e.status_code
|
11
|
+
end
|
26
12
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
13
|
+
if ENV['WITH_COVERAGE'] == 'true'
|
14
|
+
require 'simplecov'
|
15
|
+
SimpleCov.start do
|
16
|
+
enable_coverage :branch
|
17
|
+
add_filter %r{\A/test}
|
31
18
|
end
|
32
19
|
end
|
20
|
+
|
21
|
+
require 'ae_network_connection_exception'
|
22
|
+
require 'minitest/autorun'
|
23
|
+
require 'minitest/reporters'
|
24
|
+
require 'rest-client'
|
25
|
+
|
26
|
+
MiniTest::Reporters.use!
|
metadata
CHANGED
@@ -1,29 +1,77 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ae_network_connection_exception
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Appfolio, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2020-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: appraisal
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
25
32
|
- !ruby/object:Gem::Version
|
26
33
|
version: '1.7'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '3.0'
|
37
|
+
type: :development
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.7'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: minitest
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '5.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '5.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: minitest-reporters
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.4'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.4'
|
27
75
|
- !ruby/object:Gem::Dependency
|
28
76
|
name: rake
|
29
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,30 +86,78 @@ dependencies:
|
|
38
86
|
- - "~>"
|
39
87
|
- !ruby/object:Gem::Version
|
40
88
|
version: '10.0'
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rest-client
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '2.0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '2.0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rubocop
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0.80'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0.80'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rubocop-minitest
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 0.6.2
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 0.6.2
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: simplecov
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0.17'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0.17'
|
145
|
+
description: Catch exceptions related to establishing a network connection and return
|
146
|
+
a generic error.
|
147
|
+
email: opensource@appfolio.com
|
45
148
|
executables: []
|
46
149
|
extensions: []
|
47
150
|
extra_rdoc_files: []
|
48
151
|
files:
|
49
|
-
- ".circleci/config.yml"
|
50
|
-
- ".gitignore"
|
51
|
-
- ".ruby-version"
|
52
|
-
- Appraisals
|
53
|
-
- Gemfile
|
54
152
|
- LICENSE.txt
|
55
153
|
- README.md
|
56
154
|
- Rakefile
|
57
155
|
- ae_network_connection_exception.gemspec
|
58
|
-
- gemfiles/ruby_2.3.3.gemfile
|
59
|
-
- gemfiles/ruby_2.5.3.gemfile
|
60
156
|
- lib/ae_network_connection_exception.rb
|
61
157
|
- lib/ae_network_connection_exception/version.rb
|
158
|
+
- test/ae_network_connection_exception_test.rb
|
62
159
|
- test/test_helper.rb
|
63
|
-
|
64
|
-
homepage: http://github.com/appfolio/ae_network_connection_exception
|
160
|
+
homepage: https://github.com/appfolio/ae_network_connection_exception
|
65
161
|
licenses:
|
66
162
|
- MIT
|
67
163
|
metadata: {}
|
data/.circleci/config.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
defaults: &defaults
|
2
|
-
working_directory: ~/repo
|
3
|
-
|
4
|
-
steps:
|
5
|
-
- checkout
|
6
|
-
- run: bundle install
|
7
|
-
- run: bundle exec appraisal install
|
8
|
-
- run: bundle exec appraisal rake test
|
9
|
-
|
10
|
-
version: 2
|
11
|
-
jobs:
|
12
|
-
test-ruby-2.3.3:
|
13
|
-
<<: *defaults
|
14
|
-
docker:
|
15
|
-
- image: circleci/ruby:2.3.3
|
16
|
-
|
17
|
-
test-ruby-2.5.3:
|
18
|
-
<<: *defaults
|
19
|
-
docker:
|
20
|
-
- image: circleci/ruby:2.5.3-stretch
|
21
|
-
|
22
|
-
workflows:
|
23
|
-
version: 2
|
24
|
-
rc:
|
25
|
-
jobs:
|
26
|
-
- test-ruby-2.3.3:
|
27
|
-
context: appfolio_test_context
|
28
|
-
- test-ruby-2.5.3:
|
29
|
-
context: appfolio_test_context
|
30
|
-
|
data/.gitignore
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.3.3
|
data/Appraisals
DELETED
data/Gemfile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in ae_network_connection_exception.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
gem 'minitest', '~> 5.0'
|
7
|
-
|
8
|
-
source 'https://gemini.atl.appfolio.net' do
|
9
|
-
gem 'af_gems'
|
10
|
-
end
|
11
|
-
|
12
|
-
gem 'rest-client', '~> 2.0', require: false
|
data/gemfiles/ruby_2.3.3.gemfile
DELETED