jess 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -0
- data/.travis.yml +4 -4
- data/CHANGELOG.md +4 -0
- data/jess.gemspec +9 -2
- data/lib/jess/http_client/error_decorator.rb +7 -7
- data/lib/jess/http_client/logging_decorator.rb +10 -1
- data/lib/jess/version.rb +1 -1
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9659e81236ee187c8e3cc1a0704e395cc435cb0aad39421707b9db72debcd35
|
4
|
+
data.tar.gz: 681961dcd17c7c938ba262940e1cb403306554ec68273f07b5298207463779ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a723911a4d3e6201c9aaacfc0d73b9b33a0da5175d967625c32a55b656f44f9e18bad11737524fafac95d52966e1b80a53b0b9dec6602ed31f6dfc00769191c4
|
7
|
+
data.tar.gz: 2caec64ae710d44c107d770c7203837a63f01bfd6753384104c0685718b1635f0df0dcd020ddbf061364c1296709b1f2d6509796b535abb1e4cd219e3ceca265
|
data/.rubocop.yml
CHANGED
@@ -7,14 +7,25 @@ Metrics/AbcSize:
|
|
7
7
|
Exclude:
|
8
8
|
- "test/**/*"
|
9
9
|
|
10
|
+
Metrics/BlockLength:
|
11
|
+
Exclude:
|
12
|
+
- "*.gemspec"
|
13
|
+
|
10
14
|
Metrics/ClassLength:
|
11
15
|
Exclude:
|
12
16
|
- "test/**/*"
|
13
17
|
|
18
|
+
Metrics/LineLength:
|
19
|
+
Exclude:
|
20
|
+
- "*.gemspec"
|
21
|
+
|
14
22
|
Metrics/MethodLength:
|
15
23
|
Exclude:
|
16
24
|
- "test/**/*"
|
17
25
|
|
26
|
+
Naming/MemoizedInstanceVariableName:
|
27
|
+
Enabled: false
|
28
|
+
|
18
29
|
Style/BarePercentLiterals:
|
19
30
|
EnforcedStyle: percent_q
|
20
31
|
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,10 @@ Jess is in a pre-1.0 state. This means that its APIs and behavior are subject to
|
|
8
8
|
|
9
9
|
* Your contribution here!
|
10
10
|
|
11
|
+
## [0.6.0][] (2018-04-12)
|
12
|
+
|
13
|
+
* Log more detailed stack trace when an HTTP error occurs
|
14
|
+
|
11
15
|
## [0.5.0][] (2018-03-18)
|
12
16
|
|
13
17
|
* `to_s` now produces the same output as `inspect` for `Computer` and `MobileDevice`
|
data/jess.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
lib = File.expand_path("
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require "jess/version"
|
4
4
|
|
@@ -13,6 +13,13 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/mattbrictson/jess"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
+
spec.metadata = {
|
17
|
+
"homepage_uri" => "https://github.com/mattbrictson/jess",
|
18
|
+
"changelog_uri" => "https://github.com/mattbrictson/jess/blob/master/CHANGELOG.md",
|
19
|
+
"source_code_uri" => "https://github.com/mattbrictson/jess/",
|
20
|
+
"bug_tracker_uri" => "https://github.com/mattbrictson/jess/issues"
|
21
|
+
}
|
22
|
+
|
16
23
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
24
|
f.match(%r{^(test|spec|features)/})
|
18
25
|
end
|
@@ -29,6 +36,6 @@ Gem::Specification.new do |spec|
|
|
29
36
|
spec.add_development_dependency "minitest", "~> 5.0"
|
30
37
|
spec.add_development_dependency "minitest-reporters", "~>1.1"
|
31
38
|
spec.add_development_dependency "rake", "~> 12.0"
|
32
|
-
spec.add_development_dependency "rubocop", "0.
|
39
|
+
spec.add_development_dependency "rubocop", "0.54.0"
|
33
40
|
spec.add_development_dependency "webmock", "~> 3.1"
|
34
41
|
end
|
@@ -26,19 +26,19 @@ module Jess
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# rubocop:disable Lint/EmptyWhen
|
29
|
-
def handle_exception(
|
30
|
-
case
|
29
|
+
def handle_exception(err, req)
|
30
|
+
case err
|
31
31
|
when IOError, Timeout::Error
|
32
|
-
|
32
|
+
err = ConnectionError.new(err.message)
|
33
33
|
when Error
|
34
34
|
# pass
|
35
35
|
else
|
36
|
-
|
36
|
+
err = Error.new(err.inspect)
|
37
37
|
end
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
raise
|
39
|
+
err.uri = req.uri
|
40
|
+
err.http_method = req.method
|
41
|
+
raise err
|
42
42
|
end
|
43
43
|
# rubocop:enable Lint/EmptyWhen
|
44
44
|
end
|
@@ -17,7 +17,7 @@ module Jess
|
|
17
17
|
log_response(response, req.uri)
|
18
18
|
response
|
19
19
|
rescue Error => e
|
20
|
-
|
20
|
+
log_exception(e) if logger
|
21
21
|
raise
|
22
22
|
end
|
23
23
|
|
@@ -25,6 +25,15 @@ module Jess
|
|
25
25
|
|
26
26
|
attr_reader :logger
|
27
27
|
|
28
|
+
def log_exception(err)
|
29
|
+
if err.cause
|
30
|
+
logger.error(err.to_s)
|
31
|
+
logger.error(err.cause)
|
32
|
+
else
|
33
|
+
logger.error(err)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
28
37
|
def log_request(req)
|
29
38
|
logger.debug { "#{req.method} #{req.uri}" }
|
30
39
|
end
|
data/lib/jess/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.54.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.54.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: webmock
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,7 +173,11 @@ files:
|
|
173
173
|
homepage: https://github.com/mattbrictson/jess
|
174
174
|
licenses:
|
175
175
|
- MIT
|
176
|
-
metadata:
|
176
|
+
metadata:
|
177
|
+
homepage_uri: https://github.com/mattbrictson/jess
|
178
|
+
changelog_uri: https://github.com/mattbrictson/jess/blob/master/CHANGELOG.md
|
179
|
+
source_code_uri: https://github.com/mattbrictson/jess/
|
180
|
+
bug_tracker_uri: https://github.com/mattbrictson/jess/issues
|
177
181
|
post_install_message:
|
178
182
|
rdoc_options: []
|
179
183
|
require_paths:
|