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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ad2689108ccc9f42731b05900c66b3b4d37fba39186312d9d74d6f84bea4a81
4
- data.tar.gz: 28f5c1e8e7f63b29a64e0c728efa711b9a969fb3886698e97cd21b99ba012f5b
3
+ metadata.gz: c9659e81236ee187c8e3cc1a0704e395cc435cb0aad39421707b9db72debcd35
4
+ data.tar.gz: 681961dcd17c7c938ba262940e1cb403306554ec68273f07b5298207463779ef
5
5
  SHA512:
6
- metadata.gz: fed83f8057f2ffc7379c8540b9ee117776b59340f7e3e781684058434102d70bd15bab2cc4295cd91da14547e1d9406b286fe46d5f9671df8330c7b20b8616e4
7
- data.tar.gz: f03cb31a20cb635a550a050520ee42b5a50f71461bcafba70ededb4f1135085adf0d65952a8d00fa2fc132b6f5de6ede6a0575120cd1033a68c34eeea4f39d46
6
+ metadata.gz: a723911a4d3e6201c9aaacfc0d73b9b33a0da5175d967625c32a55b656f44f9e18bad11737524fafac95d52966e1b80a53b0b9dec6602ed31f6dfc00769191c4
7
+ data.tar.gz: 2caec64ae710d44c107d770c7203837a63f01bfd6753384104c0685718b1635f0df0dcd020ddbf061364c1296709b1f2d6509796b535abb1e4cd219e3ceca265
@@ -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
 
@@ -3,10 +3,10 @@ language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
5
  - 2.1.10
6
- - 2.2.9
7
- - 2.3.6
8
- - 2.4.3
9
- - 2.5.0
6
+ - 2.2.10
7
+ - 2.3.7
8
+ - 2.4.4
9
+ - 2.5.1
10
10
  - ruby-head
11
11
  before_install:
12
12
  - gem update --system
@@ -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`
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
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.52.1"
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(e, req)
30
- case e
29
+ def handle_exception(err, req)
30
+ case err
31
31
  when IOError, Timeout::Error
32
- e = ConnectionError.new(e.message)
32
+ err = ConnectionError.new(err.message)
33
33
  when Error
34
34
  # pass
35
35
  else
36
- e = Error.new(e.inspect)
36
+ err = Error.new(err.inspect)
37
37
  end
38
38
 
39
- e.uri = req.uri
40
- e.http_method = req.method
41
- raise e
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
- logger.error(e.to_s) if logger
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
@@ -1,3 +1,3 @@
1
1
  module Jess
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.6.0".freeze
3
3
  end
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.5.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-03-19 00:00:00.000000000 Z
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.52.1
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.52.1
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: