dhc 1.0.0 → 2.0.0
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/.github/workflows/rubocop.yml +2 -13
- data/.github/workflows/test.yml +2 -13
- data/README.md +1 -1
- data/lib/dhc/interceptor.rb +1 -1
- data/lib/dhc/interceptors/auth.rb +1 -1
- data/lib/dhc/interceptors/default_timeout.rb +1 -1
- data/lib/dhc/request.rb +1 -1
- data/lib/dhc/version.rb +1 -1
- data/spec/core_ext/hash/deep_transform_values_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ca76978c02b0282cb78e1bdca008c209ea28f8a23f424fbb94c4aec639c4ccc
|
4
|
+
data.tar.gz: 42cd56ebb4db087b70a3ade68b56ac7da0cb823b3b19751c2dda1accca4c7a86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1d76646f40bf13cb1e773b6e851f1923a53457d3e4b51ba4f7bf88f2e9e2c923d71d99cd32846ec564c19eb94dc2933303a2aa61298a8f7010ba41dd939676a
|
7
|
+
data.tar.gz: 472a083db1738e1e12e3a611e8c133add777d3b6adc67ebbae5f124dc5fb550452e4d10604233361d935b201f8d9598bdc23d40e799e1d8f4f785ff5469b0f0a
|
@@ -8,20 +8,9 @@ jobs:
|
|
8
8
|
|
9
9
|
steps:
|
10
10
|
- uses: actions/checkout@v2
|
11
|
-
- uses:
|
11
|
+
- uses: ruby/setup-ruby@master
|
12
12
|
with:
|
13
|
-
|
14
|
-
- name: Cache Ruby Gems
|
15
|
-
uses: actions/cache@v2
|
16
|
-
with:
|
17
|
-
path: /.tmp/vendor/bundle
|
18
|
-
key: ${{ runner.os }}-gems-latest-${{ hashFiles('**/Gemfile.lock') }}
|
19
|
-
restore-keys: |
|
20
|
-
${{ runner.os }}-gems-latest-
|
21
|
-
- name: Bundle Install
|
22
|
-
run: |
|
23
|
-
bundle config path /.tmp/vendor/bundle
|
24
|
-
bundle install --jobs 4 --retry 3
|
13
|
+
bundler-cache: true
|
25
14
|
- name: Run Rubocop
|
26
15
|
run: |
|
27
16
|
bundle exec rubocop
|
data/.github/workflows/test.yml
CHANGED
@@ -8,20 +8,9 @@ jobs:
|
|
8
8
|
|
9
9
|
steps:
|
10
10
|
- uses: actions/checkout@v2
|
11
|
-
- uses:
|
11
|
+
- uses: ruby/setup-ruby@master
|
12
12
|
with:
|
13
|
-
|
14
|
-
- name: Cache Ruby Gems
|
15
|
-
uses: actions/cache@v2
|
16
|
-
with:
|
17
|
-
path: /.tmp/vendor/bundle
|
18
|
-
key: ${{ runner.os }}-gems-latest-${{ hashFiles('**/Gemfile.lock') }}
|
19
|
-
restore-keys: |
|
20
|
-
${{ runner.os }}-gems-latest-
|
21
|
-
- name: Bundle Install
|
22
|
-
run: |
|
23
|
-
bundle config path /.tmp/vendor/bundle
|
24
|
-
bundle install --jobs 4 --retry 3
|
13
|
+
bundler-cache: true
|
25
14
|
- name: Run Tests
|
26
15
|
run: |
|
27
16
|
bundle exec rspec
|
data/README.md
CHANGED
@@ -941,7 +941,7 @@ config.middleware.use ZipkinTracer::RackHandler, {
|
|
941
941
|
|
942
942
|
#### Interceptor callbacks
|
943
943
|
|
944
|
-
`
|
944
|
+
`before_init` is called before the raw typhoeus request has been initialized.
|
945
945
|
|
946
946
|
`before_request` is called when the request is prepared and about to be executed.
|
947
947
|
|
data/lib/dhc/interceptor.rb
CHANGED
@@ -8,7 +8,7 @@ class DHC::DefaultTimeout < DHC::Interceptor
|
|
8
8
|
CONNECTTIMEOUT = 2 # seconds
|
9
9
|
TIMEOUT = 15 # seconds
|
10
10
|
|
11
|
-
def
|
11
|
+
def before_init
|
12
12
|
request_options = (request.options || {})
|
13
13
|
request_options[:timeout] ||= timeout || TIMEOUT
|
14
14
|
request_options[:connecttimeout] ||= connecttimeout || CONNECTTIMEOUT
|
data/lib/dhc/request.rb
CHANGED
@@ -22,7 +22,7 @@ class DHC::Request
|
|
22
22
|
use_configured_endpoint!
|
23
23
|
generate_url_from_template!
|
24
24
|
self.interceptors = DHC::Interceptors.new(self)
|
25
|
-
interceptors.intercept(:
|
25
|
+
interceptors.intercept(:before_init)
|
26
26
|
self.raw = create_request
|
27
27
|
interceptors.intercept(:before_request)
|
28
28
|
if self_executing && !response
|
data/lib/dhc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/DePayFi/dhc/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|