nxt_http_client 2.0.0 → 2.1.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: 1a6f3d4b612e96bdbb4ca6eb96ad25572bfcccee632e140945770e643cc875a7
4
- data.tar.gz: 983ce0f4bc00f4b3d6dec1956736714cf3bf2f367eedd3c6cbab4c1505c56ba5
3
+ metadata.gz: 0c6ed0e9821cb3c06245006c1c79a99788e4f46d2fc3ab2fbc4ab6e5009a48f3
4
+ data.tar.gz: 30462fe5cfa99f8b5f3dbd6c5dacbcab75841dc93a155a41afb4f66ebcbb58fd
5
5
  SHA512:
6
- metadata.gz: a8b12f8c808a3b71f9d23a734ecc16022adb975a0530cad5e5251745aaf4cf818f781645eb2069f60aa900dbf72996dae4a744c7bd83e89b48d0b80f02c252a2
7
- data.tar.gz: 1abe1f25bbceaa78ef1198c4e5b26a2b6c3091f53b06b6aa4a85a2182f19bd26895620ecb8584c8afd13a8aa919f94b83f1efcdc2b8db1d03a37df98e9105ee4
6
+ metadata.gz: 0dcf0bd755f9ee72b3961ac8cf57c3b6cc32c712fe2f4e4ff357ff98a0074a13436d84e395e35da1ea02e9ef173a7177f57487fa8b6207e98582c72b43800c41
7
+ data.tar.gz: d22767005133cd7bf1a2b6fd7c0804a37e7bae777af7e93493cc0678207037dbcafa05493c0dab7ebf4d23b31c8bedfc1d3178de15953514fe8980efc4f70897
data/.circleci/config.yml CHANGED
@@ -6,7 +6,7 @@ orbs:
6
6
  jobs:
7
7
  build:
8
8
  docker:
9
- - image: cimg/ruby:3.2.2-node
9
+ - image: cimg/ruby:3.3.2-node
10
10
  - image: cimg/redis:6.0.16
11
11
 
12
12
  working_directory: ~/repo
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.3.2
data/.travis.yml CHANGED
@@ -3,5 +3,5 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 3.2.2
6
+ - 3.3.2
7
7
  before_install: gem install bundler -v 1.17.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v2.1.0 2024-06-05
2
+ - Bump dependencies
3
+
4
+ # v2.0.1 2024-02-22
5
+ - Handle response code for empty strings and blank responses
6
+
1
7
  # v2.0.0 2023-08-31
2
8
  - Add simpler initialization interface for one-off clients
3
9
  - Add helpers for common config options
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nxt_http_client (2.0.0)
4
+ nxt_http_client (2.1.0)
5
5
  activesupport (< 8.0)
6
6
  nxt_registry
7
7
  typhoeus
@@ -9,64 +9,78 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (7.0.7.2)
12
+ activesupport (7.1.3.4)
13
+ base64
14
+ bigdecimal
13
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ connection_pool (>= 2.2.5)
17
+ drb
14
18
  i18n (>= 1.6, < 2)
15
19
  minitest (>= 5.1)
20
+ mutex_m
16
21
  tzinfo (~> 2.0)
17
- addressable (2.8.4)
22
+ addressable (2.8.6)
18
23
  public_suffix (>= 2.0.2, < 6.0)
24
+ base64 (0.2.0)
25
+ bigdecimal (3.1.8)
19
26
  coderay (1.1.3)
20
- concurrent-ruby (1.2.2)
27
+ concurrent-ruby (1.3.1)
21
28
  connection_pool (2.4.1)
22
- crack (0.4.5)
29
+ crack (1.0.0)
30
+ bigdecimal
23
31
  rexml
24
- diff-lcs (1.5.0)
32
+ diff-lcs (1.5.1)
33
+ drb (2.2.1)
25
34
  ethon (0.16.0)
26
35
  ffi (>= 1.15.0)
27
- ffi (1.15.5)
28
- hashdiff (1.0.1)
29
- i18n (1.14.1)
36
+ ffi (1.17.0)
37
+ ffi (1.17.0-x86_64-darwin)
38
+ ffi (1.17.0-x86_64-linux-gnu)
39
+ hashdiff (1.1.0)
40
+ i18n (1.14.5)
30
41
  concurrent-ruby (~> 1.0)
31
- method_source (1.0.0)
32
- minitest (5.19.0)
42
+ method_source (1.1.0)
43
+ minitest (5.23.1)
44
+ mutex_m (0.2.0)
33
45
  nxt_registry (0.3.10)
34
46
  activesupport
35
- nxt_vcr_harness (0.1.4)
47
+ nxt_vcr_harness (0.2.0)
36
48
  rspec (~> 3.0)
37
49
  vcr (~> 6.0)
38
50
  pry (0.14.2)
39
51
  coderay (~> 1.1)
40
52
  method_source (~> 1.0)
41
- public_suffix (5.0.3)
42
- rake (13.0.6)
43
- redis (5.0.6)
44
- redis-client (>= 0.9.0)
45
- redis-client (0.14.1)
53
+ public_suffix (5.0.5)
54
+ rake (13.2.1)
55
+ redis (5.2.0)
56
+ redis-client (>= 0.22.0)
57
+ redis-client (0.22.2)
46
58
  connection_pool
47
- rexml (3.2.6)
48
- rspec (3.12.0)
49
- rspec-core (~> 3.12.0)
50
- rspec-expectations (~> 3.12.0)
51
- rspec-mocks (~> 3.12.0)
52
- rspec-core (3.12.2)
53
- rspec-support (~> 3.12.0)
54
- rspec-expectations (3.12.3)
59
+ rexml (3.2.8)
60
+ strscan (>= 3.0.9)
61
+ rspec (3.13.0)
62
+ rspec-core (~> 3.13.0)
63
+ rspec-expectations (~> 3.13.0)
64
+ rspec-mocks (~> 3.13.0)
65
+ rspec-core (3.13.0)
66
+ rspec-support (~> 3.13.0)
67
+ rspec-expectations (3.13.0)
55
68
  diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.12.0)
57
- rspec-mocks (3.12.6)
69
+ rspec-support (~> 3.13.0)
70
+ rspec-mocks (3.13.1)
58
71
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.12.0)
60
- rspec-support (3.12.1)
72
+ rspec-support (~> 3.13.0)
73
+ rspec-support (3.13.1)
61
74
  rspec_junit_formatter (0.6.0)
62
75
  rspec-core (>= 2, < 4, != 2.12.0)
63
- timecop (0.9.6)
64
- typhoeus (1.4.0)
76
+ strscan (3.1.0)
77
+ timecop (0.9.9)
78
+ typhoeus (1.4.1)
65
79
  ethon (>= 0.9.0)
66
80
  tzinfo (2.0.6)
67
81
  concurrent-ruby (~> 1.0)
68
82
  vcr (6.2.0)
69
- webmock (3.18.1)
83
+ webmock (3.23.1)
70
84
  addressable (>= 2.8.0)
71
85
  crack (>= 0.3.2)
72
86
  hashdiff (>= 0.4.0, < 2.0.0)
data/README.md CHANGED
@@ -278,6 +278,8 @@ To install this gem onto your local machine, run `bundle exec rake install`.
278
278
 
279
279
  ## Releasing
280
280
 
281
+ ### RubyGems
282
+
281
283
  First, if you don't want to always log in with your RubyGems password,
282
284
  you can create an API key on Rubygems.org, and then run:
283
285
 
@@ -291,8 +293,38 @@ Add to `~/.gem/credentials` (create if it doesn't exist):
291
293
  :rubygems: <your Rubygems API key>
292
294
  ```
293
295
 
294
- To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
295
- which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
296
+ To release a new version follow the steps strictly:
297
+
298
+ - Commit all your feature changes
299
+ - Update the version number in `version.rb`,
300
+ - Run bundle install to update the Gemfile.lock
301
+ - Open your PR and get it approved and merged
302
+ - And then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
303
+
304
+ ### Github Package Registry
305
+
306
+ To release a new version follow the steps strictly:
307
+
308
+ - Commit all your feature changes
309
+ - Update the version number in `version.rb`,
310
+ - Run bundle install to update the Gemfile.lock
311
+ - Open your PR and get it approved and merged
312
+ - Checkout to main and then run `bin/release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to the github package registry.
313
+
314
+ Before releasing a new version, make sure you have authenticated with the Github package registry. To do so, create a personal access token ([in your Github account settings](https://github.com/settings/tokens))
315
+
316
+ Then create or add to the existing file ~/.gem/credentials, replacing `TOKEN` with your personal access token.
317
+
318
+ ```
319
+ ---
320
+ :github: Bearer TOKEN
321
+ ```
322
+
323
+ Then run
324
+
325
+ ```sh
326
+ bundle config set --local gem.push_key github
327
+ ```
296
328
 
297
329
  ## Contributing
298
330
 
data/bin/release ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env sh
2
+
3
+ GEM_VERSION=$(ruby -e '$LOAD_PATH << File.join(File.dirname(__FILE__), "lib"); require "nxt_http_client/version"; print NxtHttpClient::VERSION')
4
+
5
+ gem build nxt_http_client.gemspec
6
+
7
+ if [ ! -d "pkg" ]; then
8
+ mkdir pkg
9
+ fi
10
+
11
+ mv nxt_http_client-$GEM_VERSION.gem pkg/nxt_http_client-$GEM_VERSION.gem
12
+
13
+ git tag -m "Release $GEM_VERSION" -a v$GEM_VERSION HEAD
14
+ git push origin --tags
15
+
16
+ gem push --key github --host https://rubygems.pkg.github.com/nxt-insurance pkg/nxt_http_client-$GEM_VERSION.gem
@@ -41,7 +41,9 @@ module NxtHttpClient
41
41
  end
42
42
 
43
43
  def response_code
44
- response.code || 0
44
+ return response.code if response.respond_to?(:code)
45
+
46
+ 0
45
47
  end
46
48
 
47
49
  def request
@@ -1,3 +1,3 @@
1
1
  module NxtHttpClient
2
- VERSION = "2.0.0"
2
+ VERSION = "2.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nxt_http_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Robecke
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2023-08-31 00:00:00.000000000 Z
14
+ date: 2024-06-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: typhoeus
@@ -214,6 +214,7 @@ files:
214
214
  - README.md
215
215
  - Rakefile
216
216
  - bin/console
217
+ - bin/release
217
218
  - bin/setup
218
219
  - lib/nxt_http_client.rb
219
220
  - lib/nxt_http_client/batch_execution.rb
@@ -248,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
249
  - !ruby/object:Gem::Version
249
250
  version: '0'
250
251
  requirements: []
251
- rubygems_version: 3.4.10
252
+ rubygems_version: 3.5.3
252
253
  signing_key:
253
254
  specification_version: 4
254
255
  summary: NxtHttpClient is a simple DSL on top the typhoeus http gem