nonnative 1.37.0 → 1.42.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/CHANGELOG.md +48 -0
- data/Gemfile.lock +50 -38
- data/README.md +190 -31
- data/lib/nonnative.rb +5 -2
- data/lib/nonnative/configuration.rb +25 -1
- data/lib/nonnative/configuration_process.rb +2 -2
- data/lib/nonnative/configuration_runner.rb +19 -0
- data/lib/nonnative/configuration_server.rb +2 -14
- data/lib/nonnative/configuration_service.rb +6 -0
- data/lib/nonnative/fault_injection_proxy.rb +32 -13
- data/lib/nonnative/pool.rb +20 -4
- data/lib/nonnative/{command.rb → process.rb} +13 -11
- data/lib/nonnative/runner.rb +29 -0
- data/lib/nonnative/server.rb +1 -9
- data/lib/nonnative/service.rb +5 -18
- data/lib/nonnative/socket_pair.rb +2 -5
- data/lib/nonnative/socket_pair_factory.rb +2 -2
- data/lib/nonnative/version.rb +1 -1
- data/nonnative.gemspec +3 -3
- metadata +36 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16a378ffdce68b4ac61ec07aed090eab3b907b9138ea4bcce3a1d435bc386723
|
4
|
+
data.tar.gz: 8a3f84148bf7d47786f0bd0793c16524ab49b6ec779ca6ce23d3d4b2c16d2053
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31c1a5e132f2686355a595b76f5da900256b3948fe70e6b64b07d76e93603ac24f808914b2d0bec97bdabe57a8cfca4888a1293e50cf0ca04e7fb1e9b6e7d6c1
|
7
|
+
data.tar.gz: b7fb0522f26ff25b988ba464c4993647e22b595a8a6f857216fcf9cc4f821360720361e486b3e578962f15b5ec63334a43495da405355d57efe21e254c5b7897
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
repo_token: x3EcMK4Nr770BeIFZengeQ2DLDCDjNfNo
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,54 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4
4
|
|
5
|
+
### [1.42.1](https://github.com/alexfalkowski/nonnative/compare/v1.42.0...v1.42.1) (2021-04-30)
|
6
|
+
|
7
|
+
## [1.42.0](https://github.com/alexfalkowski/nonnative/compare/v1.41.0...v1.42.0) (2021-04-30)
|
8
|
+
|
9
|
+
|
10
|
+
### Features
|
11
|
+
|
12
|
+
* add services ([#80](https://github.com/alexfalkowski/nonnative/issues/80)) ([454980e](https://github.com/alexfalkowski/nonnative/commit/454980e1eb141995c96203fcf9254bfe2cb0133e))
|
13
|
+
|
14
|
+
## [1.41.0](https://github.com/alexfalkowski/nonnative/compare/v1.40.2...v1.41.0) (2021-04-30)
|
15
|
+
|
16
|
+
|
17
|
+
### Features
|
18
|
+
|
19
|
+
* add proxy to processes ([#79](https://github.com/alexfalkowski/nonnative/issues/79)) ([d52b2bb](https://github.com/alexfalkowski/nonnative/commit/d52b2bb6fad91612f9b9a64817c861d1c227ef0b))
|
20
|
+
|
21
|
+
### [1.40.2](https://github.com/alexfalkowski/nonnative/compare/v1.40.1...v1.40.2) (2021-04-27)
|
22
|
+
|
23
|
+
### [1.40.1](https://github.com/alexfalkowski/nonnative/compare/v1.40.0...v1.40.1) (2021-04-27)
|
24
|
+
|
25
|
+
## [1.40.0](https://github.com/alexfalkowski/nonnative/compare/v1.39.0...v1.40.0) (2021-04-25)
|
26
|
+
|
27
|
+
|
28
|
+
### Features
|
29
|
+
|
30
|
+
* update deps ([#76](https://github.com/alexfalkowski/nonnative/issues/76)) ([83c9e16](https://github.com/alexfalkowski/nonnative/commit/83c9e16b5e5f9f14ed2cc5fd2eb29b83147c1e53))
|
31
|
+
|
32
|
+
## [1.39.0](https://github.com/alexfalkowski/nonnative/compare/v1.38.0...v1.39.0) (2021-04-23)
|
33
|
+
|
34
|
+
|
35
|
+
### Features
|
36
|
+
|
37
|
+
* log interruptions ([#75](https://github.com/alexfalkowski/nonnative/issues/75)) ([bde3e05](https://github.com/alexfalkowski/nonnative/commit/bde3e052b422a0ca659cfb54fcf3ca9d8a1fb20c))
|
38
|
+
|
39
|
+
## [1.38.0](https://github.com/alexfalkowski/nonnative/compare/v1.37.0...v1.38.0) (2021-04-22)
|
40
|
+
|
41
|
+
|
42
|
+
### Features
|
43
|
+
|
44
|
+
* terminate connections on change ([#74](https://github.com/alexfalkowski/nonnative/issues/74)) ([6c1cc8e](https://github.com/alexfalkowski/nonnative/commit/6c1cc8e1c3f15d11848889852897b523f5848794))
|
45
|
+
|
46
|
+
## [1.37.0](https://github.com/alexfalkowski/nonnative/compare/v1.36.0...v1.37.0) (2021-04-22)
|
47
|
+
|
48
|
+
|
49
|
+
### Features
|
50
|
+
|
51
|
+
* simplify go exeutable ([#73](https://github.com/alexfalkowski/nonnative/issues/73)) ([95e4cf4](https://github.com/alexfalkowski/nonnative/commit/95e4cf44180ee84d32cc42ee058d6742732b57b9))
|
52
|
+
|
5
53
|
## [1.36.0](https://github.com/alexfalkowski/nonnative/compare/v1.35.2...v1.36.0) (2021-04-21)
|
6
54
|
|
7
55
|
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nonnative (1.
|
4
|
+
nonnative (1.42.0)
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
6
|
-
cucumber (>=
|
6
|
+
cucumber (>= 6, < 7)
|
7
7
|
grpc (>= 1, < 2)
|
8
|
+
grpc-tools (>= 1, < 2)
|
8
9
|
puma (~> 5.0)
|
9
10
|
rest-client (~> 2.1)
|
10
11
|
rspec-benchmark (~> 0.6.0)
|
@@ -28,37 +29,44 @@ GEM
|
|
28
29
|
benchmark-trend (0.4.0)
|
29
30
|
builder (3.2.4)
|
30
31
|
concurrent-ruby (1.1.8)
|
31
|
-
|
32
|
+
coveralls (0.8.23)
|
33
|
+
json (>= 1.8, < 3)
|
34
|
+
simplecov (~> 0.16.1)
|
35
|
+
term-ansicolor (~> 1.3)
|
36
|
+
thor (>= 0.19.4, < 2.0)
|
37
|
+
tins (~> 1.6)
|
38
|
+
cucumber (6.0.0)
|
32
39
|
builder (~> 3.2, >= 3.2.4)
|
33
|
-
cucumber-core (~>
|
34
|
-
cucumber-create-meta (~>
|
35
|
-
cucumber-cucumber-expressions (~>
|
36
|
-
cucumber-gherkin (~>
|
37
|
-
cucumber-html-formatter (~>
|
38
|
-
cucumber-messages (~>
|
39
|
-
cucumber-wire (~>
|
40
|
+
cucumber-core (~> 9.0, >= 9.0.0)
|
41
|
+
cucumber-create-meta (~> 4.0, >= 4.0.0)
|
42
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
43
|
+
cucumber-gherkin (~> 18.1, >= 18.1.0)
|
44
|
+
cucumber-html-formatter (~> 13.0, >= 13.0.0)
|
45
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
46
|
+
cucumber-wire (~> 5.0, >= 5.0.0)
|
40
47
|
diff-lcs (~> 1.4, >= 1.4.4)
|
48
|
+
mime-types (~> 3.3, >= 3.3.1)
|
41
49
|
multi_test (~> 0.1, >= 0.1.2)
|
42
|
-
sys-uname (~> 1.2, >= 1.2.
|
43
|
-
cucumber-core (
|
44
|
-
cucumber-gherkin (~>
|
45
|
-
cucumber-messages (~>
|
46
|
-
cucumber-tag-expressions (~>
|
47
|
-
cucumber-create-meta (
|
48
|
-
cucumber-messages (~>
|
49
|
-
sys-uname (~> 1.2, >= 1.2.
|
50
|
-
cucumber-cucumber-expressions (
|
51
|
-
cucumber-gherkin (
|
52
|
-
cucumber-messages (~>
|
53
|
-
cucumber-html-formatter (
|
54
|
-
cucumber-messages (~>
|
55
|
-
cucumber-messages (
|
50
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
51
|
+
cucumber-core (9.0.0)
|
52
|
+
cucumber-gherkin (~> 18.1, >= 18.1.0)
|
53
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
54
|
+
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
|
55
|
+
cucumber-create-meta (4.0.0)
|
56
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
57
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
58
|
+
cucumber-cucumber-expressions (12.1.1)
|
59
|
+
cucumber-gherkin (18.1.1)
|
60
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
61
|
+
cucumber-html-formatter (13.0.0)
|
62
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
63
|
+
cucumber-messages (15.0.0)
|
56
64
|
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
57
|
-
cucumber-tag-expressions (
|
58
|
-
cucumber-wire (
|
59
|
-
cucumber-core (~>
|
60
|
-
cucumber-cucumber-expressions (~>
|
61
|
-
cucumber-messages (~>
|
65
|
+
cucumber-tag-expressions (3.0.1)
|
66
|
+
cucumber-wire (5.0.0)
|
67
|
+
cucumber-core (~> 9.0, >= 9.0.0)
|
68
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
69
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
62
70
|
diff-lcs (1.4.4)
|
63
71
|
docile (1.3.5)
|
64
72
|
domain_name (0.5.20190701)
|
@@ -68,16 +76,17 @@ GEM
|
|
68
76
|
google-protobuf (3.15.8)
|
69
77
|
googleapis-common-protos-types (1.0.6)
|
70
78
|
google-protobuf (~> 3.14)
|
71
|
-
grpc (1.37.
|
79
|
+
grpc (1.37.1)
|
72
80
|
google-protobuf (~> 3.15)
|
73
81
|
googleapis-common-protos-types (~> 1.0)
|
74
|
-
grpc-tools (1.37.
|
82
|
+
grpc-tools (1.37.1)
|
75
83
|
http-accept (1.7.0)
|
76
84
|
http-cookie (1.0.3)
|
77
85
|
domain_name (~> 0.5)
|
78
86
|
i18n (1.8.10)
|
79
87
|
concurrent-ruby (~> 1.0)
|
80
88
|
jaro_winkler (1.5.4)
|
89
|
+
json (2.5.1)
|
81
90
|
kramdown (2.3.1)
|
82
91
|
rexml
|
83
92
|
kramdown-parser-gfm (1.1.0)
|
@@ -151,12 +160,11 @@ GEM
|
|
151
160
|
parser (>= 2.7.1.5)
|
152
161
|
ruby-progressbar (1.11.0)
|
153
162
|
ruby2_keywords (0.0.4)
|
154
|
-
simplecov (0.
|
163
|
+
simplecov (0.16.1)
|
155
164
|
docile (~> 1.1)
|
156
|
-
|
157
|
-
|
158
|
-
simplecov-html (0.
|
159
|
-
simplecov_json_formatter (0.1.2)
|
165
|
+
json (>= 1.8, < 3)
|
166
|
+
simplecov-html (~> 0.10.0)
|
167
|
+
simplecov-html (0.10.2)
|
160
168
|
sinatra (2.1.0)
|
161
169
|
mustermann (~> 1.0)
|
162
170
|
rack (~> 2.2)
|
@@ -176,11 +184,16 @@ GEM
|
|
176
184
|
thor (~> 1.0)
|
177
185
|
tilt (~> 2.0)
|
178
186
|
yard (~> 0.9, >= 0.9.24)
|
187
|
+
sync (0.5.0)
|
179
188
|
sys-uname (1.2.2)
|
180
189
|
ffi (~> 1.1)
|
190
|
+
term-ansicolor (1.7.1)
|
191
|
+
tins (~> 1.0)
|
181
192
|
thor (1.0.1)
|
182
193
|
thread_safe (0.3.6)
|
183
194
|
tilt (2.0.10)
|
195
|
+
tins (1.28.0)
|
196
|
+
sync
|
184
197
|
tzinfo (2.0.4)
|
185
198
|
concurrent-ruby (~> 1.0)
|
186
199
|
unf (0.1.4)
|
@@ -195,10 +208,9 @@ PLATFORMS
|
|
195
208
|
|
196
209
|
DEPENDENCIES
|
197
210
|
bundler (~> 2.1, >= 2.1.4)
|
198
|
-
|
211
|
+
coveralls (~> 0.8.23)
|
199
212
|
nonnative!
|
200
213
|
rubocop (~> 1.12)
|
201
|
-
simplecov (~> 0.21.2)
|
202
214
|
solargraph (~> 0.40.4)
|
203
215
|
|
204
216
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
[![CircleCI](https://circleci.com/gh/alexfalkowski/nonnative.svg?style=svg)](https://circleci.com/gh/alexfalkowski/nonnative)
|
2
|
+
[![Coverage Status](https://coveralls.io/repos/github/alexfalkowski/nonnative/badge.svg?branch=master)](https://coveralls.io/github/alexfalkowski/nonnative?branch=master)
|
2
3
|
|
3
4
|
# Nonnative
|
4
5
|
|
@@ -32,12 +33,12 @@ Or install it yourself as:
|
|
32
33
|
|
33
34
|
Configure nonnative with the following:
|
34
35
|
|
35
|
-
- Process
|
36
|
+
- Process, Server or Service that you want to start.
|
36
37
|
- A timeout value.
|
37
38
|
- Port to verify.
|
38
39
|
- The class for servers.
|
39
40
|
- The log for servers/processes
|
40
|
-
- The strategy for processes
|
41
|
+
- The strategy for processes, servers and services.
|
41
42
|
|
42
43
|
### Strategy
|
43
44
|
|
@@ -52,6 +53,8 @@ This can be overridden by the following environment variables:
|
|
52
53
|
|
53
54
|
### Processes
|
54
55
|
|
56
|
+
A process is some sort of command that you would run locally.
|
57
|
+
|
55
58
|
Setup it up programmatically:
|
56
59
|
|
57
60
|
```ruby
|
@@ -60,21 +63,21 @@ require 'nonnative'
|
|
60
63
|
Nonnative.configure do |config|
|
61
64
|
config.strategy = :startup
|
62
65
|
|
63
|
-
config.process do |
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
config.process do |p|
|
67
|
+
p.name = 'start_1'
|
68
|
+
p.command = 'features/support/bin/start 12_321'
|
69
|
+
p.timeout = config.strategy.timeout
|
70
|
+
p.port = 12_321
|
71
|
+
p.log = 'features/logs/12_321.log'
|
72
|
+
p.signal = 'INT' # Possible values are described in Signal.list.keys
|
70
73
|
end
|
71
74
|
|
72
|
-
config.process do |
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
config.process do |p|
|
76
|
+
p.name = 'start_2'
|
77
|
+
p.command = 'features/support/bin/start 12_322'
|
78
|
+
p.timeout = 0.5
|
79
|
+
p.port = 12_322
|
80
|
+
p.log = 'features/logs/12_322.log'
|
78
81
|
end
|
79
82
|
end
|
80
83
|
```
|
@@ -83,7 +86,7 @@ Setup it up through configuration:
|
|
83
86
|
|
84
87
|
```yaml
|
85
88
|
version: 1.0
|
86
|
-
strategy:
|
89
|
+
strategy: startup
|
87
90
|
processes:
|
88
91
|
-
|
89
92
|
name: start_1
|
@@ -110,6 +113,8 @@ Nonnative.load_configuration('configuration.yml')
|
|
110
113
|
|
111
114
|
### Servers
|
112
115
|
|
116
|
+
A server is a dependency to some external API.
|
117
|
+
|
113
118
|
Define your server:
|
114
119
|
|
115
120
|
```ruby
|
@@ -139,7 +144,7 @@ Setup it up programmatically:
|
|
139
144
|
require 'nonnative'
|
140
145
|
|
141
146
|
Nonnative.configure do |config|
|
142
|
-
config.strategy = :
|
147
|
+
config.strategy = :startup
|
143
148
|
|
144
149
|
config.server do |s|
|
145
150
|
s.name = 'server_1'
|
@@ -163,7 +168,7 @@ Setup it up through configuration:
|
|
163
168
|
|
164
169
|
```yaml
|
165
170
|
version: 1.0
|
166
|
-
strategy:
|
171
|
+
strategy: startup
|
167
172
|
servers:
|
168
173
|
-
|
169
174
|
name: server_1
|
@@ -219,7 +224,7 @@ Setup it up programmatically:
|
|
219
224
|
require 'nonnative'
|
220
225
|
|
221
226
|
Nonnative.configure do |config|
|
222
|
-
config.strategy = :
|
227
|
+
config.strategy = :startup
|
223
228
|
|
224
229
|
config.server do |s|
|
225
230
|
s.name = 'http_server_1'
|
@@ -235,7 +240,7 @@ Setup it up through configuration:
|
|
235
240
|
|
236
241
|
```yaml
|
237
242
|
version: 1.0
|
238
|
-
strategy:
|
243
|
+
strategy: startup
|
239
244
|
servers:
|
240
245
|
-
|
241
246
|
name: http_server_1
|
@@ -281,7 +286,7 @@ Setup it up programmatically:
|
|
281
286
|
require 'nonnative'
|
282
287
|
|
283
288
|
Nonnative.configure do |config|
|
284
|
-
config.strategy = :
|
289
|
+
config.strategy = :startup
|
285
290
|
|
286
291
|
config.server do |s|
|
287
292
|
s.name = 'grpc_server_1'
|
@@ -297,7 +302,7 @@ Setup it up through configuration:
|
|
297
302
|
|
298
303
|
```yaml
|
299
304
|
version: 1.0
|
300
|
-
strategy:
|
305
|
+
strategy: startup
|
301
306
|
servers:
|
302
307
|
-
|
303
308
|
name: grpc_server_1
|
@@ -314,22 +319,109 @@ require 'nonnative'
|
|
314
319
|
|
315
320
|
Nonnative.load_configuration('configuration.yml')
|
316
321
|
```
|
322
|
+
|
323
|
+
### Services
|
324
|
+
|
325
|
+
A service is an external dependency to your system. This is usually an expensive process to start like a DB and you would prefer to be managed externally. Services are not really exciting by themselves, it's when we add proxies that they allow us to do some extra work.
|
326
|
+
|
327
|
+
Setup it up programmatically:
|
328
|
+
|
329
|
+
```ruby
|
330
|
+
require 'nonnative'
|
331
|
+
|
332
|
+
Nonnative.configure do |config|
|
333
|
+
config.strategy = :startup
|
334
|
+
|
335
|
+
config.service do |s|
|
336
|
+
s.name = 'postgres'
|
337
|
+
p.port = 5432
|
338
|
+
end
|
339
|
+
|
340
|
+
config.service do |s|
|
341
|
+
s.name = 'redis'
|
342
|
+
s.port = 6379
|
343
|
+
end
|
344
|
+
end
|
345
|
+
```
|
346
|
+
|
347
|
+
Setup it up through configuration:
|
348
|
+
|
349
|
+
```yaml
|
350
|
+
version: 1.0
|
351
|
+
strategy: startup
|
352
|
+
processes:
|
353
|
+
-
|
354
|
+
name: postgres
|
355
|
+
port: 5432
|
356
|
+
-
|
357
|
+
name: redis
|
358
|
+
port: 6379
|
359
|
+
```
|
360
|
+
|
361
|
+
Then load the file with
|
362
|
+
|
363
|
+
```ruby
|
364
|
+
require 'nonnative'
|
365
|
+
|
366
|
+
Nonnative.load_configuration('configuration.yml')
|
367
|
+
```
|
368
|
+
|
317
369
|
#### Proxies
|
318
370
|
|
319
371
|
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:
|
320
372
|
- `none` (this is the default)
|
321
373
|
- `fault_injection`
|
322
374
|
|
375
|
+
##### Processes
|
376
|
+
|
377
|
+
Setup it up programmatically:
|
378
|
+
|
379
|
+
```ruby
|
380
|
+
require 'nonnative'
|
381
|
+
|
382
|
+
Nonnative.configure do |config|
|
383
|
+
config.strategy = :startup
|
384
|
+
|
385
|
+
config.process do |p|
|
386
|
+
p.proxy = {
|
387
|
+
type: 'fault_injection',
|
388
|
+
port: 20_000,
|
389
|
+
log: 'features/logs/proxy_server.log',
|
390
|
+
options: {
|
391
|
+
delay: 5
|
392
|
+
}
|
393
|
+
}
|
394
|
+
end
|
395
|
+
end
|
396
|
+
```
|
397
|
+
|
398
|
+
Setup it up through configuration:
|
399
|
+
|
400
|
+
```yaml
|
401
|
+
version: 1.0
|
402
|
+
strategy: startup
|
403
|
+
processes:
|
404
|
+
-
|
405
|
+
proxy:
|
406
|
+
type: fault_injection
|
407
|
+
port: 20000
|
408
|
+
log: features/logs/proxy_server.log
|
409
|
+
options:
|
410
|
+
delay: 5
|
411
|
+
```
|
412
|
+
|
413
|
+
##### Servers
|
414
|
+
|
323
415
|
Setup it up programmatically:
|
324
416
|
|
325
417
|
```ruby
|
326
418
|
require 'nonnative'
|
327
419
|
|
328
420
|
Nonnative.configure do |config|
|
329
|
-
config.strategy = :
|
421
|
+
config.strategy = :startup
|
330
422
|
|
331
|
-
config.server do |
|
332
|
-
|
423
|
+
config.server do |s|
|
424
|
+
s.proxy = {
|
333
425
|
type: 'fault_injection',
|
334
426
|
port: 20_000,
|
335
427
|
log: 'features/logs/proxy_server.log',
|
@@ -345,7 +437,7 @@ Setup it up through configuration:
|
|
345
437
|
|
346
438
|
```yaml
|
347
439
|
version: 1.0
|
348
|
-
strategy:
|
440
|
+
strategy: startup
|
349
441
|
servers:
|
350
442
|
-
|
351
443
|
proxy:
|
@@ -356,6 +448,44 @@ servers:
|
|
356
448
|
delay: 5
|
357
449
|
```
|
358
450
|
|
451
|
+
##### Services
|
452
|
+
|
453
|
+
Setup it up programmatically:
|
454
|
+
|
455
|
+
```ruby
|
456
|
+
require 'nonnative'
|
457
|
+
|
458
|
+
Nonnative.configure do |config|
|
459
|
+
config.strategy = :startup
|
460
|
+
|
461
|
+
config.service do |s|
|
462
|
+
s.proxy = {
|
463
|
+
type: 'fault_injection',
|
464
|
+
port: 20_000,
|
465
|
+
log: 'features/logs/proxy_server.log',
|
466
|
+
options: {
|
467
|
+
delay: 5
|
468
|
+
}
|
469
|
+
}
|
470
|
+
end
|
471
|
+
end
|
472
|
+
```
|
473
|
+
|
474
|
+
Setup it up through configuration:
|
475
|
+
|
476
|
+
```yaml
|
477
|
+
version: 1.0
|
478
|
+
strategy: startup
|
479
|
+
services:
|
480
|
+
-
|
481
|
+
proxy:
|
482
|
+
type: fault_injection
|
483
|
+
port: 20000
|
484
|
+
log: features/logs/proxy_server.log
|
485
|
+
options:
|
486
|
+
delay: 5
|
487
|
+
```
|
488
|
+
|
359
489
|
##### Fault Injection
|
360
490
|
|
361
491
|
The `fault_injection` proxy allows you to simulate failures by injecting them. We currently support the following:
|
@@ -363,6 +493,20 @@ The `fault_injection` proxy allows you to simulate failures by injecting them. W
|
|
363
493
|
- `delay` - This delays the communication between the connection. Default is 2 secs can be configured through options.
|
364
494
|
- `invalid_data` - This takes the input and rearranges it to produce invalid data.
|
365
495
|
|
496
|
+
###### Processes
|
497
|
+
|
498
|
+
Setup it up programmatically:
|
499
|
+
|
500
|
+
```ruby
|
501
|
+
name = 'name of process in configuration'
|
502
|
+
server = Nonnative.pool.process_by_name(name)
|
503
|
+
|
504
|
+
server.proxy.close_all # To use close_all.
|
505
|
+
server.proxy.reset # To reset it back to a good state.
|
506
|
+
```
|
507
|
+
|
508
|
+
###### Servers
|
509
|
+
|
366
510
|
Setup it up programmatically:
|
367
511
|
|
368
512
|
```ruby
|
@@ -373,6 +517,18 @@ server.proxy.close_all # To use close_all.
|
|
373
517
|
server.proxy.reset # To reset it back to a good state.
|
374
518
|
```
|
375
519
|
|
520
|
+
###### Services
|
521
|
+
|
522
|
+
Setup it up programmatically:
|
523
|
+
|
524
|
+
```ruby
|
525
|
+
name = 'name of service in configuration'
|
526
|
+
service = Nonnative.pool.service_by_name(name)
|
527
|
+
|
528
|
+
service.proxy.close_all # To use close_all.
|
529
|
+
service.proxy.reset # To reset it back to a good state.
|
530
|
+
```
|
531
|
+
|
376
532
|
### Go
|
377
533
|
|
378
534
|
As we love using go as a language for services we have added support to start binaries with defined parameters. This expects that you build your services in the format of `command sub_command --params`
|
@@ -380,24 +536,27 @@ As we love using go as a language for services we have added support to start bi
|
|
380
536
|
To get this to work you will need to create a `main_test.go` file with these contents:
|
381
537
|
|
382
538
|
```go
|
539
|
+
// +build features
|
540
|
+
|
383
541
|
package main
|
384
542
|
|
385
543
|
import (
|
386
544
|
"testing"
|
545
|
+
|
546
|
+
"github.com/your_location/cmd"
|
387
547
|
)
|
388
548
|
|
389
|
-
// TestFeatures is a hack that allows us to figure out what the coverage is during
|
390
|
-
// integration tests. I would not recommend that you use a binary built using
|
391
|
-
// this hack outside of a test suite.
|
392
549
|
func TestFeatures(t *testing.T) {
|
393
|
-
|
550
|
+
if err := cmd.Execute(); err != nil {
|
551
|
+
t.Fatal(err.Error())
|
552
|
+
}
|
394
553
|
}
|
395
554
|
```
|
396
555
|
|
397
556
|
Then to compile this binary you will need to do the following:
|
398
557
|
|
399
558
|
```sh
|
400
|
-
go test -mod vendor -c -covermode=count -o your_binary -coverpkg=./... github.com/your_location
|
559
|
+
go test -mod vendor -c -tags features -covermode=count -o your_binary -coverpkg=./... github.com/your_location
|
401
560
|
```
|
402
561
|
|
403
562
|
Then to get an executable you do the following:
|
data/lib/nonnative.rb
CHANGED
@@ -19,13 +19,16 @@ require 'nonnative/stop_error'
|
|
19
19
|
require 'nonnative/timeout'
|
20
20
|
require 'nonnative/port'
|
21
21
|
require 'nonnative/configuration'
|
22
|
+
require 'nonnative/configuration_runner'
|
22
23
|
require 'nonnative/configuration_process'
|
23
24
|
require 'nonnative/configuration_server'
|
25
|
+
require 'nonnative/configuration_service'
|
24
26
|
require 'nonnative/configuration_proxy'
|
27
|
+
require 'nonnative/runner'
|
28
|
+
require 'nonnative/process'
|
29
|
+
require 'nonnative/server'
|
25
30
|
require 'nonnative/service'
|
26
|
-
require 'nonnative/command'
|
27
31
|
require 'nonnative/pool'
|
28
|
-
require 'nonnative/server'
|
29
32
|
require 'nonnative/http_client'
|
30
33
|
require 'nonnative/http_server'
|
31
34
|
require 'nonnative/grpc_server'
|
@@ -26,6 +26,8 @@ module Nonnative
|
|
26
26
|
d.port = fd['port']
|
27
27
|
d.log = fd['log']
|
28
28
|
d.signal = fd['signal']
|
29
|
+
|
30
|
+
proxy d, fd['proxy']
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
@@ -45,6 +47,20 @@ module Nonnative
|
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
50
|
+
def services(file, config)
|
51
|
+
services = file['services'] || []
|
52
|
+
services.each do |fd|
|
53
|
+
config.service do |s|
|
54
|
+
s.name = fd['name']
|
55
|
+
s.timeout = fd['timeout']
|
56
|
+
s.port = fd['port']
|
57
|
+
s.log = fd['log']
|
58
|
+
|
59
|
+
proxy s, fd['proxy']
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
48
64
|
def proxy(server, proxy)
|
49
65
|
return unless proxy
|
50
66
|
|
@@ -61,9 +77,10 @@ module Nonnative
|
|
61
77
|
@strategy = Strategy.new
|
62
78
|
@processes = []
|
63
79
|
@servers = []
|
80
|
+
@services = []
|
64
81
|
end
|
65
82
|
|
66
|
-
attr_accessor :processes, :servers
|
83
|
+
attr_accessor :processes, :servers, :services
|
67
84
|
attr_reader :strategy
|
68
85
|
|
69
86
|
def strategy=(value)
|
@@ -83,5 +100,12 @@ module Nonnative
|
|
83
100
|
|
84
101
|
servers << server
|
85
102
|
end
|
103
|
+
|
104
|
+
def service
|
105
|
+
service = Nonnative::ConfigurationService.new
|
106
|
+
yield service
|
107
|
+
|
108
|
+
services << service
|
109
|
+
end
|
86
110
|
end
|
87
111
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Nonnative
|
4
|
+
class ConfigurationRunner
|
5
|
+
attr_accessor :name, :timeout, :port, :log
|
6
|
+
attr_reader :proxy
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@proxy = Nonnative::ConfigurationProxy.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def proxy=(value)
|
13
|
+
proxy.type = value[:type]
|
14
|
+
proxy.port = value[:port]
|
15
|
+
proxy.log = value[:log]
|
16
|
+
proxy.options = value[:options]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,19 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Nonnative
|
4
|
-
class ConfigurationServer
|
5
|
-
attr_accessor :
|
6
|
-
attr_reader :proxy
|
7
|
-
|
8
|
-
def initialize
|
9
|
-
@proxy = Nonnative::ConfigurationProxy.new
|
10
|
-
end
|
11
|
-
|
12
|
-
def proxy=(value)
|
13
|
-
proxy.type = value[:type]
|
14
|
-
proxy.port = value[:port]
|
15
|
-
proxy.log = value[:log]
|
16
|
-
proxy.options = value[:options]
|
17
|
-
end
|
4
|
+
class ConfigurationServer < ConfigurationRunner
|
5
|
+
attr_accessor :klass
|
18
6
|
end
|
19
7
|
end
|
@@ -17,8 +17,8 @@ module Nonnative
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def stop
|
20
|
-
thread
|
21
|
-
tcp_server
|
20
|
+
thread&.terminate
|
21
|
+
tcp_server&.close
|
22
22
|
end
|
23
23
|
|
24
24
|
def close_all
|
@@ -48,27 +48,46 @@ module Nonnative
|
|
48
48
|
def perform_start
|
49
49
|
loop do
|
50
50
|
thread = Thread.start(tcp_server.accept) do |local_socket|
|
51
|
-
|
52
|
-
|
53
|
-
logger.info "started connection for #{id} with socket #{local_socket.inspect}"
|
54
|
-
|
55
|
-
connect local_socket
|
56
|
-
connections.delete(id)
|
57
|
-
|
58
|
-
logger.info "finished connection for #{id} with socket #{local_socket.inspect}"
|
51
|
+
accept_connection local_socket
|
59
52
|
end
|
60
53
|
|
61
|
-
thread.report_on_exception = false
|
62
54
|
connections[thread.object_id] = thread
|
63
55
|
end
|
64
56
|
end
|
65
57
|
|
58
|
+
def accept_connection(local_socket)
|
59
|
+
id = Thread.current.object_id
|
60
|
+
socket_info = local_socket.inspect
|
61
|
+
|
62
|
+
error = connect(local_socket)
|
63
|
+
if error
|
64
|
+
logger.error "could not handle the connection for '#{id}' with socket '#{socket_info}' and error '#{error}'"
|
65
|
+
else
|
66
|
+
logger.info "handled connection for '#{id}' with socket '#{socket_info}'"
|
67
|
+
end
|
68
|
+
|
69
|
+
connections.delete(id)
|
70
|
+
end
|
71
|
+
|
66
72
|
def connect(local_socket)
|
67
|
-
SocketPairFactory.create(read_state, service.proxy
|
73
|
+
pair = SocketPairFactory.create(read_state, service.proxy)
|
74
|
+
pair.connect(local_socket)
|
75
|
+
rescue StandardError => e
|
76
|
+
local_socket.close
|
77
|
+
|
78
|
+
e
|
79
|
+
end
|
80
|
+
|
81
|
+
def close_connections
|
82
|
+
connections.each_value(&:terminate)
|
83
|
+
connections.clear
|
68
84
|
end
|
69
85
|
|
70
86
|
def apply_state(state)
|
71
|
-
mutex.synchronize
|
87
|
+
mutex.synchronize do
|
88
|
+
@state = state
|
89
|
+
close_connections
|
90
|
+
end
|
72
91
|
end
|
73
92
|
|
74
93
|
def read_state
|
data/lib/nonnative/pool.rb
CHANGED
@@ -7,11 +7,18 @@ module Nonnative
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def start(&block)
|
10
|
+
services.each(&:start)
|
10
11
|
[servers, processes].each { |t| process(t, :start, :open?, &block) }
|
11
12
|
end
|
12
13
|
|
13
14
|
def stop(&block)
|
14
15
|
[processes, servers].each { |t| process(t, :stop, :closed?, &block) }
|
16
|
+
services.each(&:stop)
|
17
|
+
end
|
18
|
+
|
19
|
+
def process_by_name(name)
|
20
|
+
index = configuration.processes.find_index { |s| s.name == name }
|
21
|
+
processes[index].first
|
15
22
|
end
|
16
23
|
|
17
24
|
def server_by_name(name)
|
@@ -19,22 +26,31 @@ module Nonnative
|
|
19
26
|
servers[index].first
|
20
27
|
end
|
21
28
|
|
29
|
+
def service_by_name(name)
|
30
|
+
index = configuration.services.find_index { |s| s.name == name }
|
31
|
+
services[index]
|
32
|
+
end
|
33
|
+
|
22
34
|
private
|
23
35
|
|
24
36
|
attr_reader :configuration
|
25
37
|
|
26
38
|
def processes
|
27
|
-
@processes ||= configuration.processes.map do |
|
28
|
-
[Nonnative::
|
39
|
+
@processes ||= configuration.processes.map do |p|
|
40
|
+
[Nonnative::Process.new(p), Nonnative::Port.new(p)]
|
29
41
|
end
|
30
42
|
end
|
31
43
|
|
32
44
|
def servers
|
33
|
-
@servers ||= configuration.servers.map do |
|
34
|
-
[
|
45
|
+
@servers ||= configuration.servers.map do |s|
|
46
|
+
[s.klass.new(s), Nonnative::Port.new(s)]
|
35
47
|
end
|
36
48
|
end
|
37
49
|
|
50
|
+
def services
|
51
|
+
@services ||= configuration.services.map { |s| Nonnative::Service.new(s) }
|
52
|
+
end
|
53
|
+
|
38
54
|
def process(all, type_method, port_method, &block)
|
39
55
|
types = []
|
40
56
|
pids = []
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Nonnative
|
4
|
-
class
|
4
|
+
class Process < Runner
|
5
5
|
def start
|
6
|
-
unless
|
7
|
-
|
6
|
+
unless process_exists?
|
7
|
+
proxy.start
|
8
|
+
@pid = process_spawn
|
8
9
|
wait_start
|
9
10
|
end
|
10
11
|
|
@@ -12,8 +13,9 @@ module Nonnative
|
|
12
13
|
end
|
13
14
|
|
14
15
|
def stop
|
15
|
-
if
|
16
|
-
|
16
|
+
if process_exists?
|
17
|
+
process_kill
|
18
|
+
proxy.stop
|
17
19
|
wait_stop
|
18
20
|
end
|
19
21
|
|
@@ -24,7 +26,7 @@ module Nonnative
|
|
24
26
|
|
25
27
|
def wait_stop
|
26
28
|
timeout.perform do
|
27
|
-
Process.waitpid2(pid)
|
29
|
+
::Process.waitpid2(pid)
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
@@ -32,20 +34,20 @@ module Nonnative
|
|
32
34
|
|
33
35
|
attr_reader :pid
|
34
36
|
|
35
|
-
def
|
37
|
+
def process_kill
|
36
38
|
signal = Signal.list[service.signal || 'INT'] || Signal.list['INT']
|
37
|
-
Process.kill(signal, pid)
|
39
|
+
::Process.kill(signal, pid)
|
38
40
|
end
|
39
41
|
|
40
|
-
def
|
42
|
+
def process_spawn
|
41
43
|
spawn(service.command, %i[out err] => [service.log, 'a'])
|
42
44
|
end
|
43
45
|
|
44
|
-
def
|
46
|
+
def process_exists?
|
45
47
|
return false if pid.nil?
|
46
48
|
|
47
49
|
signal = Signal.list['EXIT']
|
48
|
-
Process.kill(signal, pid)
|
50
|
+
::Process.kill(signal, pid)
|
49
51
|
true
|
50
52
|
rescue Errno::ESRCH
|
51
53
|
false
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Nonnative
|
4
|
+
class Runner
|
5
|
+
attr_reader :proxy
|
6
|
+
|
7
|
+
def initialize(service)
|
8
|
+
@service = service
|
9
|
+
@timeout = Nonnative::Timeout.new(service.timeout)
|
10
|
+
@proxy = Nonnative::ProxyFactory.create(service)
|
11
|
+
end
|
12
|
+
|
13
|
+
def name
|
14
|
+
service.name
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
|
19
|
+
attr_reader :service, :timeout
|
20
|
+
|
21
|
+
def wait_start
|
22
|
+
sleep 0.1
|
23
|
+
end
|
24
|
+
|
25
|
+
def wait_stop
|
26
|
+
sleep 0.1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/nonnative/server.rb
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Nonnative
|
4
|
-
class Server <
|
5
|
-
attr_reader :proxy
|
6
|
-
|
7
|
-
def initialize(service)
|
8
|
-
@proxy = Nonnative::ProxyFactory.create(service)
|
9
|
-
|
10
|
-
super service
|
11
|
-
end
|
12
|
-
|
4
|
+
class Server < Runner
|
13
5
|
def start
|
14
6
|
unless thread
|
15
7
|
proxy.start
|
data/lib/nonnative/service.rb
CHANGED
@@ -1,26 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Nonnative
|
4
|
-
class Service
|
5
|
-
def
|
6
|
-
|
7
|
-
@timeout = Nonnative::Timeout.new(service.timeout)
|
4
|
+
class Service < Runner
|
5
|
+
def start
|
6
|
+
proxy.start
|
8
7
|
end
|
9
8
|
|
10
|
-
def
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
protected
|
15
|
-
|
16
|
-
attr_reader :service, :timeout
|
17
|
-
|
18
|
-
def wait_start
|
19
|
-
sleep 0.1
|
20
|
-
end
|
21
|
-
|
22
|
-
def wait_stop
|
23
|
-
sleep 0.1
|
9
|
+
def stop
|
10
|
+
proxy.stop
|
24
11
|
end
|
25
12
|
end
|
26
13
|
end
|
@@ -2,9 +2,8 @@
|
|
2
2
|
|
3
3
|
module Nonnative
|
4
4
|
class SocketPair
|
5
|
-
def initialize(proxy
|
5
|
+
def initialize(proxy)
|
6
6
|
@proxy = proxy
|
7
|
-
@logger = logger
|
8
7
|
end
|
9
8
|
|
10
9
|
def connect(local_socket)
|
@@ -16,8 +15,6 @@ module Nonnative
|
|
16
15
|
break if pipe(ready, local_socket, remote_socket)
|
17
16
|
break if pipe(ready, remote_socket, local_socket)
|
18
17
|
end
|
19
|
-
rescue StandardError => e
|
20
|
-
logger.error e
|
21
18
|
ensure
|
22
19
|
local_socket.close
|
23
20
|
remote_socket&.close
|
@@ -25,7 +22,7 @@ module Nonnative
|
|
25
22
|
|
26
23
|
protected
|
27
24
|
|
28
|
-
attr_reader :proxy
|
25
|
+
attr_reader :proxy
|
29
26
|
|
30
27
|
def create_remote_socket
|
31
28
|
::TCPSocket.new('0.0.0.0', proxy.port)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Nonnative
|
4
4
|
class SocketPairFactory
|
5
5
|
class << self
|
6
|
-
def create(type, proxy
|
6
|
+
def create(type, proxy)
|
7
7
|
pair = case type
|
8
8
|
when :close_all
|
9
9
|
CloseAllSocketPair
|
@@ -15,7 +15,7 @@ module Nonnative
|
|
15
15
|
SocketPair
|
16
16
|
end
|
17
17
|
|
18
|
-
pair.new(proxy
|
18
|
+
pair.new(proxy)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/nonnative/version.rb
CHANGED
data/nonnative.gemspec
CHANGED
@@ -24,8 +24,9 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.required_ruby_version = ['>= 2.7.0', '< 2.8.0']
|
25
25
|
|
26
26
|
spec.add_dependency 'concurrent-ruby', '~> 1.0', '>= 1.0.5'
|
27
|
-
spec.add_dependency 'cucumber', ['>=
|
27
|
+
spec.add_dependency 'cucumber', ['>= 6', '< 7']
|
28
28
|
spec.add_dependency 'grpc', ['>= 1', '< 2']
|
29
|
+
spec.add_dependency 'grpc-tools', ['>= 1', '< 2']
|
29
30
|
spec.add_dependency 'puma', '~> 5.0'
|
30
31
|
spec.add_dependency 'rest-client', '~> 2.1'
|
31
32
|
spec.add_dependency 'rspec-benchmark', '~> 0.6.0'
|
@@ -33,8 +34,7 @@ Gem::Specification.new do |spec|
|
|
33
34
|
spec.add_dependency 'sinatra', '~> 2.0', '>= 2.0.8.1'
|
34
35
|
|
35
36
|
spec.add_development_dependency 'bundler', '~> 2.1', '>= 2.1.4'
|
36
|
-
spec.add_development_dependency '
|
37
|
+
spec.add_development_dependency 'coveralls', '~> 0.8.23'
|
37
38
|
spec.add_development_dependency 'rubocop', '~> 1.12'
|
38
|
-
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
39
39
|
spec.add_development_dependency 'solargraph', '~> 0.40.4'
|
40
40
|
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.
|
4
|
+
version: 1.42.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Falkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -36,20 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '6'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '7'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '6'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '7'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: grpc
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,6 +70,26 @@ dependencies:
|
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '2'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: grpc-tools
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '1'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2'
|
83
|
+
type: :runtime
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '2'
|
73
93
|
- !ruby/object:Gem::Dependency
|
74
94
|
name: puma
|
75
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,25 +193,19 @@ dependencies:
|
|
173
193
|
- !ruby/object:Gem::Version
|
174
194
|
version: 2.1.4
|
175
195
|
- !ruby/object:Gem::Dependency
|
176
|
-
name:
|
196
|
+
name: coveralls
|
177
197
|
requirement: !ruby/object:Gem::Requirement
|
178
198
|
requirements:
|
179
|
-
- - "
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
version: '1'
|
182
|
-
- - "<"
|
199
|
+
- - "~>"
|
183
200
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
201
|
+
version: 0.8.23
|
185
202
|
type: :development
|
186
203
|
prerelease: false
|
187
204
|
version_requirements: !ruby/object:Gem::Requirement
|
188
205
|
requirements:
|
189
|
-
- - "
|
190
|
-
- !ruby/object:Gem::Version
|
191
|
-
version: '1'
|
192
|
-
- - "<"
|
206
|
+
- - "~>"
|
193
207
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
208
|
+
version: 0.8.23
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: rubocop
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,20 +220,6 @@ dependencies:
|
|
206
220
|
- - "~>"
|
207
221
|
- !ruby/object:Gem::Version
|
208
222
|
version: '1.12'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: simplecov
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - "~>"
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: 0.21.2
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - "~>"
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: 0.21.2
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: solargraph
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -243,6 +243,7 @@ extra_rdoc_files: []
|
|
243
243
|
files:
|
244
244
|
- ".circleci/config.yml"
|
245
245
|
- ".config/cucumber.yml"
|
246
|
+
- ".coveralls.yml"
|
246
247
|
- ".editorconfig"
|
247
248
|
- ".gitignore"
|
248
249
|
- ".rubocop.yml"
|
@@ -258,11 +259,12 @@ files:
|
|
258
259
|
- lib/nonnative.rb
|
259
260
|
- lib/nonnative/before.rb
|
260
261
|
- lib/nonnative/close_all_socket_pair.rb
|
261
|
-
- lib/nonnative/command.rb
|
262
262
|
- lib/nonnative/configuration.rb
|
263
263
|
- lib/nonnative/configuration_process.rb
|
264
264
|
- lib/nonnative/configuration_proxy.rb
|
265
|
+
- lib/nonnative/configuration_runner.rb
|
265
266
|
- lib/nonnative/configuration_server.rb
|
267
|
+
- lib/nonnative/configuration_service.rb
|
266
268
|
- lib/nonnative/delay_socket_pair.rb
|
267
269
|
- lib/nonnative/error.rb
|
268
270
|
- lib/nonnative/fault_injection_proxy.rb
|
@@ -276,8 +278,10 @@ files:
|
|
276
278
|
- lib/nonnative/observability.rb
|
277
279
|
- lib/nonnative/pool.rb
|
278
280
|
- lib/nonnative/port.rb
|
281
|
+
- lib/nonnative/process.rb
|
279
282
|
- lib/nonnative/proxy.rb
|
280
283
|
- lib/nonnative/proxy_factory.rb
|
284
|
+
- lib/nonnative/runner.rb
|
281
285
|
- lib/nonnative/server.rb
|
282
286
|
- lib/nonnative/service.rb
|
283
287
|
- lib/nonnative/socket_pair.rb
|