nonnative 1.102.0 → 1.104.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a0a1b6cd139850ec56082f6b35cf54bf192946fdf874a1a604a35549c75ea13
4
- data.tar.gz: c0d14528d9ce8f53c83d5140f5dbd83c086759cd816dca4f0ef7330de33d2a93
3
+ metadata.gz: 8a156d00f9bb25f8708a472ad883786792d1157f3cbcebc397b82b67e43b7d96
4
+ data.tar.gz: abe720e0fc99143fb9ad42e87cb44f7b752a8d1e4f0a0caf09c68b3efa483d1c
5
5
  SHA512:
6
- metadata.gz: 2544bacfdf266acc520b3f9cce54546f1c74d06b2222e63f2f395c1c8f58fcd792797c184512c3b76ddb18e565185d0bee1a2d3b6328938bb2db8f2a496418ca
7
- data.tar.gz: 13d46528e8a2c8723fd27ad101e6b0f2143ccb9c363b94469b6f673b67fa4d8a23ed9db1c46e31d6b05a25dd9a58f86f95a479f89e0f1b64db212378fe5358e5
6
+ metadata.gz: 7dedf8147ac61d2f5f798cb69e87ddac0b145427b41fcd5c7d5b63209694cf2bc96b8f7a0818d703a5af6cb057a8a7ef80fd3198f089e33e31dbd17a773d3aec
7
+ data.tar.gz: f497eccc784286d9f51a32d2ce33df1cfefa129e507a130e7e7367fdaaefacb2168219fe80844afb5ca55d634819b24fbd810ba5243148a68b91091b28e0ed2a
data/.circleci/config.yml CHANGED
@@ -3,7 +3,7 @@ version: 2.1
3
3
  jobs:
4
4
  build:
5
5
  docker:
6
- - image: alexfalkowski/ruby:1.23
6
+ - image: alexfalkowski/ruby:1.35
7
7
  working_directory: ~/nonnative
8
8
  steps:
9
9
  - checkout
@@ -31,7 +31,7 @@ jobs:
31
31
  resource_class: large
32
32
  release:
33
33
  docker:
34
- - image: alexfalkowski/release:3.15
34
+ - image: alexfalkowski/release:3.24
35
35
  working_directory: ~/nonnative
36
36
  steps:
37
37
  - checkout
data/CHANGELOG.md CHANGED
@@ -6,6 +6,33 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [v1.104.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.104.0) - 2025-06-09
10
+
11
+ - [`834596d`](https://github.com/alexfalkowski/nonnative/commit/834596d18be24b990238c3abcd0cefbced1132e9) feat(observability): prefix with name (#578)
12
+ - [`e169924`](https://github.com/alexfalkowski/nonnative/commit/e169924fc0a1d31414951dc426bab97bb836f9ea) test(deps): bump ruby-lsp from 0.23.24 to 0.24.1 (#577)
13
+
14
+ ## [v1.103.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.103.0) - 2025-06-06
15
+
16
+ - [`2e2b7e4`](https://github.com/alexfalkowski/nonnative/commit/2e2b7e46a6005a265bb00baa600bdc0e954486f3) feat(socket): use predicate method (#576)
17
+ - [`8b12b0f`](https://github.com/alexfalkowski/nonnative/commit/8b12b0fe1d2b19d770ca1959d8dcf16d614b913a) test(deps): bump rspec-expectations from 3.13.4 to 3.13.5 (#575)
18
+ - [`cf1a961`](https://github.com/alexfalkowski/nonnative/commit/cf1a96109d52fb37095ae7a7727d04f565e7ebed) test(deps): bump ruby-lsp from 0.23.20 to 0.23.24 (#574)
19
+ - [`bb0c989`](https://github.com/alexfalkowski/nonnative/commit/bb0c9891a8c51dd5c9d3db3c9f15086151aef182) build(deps): bump bin from `9c21752` to `255c12c` (#572)
20
+ - [`588f26c`](https://github.com/alexfalkowski/nonnative/commit/588f26c8d62ae85f81fb79f92b3067f3e5430257) test(deps): bump rack from 3.1.15 to 3.1.16 (#571)
21
+ - [`7b35d07`](https://github.com/alexfalkowski/nonnative/commit/7b35d073f30a62e3c846cd4408849b81f3352cb8) build(ci): use alexfalkowski/ruby:1.33 (#570)
22
+ - [`19378ce`](https://github.com/alexfalkowski/nonnative/commit/19378ceb037f23c7e016394975662e3ae818b19f) build(deps): bump bin from `810b10e` to `9c21752` (#569)
23
+ - [`b83e1f9`](https://github.com/alexfalkowski/nonnative/commit/b83e1f945c8cf2ee67ef35d0d2956d4ad067fd8e) build(ci): use alexfalkowski/ruby:1.31 (#568)
24
+ - [`6e90161`](https://github.com/alexfalkowski/nonnative/commit/6e90161bbab3fa69f743ea239cdc6e2ff8e059fc) build(deps): bump bin from `eeb0425` to `810b10e` (#567)
25
+ - [`97f4bbd`](https://github.com/alexfalkowski/nonnative/commit/97f4bbda48012b906c333a08e59d75ce58f303ce) build(deps): bump bin from `104e349` to `eeb0425` (#566)
26
+ - [`860cf31`](https://github.com/alexfalkowski/nonnative/commit/860cf31e9ba24b6e720dcdb2c687ad0004d4d4f8) build(deps): bump bin from `de214a6` to `104e349` (#565)
27
+ - [`caeb640`](https://github.com/alexfalkowski/nonnative/commit/caeb64039156a18590a2dc27566c98d54422b0ea) build(deps): bump bin from `041892c` to `de214a6` (#564)
28
+ - [`a211e61`](https://github.com/alexfalkowski/nonnative/commit/a211e61a1c8acff21f5c68cbf334aec296def84c) build(ci): use alexfalkowski/ruby:1.29 (#563)
29
+ - [`b475e48`](https://github.com/alexfalkowski/nonnative/commit/b475e48b1cd515fa5bcefca9f4be8147ded2e350) build(deps): bump bin from `c59b166` to `041892c` (#562)
30
+ - [`46412eb`](https://github.com/alexfalkowski/nonnative/commit/46412eb4a4206b0ca0cb94f8e559f41e4e666cc1) build(deps): bump bin from `ac9a5b2` to `c59b166` (#561)
31
+ - [`de82d07`](https://github.com/alexfalkowski/nonnative/commit/de82d070becdafc99f082208069d5fb064f3560e) build(deps): update all (#560)
32
+ - [`b59fbc7`](https://github.com/alexfalkowski/nonnative/commit/b59fbc747f887bfc9bd7b18357d442ecf1b6d4f5) build(deps): bump bin from `652fb33` to `ac9a5b2` (#559)
33
+ - [`8ced4ae`](https://github.com/alexfalkowski/nonnative/commit/8ced4aec80609807626af29061b430b7ee62fdd3) build(deps): bump bin from `7b214f3` to `652fb33` (#558)
34
+ - [`0b749d0`](https://github.com/alexfalkowski/nonnative/commit/0b749d090d020c62ae9f968b93c18b270bc4e2a6) build(deps): bump bin from `926a71b` to `7b214f3` (#557)
35
+
9
36
  ## [v1.102.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.102.0) - 2025-05-01
10
37
 
11
38
  - [`d2947f6`](https://github.com/alexfalkowski/nonnative/commit/d2947f6626ce77ade0a69007ea388cf14e5d3f67) feat(http): enable logging for proxy (#556)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nonnative (1.101.0)
4
+ nonnative (1.104.0)
5
5
  concurrent-ruby (>= 1, < 2)
6
6
  config (>= 5, < 6)
7
7
  cucumber (>= 7, < 10)
@@ -55,32 +55,39 @@ GEM
55
55
  cucumber-messages (22.0.0)
56
56
  cucumber-tag-expressions (6.1.2)
57
57
  deep_merge (1.2.2)
58
- diff-lcs (1.6.1)
58
+ diff-lcs (1.6.2)
59
59
  docile (1.4.1)
60
60
  domain_name (0.6.20240107)
61
61
  ffi (1.17.2-x86_64-darwin)
62
+ ffi (1.17.2-x86_64-linux-gnu)
62
63
  get_process_mem (1.0.0)
63
64
  bigdecimal (>= 2.0)
64
65
  ffi (~> 1.0)
65
- google-protobuf (4.30.2-x86_64-darwin)
66
+ google-protobuf (4.31.0-x86_64-darwin)
67
+ bigdecimal
68
+ rake (>= 13)
69
+ google-protobuf (4.31.0-x86_64-linux-gnu)
66
70
  bigdecimal
67
71
  rake (>= 13)
68
72
  googleapis-common-protos-types (1.20.0)
69
73
  google-protobuf (>= 3.18, < 5.a)
70
- grpc (1.71.0-x86_64-darwin)
74
+ grpc (1.72.0-x86_64-darwin)
75
+ google-protobuf (>= 3.25, < 5.0)
76
+ googleapis-common-protos-types (~> 1.0)
77
+ grpc (1.72.0-x86_64-linux)
71
78
  google-protobuf (>= 3.25, < 5.0)
72
79
  googleapis-common-protos-types (~> 1.0)
73
80
  http-accept (1.7.0)
74
81
  http-cookie (1.0.8)
75
82
  domain_name (~> 0.5)
76
- json (2.11.3)
77
- language_server-protocol (3.17.0.4)
83
+ json (2.12.2)
84
+ language_server-protocol (3.17.0.5)
78
85
  lint_roller (1.1.0)
79
86
  logger (1.7.0)
80
- mime-types (3.6.2)
87
+ mime-types (3.7.0)
81
88
  logger
82
- mime-types-data (~> 3.2015)
83
- mime-types-data (3.2025.0429)
89
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
90
+ mime-types-data (3.2025.0514)
84
91
  mini_mime (1.1.5)
85
92
  multi_test (1.1.0)
86
93
  mustermann (3.0.3)
@@ -96,17 +103,17 @@ GEM
96
103
  puma (6.6.0)
97
104
  nio4r (~> 2.0)
98
105
  racc (1.8.1)
99
- rack (3.1.13)
106
+ rack (3.1.16)
100
107
  rack-protection (4.1.1)
101
108
  base64 (>= 0.1.0)
102
109
  logger (>= 1.6.0)
103
110
  rack (>= 3.0.0, < 4)
104
- rack-session (2.1.0)
111
+ rack-session (2.1.1)
105
112
  base64 (>= 0.1.0)
106
113
  rack (>= 3.0.0)
107
114
  rainbow (3.1.1)
108
115
  rake (13.2.1)
109
- rbs (3.9.2)
116
+ rbs (3.9.4)
110
117
  logger
111
118
  regexp_parser (2.10.0)
112
119
  rest-client (2.1.0)
@@ -127,16 +134,16 @@ GEM
127
134
  rspec (>= 3.0)
128
135
  rspec-core (3.13.3)
129
136
  rspec-support (~> 3.13.0)
130
- rspec-expectations (3.13.3)
137
+ rspec-expectations (3.13.5)
131
138
  diff-lcs (>= 1.2.0, < 2.0)
132
139
  rspec-support (~> 3.13.0)
133
- rspec-mocks (3.13.2)
140
+ rspec-mocks (3.13.4)
134
141
  diff-lcs (>= 1.2.0, < 2.0)
135
142
  rspec-support (~> 3.13.0)
136
- rspec-support (3.13.2)
143
+ rspec-support (3.13.4)
137
144
  rspec-wait (1.0.1)
138
145
  rspec (>= 3.4)
139
- rubocop (1.75.4)
146
+ rubocop (1.76.0)
140
147
  json (~> 2.3)
141
148
  language_server-protocol (~> 3.17.0.2)
142
149
  lint_roller (~> 1.1.0)
@@ -144,16 +151,16 @@ GEM
144
151
  parser (>= 3.3.0.2)
145
152
  rainbow (>= 2.2.2, < 4.0)
146
153
  regexp_parser (>= 2.9.3, < 3.0)
147
- rubocop-ast (>= 1.44.0, < 2.0)
154
+ rubocop-ast (>= 1.45.0, < 2.0)
148
155
  ruby-progressbar (~> 1.7)
149
156
  unicode-display_width (>= 2.4.0, < 4.0)
150
- rubocop-ast (1.44.1)
157
+ rubocop-ast (1.45.0)
151
158
  parser (>= 3.3.7.2)
152
159
  prism (~> 1.4)
153
- ruby-lsp (0.23.15)
160
+ ruby-lsp (0.24.1)
154
161
  language_server-protocol (~> 3.17.0)
155
162
  prism (>= 1.2, < 2.0)
156
- rbs (>= 3, < 4)
163
+ rbs (>= 3, < 5)
157
164
  sorbet-runtime (>= 0.5.10782)
158
165
  ruby-progressbar (1.13.0)
159
166
  ruby2_keywords (0.0.5)
@@ -173,7 +180,7 @@ GEM
173
180
  rack-protection (= 4.1.1)
174
181
  rack-session (>= 2.0.0, < 3)
175
182
  tilt (~> 2.0)
176
- sorbet-runtime (0.5.12046)
183
+ sorbet-runtime (0.5.12163)
177
184
  sys-uname (1.3.1)
178
185
  ffi (~> 1.1)
179
186
  tilt (2.6.0)
@@ -184,6 +191,7 @@ GEM
184
191
  PLATFORMS
185
192
  x86_64-darwin-21
186
193
  x86_64-darwin-23
194
+ x86_64-linux
187
195
 
188
196
  DEPENDENCIES
189
197
  bundler
@@ -194,4 +202,4 @@ DEPENDENCIES
194
202
  simplecov-cobertura
195
203
 
196
204
  BUNDLED WITH
197
- 2.6.8
205
+ 2.6.9
data/Makefile CHANGED
@@ -1,2 +1,3 @@
1
+ include bin/build/make/help.mak
1
2
  include bin/build/make/ruby.mak
2
3
  include bin/build/make/git.mak
data/README.md CHANGED
@@ -25,17 +25,22 @@ gem 'nonnative'
25
25
 
26
26
  And then execute:
27
27
 
28
- $ bundle
28
+ ```bash
29
+ bundle
30
+ ```
29
31
 
30
32
  Or install it yourself as:
31
33
 
32
- $ gem install nonnative
34
+ ```bash
35
+ gem install nonnative
36
+ ```
33
37
 
34
38
  ## Usage
35
39
 
36
40
  Configure nonnative with the following:
37
41
 
38
42
  - The version of the configuration (1.0).
43
+ - The name of the service.
39
44
  - The URL of the service.
40
45
  - A log file.
41
46
  - Process, Server or Service that you want to start.
@@ -49,6 +54,7 @@ Configure nonnative with the following:
49
54
  ### Strategy
50
55
 
51
56
  The strategy can be one of the following values:
57
+
52
58
  - startup - When we include `nonnative/startup`, it will start it once.
53
59
  - before - When we tag our features with `@startup` it will start and stop after the scenario.
54
60
  - manual - When we tag our features with `@manual` it will stop after the scenario.
@@ -64,6 +70,7 @@ require 'nonnative'
64
70
 
65
71
  Nonnative.configure do |config|
66
72
  config.version = '1.0'
73
+ config.name = 'test'
67
74
  config.url = 'http://localhost:4567'
68
75
  config.log = 'nonnative.log'
69
76
 
@@ -95,6 +102,7 @@ Setup it up through configuration:
95
102
 
96
103
  ```yaml
97
104
  version: "1.0"
105
+ name: test
98
106
  url: http://localhost:4567
99
107
  log: nonnative.log
100
108
  processes:
@@ -176,6 +184,7 @@ require 'nonnative'
176
184
 
177
185
  Nonnative.configure do |config|
178
186
  config.version = '1.0'
187
+ config.name = 'test'
179
188
  config.url = 'http://localhost:4567'
180
189
  config.log = 'nonnative.log'
181
190
 
@@ -201,6 +210,7 @@ Setup it up through configuration:
201
210
 
202
211
  ```yaml
203
212
  version: "1.0"
213
+ name: test
204
214
  url: http://localhost:4567
205
215
  log: nonnative.log
206
216
  servers:
@@ -257,6 +267,7 @@ require 'nonnative'
257
267
 
258
268
  Nonnative.configure do |config|
259
269
  config.version = '1.0'
270
+ config.name = 'test'
260
271
  config.url = 'http://localhost:4567'
261
272
  config.log = 'nonnative.log'
262
273
 
@@ -274,6 +285,7 @@ Setup it up through configuration:
274
285
 
275
286
  ```yaml
276
287
  version: "1.0"
288
+ name: test
277
289
  url: http://localhost:4567
278
290
  log: nonnative.log
279
291
  servers:
@@ -320,6 +332,7 @@ require 'nonnative'
320
332
 
321
333
  Nonnative.configure do |config|
322
334
  config.version = '1.0'
335
+ config.name = 'test'
323
336
  config.url = 'http://localhost:4567'
324
337
  config.log = 'nonnative.log'
325
338
 
@@ -337,6 +350,7 @@ Setup it up through configuration:
337
350
 
338
351
  ```yaml
339
352
  version: "1.0"
353
+ name: test
340
354
  url: http://localhost:4567
341
355
  log: nonnative.log
342
356
  servers:
@@ -387,6 +401,7 @@ require 'nonnative'
387
401
 
388
402
  Nonnative.configure do |config|
389
403
  config.version = '1.0'
404
+ config.name = 'test'
390
405
  config.url = 'http://localhost:4567'
391
406
  config.log = 'nonnative.log'
392
407
 
@@ -404,6 +419,7 @@ Setup it up through configuration:
404
419
 
405
420
  ```yaml
406
421
  version: "1.0"
422
+ name: test
407
423
  url: http://localhost:4567
408
424
  log: nonnative.log
409
425
  servers:
@@ -436,6 +452,7 @@ require 'nonnative'
436
452
 
437
453
  Nonnative.configure do |config|
438
454
  config.version = '1.0'
455
+ config.name = 'test'
439
456
  config.url = 'http://localhost:4567'
440
457
  config.log = 'nonnative.log'
441
458
 
@@ -455,6 +472,7 @@ Setup it up through configuration:
455
472
 
456
473
  ```yaml
457
474
  version: "1.0"
475
+ name: test
458
476
  url: http://localhost:4567
459
477
  log: nonnative.log
460
478
  processes:
@@ -479,10 +497,11 @@ end
479
497
  #### Proxies
480
498
 
481
499
  We allow different proxies to be configured. These proxies can be used to simulate all kind of situations. The proxies that can be configured are:
500
+
482
501
  - `none` (this is the default)
483
502
  - `fault_injection`
484
503
 
485
- ##### Processes
504
+ ##### Proxies Processes
486
505
 
487
506
  Setup it up programmatically:
488
507
 
@@ -491,6 +510,7 @@ require 'nonnative'
491
510
 
492
511
  Nonnative.configure do |config|
493
512
  config.version = '1.0'
513
+ config.name = 'test'
494
514
  config.url = 'http://localhost:4567'
495
515
  config.log = 'nonnative.log'
496
516
 
@@ -512,6 +532,7 @@ Setup it up through configuration:
512
532
 
513
533
  ```yaml
514
534
  version: "1.0"
535
+ name: test
515
536
  url: http://localhost:4567
516
537
  log: nonnative.log
517
538
  processes:
@@ -525,7 +546,7 @@ processes:
525
546
  delay: 5
526
547
  ```
527
548
 
528
- ##### Servers
549
+ ##### Proxies Servers
529
550
 
530
551
  Setup it up programmatically:
531
552
 
@@ -534,6 +555,7 @@ require 'nonnative'
534
555
 
535
556
  Nonnative.configure do |config|
536
557
  config.version = '1.0'
558
+ config.name = 'test'
537
559
  config.url = 'http://localhost:4567'
538
560
  config.log = 'nonnative.log'
539
561
 
@@ -555,6 +577,7 @@ Setup it up through configuration:
555
577
 
556
578
  ```yaml
557
579
  version: "1.0"
580
+ name: test
558
581
  url: http://localhost:4567
559
582
  log: nonnative.log
560
583
  servers:
@@ -568,7 +591,7 @@ servers:
568
591
  delay: 5
569
592
  ```
570
593
 
571
- ##### Services
594
+ ##### Proxies Services
572
595
 
573
596
  Setup it up programmatically:
574
597
 
@@ -577,6 +600,7 @@ require 'nonnative'
577
600
 
578
601
  Nonnative.configure do |config|
579
602
  config.version = '1.0'
603
+ config.name = 'test'
580
604
  config.url = 'http://localhost:4567'
581
605
  config.log = 'nonnative.log'
582
606
  config.wait = 1
@@ -599,6 +623,7 @@ Setup it up through configuration:
599
623
 
600
624
  ```yaml
601
625
  version: "1.0"
626
+ name: test
602
627
  url: http://localhost:4567
603
628
  log: nonnative.log
604
629
  wait: 1
@@ -616,11 +641,12 @@ services:
616
641
  ##### Fault Injection
617
642
 
618
643
  The `fault_injection` proxy allows you to simulate failures by injecting them. We currently support the following:
644
+
619
645
  - `close_all` - Closes the socket as soon as it connects.
620
646
  - `delay` - This delays the communication between the connection. Default is 2 secs can be configured through options.
621
647
  - `invalid_data` - This takes the input and rearranges it to produce invalid data.
622
648
 
623
- ###### Processes
649
+ ###### Fault Injection Processes
624
650
 
625
651
  Setup it up programmatically:
626
652
 
@@ -639,7 +665,7 @@ Given I set the proxy for process 'process_1' to 'close_all'
639
665
  Then I should reset the proxy for process 'process_1'
640
666
  ```
641
667
 
642
- ###### Servers
668
+ ###### Fault Injection Servers
643
669
 
644
670
  Setup it up programmatically:
645
671
 
@@ -658,7 +684,7 @@ Given I set the proxy for server 'server_1' to 'close_all'
658
684
  Then I should reset the proxy for server 'server_1'
659
685
  ```
660
686
 
661
- ###### Services
687
+ ###### Fault Injection Services
662
688
 
663
689
  Setup it up programmatically:
664
690
 
@@ -691,7 +717,7 @@ package main
691
717
  import "testing"
692
718
 
693
719
  func TestFeatures(t *testing.T) {
694
- main()
720
+ main()
695
721
  }
696
722
  ```
697
723
 
@@ -713,6 +739,7 @@ Setup it up through configuration:
713
739
 
714
740
  ```yaml
715
741
  version: "1.0"
742
+ name: test
716
743
  url: http://localhost:4567
717
744
  log: nonnative.log
718
745
  processes:
@@ -8,12 +8,13 @@ module Nonnative
8
8
  @services = []
9
9
  end
10
10
 
11
- attr_accessor :version, :url, :log, :processes, :servers, :services
11
+ attr_accessor :name, :version, :url, :log, :processes, :servers, :services
12
12
 
13
13
  def load_file(path)
14
14
  cfg = Nonnative.configurations(path)
15
15
 
16
16
  self.version = cfg.version
17
+ self.name = cfg.name
17
18
  self.url = cfg.url
18
19
  self.log = cfg.log
19
20
 
@@ -4,7 +4,7 @@ module Nonnative
4
4
  class HTTPClient
5
5
  def initialize(host)
6
6
  @host = host
7
- @expections = [
7
+ @exceptions = [
8
8
  RestClient::Exceptions::Timeout,
9
9
  RestClient::ServerBrokeConnection
10
10
  ]
@@ -13,7 +13,7 @@ module Nonnative
13
13
  protected
14
14
 
15
15
  def with_retry(tries, wait, &)
16
- Retriable.retriable(tries: tries, base_interval: wait, on: expections, &)
16
+ Retriable.retriable(tries: tries, base_interval: wait, on: exceptions, &)
17
17
  end
18
18
 
19
19
  def get(pathname, opts = {})
@@ -46,11 +46,11 @@ module Nonnative
46
46
 
47
47
  private
48
48
 
49
- attr_reader :host, :expections
49
+ attr_reader :host, :exceptions
50
50
 
51
51
  def with_exception
52
52
  yield
53
- rescue *expections => e
53
+ rescue *exceptions => e
54
54
  raise e
55
55
  rescue RestClient::Exception => e
56
56
  e.response
@@ -3,19 +3,25 @@
3
3
  module Nonnative
4
4
  class Observability < Nonnative::HTTPClient
5
5
  def health(opts = {})
6
- get('healthz', opts)
6
+ get("#{name}/healthz", opts)
7
7
  end
8
8
 
9
9
  def liveness(opts = {})
10
- get('livez', opts)
10
+ get("#{name}/livez", opts)
11
11
  end
12
12
 
13
13
  def readiness(opts = {})
14
- get('readyz', opts)
14
+ get("#{name}/readyz", opts)
15
15
  end
16
16
 
17
17
  def metrics(opts = {})
18
- get('metrics', opts)
18
+ get("#{name}/metrics", opts)
19
+ end
20
+
21
+ protected
22
+
23
+ def name
24
+ Nonnative.configuration.name
19
25
  end
20
26
  end
21
27
  end
@@ -12,8 +12,8 @@ module Nonnative
12
12
  loop do
13
13
  ready = select([local_socket, remote_socket], nil, nil)
14
14
 
15
- break if pipe(ready, local_socket, remote_socket)
16
- break if pipe(ready, remote_socket, local_socket)
15
+ break if pipe?(ready, local_socket, remote_socket)
16
+ break if pipe?(ready, remote_socket, local_socket)
17
17
  end
18
18
  ensure
19
19
  Nonnative.logger.info "finished connect for local socket '#{local_socket.inspect}' and '#{remote_socket&.inspect}' for 'socket_pair'"
@@ -30,7 +30,7 @@ module Nonnative
30
30
  ::TCPSocket.new(proxy.host, proxy.port)
31
31
  end
32
32
 
33
- def pipe(ready, socket1, socket2)
33
+ def pipe?(ready, socket1, socket2)
34
34
  if ready[0].include?(socket1)
35
35
  data = read(socket1)
36
36
  return true if data.empty?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nonnative
4
- VERSION = '1.102.0'
4
+ VERSION = '1.104.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nonnative
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.102.0
4
+ version: 1.104.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Falkowski
@@ -330,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
330
330
  - !ruby/object:Gem::Version
331
331
  version: '0'
332
332
  requirements: []
333
- rubygems_version: 3.6.8
333
+ rubygems_version: 3.6.9
334
334
  specification_version: 4
335
335
  summary: Allows you to keep using the power of ruby to test other systems
336
336
  test_files: []