chimera_http_client 1.4.1 → 1.5.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: d44d96daf4357f5f997f4874569c0f92bddeab9f945d5c950f8066d937c8d92b
4
- data.tar.gz: 71eadaa902be940979f3fff031bddb78469beefafed2f605a19199ca54ce14f7
3
+ metadata.gz: da90ccc4dfdbaf080bf84581cebbf3344e85793653605ecf49075a524c4ecef2
4
+ data.tar.gz: 5b93585a12aad3e8c927853e44dd0bc9b22b61f606edd7d3627a89ec91879cc2
5
5
  SHA512:
6
- metadata.gz: 7efe9e56feff54e326a568817cd2edde14ca7988188f67a150d6a4c507d0c87e6d4e08ab159102fdf91f6a86684acb18386cd9b433a63bc5b98e22a92b4e18d9
7
- data.tar.gz: 97fa3cbea4100201f44264efccd9d5e574abbac20dcc36ef3cfdfd5b9aac16d993ba065b39fa56d2c6b31f9c1cbc2476ab58621bb0815aaa6343419e48c0dcff
6
+ metadata.gz: 805969007906d493de7b720747c7235345ad12022711f616557944053b7b57310ff587a3f381d081a68f9d63525a176f85dc1a67dc5002b5a4c01a939dea0ceb
7
+ data.tar.gz: ffc28a398833e72ae2e760826e418dff7a7d5221e61443974c3bff4277ada7f2c9c1e71e7b1b7da3b20fc1251ccabd4d15c1f646061c74c03fcb45bfd63105a4
@@ -0,0 +1,21 @@
1
+ name: rubies-ci
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ os: [ubuntu-latest] # macos-latest
9
+ ruby: ['2.5', '2.6', '2.7', '3.0'] # Due to https://github.com/actions/runner/issues/849, we have to use quotes
10
+
11
+ runs-on: ${{ matrix.os }}
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
19
+
20
+ - name: Run linters and test suite
21
+ run: bundle exec rake ci
data/README.markdown CHANGED
@@ -6,7 +6,8 @@ And what works for the internal communication between your own apps, will also w
6
6
 
7
7
  It offers an **easy to learn interface** and **nice error handling**. And it enables you to **queue HTTP requests to run them in parallel** for better performance and simple aggregating of distributed data.
8
8
 
9
- [![Build Status](https://travis-ci.com/mediafinger/chimera_http_client.svg?branch=master)](https://travis-ci.com/mediafinger/chimera_http_client)
9
+ [![GitHub Actions CI Build Status](https://github.com/mediafinger/chimera_http_client/actions/workflows/action-ci.yml/badge.svg?branch=master)](https://github.com/mediafinger/chimera_http_client/actions/workflows/action-ci.yml)
10
+ [![Travis-CI Build Status](https://travis-ci.com/mediafinger/chimera_http_client.svg?branch=master)](https://travis-ci.com/mediafinger/chimera_http_client)
10
11
  [![Gem Version](https://badge.fury.io/rb/chimera_http_client.svg)](https://badge.fury.io/rb/chimera_http_client)
11
12
 
12
13
  ## Dependencies
@@ -34,32 +35,36 @@ Setting the environment variable `ENV['CHIMERA_HTTP_CLIENT_LOG_REQUESTS']` to `t
34
35
 
35
36
  <!-- TOC depthFrom:1 depthTo:4 withLinks:1 updateOnSave:0 orderedList:0 -->
36
37
 
37
- - [ChimeraHttpClient](#chimerahttpclient)
38
- - [Table of Contents](#table-of-contents)
39
- - [Dependencies](#dependencies)
40
- - [ENV variables](#env-variables)
41
- - [The Connection class](#the-connection-class)
42
- - [Initialization](#initialization)
43
- - [Mandatory initialization parameter `base_url`](#mandatory-initialization-parameter-baseurl)
44
- - [Optional initialization parameters](#optional-initialization-parameters)
45
- - [Request methods](#request-methods)
46
- - [Mandatory request parameter `endpoint`](#mandatory-request-parameter-endpoint)
47
- - [Optional request parameters](#optional-request-parameters)
48
- - [Basic auth](#basic-auth)
49
- - [Timeout duration](#timeout-duration)
50
- - [Custom logger](#custom-logger)
51
- - [Caching responses](#caching-responses)
52
- - [Example usage](#example-usage)
53
- - [The Request class](#the-request-class)
54
- - [The Response class](#the-response-class)
55
- - [Error classes](#error-classes)
56
- - [The Queue class](#the-queue-class)
57
- - [Queueing requests](#queueing-requests)
58
- - [Executing requests in parallel](#executing-requests-in-parallel)
59
- - [Installation](#installation)
60
- - [Maintainers and Contributors](#maintainers-and-contributors)
61
- - [Roadmap](#roadmap)
62
- - [Chimera](#chimera)
38
+ * [ChimeraHttpClient](#chimerahttpclient)
39
+ * [Dependencies](#dependencies)
40
+ * [Ruby version](#ruby-version)
41
+ * [ENV variables](#env-variables)
42
+ * [Table of Contents](#table-of-contents)
43
+ * [The Connection class](#the-connection-class)
44
+ * [Initialization](#initialization)
45
+ * [Mandatory initialization parameter `base_url`](#mandatory-initialization-parameter-base_url)
46
+ * [Optional initialization parameters](#optional-initialization-parameters)
47
+ * [Custom deserializers](#custom-deserializers)
48
+ * [Monitoring, metrics, instrumentation](#monitoring-metrics-instrumentation)
49
+ * [Request methods](#request-methods)
50
+ * [Mandatory request parameter `endpoint`](#mandatory-request-parameter-endpoint)
51
+ * [Optional request parameters](#optional-request-parameters)
52
+ * [Basic auth](#basic-auth)
53
+ * [Timeout duration](#timeout-duration)
54
+ * [Custom logger](#custom-logger)
55
+ * [Caching responses](#caching-responses)
56
+ * [Example usage](#example-usage)
57
+ * [The Request class](#the-request-class)
58
+ * [The Response class](#the-response-class)
59
+ * [Error classes](#error-classes)
60
+ * [The Queue class](#the-queue-class)
61
+ * [Queueing requests](#queueing-requests)
62
+ * [Executing requests in parallel](#executing-requests-in-parallel)
63
+ * [Empty the queue](#empty-the-queue)
64
+ * [Installation](#installation)
65
+ * [Maintainers and Contributors](#maintainers-and-contributors)
66
+ * [Roadmap](#roadmap)
67
+ * [Chimera](#chimera)
63
68
 
64
69
  <!-- /TOC -->
65
70
 
@@ -324,6 +329,7 @@ The `ChimeraHttpClient::Response` objects have the following interface:
324
329
  * code (http code, should be 200 or 2xx)
325
330
  * time (for monitoring)
326
331
  * response (the full response object, including the request)
332
+ * success? (returns the result of response.success?)
327
333
  * error? (returns false)
328
334
  * parsed_body (returns the result of `deserializer[:response].call(body)`)
329
335
 
@@ -337,6 +343,7 @@ All errors inherit from `ChimeraHttpClient::Error` and therefore offer the same
337
343
  * body (alias => message)
338
344
  * time (for monitoring)
339
345
  * response (the full response object, including the request)
346
+ * success? (returns the result of response.success?)
340
347
  * error? (returns true)
341
348
  * error_class (e.g. ChimeraHttpClient::NotFoundError)
342
349
  * to_s (information for logging / respects ENV['CHIMERA_HTTP_CLIENT_LOG_REQUESTS'])
@@ -14,6 +14,10 @@ module ChimeraHttpClient
14
14
  super(response.body)
15
15
  end
16
16
 
17
+ def success?
18
+ response.success?
19
+ end
20
+
17
21
  def error?
18
22
  true
19
23
  end
@@ -15,6 +15,10 @@ module ChimeraHttpClient
15
15
  deserializer.call(body)
16
16
  end
17
17
 
18
+ def success?
19
+ response.success?
20
+ end
21
+
18
22
  def error?
19
23
  false
20
24
  end
@@ -1,3 +1,3 @@
1
1
  module ChimeraHttpClient
2
- VERSION = "1.4.1".freeze
2
+ VERSION = "1.5.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chimera_http_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Finger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-08 00:00:00.000000000 Z
11
+ date: 2021-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -260,6 +260,7 @@ executables: []
260
260
  extensions: []
261
261
  extra_rdoc_files: []
262
262
  files:
263
+ - ".github/workflows/action-ci.yml"
263
264
  - ".gitignore"
264
265
  - ".rspec"
265
266
  - ".rubocop.yml"