nonnative 1.84.0 → 1.85.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/.circleci/config.yml +3 -2
- data/.rubocop.yml +7 -4
- data/CHANGELOG.md +54 -0
- data/Gemfile.lock +30 -29
- data/README.md +12 -9
- data/lib/nonnative/configuration.rb +5 -1
- data/lib/nonnative/cucumber.rb +6 -0
- data/lib/nonnative/http_server.rb +8 -5
- data/lib/nonnative/version.rb +1 -1
- data/lib/nonnative.rb +6 -0
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 269ca3c4d7ce3578eb0ec99ca4a015bb3410d27bda4b5c865429cbf01a88b092
|
4
|
+
data.tar.gz: e419d681a23f15dde5ac885ca3a5bad465a5965334fe62b02b876475d12cbbd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31cc672d88555e8281ce4128040237131bbf71f42b317ad5cc61f1e854e3cd6d80614c9c5f9c4369c455c7a6f50c121b457fcfdf66826e6e97557cbf4d766c16
|
7
|
+
data.tar.gz: cd4874e970689bda4827feb3aedce9b2840a429b9ad4f22ab73b1be9fee565b2e14e4aaef141a0ad2d2134ece3df7382c7bb9cf6faf35224179ad23841809c1a
|
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:
|
6
|
+
- image: alexfalkowski/ruby:1.5
|
7
7
|
working_directory: ~/nonnative
|
8
8
|
steps:
|
9
9
|
- checkout
|
@@ -15,6 +15,7 @@ jobs:
|
|
15
15
|
- nonnative-ruby-cache-{{ checksum "Gemfile.lock" }}
|
16
16
|
- nonnative-ruby-cache-
|
17
17
|
- run: make dep
|
18
|
+
- run: make clean-dep
|
18
19
|
- save_cache:
|
19
20
|
name: save deps
|
20
21
|
key: nonnative-ruby-cache-{{ checksum "Gemfile.lock" }}
|
@@ -30,7 +31,7 @@ jobs:
|
|
30
31
|
resource_class: large
|
31
32
|
release:
|
32
33
|
docker:
|
33
|
-
- image: alexfalkowski/release:3.
|
34
|
+
- image: alexfalkowski/release:3.5
|
34
35
|
working_directory: ~/nonnative
|
35
36
|
steps:
|
36
37
|
- checkout
|
data/.rubocop.yml
CHANGED
@@ -3,9 +3,9 @@ AllCops:
|
|
3
3
|
DisplayCopNames: true
|
4
4
|
NewCops: enable
|
5
5
|
Exclude:
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
6
|
+
- "bin/**/*"
|
7
|
+
- "vendor/**/*"
|
8
|
+
- "test/grpc/**/*"
|
9
9
|
|
10
10
|
Layout/LineLength:
|
11
11
|
Max: 150
|
@@ -14,7 +14,7 @@ Metrics/MethodLength:
|
|
14
14
|
Max: 20
|
15
15
|
|
16
16
|
Metrics/BlockLength:
|
17
|
-
Max:
|
17
|
+
Max: 90
|
18
18
|
|
19
19
|
Metrics/AbcSize:
|
20
20
|
Max: 25
|
@@ -24,3 +24,6 @@ Style/Documentation:
|
|
24
24
|
|
25
25
|
Lint/HashCompareByIdentity:
|
26
26
|
Enabled: false
|
27
|
+
|
28
|
+
Style/NumericPredicate:
|
29
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,60 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
|
7
7
|
## Unreleased
|
8
8
|
|
9
|
+
## [v1.85.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.85.0) - 2025-01-25
|
10
|
+
|
11
|
+
- [`e6fad27`](https://github.com/alexfalkowski/nonnative/commit/e6fad27ead0df16c5260972fe1bda0471125f4bd) feat(http_server): handle shutdown correctly (#487)
|
12
|
+
|
13
|
+
## [v1.84.10](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.10) - 2025-01-23
|
14
|
+
|
15
|
+
- [`bcf4c9b`](https://github.com/alexfalkowski/nonnative/commit/bcf4c9b375c692215677b229aae0e0bac23c63d5) fix(deps): bump rubocop from 1.70.0 to 1.71.0 (#486)
|
16
|
+
- [`f37b9ac`](https://github.com/alexfalkowski/nonnative/commit/f37b9ac3cea49e218280a03aebd250c0468760bc) build(ci): update ruby:1.5 (#485)
|
17
|
+
|
18
|
+
## [v1.84.9](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.9) - 2025-01-17
|
19
|
+
|
20
|
+
- [`fa74928`](https://github.com/alexfalkowski/nonnative/commit/fa74928d7927cbb797d0b7348b10ba42be00aea9) fix(deps): bump ruby-lsp from 0.23.5 to 0.23.6 (#484)
|
21
|
+
|
22
|
+
## [v1.84.8](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.8) - 2025-01-16
|
23
|
+
|
24
|
+
- [`c9d488a`](https://github.com/alexfalkowski/nonnative/commit/c9d488ae8a73424dfb3125e639ad551c2f7cf2d0) fix(deps): bump concurrent-ruby from 1.3.4 to 1.3.5 (#483)
|
25
|
+
- [`2b7f2a9`](https://github.com/alexfalkowski/nonnative/commit/2b7f2a998032196eeabf7a9373d97da0fa831c2e) build(ci): update ruby:1.3 (#482)
|
26
|
+
|
27
|
+
## [v1.84.7](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.7) - 2025-01-13
|
28
|
+
|
29
|
+
- [`af10e51`](https://github.com/alexfalkowski/nonnative/commit/af10e51fd4b2115df69d84c341b5e2c76672484a) fix(deps): bump rubocop from 1.69.2 to 1.70.0 (#480)
|
30
|
+
|
31
|
+
## [v1.84.6](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.6) - 2025-01-13
|
32
|
+
|
33
|
+
- [`f7420d4`](https://github.com/alexfalkowski/nonnative/commit/f7420d4387eb01755a2acd555dd06bb9f06cd985) fix(deps): bump ruby-lsp from 0.23.3 to 0.23.5 (#481)
|
34
|
+
|
35
|
+
## [v1.84.5](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.5) - 2025-01-13
|
36
|
+
|
37
|
+
- [`c4435ec`](https://github.com/alexfalkowski/nonnative/commit/c4435ec1cb787d776761d8c3886f556ece701962) fix(deps): bump cucumber from 9.2.0 to 9.2.1 (#479)
|
38
|
+
|
39
|
+
## [v1.84.4](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.4) - 2025-01-10
|
40
|
+
|
41
|
+
- [`85363ba`](https://github.com/alexfalkowski/nonnative/commit/85363ba28291e6fc6c07cf04b951349f5919fead) fix(deps): bump grpc from 1.68.1 to 1.69.0 (#476)
|
42
|
+
|
43
|
+
## [v1.84.3](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.3) - 2025-01-10
|
44
|
+
|
45
|
+
- [`f2635c9`](https://github.com/alexfalkowski/nonnative/commit/f2635c9a53d22fe1dfb9be955ed319f555765443) fix(deps): bump ruby-lsp from 0.23.1 to 0.23.3 (#477)
|
46
|
+
- [`9ab3987`](https://github.com/alexfalkowski/nonnative/commit/9ab3987d629298e397804e1c1ba01c2d14d933c4) build(deps): bump bin from `a278340` to `cb313fe` (#478)
|
47
|
+
|
48
|
+
## [v1.84.2](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.2) - 2025-01-07
|
49
|
+
|
50
|
+
- [`82194e1`](https://github.com/alexfalkowski/nonnative/commit/82194e14b69691860a3d289448f94711a5d18db7) fix(deps): bump ruby-lsp from 0.22.1 to 0.23.1 (#475)
|
51
|
+
- [`66da445`](https://github.com/alexfalkowski/nonnative/commit/66da445e63ff2488594ec3298cde30963f576dcb) build(deps): bump bin from `08600e7` to `a278340` (#474)
|
52
|
+
- [`7ca543c`](https://github.com/alexfalkowski/nonnative/commit/7ca543c78f0d61f7357cb1b9d9988a5ea28cec20) build(ci): add make clean-dep (#473)
|
53
|
+
- [`982e551`](https://github.com/alexfalkowski/nonnative/commit/982e5514b9f698e53d1a175e717c41192a2987f2) build(deps): bump bin from `bde1e44` to `08600e7` (#472)
|
54
|
+
- [`10b1db6`](https://github.com/alexfalkowski/nonnative/commit/10b1db64908e7200d86dfb7f8690d9c673f1227e) test(deps): upgraded bundler to 2.6.1 (#471)
|
55
|
+
- [`f5b0c17`](https://github.com/alexfalkowski/nonnative/commit/f5b0c17b33d1af1b58e8f6d5d757a29c89c2bb15) build(deps): bump bin from `a433391` to `bde1e44` (#470)
|
56
|
+
- [`e4da404`](https://github.com/alexfalkowski/nonnative/commit/e4da4049682b648351815ecc28820d38d027a661) build(deps): bump bin from `9fa29e2` to `a433391` (#469)
|
57
|
+
- [`cd74167`](https://github.com/alexfalkowski/nonnative/commit/cd7416731e9c882b315aac3b5dae9f4f463c2e2b) build(deps): bump bin from `10049eb` to `9fa29e2` (#468)
|
58
|
+
|
59
|
+
## [v1.84.1](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.1) - 2024-12-17
|
60
|
+
|
61
|
+
- [`1fb44bd`](https://github.com/alexfalkowski/nonnative/commit/1fb44bdb781b6d5d9f88e3d6565eca848aad189e) fix(config): make sure we set properties (#467)
|
62
|
+
|
9
63
|
## [v1.84.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.84.0) - 2024-12-17
|
10
64
|
|
11
65
|
- [`14daed4`](https://github.com/alexfalkowski/nonnative/commit/14daed43ab1d64baa32d004d875409784813590c) feat(cucumber): add ability to control faults (#466)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nonnative (1.
|
4
|
+
nonnative (1.85.0)
|
5
5
|
concurrent-ruby (>= 1, < 2)
|
6
6
|
config (>= 5, < 6)
|
7
7
|
cucumber (>= 7, < 10)
|
@@ -22,13 +22,13 @@ GEM
|
|
22
22
|
benchmark-malloc (0.2.0)
|
23
23
|
benchmark-perf (0.6.0)
|
24
24
|
benchmark-trend (0.4.0)
|
25
|
-
bigdecimal (3.1.
|
25
|
+
bigdecimal (3.1.9)
|
26
26
|
builder (3.3.0)
|
27
|
-
concurrent-ruby (1.3.
|
27
|
+
concurrent-ruby (1.3.5)
|
28
28
|
config (5.5.2)
|
29
29
|
deep_merge (~> 1.2, >= 1.2.1)
|
30
30
|
ostruct
|
31
|
-
cucumber (9.2.
|
31
|
+
cucumber (9.2.1)
|
32
32
|
builder (~> 3.2)
|
33
33
|
cucumber-ci-environment (> 9, < 11)
|
34
34
|
cucumber-core (> 13, < 14)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
bigdecimal
|
50
50
|
cucumber-gherkin (27.0.0)
|
51
51
|
cucumber-messages (>= 19.1.4, < 23)
|
52
|
-
cucumber-html-formatter (21.
|
52
|
+
cucumber-html-formatter (21.8.0)
|
53
53
|
cucumber-messages (> 19, < 27)
|
54
54
|
cucumber-messages (22.0.0)
|
55
55
|
cucumber-tag-expressions (6.1.1)
|
@@ -57,42 +57,42 @@ GEM
|
|
57
57
|
diff-lcs (1.5.1)
|
58
58
|
docile (1.4.1)
|
59
59
|
domain_name (0.6.20240107)
|
60
|
-
ffi (1.17.
|
61
|
-
ffi (1.17.
|
62
|
-
ffi (1.17.
|
60
|
+
ffi (1.17.1-arm64-darwin)
|
61
|
+
ffi (1.17.1-x86_64-darwin)
|
62
|
+
ffi (1.17.1-x86_64-linux-gnu)
|
63
63
|
get_process_mem (1.0.0)
|
64
64
|
bigdecimal (>= 2.0)
|
65
65
|
ffi (~> 1.0)
|
66
|
-
google-protobuf (4.29.
|
66
|
+
google-protobuf (4.29.3-arm64-darwin)
|
67
67
|
bigdecimal
|
68
68
|
rake (>= 13)
|
69
|
-
google-protobuf (4.29.
|
69
|
+
google-protobuf (4.29.3-x86_64-darwin)
|
70
70
|
bigdecimal
|
71
71
|
rake (>= 13)
|
72
|
-
google-protobuf (4.29.
|
72
|
+
google-protobuf (4.29.3-x86_64-linux)
|
73
73
|
bigdecimal
|
74
74
|
rake (>= 13)
|
75
|
-
googleapis-common-protos-types (1.
|
75
|
+
googleapis-common-protos-types (1.18.0)
|
76
76
|
google-protobuf (>= 3.18, < 5.a)
|
77
|
-
grpc (1.
|
77
|
+
grpc (1.69.0-arm64-darwin)
|
78
78
|
google-protobuf (>= 3.25, < 5.0)
|
79
79
|
googleapis-common-protos-types (~> 1.0)
|
80
|
-
grpc (1.
|
80
|
+
grpc (1.69.0-x86_64-darwin)
|
81
81
|
google-protobuf (>= 3.25, < 5.0)
|
82
82
|
googleapis-common-protos-types (~> 1.0)
|
83
|
-
grpc (1.
|
83
|
+
grpc (1.69.0-x86_64-linux)
|
84
84
|
google-protobuf (>= 3.25, < 5.0)
|
85
85
|
googleapis-common-protos-types (~> 1.0)
|
86
86
|
http-accept (1.7.0)
|
87
87
|
http-cookie (1.0.8)
|
88
88
|
domain_name (~> 0.5)
|
89
|
-
json (2.9.
|
89
|
+
json (2.9.1)
|
90
90
|
language_server-protocol (3.17.0.3)
|
91
|
-
logger (1.6.
|
91
|
+
logger (1.6.5)
|
92
92
|
mime-types (3.6.0)
|
93
93
|
logger
|
94
94
|
mime-types-data (~> 3.2015)
|
95
|
-
mime-types-data (3.
|
95
|
+
mime-types-data (3.2025.0107)
|
96
96
|
mini_mime (1.1.5)
|
97
97
|
multi_test (1.1.0)
|
98
98
|
mustermann (3.0.3)
|
@@ -101,10 +101,10 @@ GEM
|
|
101
101
|
nio4r (2.7.4)
|
102
102
|
ostruct (0.6.1)
|
103
103
|
parallel (1.26.3)
|
104
|
-
parser (3.3.
|
104
|
+
parser (3.3.7.0)
|
105
105
|
ast (~> 2.4.1)
|
106
106
|
racc
|
107
|
-
prism (1.
|
107
|
+
prism (1.3.0)
|
108
108
|
puma (6.5.0)
|
109
109
|
nio4r (~> 2.0)
|
110
110
|
racc (1.8.1)
|
@@ -113,13 +113,14 @@ GEM
|
|
113
113
|
base64 (>= 0.1.0)
|
114
114
|
logger (>= 1.6.0)
|
115
115
|
rack (>= 3.0.0, < 4)
|
116
|
-
rack-session (2.
|
116
|
+
rack-session (2.1.0)
|
117
|
+
base64 (>= 0.1.0)
|
117
118
|
rack (>= 3.0.0)
|
118
119
|
rainbow (3.1.1)
|
119
120
|
rake (13.2.1)
|
120
|
-
rbs (3.
|
121
|
+
rbs (3.8.1)
|
121
122
|
logger
|
122
|
-
regexp_parser (2.
|
123
|
+
regexp_parser (2.10.0)
|
123
124
|
rest-client (2.1.0)
|
124
125
|
http-accept (>= 1.7.0, < 2.0)
|
125
126
|
http-cookie (>= 1.0.2, < 2.0)
|
@@ -146,7 +147,7 @@ GEM
|
|
146
147
|
rspec-support (3.13.2)
|
147
148
|
rspec-wait (1.0.1)
|
148
149
|
rspec (>= 3.4)
|
149
|
-
rubocop (1.
|
150
|
+
rubocop (1.71.0)
|
150
151
|
json (~> 2.3)
|
151
152
|
language_server-protocol (>= 3.17.0)
|
152
153
|
parallel (~> 1.10)
|
@@ -158,7 +159,7 @@ GEM
|
|
158
159
|
unicode-display_width (>= 2.4.0, < 4.0)
|
159
160
|
rubocop-ast (1.37.0)
|
160
161
|
parser (>= 3.3.1.0)
|
161
|
-
ruby-lsp (0.
|
162
|
+
ruby-lsp (0.23.6)
|
162
163
|
language_server-protocol (~> 3.17.0)
|
163
164
|
prism (>= 1.2, < 2.0)
|
164
165
|
rbs (>= 3, < 4)
|
@@ -181,11 +182,11 @@ GEM
|
|
181
182
|
rack-protection (= 4.1.1)
|
182
183
|
rack-session (>= 2.0.0, < 3)
|
183
184
|
tilt (~> 2.0)
|
184
|
-
sorbet-runtime (0.5.
|
185
|
+
sorbet-runtime (0.5.11781)
|
185
186
|
sys-uname (1.3.1)
|
186
187
|
ffi (~> 1.1)
|
187
|
-
tilt (2.
|
188
|
-
unicode-display_width (3.1.
|
188
|
+
tilt (2.6.0)
|
189
|
+
unicode-display_width (3.1.4)
|
189
190
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
190
191
|
unicode-emoji (4.0.4)
|
191
192
|
|
@@ -204,4 +205,4 @@ DEPENDENCIES
|
|
204
205
|
simplecov-cobertura
|
205
206
|
|
206
207
|
BUNDLED WITH
|
207
|
-
2.
|
208
|
+
2.6.2
|
data/README.md
CHANGED
@@ -37,6 +37,7 @@ Configure nonnative with the following:
|
|
37
37
|
|
38
38
|
- The version of the configuration (1.0).
|
39
39
|
- The URL of the service.
|
40
|
+
- The time to wait on proxy changes (fault injection).
|
40
41
|
- Process, Server or Service that you want to start.
|
41
42
|
- A timeout value.
|
42
43
|
- A time to wait.
|
@@ -64,6 +65,7 @@ require 'nonnative'
|
|
64
65
|
Nonnative.configure do |config|
|
65
66
|
config.version = '1.0'
|
66
67
|
config.url = 'http://localhost:4567'
|
68
|
+
config.wait = 2.0
|
67
69
|
|
68
70
|
config.process do |p|
|
69
71
|
p.name = 'start_1'
|
@@ -92,8 +94,9 @@ end
|
|
92
94
|
Setup it up through configuration:
|
93
95
|
|
94
96
|
```yaml
|
95
|
-
version: 1.0
|
97
|
+
version: "1.0"
|
96
98
|
url: http://localhost:4567
|
99
|
+
wait: 2.0
|
97
100
|
processes:
|
98
101
|
-
|
99
102
|
name: start_1
|
@@ -187,7 +190,7 @@ end
|
|
187
190
|
Setup it up through configuration:
|
188
191
|
|
189
192
|
```yaml
|
190
|
-
version: 1.0
|
193
|
+
version: "1.0"
|
191
194
|
url: http://localhost:4567
|
192
195
|
servers:
|
193
196
|
-
|
@@ -262,7 +265,7 @@ end
|
|
262
265
|
Setup it up through configuration:
|
263
266
|
|
264
267
|
```yaml
|
265
|
-
version: 1.0
|
268
|
+
version: "1.0"
|
266
269
|
url: http://localhost:4567
|
267
270
|
servers:
|
268
271
|
-
|
@@ -327,7 +330,7 @@ end
|
|
327
330
|
Setup it up through configuration:
|
328
331
|
|
329
332
|
```yaml
|
330
|
-
version: 1.0
|
333
|
+
version: "1.0"
|
331
334
|
url: http://localhost:4567
|
332
335
|
servers:
|
333
336
|
-
|
@@ -376,7 +379,7 @@ end
|
|
376
379
|
Setup it up through configuration:
|
377
380
|
|
378
381
|
```yaml
|
379
|
-
version: 1.0
|
382
|
+
version: "1.0"
|
380
383
|
processes:
|
381
384
|
-
|
382
385
|
name: postgres
|
@@ -429,7 +432,7 @@ end
|
|
429
432
|
Setup it up through configuration:
|
430
433
|
|
431
434
|
```yaml
|
432
|
-
version: 1.0
|
435
|
+
version: "1.0"
|
433
436
|
url: http://localhost:4567
|
434
437
|
processes:
|
435
438
|
-
|
@@ -468,7 +471,7 @@ end
|
|
468
471
|
Setup it up through configuration:
|
469
472
|
|
470
473
|
```yaml
|
471
|
-
version: 1.0
|
474
|
+
version: "1.0"
|
472
475
|
url: http://localhost:4567
|
473
476
|
servers:
|
474
477
|
-
|
@@ -507,7 +510,7 @@ end
|
|
507
510
|
Setup it up through configuration:
|
508
511
|
|
509
512
|
```yaml
|
510
|
-
version: 1.0
|
513
|
+
version: "1.0"
|
511
514
|
url: http://localhost:4567
|
512
515
|
services:
|
513
516
|
-
|
@@ -618,7 +621,7 @@ Nonnative.go_executable(tools, 'reports', 'your_binary', 'sub_command', '--confi
|
|
618
621
|
Setup it up through configuration:
|
619
622
|
|
620
623
|
```yaml
|
621
|
-
version: 1.0
|
624
|
+
version: "1.0"
|
622
625
|
url: http://localhost:4567
|
623
626
|
processes:
|
624
627
|
-
|
@@ -8,11 +8,15 @@ module Nonnative
|
|
8
8
|
@services = []
|
9
9
|
end
|
10
10
|
|
11
|
-
attr_accessor :version, :url, :processes, :servers, :services
|
11
|
+
attr_accessor :version, :url, :wait, :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
|
+
self.wait = cfg.wait
|
19
|
+
|
16
20
|
add_processes(cfg)
|
17
21
|
add_servers(cfg)
|
18
22
|
add_services(cfg)
|
data/lib/nonnative/cucumber.rb
CHANGED
@@ -23,16 +23,22 @@ end
|
|
23
23
|
Given('I set the proxy for process {string} to {string}') do |name, operation|
|
24
24
|
process = Nonnative.pool.process_by_name(name)
|
25
25
|
process.proxy.send(operation)
|
26
|
+
|
27
|
+
Nonnative.wait
|
26
28
|
end
|
27
29
|
|
28
30
|
Given('I set the proxy for server {string} to {string}') do |name, operation|
|
29
31
|
server = Nonnative.pool.server_by_name(name)
|
30
32
|
server.proxy.send(operation)
|
33
|
+
|
34
|
+
Nonnative.wait
|
31
35
|
end
|
32
36
|
|
33
37
|
Given('I set the proxy for service {string} to {string}') do |name, operation|
|
34
38
|
service = Nonnative.pool.service_by_name(name)
|
35
39
|
service.proxy.send(operation)
|
40
|
+
|
41
|
+
Nonnative.wait
|
36
42
|
end
|
37
43
|
|
38
44
|
Given('I start the system') do
|
@@ -4,7 +4,10 @@ module Nonnative
|
|
4
4
|
class HTTPServer < Nonnative::Server
|
5
5
|
def initialize(service)
|
6
6
|
log = File.open(service.log, 'a')
|
7
|
-
options = {
|
7
|
+
options = {
|
8
|
+
log_writer: Puma::LogWriter.new(log, log),
|
9
|
+
force_shutdown_after: service.timeout
|
10
|
+
}
|
8
11
|
@server = Puma::Server.new(app, Puma::Events.new, options)
|
9
12
|
|
10
13
|
super
|
@@ -14,22 +17,22 @@ module Nonnative
|
|
14
17
|
|
15
18
|
def perform_start
|
16
19
|
server.add_tcp_listener proxy.host, proxy.port
|
17
|
-
server.run
|
20
|
+
server.run(false)
|
18
21
|
end
|
19
22
|
|
20
23
|
def perform_stop
|
21
|
-
server.
|
24
|
+
server.graceful_shutdown
|
22
25
|
end
|
23
26
|
|
24
27
|
def wait_start
|
25
28
|
timeout.perform do
|
26
|
-
super
|
29
|
+
super while server.running == 0
|
27
30
|
end
|
28
31
|
end
|
29
32
|
|
30
33
|
def wait_stop
|
31
34
|
timeout.perform do
|
32
|
-
super while server.running
|
35
|
+
super while server.running != 0
|
33
36
|
end
|
34
37
|
end
|
35
38
|
|
data/lib/nonnative/version.rb
CHANGED
data/lib/nonnative.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nonnative
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.85.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Falkowski
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-25 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: concurrent-ruby
|
@@ -292,7 +291,6 @@ licenses:
|
|
292
291
|
- MIT
|
293
292
|
metadata:
|
294
293
|
rubygems_mfa_required: 'true'
|
295
|
-
post_install_message:
|
296
294
|
rdoc_options: []
|
297
295
|
require_paths:
|
298
296
|
- lib
|
@@ -310,8 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
310
308
|
- !ruby/object:Gem::Version
|
311
309
|
version: '0'
|
312
310
|
requirements: []
|
313
|
-
rubygems_version: 3.
|
314
|
-
signing_key:
|
311
|
+
rubygems_version: 3.6.2
|
315
312
|
specification_version: 4
|
316
313
|
summary: Allows you to keep using the power of ruby to test other systems
|
317
314
|
test_files: []
|