nxt_http_client 2.0.0 → 2.0.1

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: 6e98f276eeb62238aadce54fe323c48b62a6a4c76a8a2209a1b70ff09304d85a
4
+ data.tar.gz: 1c1402b51b3621dbdf304a1645040ad02f142f2a691f511faa0642f25c5d161c
5
5
  SHA512:
6
- metadata.gz: a8b12f8c808a3b71f9d23a734ecc16022adb975a0530cad5e5251745aaf4cf818f781645eb2069f60aa900dbf72996dae4a744c7bd83e89b48d0b80f02c252a2
7
- data.tar.gz: 1abe1f25bbceaa78ef1198c4e5b26a2b6c3091f53b06b6aa4a85a2182f19bd26895620ecb8584c8afd13a8aa919f94b83f1efcdc2b8db1d03a37df98e9105ee4
6
+ metadata.gz: 55d73eb8025b15d1fd22c104d4a4725f905b20c0f840971c1664ec943ecc86ef3a82f2386120bff921965d1f99e1cefa517cc15573842d64b756b6a48a8a6ba0
7
+ data.tar.gz: 7f2a85465054aca63385b144bc7cbab8d5b2bda929298a00d118c00f5c19d425121c2a79cd9ee6370af8044a8c4245a9995260d2b06d128b3e7b882e64abfb9c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v2.0.1 2024-02-22
2
+ - Handle response code for empty strings and blank responses
3
+
1
4
  # v2.0.0 2023-08-31
2
5
  - Add simpler initialization interface for one-off clients
3
6
  - 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.0.1)
5
5
  activesupport (< 8.0)
6
6
  nxt_registry
7
7
  typhoeus
@@ -9,27 +9,37 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (7.0.7.2)
12
+ activesupport (7.1.3.2)
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
22
  addressable (2.8.4)
18
23
  public_suffix (>= 2.0.2, < 6.0)
24
+ base64 (0.2.0)
25
+ bigdecimal (3.1.6)
19
26
  coderay (1.1.3)
20
- concurrent-ruby (1.2.2)
27
+ concurrent-ruby (1.2.3)
21
28
  connection_pool (2.4.1)
22
29
  crack (0.4.5)
23
30
  rexml
24
31
  diff-lcs (1.5.0)
32
+ drb (2.2.0)
33
+ ruby2_keywords
25
34
  ethon (0.16.0)
26
35
  ffi (>= 1.15.0)
27
- ffi (1.15.5)
36
+ ffi (1.16.3)
28
37
  hashdiff (1.0.1)
29
38
  i18n (1.14.1)
30
39
  concurrent-ruby (~> 1.0)
31
40
  method_source (1.0.0)
32
- minitest (5.19.0)
41
+ minitest (5.22.2)
42
+ mutex_m (0.2.0)
33
43
  nxt_registry (0.3.10)
34
44
  activesupport
35
45
  nxt_vcr_harness (0.1.4)
@@ -60,8 +70,9 @@ GEM
60
70
  rspec-support (3.12.1)
61
71
  rspec_junit_formatter (0.6.0)
62
72
  rspec-core (>= 2, < 4, != 2.12.0)
73
+ ruby2_keywords (0.0.5)
63
74
  timecop (0.9.6)
64
- typhoeus (1.4.0)
75
+ typhoeus (1.4.1)
65
76
  ethon (>= 0.9.0)
66
77
  tzinfo (2.0.6)
67
78
  concurrent-ruby (~> 1.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.0.1"
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.0.1
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-02-26 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