nonnative 1.83.0 → 1.84.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: 2d594f67fc5d69f339e48aaec08fc46bf85d55edebf714325700c971d26616c5
4
- data.tar.gz: 0ce8f6b9044622d9822efb335e7bfdd3201f064b12cafd31a71bbe6052af3338
3
+ metadata.gz: ff480fe0c80d2f8aea2767d81dc0d64a5467875ee4c7aae41e29db61d8297bb4
4
+ data.tar.gz: fb5c830a040acd4531f5106e51afce5b5b15d6b608a1dbb41fce4239983651d1
5
5
  SHA512:
6
- metadata.gz: 475a610a708bf8ad73a5e4c42340fe15bfa0c27495c2bb1387447483c263a3eeda6d8e29686ae74623232bc116edd023610bec7f0490b2306c40b20ebbc6d863
7
- data.tar.gz: 2f1f5e8ceda0297ea4797ee4bead4a485a340f4e027fcecef43f06ab01f75f3a86c7fc83f69e906be0ba44442b4aa6ea73ce0ef6defcb6f03fa7b85cfceb49ff
6
+ metadata.gz: 4608d44faf23a3f00adc43b91343e1a002bd06af4d8ef7609ebfff34652e2bdbe8ee999fb987c1c52ed0ad4c631045d04ebd40130ea19f88196c5e447ea7549f
7
+ data.tar.gz: c8b62a28660022f0f5bc40d6e28223c0b64231798c1c1eea63979d9d69b39a0251045196d76ad185399d713ea0aea31aaf5c775ec5c41f6a2c0bc7dcc7d20f6e
data/CHANGELOG.md CHANGED
@@ -6,6 +6,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [v1.84.1](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.1) - 2024-12-17
10
+
11
+ - [`1fb44bd`](https://github.com/alexfalkowski/nonnative/commit/1fb44bdb781b6d5d9f88e3d6565eca848aad189e) fix(config): make sure we set properties (#467)
12
+
13
+ ## [v1.84.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.0) - 2024-12-17
14
+
15
+ - [`14daed4`](https://github.com/alexfalkowski/nonnative/commit/14daed43ab1d64baa32d004d875409784813590c) feat(cucumber): add ability to control faults (#466)
16
+
17
+ ## [v1.83.8](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.8) - 2024-12-13
18
+
19
+ - [`64a5686`](https://github.com/alexfalkowski/nonnative/commit/64a568628ad845cc274c0b5dbe18a9d77c806be7) fix(deps): bump rubocop from 1.69.1 to 1.69.2 (#465)
20
+ - [`fcdf19e`](https://github.com/alexfalkowski/nonnative/commit/fcdf19e96220c5a9e5dab558c0965f86fe693f03) build(deps): bump bin from `cf4a7d3` to `10049eb` (#464)
21
+
22
+ ## [v1.83.7](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.7) - 2024-12-04
23
+
24
+ - [`9f70167`](https://github.com/alexfalkowski/nonnative/commit/9f70167f308c78bf8d8686fbf453977cf72d80c7) fix(deps): bump grpc from 1.67.0 to 1.68.1 (#462)
25
+
26
+ ## [v1.83.6](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.6) - 2024-12-04
27
+
28
+ - [`194daad`](https://github.com/alexfalkowski/nonnative/commit/194daad98aabbbb616e1f79d4425d10501e9feeb) fix(deps): bump rubocop from 1.69.0 to 1.69.1 (#463)
29
+
30
+ ## [v1.83.5](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.5) - 2024-11-27
31
+
32
+ - [`4431063`](https://github.com/alexfalkowski/nonnative/commit/44310634ec5a19ea9e60fee9084a31fd8ae1dbf3) fix(deps): bump rubocop from 1.68.0 to 1.69.0 (#461)
33
+
34
+ ## [v1.83.4](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.4) - 2024-11-25
35
+
36
+ - [`85641f3`](https://github.com/alexfalkowski/nonnative/commit/85641f3d31c7b4289a01aa3f9a5e7fc90e546fcf) fix(deps): bump puma from 6.4.3 to 6.5.0 (#460)
37
+ - [`2108665`](https://github.com/alexfalkowski/nonnative/commit/210866595806aa3ec27e7de94098fcf1157433bb) fix(deps): bump ruby-lsp from 0.22.0 to 0.22.1 (#459)
38
+
39
+ ## [v1.83.3](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.3) - 2024-11-21
40
+
41
+ - [`dd188d2`](https://github.com/alexfalkowski/nonnative/commit/dd188d2821943b21c53390af3046c993e9293393) fix(deps): bump sinatra from 4.1.0 to 4.1.1 (#457)
42
+
43
+ ## [v1.83.2](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.2) - 2024-11-21
44
+
45
+ - [`88c2e8b`](https://github.com/alexfalkowski/nonnative/commit/88c2e8bebdd66a91d2fd05d266774605195c0bd7) fix(deps): bump ruby-lsp from 0.21.3 to 0.22.0 (#458)
46
+
47
+ ## [v1.83.1](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.1) - 2024-11-19
48
+
49
+ - [`4a68ac0`](https://github.com/alexfalkowski/nonnative/commit/4a68ac08a523af60dc2882451152e159ca4977ba) fix(deps): bump sinatra from 4.0.0 to 4.1.0 (#456)
50
+
9
51
  ## [v1.83.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.83.0) - 2024-11-06
10
52
 
11
53
  - [`7e69c40`](https://github.com/alexfalkowski/nonnative/commit/7e69c40dcdae1f9f6e0051ce19421a661c68a7f8) feat(sinatra): update sinatra (>= 4, < 5) (#455)
@@ -1345,7 +1387,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1345
1387
  - [`787e490`](https://github.com/alexfalkowski/nonnative/commit/787e490b71884c8dcd0920778b88fd94d520dfab) feat: remove logs
1346
1388
  - [`1b3b01c`](https://github.com/alexfalkowski/nonnative/commit/1b3b01c17cb3b634e17a68e8e88404ff66fa6be5) feat: add puma (4.3.3)
1347
1389
  - [`4e0c55d`](https://github.com/alexfalkowski/nonnative/commit/4e0c55d8b4776c0e1142b1fcc66d7816fde6c875) Merge pull request #27 from alexfalkowski/feature/add-tests
1348
- - [`111d81d`](https://github.com/alexfalkowski/nonnative/commit/111d81da298a7203c08fa5725e2310736b613fb9) feat: successfully starting of HTTP servers programatically with not found message
1390
+ - [`111d81d`](https://github.com/alexfalkowski/nonnative/commit/111d81da298a7203c08fa5725e2310736b613fb9) feat: successfully starting of HTTP servers programmatically with not found message
1349
1391
  - [`047efaf`](https://github.com/alexfalkowski/nonnative/commit/047efaf9d6e2b721d92ce17fa348326b07705008) test: cover post
1350
1392
  - [`c38d8a3`](https://github.com/alexfalkowski/nonnative/commit/c38d8a34b54f4bf7036d0794fa788015a9de9043) Merge pull request #26 from alexfalkowski/feature/debt
1351
1393
  - [`cb93b23`](https://github.com/alexfalkowski/nonnative/commit/cb93b23a3c8ae463b656fb4a43e2b7dab83db2f5) fix: add comments
@@ -1372,14 +1414,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1372
1414
  - [`3719e3c`](https://github.com/alexfalkowski/nonnative/commit/3719e3ce45c44ddfa26da87e41cc1604e2dcd88d) refactor: move to greeter file
1373
1415
  - [`d9f58b2`](https://github.com/alexfalkowski/nonnative/commit/d9f58b212e729f3316b3d790078610d2312e100d) Merge pull request #22 from alexfalkowski/feature/observability
1374
1416
  - [`1df039d`](https://github.com/alexfalkowski/nonnative/commit/1df039d931aa04ce105e91b9bfb6452d9a0ce64a) build: bump to version 1.7.0
1375
- - [`4536904`](https://github.com/alexfalkowski/nonnative/commit/45369041a8d95e240b5533d2132b60fa4d31278f) feat: successfully starting of HTTP servers programatically and getting metrics
1376
- - [`be9ae06`](https://github.com/alexfalkowski/nonnative/commit/be9ae06952e83af666f654a9782b596673709c87) feat: successfully starting of HTTP servers programatically and getting health
1417
+ - [`4536904`](https://github.com/alexfalkowski/nonnative/commit/45369041a8d95e240b5533d2132b60fa4d31278f) feat: successfully starting of HTTP servers programmatically and getting metrics
1418
+ - [`be9ae06`](https://github.com/alexfalkowski/nonnative/commit/be9ae06952e83af666f654a9782b596673709c87) feat: successfully starting of HTTP servers programmatically and getting health
1377
1419
  - [`fdb61da`](https://github.com/alexfalkowski/nonnative/commit/fdb61da719e6cf3d35db7d8af6acea19481a8ff9) feat: use ruby 2.6.6
1378
1420
  - [`87f6e0f`](https://github.com/alexfalkowski/nonnative/commit/87f6e0feb0c2a504d773bc1d77e5c00a403c6365) Merge pull request #21 from alexfalkowski/feature/fake-servers
1379
1421
  - [`1093f30`](https://github.com/alexfalkowski/nonnative/commit/1093f30717f1891a4644c63c4fea3d0640599578) build: bump to version 1.6.0
1380
1422
  - [`7aa120e`](https://github.com/alexfalkowski/nonnative/commit/7aa120e282eca41384c73f0c233b348f489b7e60) docs: add examples for http and grpc
1381
- - [`cc92276`](https://github.com/alexfalkowski/nonnative/commit/cc9227620ecb8133277871967eb835f67943ccad) feat: successfully starting of grpc servers programatically
1382
- - [`93373f1`](https://github.com/alexfalkowski/nonnative/commit/93373f1b85d50328b54ee49236f55acd2c5c0180) feat: successfully starting of HTTP servers programatically
1423
+ - [`cc92276`](https://github.com/alexfalkowski/nonnative/commit/cc9227620ecb8133277871967eb835f67943ccad) feat: successfully starting of grpc servers programmatically
1424
+ - [`93373f1`](https://github.com/alexfalkowski/nonnative/commit/93373f1b85d50328b54ee49236f55acd2c5c0180) feat: successfully starting of HTTP servers programmatically
1383
1425
  - [`d27904b`](https://github.com/alexfalkowski/nonnative/commit/d27904b7e6c4c9b510ae860e42a7d10a4cc0035f) test: rename to tcp
1384
1426
  - [`42c10e9`](https://github.com/alexfalkowski/nonnative/commit/42c10e99e951450efce4a529b75f18a0f4f5fd36) test: add grpc-tools (~> 1.28)
1385
1427
  - [`6cabe9e`](https://github.com/alexfalkowski/nonnative/commit/6cabe9e6e6107405459be0cdf93afc9fae742d6e) feat: add grpc (~> 1.28)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nonnative (1.83.0)
4
+ nonnative (1.84.1)
5
5
  concurrent-ruby (>= 1, < 2)
6
6
  config (>= 5, < 6)
7
7
  cucumber (>= 7, < 10)
@@ -11,6 +11,7 @@ PATH
11
11
  rest-client (>= 2, < 3)
12
12
  rspec-benchmark (>= 0, < 1)
13
13
  rspec-expectations (>= 3, < 4)
14
+ rspec-wait (>= 1, < 2)
14
15
  sinatra (>= 4, < 5)
15
16
 
16
17
  GEM
@@ -62,68 +63,69 @@ GEM
62
63
  get_process_mem (1.0.0)
63
64
  bigdecimal (>= 2.0)
64
65
  ffi (~> 1.0)
65
- google-protobuf (4.28.3-arm64-darwin)
66
+ google-protobuf (4.29.1-arm64-darwin)
66
67
  bigdecimal
67
68
  rake (>= 13)
68
- google-protobuf (4.28.3-x86_64-darwin)
69
+ google-protobuf (4.29.1-x86_64-darwin)
69
70
  bigdecimal
70
71
  rake (>= 13)
71
- google-protobuf (4.28.3-x86_64-linux)
72
+ google-protobuf (4.29.1-x86_64-linux)
72
73
  bigdecimal
73
74
  rake (>= 13)
74
75
  googleapis-common-protos-types (1.16.0)
75
76
  google-protobuf (>= 3.18, < 5.a)
76
- grpc (1.67.0-arm64-darwin)
77
+ grpc (1.68.1-arm64-darwin)
77
78
  google-protobuf (>= 3.25, < 5.0)
78
79
  googleapis-common-protos-types (~> 1.0)
79
- grpc (1.67.0-x86_64-darwin)
80
+ grpc (1.68.1-x86_64-darwin)
80
81
  google-protobuf (>= 3.25, < 5.0)
81
82
  googleapis-common-protos-types (~> 1.0)
82
- grpc (1.67.0-x86_64-linux)
83
+ grpc (1.68.1-x86_64-linux)
83
84
  google-protobuf (>= 3.25, < 5.0)
84
85
  googleapis-common-protos-types (~> 1.0)
85
86
  http-accept (1.7.0)
86
- http-cookie (1.0.7)
87
+ http-cookie (1.0.8)
87
88
  domain_name (~> 0.5)
88
- json (2.7.6)
89
+ json (2.9.0)
89
90
  language_server-protocol (3.17.0.3)
90
- logger (1.6.1)
91
+ logger (1.6.3)
91
92
  mime-types (3.6.0)
92
93
  logger
93
94
  mime-types-data (~> 3.2015)
94
- mime-types-data (3.2024.1105)
95
+ mime-types-data (3.2024.1203)
95
96
  mini_mime (1.1.5)
96
97
  multi_test (1.1.0)
97
98
  mustermann (3.0.3)
98
99
  ruby2_keywords (~> 0.0.1)
99
100
  netrc (0.11.0)
100
101
  nio4r (2.7.4)
101
- ostruct (0.6.0)
102
+ ostruct (0.6.1)
102
103
  parallel (1.26.3)
103
104
  parser (3.3.6.0)
104
105
  ast (~> 2.4.1)
105
106
  racc
106
107
  prism (1.2.0)
107
- puma (6.4.3)
108
+ puma (6.5.0)
108
109
  nio4r (~> 2.0)
109
110
  racc (1.8.1)
110
111
  rack (3.1.8)
111
- rack-protection (4.0.0)
112
+ rack-protection (4.1.1)
112
113
  base64 (>= 0.1.0)
114
+ logger (>= 1.6.0)
113
115
  rack (>= 3.0.0, < 4)
114
116
  rack-session (2.0.0)
115
117
  rack (>= 3.0.0)
116
118
  rainbow (3.1.1)
117
119
  rake (13.2.1)
118
- rbs (3.6.1)
120
+ rbs (3.7.0)
119
121
  logger
120
- regexp_parser (2.9.2)
122
+ regexp_parser (2.9.3)
121
123
  rest-client (2.1.0)
122
124
  http-accept (>= 1.7.0, < 2.0)
123
125
  http-cookie (>= 1.0.2, < 2.0)
124
126
  mime-types (>= 1.16, < 4.0)
125
127
  netrc (~> 0.8)
126
- rexml (3.3.9)
128
+ rexml (3.4.0)
127
129
  rspec (3.13.0)
128
130
  rspec-core (~> 3.13.0)
129
131
  rspec-expectations (~> 3.13.0)
@@ -141,20 +143,22 @@ GEM
141
143
  rspec-mocks (3.13.2)
142
144
  diff-lcs (>= 1.2.0, < 2.0)
143
145
  rspec-support (~> 3.13.0)
144
- rspec-support (3.13.1)
145
- rubocop (1.68.0)
146
+ rspec-support (3.13.2)
147
+ rspec-wait (1.0.1)
148
+ rspec (>= 3.4)
149
+ rubocop (1.69.2)
146
150
  json (~> 2.3)
147
151
  language_server-protocol (>= 3.17.0)
148
152
  parallel (~> 1.10)
149
153
  parser (>= 3.3.0.2)
150
154
  rainbow (>= 2.2.2, < 4.0)
151
- regexp_parser (>= 2.4, < 3.0)
152
- rubocop-ast (>= 1.32.2, < 2.0)
155
+ regexp_parser (>= 2.9.3, < 3.0)
156
+ rubocop-ast (>= 1.36.2, < 2.0)
153
157
  ruby-progressbar (~> 1.7)
154
- unicode-display_width (>= 2.4.0, < 3.0)
155
- rubocop-ast (1.34.0)
158
+ unicode-display_width (>= 2.4.0, < 4.0)
159
+ rubocop-ast (1.37.0)
156
160
  parser (>= 3.3.1.0)
157
- ruby-lsp (0.21.3)
161
+ ruby-lsp (0.22.1)
158
162
  language_server-protocol (~> 3.17.0)
159
163
  prism (>= 1.2, < 2.0)
160
164
  rbs (>= 3, < 4)
@@ -170,17 +174,20 @@ GEM
170
174
  simplecov (~> 0.19)
171
175
  simplecov-html (0.13.1)
172
176
  simplecov_json_formatter (0.1.4)
173
- sinatra (4.0.0)
177
+ sinatra (4.1.1)
178
+ logger (>= 1.6.0)
174
179
  mustermann (~> 3.0)
175
180
  rack (>= 3.0.0, < 4)
176
- rack-protection (= 4.0.0)
181
+ rack-protection (= 4.1.1)
177
182
  rack-session (>= 2.0.0, < 3)
178
183
  tilt (~> 2.0)
179
- sorbet-runtime (0.5.11637)
180
- sys-uname (1.3.0)
184
+ sorbet-runtime (0.5.11699)
185
+ sys-uname (1.3.1)
181
186
  ffi (~> 1.1)
182
187
  tilt (2.4.0)
183
- unicode-display_width (2.6.0)
188
+ unicode-display_width (3.1.2)
189
+ unicode-emoji (~> 4.0, >= 4.0.4)
190
+ unicode-emoji (4.0.4)
184
191
 
185
192
  PLATFORMS
186
193
  arm64-darwin-22
data/README.md CHANGED
@@ -35,6 +35,8 @@ Or install it yourself as:
35
35
 
36
36
  Configure nonnative with the following:
37
37
 
38
+ - The version of the configuration (1.0).
39
+ - The URL of the service.
38
40
  - Process, Server or Service that you want to start.
39
41
  - A timeout value.
40
42
  - A time to wait.
@@ -60,6 +62,9 @@ Setup it up programmatically:
60
62
  require 'nonnative'
61
63
 
62
64
  Nonnative.configure do |config|
65
+ config.version = '1.0'
66
+ config.url = 'http://localhost:4567'
67
+
63
68
  config.process do |p|
64
69
  p.name = 'start_1'
65
70
  p.command = -> { 'features/support/bin/start 12_321' }
@@ -87,7 +92,8 @@ end
87
92
  Setup it up through configuration:
88
93
 
89
94
  ```yaml
90
- version: 1.0
95
+ version: "1.0"
96
+ url: http://localhost:4567
91
97
  processes:
92
98
  -
93
99
  name: start_1
@@ -157,6 +163,9 @@ Setup it up programmatically:
157
163
  require 'nonnative'
158
164
 
159
165
  Nonnative.configure do |config|
166
+ config.version = '1.0'
167
+ config.url = 'http://localhost:4567'
168
+
160
169
  config.server do |s|
161
170
  s.name = 'server_1'
162
171
  s.klass = Nonnative::EchoServer
@@ -178,7 +187,8 @@ end
178
187
  Setup it up through configuration:
179
188
 
180
189
  ```yaml
181
- version: 1.0
190
+ version: "1.0"
191
+ url: http://localhost:4567
182
192
  servers:
183
193
  -
184
194
  name: server_1
@@ -236,6 +246,9 @@ Setup it up programmatically:
236
246
  require 'nonnative'
237
247
 
238
248
  Nonnative.configure do |config|
249
+ config.version = '1.0'
250
+ config.url = 'http://localhost:4567'
251
+
239
252
  config.server do |s|
240
253
  s.name = 'http_server_1'
241
254
  s.klass = Nonnative::Features::HTTPServer
@@ -249,7 +262,8 @@ end
249
262
  Setup it up through configuration:
250
263
 
251
264
  ```yaml
252
- version: 1.0
265
+ version: "1.0"
266
+ url: http://localhost:4567
253
267
  servers:
254
268
  -
255
269
  name: http_server_1
@@ -297,6 +311,9 @@ Setup it up programmatically:
297
311
  require 'nonnative'
298
312
 
299
313
  Nonnative.configure do |config|
314
+ config.version = '1.0'
315
+ config.url = 'http://localhost:4567'
316
+
300
317
  config.server do |s|
301
318
  s.name = 'grpc_server_1'
302
319
  s.klass = Nonnative::Features::GRPCServer
@@ -310,7 +327,8 @@ end
310
327
  Setup it up through configuration:
311
328
 
312
329
  ```yaml
313
- version: 1.0
330
+ version: "1.0"
331
+ url: http://localhost:4567
314
332
  servers:
315
333
  -
316
334
  name: grpc_server_1
@@ -340,6 +358,9 @@ Setup it up programmatically:
340
358
  require 'nonnative'
341
359
 
342
360
  Nonnative.configure do |config|
361
+ config.version = '1.0'
362
+ config.url = 'http://localhost:4567'
363
+
343
364
  config.service do |s|
344
365
  s.name = 'postgres'
345
366
  p.port = 5432
@@ -355,7 +376,7 @@ end
355
376
  Setup it up through configuration:
356
377
 
357
378
  ```yaml
358
- version: 1.0
379
+ version: "1.0"
359
380
  processes:
360
381
  -
361
382
  name: postgres
@@ -389,6 +410,9 @@ Setup it up programmatically:
389
410
  require 'nonnative'
390
411
 
391
412
  Nonnative.configure do |config|
413
+ config.version = '1.0'
414
+ config.url = 'http://localhost:4567'
415
+
392
416
  config.process do |p|
393
417
  p.proxy = {
394
418
  kind: 'fault_injection',
@@ -405,7 +429,8 @@ end
405
429
  Setup it up through configuration:
406
430
 
407
431
  ```yaml
408
- version: 1.0
432
+ version: "1.0"
433
+ url: http://localhost:4567
409
434
  processes:
410
435
  -
411
436
  proxy:
@@ -424,6 +449,9 @@ Setup it up programmatically:
424
449
  require 'nonnative'
425
450
 
426
451
  Nonnative.configure do |config|
452
+ config.version = '1.0'
453
+ config.url = 'http://localhost:4567'
454
+
427
455
  config.server do |s|
428
456
  s.proxy = {
429
457
  kind: 'fault_injection',
@@ -440,7 +468,8 @@ end
440
468
  Setup it up through configuration:
441
469
 
442
470
  ```yaml
443
- version: 1.0
471
+ version: "1.0"
472
+ url: http://localhost:4567
444
473
  servers:
445
474
  -
446
475
  proxy:
@@ -459,6 +488,9 @@ Setup it up programmatically:
459
488
  require 'nonnative'
460
489
 
461
490
  Nonnative.configure do |config|
491
+ config.version = '1.0'
492
+ config.url = 'http://localhost:4567'
493
+
462
494
  config.service do |s|
463
495
  s.proxy = {
464
496
  kind: 'fault_injection',
@@ -475,7 +507,8 @@ end
475
507
  Setup it up through configuration:
476
508
 
477
509
  ```yaml
478
- version: 1.0
510
+ version: "1.0"
511
+ url: http://localhost:4567
479
512
  services:
480
513
  -
481
514
  proxy:
@@ -585,7 +618,8 @@ Nonnative.go_executable(tools, 'reports', 'your_binary', 'sub_command', '--confi
585
618
  Setup it up through configuration:
586
619
 
587
620
  ```yaml
588
- version: 1.0
621
+ version: "1.0"
622
+ url: http://localhost:4567
589
623
  processes:
590
624
  -
591
625
  name: go
@@ -8,11 +8,14 @@ module Nonnative
8
8
  @services = []
9
9
  end
10
10
 
11
- attr_accessor :processes, :servers, :services
11
+ attr_accessor :version, :url, :processes, :servers, :services
12
12
 
13
13
  def load_file(path)
14
14
  cfg = Nonnative.configurations(path)
15
15
 
16
+ self.version = cfg.version
17
+ self.url = cfg.url
18
+
16
19
  add_processes(cfg)
17
20
  add_servers(cfg)
18
21
  add_services(cfg)
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  World(RSpec::Benchmark::Matchers)
4
+ World(RSpec::Matchers)
5
+ World(RSpec::Wait)
4
6
 
5
7
  Before('@startup') do
6
8
  Nonnative.start
@@ -37,6 +39,20 @@ Given('I start the system') do
37
39
  Nonnative.start
38
40
  end
39
41
 
42
+ Given('I should see {string} as unhealthy') do |service|
43
+ opts = {
44
+ headers: { content_type: :json, accept: :json },
45
+ read_timeout: 10, open_timeout: 10
46
+ }
47
+
48
+ wait_for do
49
+ @response = Nonnative.observability.health(opts)
50
+ @response.code
51
+ end.to eq(503)
52
+
53
+ expect(@response.body).to include(service)
54
+ end
55
+
40
56
  Then('I should reset the proxy for process {string}') do |name|
41
57
  process = Nonnative.pool.process_by_name(name)
42
58
  process.proxy.reset
@@ -77,3 +93,17 @@ end
77
93
  Then('I should see a log entry of {string} in the file {string}') do |message, path|
78
94
  expect(Nonnative.log_lines(path, ->(l) { l.include?(message) }).first).to include(message)
79
95
  end
96
+
97
+ Then('I should see {string} as healthy') do |service|
98
+ opts = {
99
+ headers: { content_type: :json, accept: :json },
100
+ read_timeout: 10, open_timeout: 10
101
+ }
102
+
103
+ wait_for do
104
+ @response = Nonnative.observability.health(opts)
105
+ @response.code
106
+ end.to eq(200)
107
+
108
+ expect(@response.body).to_not include(service)
109
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nonnative
4
- VERSION = '1.83.0'
4
+ VERSION = '1.84.1'
5
5
  end
data/lib/nonnative.rb CHANGED
@@ -16,6 +16,8 @@ require 'config'
16
16
  require 'cucumber'
17
17
  require 'get_process_mem'
18
18
  require 'rspec-benchmark'
19
+ require 'rspec/expectations'
20
+ require 'rspec/wait'
19
21
 
20
22
  require 'nonnative/version'
21
23
  require 'nonnative/error'
@@ -68,6 +70,10 @@ module Nonnative
68
70
  Nonnative::GoCommand.new(tools, exec, output).executable(cmd, params)
69
71
  end
70
72
 
73
+ def observability
74
+ @observability ||= Nonnative::Observability.new(configuration.url)
75
+ end
76
+
71
77
  def configuration
72
78
  @configuration ||= Nonnative::Configuration.new
73
79
  end
data/nonnative.gemspec CHANGED
@@ -33,5 +33,6 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency 'rest-client', '>= 2', '< 3'
34
34
  spec.add_dependency 'rspec-benchmark', '>= 0', '< 1'
35
35
  spec.add_dependency 'rspec-expectations', '>= 3', '< 4'
36
+ spec.add_dependency 'rspec-wait', '>= 1', '< 2'
36
37
  spec.add_dependency 'sinatra', '>= 4', '< 5'
37
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nonnative
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.83.0
4
+ version: 1.84.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Falkowski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-06 00:00:00.000000000 Z
11
+ date: 2024-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -190,6 +190,26 @@ dependencies:
190
190
  - - "<"
191
191
  - !ruby/object:Gem::Version
192
192
  version: '4'
193
+ - !ruby/object:Gem::Dependency
194
+ name: rspec-wait
195
+ requirement: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '1'
200
+ - - "<"
201
+ - !ruby/object:Gem::Version
202
+ version: '2'
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '1'
210
+ - - "<"
211
+ - !ruby/object:Gem::Version
212
+ version: '2'
193
213
  - !ruby/object:Gem::Dependency
194
214
  name: sinatra
195
215
  requirement: !ruby/object:Gem::Requirement
@@ -290,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
310
  - !ruby/object:Gem::Version
291
311
  version: '0'
292
312
  requirements: []
293
- rubygems_version: 3.5.16
313
+ rubygems_version: 3.5.22
294
314
  signing_key:
295
315
  specification_version: 4
296
316
  summary: Allows you to keep using the power of ruby to test other systems