nonnative 1.46.0 → 1.47.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/.rubocop.yml +1 -1
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +3 -3
- data/README.md +7 -2
- data/lib/nonnative/configuration.rb +1 -2
- data/lib/nonnative/configuration_process.rb +1 -1
- data/lib/nonnative/configuration_runner.rb +1 -1
- data/lib/nonnative/configuration_server.rb +1 -1
- data/lib/nonnative/process.rb +11 -2
- data/lib/nonnative/runner.rb +1 -2
- data/lib/nonnative/server.rb +7 -1
- data/lib/nonnative/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fadc106377cb9006d00a0a15af09b93e9f63d360737e676595581e0d108a0dbe
|
4
|
+
data.tar.gz: 071bc7fc5293f47d425da66c1c98368492c9d62b068645e8d651ebd10562a80b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32166837748726de12fdcdd5a25202ef2df5f6c6919459a0bbe53f02cb62e96a1469ea9c208734cbb64edbdcb71c653f8d4ebef94a272b47c54a8c1a58a86b50
|
7
|
+
data.tar.gz: a2fd4abffbf60b676d793cd42641bf94511dfddb215f5a0988c1c337f96a411b53e89a125d78f879e1ac2594836b75aef725e099eab7ebdf2f4d5337a1165cf4
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
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.47.0](https://github.com/alexfalkowski/nonnative/compare/v1.46.0...v1.47.0) (2021-05-14)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* allow to pass env variables to processes ([#88](https://github.com/alexfalkowski/nonnative/issues/88)) ([4401a77](https://github.com/alexfalkowski/nonnative/commit/4401a776ccc50dbefa45b06de01945abf4724864))
|
11
|
+
|
5
12
|
## [1.46.0](https://github.com/alexfalkowski/nonnative/compare/v1.45.0...v1.46.0) (2021-05-10)
|
6
13
|
|
7
14
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nonnative (1.
|
4
|
+
nonnative (1.47.0)
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
6
6
|
cucumber (>= 6, < 7)
|
7
7
|
grpc (>= 1, < 2)
|
@@ -73,7 +73,7 @@ GEM
|
|
73
73
|
unf (>= 0.0.5, < 1.0.0)
|
74
74
|
e2mmap (0.1.0)
|
75
75
|
ffi (1.15.0)
|
76
|
-
google-protobuf (3.
|
76
|
+
google-protobuf (3.17.0)
|
77
77
|
googleapis-common-protos-types (1.0.6)
|
78
78
|
google-protobuf (~> 3.14)
|
79
79
|
grpc (1.37.1)
|
@@ -113,7 +113,7 @@ GEM
|
|
113
113
|
middleware
|
114
114
|
thor
|
115
115
|
thread_safe
|
116
|
-
puma (5.3.
|
116
|
+
puma (5.3.1)
|
117
117
|
nio4r (~> 2.0)
|
118
118
|
racc (1.5.2)
|
119
119
|
rack (2.2.3)
|
data/README.md
CHANGED
@@ -69,7 +69,10 @@ Nonnative.configure do |config|
|
|
69
69
|
p.timeout = config.strategy.timeout
|
70
70
|
p.port = 12_321
|
71
71
|
p.log = 'features/logs/12_321.log'
|
72
|
-
p.signal = 'INT' # Possible values are described in Signal.list.keys
|
72
|
+
p.signal = 'INT' # Possible values are described in Signal.list.keys.
|
73
|
+
p.environment = { # Pass environment variables to process.
|
74
|
+
'TEST' => 'true'
|
75
|
+
}
|
73
76
|
end
|
74
77
|
|
75
78
|
config.process do |p|
|
@@ -94,7 +97,9 @@ processes:
|
|
94
97
|
timeout: 5
|
95
98
|
port: 12321
|
96
99
|
log: features/logs/12_321.log
|
97
|
-
signal: INT # Possible values are described in Signal.list.keys
|
100
|
+
signal: INT # Possible values are described in Signal.list.keys.
|
101
|
+
environment: # Pass environment variables to process.
|
102
|
+
TEST: true
|
98
103
|
-
|
99
104
|
name: start_2
|
100
105
|
command: features/support/bin/start 12_322
|
@@ -59,6 +59,7 @@ module Nonnative
|
|
59
59
|
d.port = fd['port']
|
60
60
|
d.log = fd['log']
|
61
61
|
d.signal = fd['signal']
|
62
|
+
d.environment = fd['environment']
|
62
63
|
|
63
64
|
proxy d, fd['proxy']
|
64
65
|
end
|
@@ -95,9 +96,7 @@ module Nonnative
|
|
95
96
|
services.each do |fd|
|
96
97
|
service do |s|
|
97
98
|
s.name = fd['name']
|
98
|
-
s.timeout = fd['timeout']
|
99
99
|
s.port = fd['port']
|
100
|
-
s.log = fd['log']
|
101
100
|
|
102
101
|
proxy s, fd['proxy']
|
103
102
|
end
|
data/lib/nonnative/process.rb
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
module Nonnative
|
4
4
|
class Process < Runner
|
5
|
+
def initialize(service)
|
6
|
+
super service
|
7
|
+
|
8
|
+
@timeout = Nonnative::Timeout.new(service.timeout)
|
9
|
+
end
|
10
|
+
|
5
11
|
def start
|
6
12
|
unless process_exists?
|
7
13
|
proxy.start
|
@@ -32,7 +38,7 @@ module Nonnative
|
|
32
38
|
|
33
39
|
private
|
34
40
|
|
35
|
-
attr_reader :pid
|
41
|
+
attr_reader :pid, :timeout
|
36
42
|
|
37
43
|
def process_kill
|
38
44
|
signal = Signal.list[service.signal || 'INT'] || Signal.list['INT']
|
@@ -40,7 +46,10 @@ module Nonnative
|
|
40
46
|
end
|
41
47
|
|
42
48
|
def process_spawn
|
43
|
-
|
49
|
+
environment = service.environment || {}
|
50
|
+
environment = environment.transform_keys(&:to_s).transform_values(&:to_s)
|
51
|
+
|
52
|
+
spawn(environment, service.command, %i[out err] => [service.log, 'a'])
|
44
53
|
end
|
45
54
|
|
46
55
|
def process_exists?
|
data/lib/nonnative/runner.rb
CHANGED
@@ -6,7 +6,6 @@ module Nonnative
|
|
6
6
|
|
7
7
|
def initialize(service)
|
8
8
|
@service = service
|
9
|
-
@timeout = Nonnative::Timeout.new(service.timeout)
|
10
9
|
@proxy = Nonnative::ProxyFactory.create(service)
|
11
10
|
end
|
12
11
|
|
@@ -16,7 +15,7 @@ module Nonnative
|
|
16
15
|
|
17
16
|
protected
|
18
17
|
|
19
|
-
attr_reader :service
|
18
|
+
attr_reader :service
|
20
19
|
|
21
20
|
def wait_start
|
22
21
|
sleep 0.1
|
data/lib/nonnative/server.rb
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
module Nonnative
|
4
4
|
class Server < Runner
|
5
|
+
def initialize(service)
|
6
|
+
super service
|
7
|
+
|
8
|
+
@timeout = Nonnative::Timeout.new(service.timeout)
|
9
|
+
end
|
10
|
+
|
5
11
|
def start
|
6
12
|
unless thread
|
7
13
|
proxy.start
|
@@ -28,6 +34,6 @@ module Nonnative
|
|
28
34
|
|
29
35
|
private
|
30
36
|
|
31
|
-
attr_reader :thread
|
37
|
+
attr_reader :thread, :timeout
|
32
38
|
end
|
33
39
|
end
|
data/lib/nonnative/version.rb
CHANGED
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.47.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Falkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|