nonnative 1.58.1 → 1.59.1
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/CHANGELOG.md +11 -0
- data/Gemfile.lock +8 -10
- data/README.md +6 -6
- data/lib/nonnative/cucumber.rb +18 -0
- data/lib/nonnative/process.rb +1 -1
- data/lib/nonnative/strategy.rb +2 -2
- data/lib/nonnative/version.rb +1 -1
- data/lib/nonnative.rb +1 -0
- data/nonnative.gemspec +0 -1
- metadata +2 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a2c4751f90acdfd5c610819ec3c6400c06ef5565a21a57de76ca934e0ae4c4c
|
|
4
|
+
data.tar.gz: 0543d81897672535887ded26db0631b03868ee465dfe0a1361795da890223f12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92d476f0b27e5524b7698846b25b7cd4dd761582784dc53124093bb0c6bff31f8dec73869685a43e77de00d826204fe55d7bcd0644b83a5bbdae27a9add43e36
|
|
7
|
+
data.tar.gz: b2bbaa52ee9e45e36c5903f5989ab1100c3f4c23a49e344f2fa287bc870e98d206c956d94c5af75be7136880b1a50294846dba314e081bf6562cef1ccc999c0d
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.59.1](https://github.com/alexfalkowski/nonnative/compare/v1.59.0...v1.59.1) (2022-04-25)
|
|
6
|
+
|
|
7
|
+
## [1.59.0](https://github.com/alexfalkowski/nonnative/compare/v1.58.2...v1.59.0) (2022-04-25)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **cucumber:** verify system start errors ([#117](https://github.com/alexfalkowski/nonnative/issues/117)) ([f8c7f7f](https://github.com/alexfalkowski/nonnative/commit/f8c7f7f4cb4d1506e1b8ae038bd6c46f7ce529a2))
|
|
13
|
+
|
|
14
|
+
### [1.58.2](https://github.com/alexfalkowski/nonnative/compare/v1.58.1...v1.58.2) (2022-04-13)
|
|
15
|
+
|
|
5
16
|
### [1.58.1](https://github.com/alexfalkowski/nonnative/compare/v1.58.0...v1.58.1) (2022-04-06)
|
|
6
17
|
|
|
7
18
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nonnative (1.
|
|
4
|
+
nonnative (1.59.1)
|
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
|
6
6
|
cucumber (>= 7, < 8)
|
|
7
7
|
get_process_mem (~> 0.2.1)
|
|
8
8
|
grpc (>= 1, < 2)
|
|
9
|
-
grpc-tools (>= 1, < 2)
|
|
10
9
|
puma (~> 5.0)
|
|
11
10
|
rest-client (~> 2.1)
|
|
12
11
|
rspec-benchmark (~> 0.6.0)
|
|
@@ -67,13 +66,12 @@ GEM
|
|
|
67
66
|
ffi (1.15.5)
|
|
68
67
|
get_process_mem (0.2.7)
|
|
69
68
|
ffi (~> 1.0)
|
|
70
|
-
google-protobuf (3.20.
|
|
69
|
+
google-protobuf (3.20.1-x86_64-darwin)
|
|
71
70
|
googleapis-common-protos-types (1.3.1)
|
|
72
71
|
google-protobuf (~> 3.14)
|
|
73
72
|
grpc (1.45.0-universal-darwin)
|
|
74
73
|
google-protobuf (~> 3.19)
|
|
75
74
|
googleapis-common-protos-types (~> 1.0)
|
|
76
|
-
grpc-tools (1.45.0)
|
|
77
75
|
http-accept (1.7.0)
|
|
78
76
|
http-cookie (1.0.4)
|
|
79
77
|
domain_name (~> 0.5)
|
|
@@ -90,10 +88,10 @@ GEM
|
|
|
90
88
|
ruby2_keywords (~> 0.0.1)
|
|
91
89
|
netrc (0.11.0)
|
|
92
90
|
nio4r (2.5.8)
|
|
93
|
-
nokogiri (1.13.
|
|
91
|
+
nokogiri (1.13.4-x86_64-darwin)
|
|
94
92
|
racc (~> 1.4)
|
|
95
93
|
parallel (1.22.1)
|
|
96
|
-
parser (3.1.
|
|
94
|
+
parser (3.1.2.0)
|
|
97
95
|
ast (~> 2.4.1)
|
|
98
96
|
puma (5.6.4)
|
|
99
97
|
nio4r (~> 2.0)
|
|
@@ -102,7 +100,7 @@ GEM
|
|
|
102
100
|
rack-protection (2.2.0)
|
|
103
101
|
rack
|
|
104
102
|
rainbow (3.1.1)
|
|
105
|
-
regexp_parser (2.
|
|
103
|
+
regexp_parser (2.3.1)
|
|
106
104
|
rest-client (2.1.0)
|
|
107
105
|
http-accept (>= 1.7.0, < 2.0)
|
|
108
106
|
http-cookie (>= 1.0.2, < 2.0)
|
|
@@ -129,16 +127,16 @@ GEM
|
|
|
129
127
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
130
128
|
rspec-support (~> 3.11.0)
|
|
131
129
|
rspec-support (3.11.0)
|
|
132
|
-
rubocop (1.
|
|
130
|
+
rubocop (1.28.2)
|
|
133
131
|
parallel (~> 1.10)
|
|
134
132
|
parser (>= 3.1.0.0)
|
|
135
133
|
rainbow (>= 2.2.2, < 4.0)
|
|
136
134
|
regexp_parser (>= 1.8, < 3.0)
|
|
137
135
|
rexml
|
|
138
|
-
rubocop-ast (>= 1.
|
|
136
|
+
rubocop-ast (>= 1.17.0, < 2.0)
|
|
139
137
|
ruby-progressbar (~> 1.7)
|
|
140
138
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
141
|
-
rubocop-ast (1.
|
|
139
|
+
rubocop-ast (1.17.0)
|
|
142
140
|
parser (>= 3.1.1.0)
|
|
143
141
|
ruby-progressbar (1.11.0)
|
|
144
142
|
ruby2_keywords (0.0.5)
|
data/README.md
CHANGED
|
@@ -282,15 +282,15 @@ Define your server:
|
|
|
282
282
|
```ruby
|
|
283
283
|
module Nonnative
|
|
284
284
|
module Features
|
|
285
|
-
class
|
|
285
|
+
class Greeter < GreeterService::Service
|
|
286
286
|
def say_hello(request, _call)
|
|
287
|
-
Nonnative::Features::
|
|
287
|
+
Nonnative::Features::SayHelloResponse.new(message: request.name.to_s)
|
|
288
288
|
end
|
|
289
289
|
end
|
|
290
290
|
|
|
291
291
|
class GRPCServer < Nonnative::GRPCServer
|
|
292
292
|
def svc
|
|
293
|
-
|
|
293
|
+
Greeter.new
|
|
294
294
|
end
|
|
295
295
|
end
|
|
296
296
|
end
|
|
@@ -530,7 +530,7 @@ With cucumber:
|
|
|
530
530
|
|
|
531
531
|
```cucumber
|
|
532
532
|
Given I set the proxy for process 'process_1' to 'close_all'
|
|
533
|
-
Then
|
|
533
|
+
Then I should reset the proxy for process 'process_1'
|
|
534
534
|
```
|
|
535
535
|
|
|
536
536
|
###### Servers
|
|
@@ -549,7 +549,7 @@ With cucumber:
|
|
|
549
549
|
|
|
550
550
|
```cucumber
|
|
551
551
|
Given I set the proxy for server 'server_1' to 'close_all'
|
|
552
|
-
Then
|
|
552
|
+
Then I should reset the proxy for server 'server_1'
|
|
553
553
|
```
|
|
554
554
|
|
|
555
555
|
###### Services
|
|
@@ -568,7 +568,7 @@ With cucumber:
|
|
|
568
568
|
|
|
569
569
|
```cucumber
|
|
570
570
|
Given I set the proxy for service 'service_1' to 'close_all'
|
|
571
|
-
Then
|
|
571
|
+
Then I should reset the proxy for service 'service_1'
|
|
572
572
|
```
|
|
573
573
|
|
|
574
574
|
### Go
|
data/lib/nonnative/cucumber.rb
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
World(RSpec::Benchmark::Matchers)
|
|
4
|
+
|
|
5
|
+
After('@manual') do
|
|
6
|
+
Nonnative.stop
|
|
7
|
+
end
|
|
8
|
+
|
|
3
9
|
Given('I set the proxy for process {string} to {string}') do |name, operation|
|
|
4
10
|
process = Nonnative.pool.process_by_name(name)
|
|
5
11
|
process.proxy.send(operation)
|
|
@@ -15,6 +21,10 @@ Given('I set the proxy for service {string} to {string}') do |name, operation|
|
|
|
15
21
|
service.proxy.send(operation)
|
|
16
22
|
end
|
|
17
23
|
|
|
24
|
+
Given('I start the system') do
|
|
25
|
+
Nonnative.start
|
|
26
|
+
end
|
|
27
|
+
|
|
18
28
|
Then('I should reset the proxy for process {string}') do |name|
|
|
19
29
|
process = Nonnative.pool.process_by_name(name)
|
|
20
30
|
process.proxy.reset
|
|
@@ -38,3 +48,11 @@ Then('the process {string} should consume less than {string} of memory') do |nam
|
|
|
38
48
|
|
|
39
49
|
expect(actual).to be < size
|
|
40
50
|
end
|
|
51
|
+
|
|
52
|
+
Then('starting the system should raise an error') do
|
|
53
|
+
expect { Nonnative.start }.to raise_error(Nonnative::StartError)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
Then('stopping the system should raise an error') do
|
|
57
|
+
expect { Nonnative.stop }.to raise_error(Nonnative::StopError)
|
|
58
|
+
end
|
data/lib/nonnative/process.rb
CHANGED
|
@@ -56,7 +56,7 @@ module Nonnative
|
|
|
56
56
|
environment = environment.transform_keys(&:to_s).transform_values(&:to_s)
|
|
57
57
|
|
|
58
58
|
environment.each_key do |k|
|
|
59
|
-
environment[k] = ENV
|
|
59
|
+
environment[k] = ENV.fetch(k, nil) || environment[k]
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
spawn(environment, service.command.call, %i[out err] => [service.log, 'a'])
|
data/lib/nonnative/strategy.rb
CHANGED
|
@@ -18,11 +18,11 @@ module Nonnative
|
|
|
18
18
|
private
|
|
19
19
|
|
|
20
20
|
def env_strategy
|
|
21
|
-
@env_strategy ||= ENV
|
|
21
|
+
@env_strategy ||= ENV.fetch('NONNATIVE_STRATEGY', nil)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def env_timeout
|
|
25
|
-
@env_timeout ||= ENV
|
|
25
|
+
@env_timeout ||= ENV.fetch('NONNATIVE_TIMEOUT', nil)
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
data/lib/nonnative/version.rb
CHANGED
data/lib/nonnative.rb
CHANGED
data/nonnative.gemspec
CHANGED
|
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.add_dependency 'cucumber', ['>= 7', '< 8']
|
|
29
29
|
spec.add_dependency 'get_process_mem', '~> 0.2.1'
|
|
30
30
|
spec.add_dependency 'grpc', ['>= 1', '< 2']
|
|
31
|
-
spec.add_dependency 'grpc-tools', ['>= 1', '< 2']
|
|
32
31
|
spec.add_dependency 'puma', '~> 5.0'
|
|
33
32
|
spec.add_dependency 'rest-client', '~> 2.1'
|
|
34
33
|
spec.add_dependency 'rspec-benchmark', '~> 0.6.0'
|
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.59.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: 2022-04-
|
|
11
|
+
date: 2022-04-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|
|
@@ -84,26 +84,6 @@ dependencies:
|
|
|
84
84
|
- - "<"
|
|
85
85
|
- !ruby/object:Gem::Version
|
|
86
86
|
version: '2'
|
|
87
|
-
- !ruby/object:Gem::Dependency
|
|
88
|
-
name: grpc-tools
|
|
89
|
-
requirement: !ruby/object:Gem::Requirement
|
|
90
|
-
requirements:
|
|
91
|
-
- - ">="
|
|
92
|
-
- !ruby/object:Gem::Version
|
|
93
|
-
version: '1'
|
|
94
|
-
- - "<"
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '2'
|
|
97
|
-
type: :runtime
|
|
98
|
-
prerelease: false
|
|
99
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - ">="
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1'
|
|
104
|
-
- - "<"
|
|
105
|
-
- !ruby/object:Gem::Version
|
|
106
|
-
version: '2'
|
|
107
87
|
- !ruby/object:Gem::Dependency
|
|
108
88
|
name: puma
|
|
109
89
|
requirement: !ruby/object:Gem::Requirement
|