nonnative 1.46.0 → 1.53.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ab3f3907cd50fe1984cc57c28da9a17612beba23d73e8e82111ab133569a082
4
- data.tar.gz: 71601b678ec6a2dbf53a1a2347955c691619dcf7310224d974d0b84bdc4de922
3
+ metadata.gz: 64af28e950a344ef821dbe75028136dc1d79a7fa6a6abfb388b4428e44e11d98
4
+ data.tar.gz: 15e4681afc473711a5b78329680636b3adb082517bd5b0adb5da11e9d8c8a552
5
5
  SHA512:
6
- metadata.gz: 0bcee6e1dfcba57e0a6be43cff1be649f9fcff7c1ec94a26cca48e47b1ae0d734a279ff61464acdca5e531ba4abfb79479a9f473bd893f63d97efa575b7387e4
7
- data.tar.gz: 91d0a695d1d2efc013af95e4a10db2637c8d47dfa21ab49a0765098f7f69c34520e514598aadca2652d69610b7baeea76822388c6030f33b3f0c78c33ec039ea
6
+ metadata.gz: e5cb7c08078df70ca47d49941e29207594fbe1b118048e925c5c433265328f4e1792688f54a483d67ffc35745d46e7f1f6f7e94bcfbe632c18ba443e1bc0eae2
7
+ data.tar.gz: b1d4715e7557ef4e949a92c01acfaca7bff28ed56d3eda5bb6fa05249a945bb4790673e0aa7076ba00e4e376dccabb8b24f7524ed2536d7643a4b84813302354
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:2.7
6
+ - image: alexfalkowski/ruby:3.0
7
7
  steps:
8
8
  - checkout
9
9
  - restore_cache:
@@ -28,7 +28,7 @@ jobs:
28
28
  - image: alexfalkowski/release:2.0
29
29
  steps:
30
30
  - checkout
31
- - run: release.sh
31
+ - run: release
32
32
 
33
33
  workflows:
34
34
  nonnative:
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.7
2
+ TargetRubyVersion: 3.0
3
3
  DisplayCopNames: true
4
4
  NewCops: enable
5
5
 
@@ -13,7 +13,7 @@ Metrics/BlockLength:
13
13
  Max: 80
14
14
 
15
15
  Metrics/AbcSize:
16
- Max: 20
16
+ Max: 22
17
17
 
18
18
  Style/Documentation:
19
19
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.7.2
1
+ ruby-3.0.2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,66 @@
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.53.0](https://github.com/alexfalkowski/nonnative/compare/v1.52.0...v1.53.0) (2021-10-11)
6
+
7
+
8
+ ### Features
9
+
10
+ * add ability to read process memory ([#98](https://github.com/alexfalkowski/nonnative/issues/98)) ([2139932](https://github.com/alexfalkowski/nonnative/commit/21399326bd342711a2cc98ab941cc3b8aaea6d56))
11
+
12
+ ## [1.52.0](https://github.com/alexfalkowski/nonnative/compare/v1.51.2...v1.52.0) (2021-09-21)
13
+
14
+
15
+ ### Features
16
+
17
+ * update ruby ([#96](https://github.com/alexfalkowski/nonnative/issues/96)) ([accdbb3](https://github.com/alexfalkowski/nonnative/commit/accdbb3e9837e2c25bedf966a84c52df4d65d2b7))
18
+
19
+ ### [1.51.2](https://github.com/alexfalkowski/nonnative/compare/v1.51.1...v1.51.2) (2021-08-16)
20
+
21
+ ### [1.51.1](https://github.com/alexfalkowski/nonnative/compare/v1.51.0...v1.51.1) (2021-07-20)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * to version 1.51.1 ([#94](https://github.com/alexfalkowski/nonnative/issues/94)) ([06e2199](https://github.com/alexfalkowski/nonnative/commit/06e21997f1a18ebf40eb3db92b55a5af8f45b50f))
27
+
28
+ ## [1.51.0](https://github.com/alexfalkowski/nonnative/compare/v1.50.1...v1.51.0) (2021-07-20)
29
+
30
+
31
+ ### Features
32
+
33
+ * **deps:** update cucumber to 7.0.0 ([#93](https://github.com/alexfalkowski/nonnative/issues/93)) ([996c014](https://github.com/alexfalkowski/nonnative/commit/996c014eb843950b62febfc4fbd3f82c959c42ae))
34
+
35
+ ### [1.50.1](https://github.com/alexfalkowski/nonnative/compare/v1.50.0...v1.50.1) (2021-07-19)
36
+
37
+ ## [1.50.0](https://github.com/alexfalkowski/nonnative/compare/v1.49.0...v1.50.0) (2021-06-06)
38
+
39
+
40
+ ### Features
41
+
42
+ * **deps:** update ([#91](https://github.com/alexfalkowski/nonnative/issues/91)) ([9817716](https://github.com/alexfalkowski/nonnative/commit/9817716fdf27da6af5713d0a8847a64a62f978dd))
43
+
44
+ ## [1.49.0](https://github.com/alexfalkowski/nonnative/compare/v1.48.0...v1.49.0) (2021-05-28)
45
+
46
+
47
+ ### Features
48
+
49
+ * **deps:** update ([#90](https://github.com/alexfalkowski/nonnative/issues/90)) ([2644345](https://github.com/alexfalkowski/nonnative/commit/2644345e8f735276e778e3e977514b3b047c7c01))
50
+
51
+ ## [1.48.0](https://github.com/alexfalkowski/nonnative/compare/v1.47.0...v1.48.0) (2021-05-15)
52
+
53
+
54
+ ### Features
55
+
56
+ * **deps:** update to ruby version 3.0.0 ([#89](https://github.com/alexfalkowski/nonnative/issues/89)) ([e2b37bf](https://github.com/alexfalkowski/nonnative/commit/e2b37bfc6e6dd922258cc1d1bc5b6abc4d78fd02))
57
+
58
+ ## [1.47.0](https://github.com/alexfalkowski/nonnative/compare/v1.46.0...v1.47.0) (2021-05-14)
59
+
60
+
61
+ ### Features
62
+
63
+ * allow to pass env variables to processes ([#88](https://github.com/alexfalkowski/nonnative/issues/88)) ([4401a77](https://github.com/alexfalkowski/nonnative/commit/4401a776ccc50dbefa45b06de01945abf4724864))
64
+
5
65
  ## [1.46.0](https://github.com/alexfalkowski/nonnative/compare/v1.45.0...v1.46.0) (2021-05-10)
6
66
 
7
67
 
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nonnative (1.46.0)
4
+ nonnative (1.53.0)
5
5
  concurrent-ruby (~> 1.0, >= 1.0.5)
6
- cucumber (>= 6, < 7)
6
+ cucumber (>= 7, < 8)
7
+ get_process_mem (~> 0.2.1)
7
8
  grpc (>= 1, < 2)
8
9
  grpc-tools (>= 1, < 2)
9
10
  puma (~> 5.0)
@@ -15,105 +16,91 @@ PATH
15
16
  GEM
16
17
  remote: https://rubygems.org/
17
18
  specs:
18
- activesupport (6.1.3.2)
19
- concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (>= 1.6, < 2)
21
- minitest (>= 5.1)
22
- tzinfo (~> 2.0)
23
- zeitwerk (~> 2.3)
24
19
  ast (2.4.2)
25
- backport (1.1.2)
20
+ backport (1.2.0)
26
21
  benchmark (0.1.1)
27
22
  benchmark-malloc (0.2.0)
28
23
  benchmark-perf (0.6.0)
29
24
  benchmark-trend (0.4.0)
30
25
  builder (3.2.4)
31
- concurrent-ruby (1.1.8)
26
+ concurrent-ruby (1.1.9)
32
27
  coveralls (0.8.23)
33
28
  json (>= 1.8, < 3)
34
29
  simplecov (~> 0.16.1)
35
30
  term-ansicolor (~> 1.3)
36
31
  thor (>= 0.19.4, < 2.0)
37
32
  tins (~> 1.6)
38
- cucumber (6.0.0)
33
+ cucumber (7.0.0)
39
34
  builder (~> 3.2, >= 3.2.4)
40
- cucumber-core (~> 9.0, >= 9.0.0)
41
- cucumber-create-meta (~> 4.0, >= 4.0.0)
35
+ cucumber-core (~> 10.0, >= 10.0.1)
36
+ cucumber-create-meta (~> 6.0, >= 6.0.1)
42
37
  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)
38
+ cucumber-gherkin (~> 20.0, >= 20.0.1)
39
+ cucumber-html-formatter (~> 16.0, >= 16.0.1)
40
+ cucumber-messages (~> 17.0, >= 17.0.1)
41
+ cucumber-wire (~> 6.0, >= 6.0.1)
47
42
  diff-lcs (~> 1.4, >= 1.4.4)
48
43
  mime-types (~> 3.3, >= 3.3.1)
49
44
  multi_test (~> 0.1, >= 0.1.2)
50
45
  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)
46
+ cucumber-core (10.0.1)
47
+ cucumber-gherkin (~> 20.0, >= 20.0.1)
48
+ cucumber-messages (~> 17.0, >= 17.0.1)
54
49
  cucumber-tag-expressions (~> 3.0, >= 3.0.1)
55
- cucumber-create-meta (4.0.0)
56
- cucumber-messages (~> 15.0, >= 15.0.0)
50
+ cucumber-create-meta (6.0.1)
51
+ cucumber-messages (~> 17.0, >= 17.0.1)
57
52
  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)
64
- protobuf-cucumber (~> 3.10, >= 3.10.8)
53
+ cucumber-cucumber-expressions (12.1.3)
54
+ cucumber-gherkin (20.0.1)
55
+ cucumber-messages (~> 17.0, >= 17.0.1)
56
+ cucumber-html-formatter (16.0.1)
57
+ cucumber-messages (~> 17.0, >= 17.0.1)
58
+ cucumber-messages (17.1.1)
65
59
  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)
60
+ cucumber-wire (6.1.1)
61
+ cucumber-core (~> 10.0, >= 10.0.1)
62
+ cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
63
+ cucumber-messages (~> 17.0, >= 17.0.1)
70
64
  diff-lcs (1.4.4)
71
- docile (1.3.5)
65
+ docile (1.4.0)
72
66
  domain_name (0.5.20190701)
73
67
  unf (>= 0.0.5, < 1.0.0)
74
68
  e2mmap (0.1.0)
75
- ffi (1.15.0)
76
- google-protobuf (3.16.0)
77
- googleapis-common-protos-types (1.0.6)
69
+ ffi (1.15.4)
70
+ get_process_mem (0.2.7)
71
+ ffi (~> 1.0)
72
+ google-protobuf (3.18.1)
73
+ googleapis-common-protos-types (1.2.0)
78
74
  google-protobuf (~> 3.14)
79
- grpc (1.37.1)
80
- google-protobuf (~> 3.15)
75
+ grpc (1.41.0)
76
+ google-protobuf (~> 3.17)
81
77
  googleapis-common-protos-types (~> 1.0)
82
- grpc-tools (1.37.1)
78
+ grpc-tools (1.41.0)
83
79
  http-accept (1.7.0)
84
- http-cookie (1.0.3)
80
+ http-cookie (1.0.4)
85
81
  domain_name (~> 0.5)
86
- i18n (1.8.10)
87
- concurrent-ruby (~> 1.0)
88
82
  jaro_winkler (1.5.4)
89
83
  json (2.5.1)
90
84
  kramdown (2.3.1)
91
85
  rexml
92
86
  kramdown-parser-gfm (1.1.0)
93
87
  kramdown (~> 2.0)
94
- middleware (0.1.0)
95
88
  mime-types (3.3.1)
96
89
  mime-types-data (~> 3.2015)
97
- mime-types-data (3.2021.0225)
98
- mini_portile2 (2.5.0)
99
- minitest (5.14.4)
90
+ mime-types-data (3.2021.0901)
91
+ mini_portile2 (2.6.1)
100
92
  multi_test (0.1.2)
101
93
  mustermann (1.1.1)
102
94
  ruby2_keywords (~> 0.0.1)
103
95
  netrc (0.11.0)
104
- nio4r (2.5.7)
105
- nokogiri (1.11.3)
106
- mini_portile2 (~> 2.5.0)
96
+ nio4r (2.5.8)
97
+ nokogiri (1.12.5)
98
+ mini_portile2 (~> 2.6.1)
107
99
  racc (~> 1.4)
108
- parallel (1.20.1)
109
- parser (3.0.1.1)
100
+ parallel (1.21.0)
101
+ parser (3.0.2.0)
110
102
  ast (~> 2.4.1)
111
- protobuf-cucumber (3.10.8)
112
- activesupport (>= 3.2)
113
- middleware
114
- thor
115
- thread_safe
116
- puma (5.3.0)
103
+ puma (5.5.0)
117
104
  nio4r (~> 2.0)
118
105
  racc (1.5.2)
119
106
  rack (2.2.3)
@@ -147,19 +134,19 @@ GEM
147
134
  diff-lcs (>= 1.2.0, < 2.0)
148
135
  rspec-support (~> 3.10.0)
149
136
  rspec-support (3.10.2)
150
- rubocop (1.14.0)
137
+ rubocop (1.22.1)
151
138
  parallel (~> 1.10)
152
139
  parser (>= 3.0.0.0)
153
140
  rainbow (>= 2.2.2, < 4.0)
154
141
  regexp_parser (>= 1.8, < 3.0)
155
142
  rexml
156
- rubocop-ast (>= 1.5.0, < 2.0)
143
+ rubocop-ast (>= 1.12.0, < 2.0)
157
144
  ruby-progressbar (~> 1.7)
158
145
  unicode-display_width (>= 1.4.0, < 3.0)
159
- rubocop-ast (1.5.0)
146
+ rubocop-ast (1.12.0)
160
147
  parser (>= 3.0.1.1)
161
148
  ruby-progressbar (1.11.0)
162
- ruby2_keywords (0.0.4)
149
+ ruby2_keywords (0.0.5)
163
150
  simplecov (0.16.1)
164
151
  docile (~> 1.1)
165
152
  json (>= 1.8, < 3)
@@ -170,10 +157,11 @@ GEM
170
157
  rack (~> 2.2)
171
158
  rack-protection (= 2.1.0)
172
159
  tilt (~> 2.0)
173
- solargraph (0.40.4)
174
- backport (~> 1.1)
160
+ solargraph (0.44.0)
161
+ backport (~> 1.2)
175
162
  benchmark
176
163
  bundler (>= 1.17.2)
164
+ diff-lcs (~> 1.4)
177
165
  e2mmap
178
166
  jaro_winkler (~> 1.5)
179
167
  kramdown (~> 2.3)
@@ -189,29 +177,25 @@ GEM
189
177
  ffi (~> 1.1)
190
178
  term-ansicolor (1.7.1)
191
179
  tins (~> 1.0)
192
- thor (1.0.1)
193
- thread_safe (0.3.6)
180
+ thor (1.1.0)
194
181
  tilt (2.0.10)
195
- tins (1.28.0)
182
+ tins (1.29.1)
196
183
  sync
197
- tzinfo (2.0.4)
198
- concurrent-ruby (~> 1.0)
199
184
  unf (0.1.4)
200
185
  unf_ext
201
- unf_ext (0.0.7.7)
202
- unicode-display_width (2.0.0)
186
+ unf_ext (0.0.8)
187
+ unicode-display_width (2.1.0)
203
188
  yard (0.9.26)
204
- zeitwerk (2.4.2)
205
189
 
206
190
  PLATFORMS
207
191
  ruby
208
192
 
209
193
  DEPENDENCIES
210
- bundler (~> 2.1, >= 2.1.4)
194
+ bundler (~> 2.2, >= 2.2.17)
211
195
  coveralls (~> 0.8.23)
212
196
  nonnative!
213
- rubocop (~> 1.14)
214
- solargraph (~> 0.40.4)
197
+ rubocop (~> 1.22, >= 1.22.1)
198
+ solargraph (~> 0.44.0)
215
199
 
216
200
  BUNDLED WITH
217
- 2.1.4
201
+ 2.2.22
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
@@ -113,6 +118,12 @@ Nonnative.configure do |config|
113
118
  end
114
119
  ```
115
120
 
121
+ With cucumber you can also verify how much memory is used by the process:
122
+
123
+ ```cucumber
124
+ Then the process 'start_1' should consume '<=' '20mb' of memory
125
+ ```
126
+
116
127
  ### Servers
117
128
 
118
129
  A server is a dependency to some external API.
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nonnative
4
4
  class ConfigurationProcess < ConfigurationRunner
5
- attr_accessor :command, :signal
5
+ attr_accessor :command, :signal, :timeout, :log, :environment
6
6
  end
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Nonnative
4
4
  class ConfigurationRunner
5
- attr_accessor :name, :timeout, :port, :log
5
+ attr_accessor :name, :port
6
6
  attr_reader :proxy
7
7
 
8
8
  def initialize
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nonnative
4
4
  class ConfigurationServer < ConfigurationRunner
5
- attr_accessor :klass
5
+ attr_accessor :klass, :timeout, :log
6
6
  end
7
7
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Given('I set the proxy for process {string} to {string}') do |name, operation|
4
- server = Nonnative.pool.process_by_name(name)
5
- server.proxy.send(operation)
4
+ process = Nonnative.pool.process_by_name(name)
5
+ process.proxy.send(operation)
6
6
  end
7
7
 
8
8
  Given('I set the proxy for server {string} to {string}') do |name, operation|
@@ -16,8 +16,8 @@ Given('I set the proxy for service {string} to {string}') do |name, operation|
16
16
  end
17
17
 
18
18
  Then('I should reset the proxy for process {string}') do |name|
19
- server = Nonnative.pool.process_by_name(name)
20
- server.proxy.reset
19
+ process = Nonnative.pool.process_by_name(name)
20
+ process.proxy.reset
21
21
  end
22
22
 
23
23
  Then('I should reset the proxy for server {string}') do |name|
@@ -29,3 +29,23 @@ Then('I should reset the proxy for service {string}') do |name|
29
29
  service = Nonnative.pool.service_by_name(name)
30
30
  service.proxy.reset
31
31
  end
32
+
33
+ Then('the process {string} should consume {string} {string} of memory') do |name, op, mem|
34
+ process = Nonnative.pool.process_by_name(name)
35
+ _, size, type = mem.split(/(\d+)/)
36
+ actual = process.memory.send(type)
37
+ size = size.to_i
38
+
39
+ case op
40
+ when '='
41
+ expect(actual).to eq(size)
42
+ when '<'
43
+ expect(actual).to be < size
44
+ when '<='
45
+ expect(actual).to be <= size
46
+ when '>'
47
+ expect(actual).to be > size
48
+ when '>='
49
+ expect(actual).to be >= size
50
+ end
51
+ end
@@ -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
@@ -22,6 +28,12 @@ module Nonnative
22
28
  pid
23
29
  end
24
30
 
31
+ def memory
32
+ return if pid.nil?
33
+
34
+ @memory ||= GetProcessMem.new(pid)
35
+ end
36
+
25
37
  protected
26
38
 
27
39
  def wait_stop
@@ -32,7 +44,7 @@ module Nonnative
32
44
 
33
45
  private
34
46
 
35
- attr_reader :pid
47
+ attr_reader :pid, :timeout
36
48
 
37
49
  def process_kill
38
50
  signal = Signal.list[service.signal || 'INT'] || Signal.list['INT']
@@ -40,7 +52,10 @@ module Nonnative
40
52
  end
41
53
 
42
54
  def process_spawn
43
- spawn(service.command, %i[out err] => [service.log, 'a'])
55
+ environment = service.environment || {}
56
+ environment = environment.transform_keys(&:to_s).transform_values(&:to_s)
57
+
58
+ spawn(environment, service.command, %i[out err] => [service.log, 'a'])
44
59
  end
45
60
 
46
61
  def process_exists?
@@ -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, :timeout
18
+ attr_reader :service
20
19
 
21
20
  def wait_start
22
21
  sleep 0.1
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nonnative
4
- VERSION = '1.46.0'
4
+ VERSION = '1.53.0'
5
5
  end
data/lib/nonnative.rb CHANGED
@@ -12,6 +12,7 @@ require 'puma'
12
12
  require 'puma/server'
13
13
  require 'concurrent'
14
14
  require 'cucumber'
15
+ require 'get_process_mem'
15
16
 
16
17
  require 'nonnative/version'
17
18
  require 'nonnative/error'
data/nonnative.gemspec CHANGED
@@ -21,10 +21,11 @@ Gem::Specification.new do |spec|
21
21
  spec.bindir = 'exe'
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
- spec.required_ruby_version = ['>= 2.7.0', '< 2.8.0']
24
+ spec.required_ruby_version = ['>= 3.0.0', '< 4.0.0']
25
25
 
26
26
  spec.add_dependency 'concurrent-ruby', '~> 1.0', '>= 1.0.5'
27
- spec.add_dependency 'cucumber', ['>= 6', '< 7']
27
+ spec.add_dependency 'cucumber', ['>= 7', '< 8']
28
+ spec.add_dependency 'get_process_mem', '~> 0.2.1'
28
29
  spec.add_dependency 'grpc', ['>= 1', '< 2']
29
30
  spec.add_dependency 'grpc-tools', ['>= 1', '< 2']
30
31
  spec.add_dependency 'puma', '~> 5.0'
@@ -33,8 +34,8 @@ Gem::Specification.new do |spec|
33
34
  spec.add_dependency 'rspec-expectations', '~> 3.9', '>= 3.9.2'
34
35
  spec.add_dependency 'sinatra', '~> 2.0', '>= 2.0.8.1'
35
36
 
36
- spec.add_development_dependency 'bundler', '~> 2.1', '>= 2.1.4'
37
+ spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.17'
37
38
  spec.add_development_dependency 'coveralls', '~> 0.8.23'
38
- spec.add_development_dependency 'rubocop', '~> 1.14'
39
- spec.add_development_dependency 'solargraph', '~> 0.40.4'
39
+ spec.add_development_dependency 'rubocop', '~> 1.22', '>= 1.22.1'
40
+ spec.add_development_dependency 'solargraph', '~> 0.44.0'
40
41
  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.46.0
4
+ version: 1.53.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-10 00:00:00.000000000 Z
11
+ date: 2021-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -36,20 +36,34 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '6'
39
+ version: '7'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7'
42
+ version: '8'
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: '6'
49
+ version: '7'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7'
52
+ version: '8'
53
+ - !ruby/object:Gem::Dependency
54
+ name: get_process_mem
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: 0.2.1
60
+ type: :runtime
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: 0.2.1
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: grpc
55
69
  requirement: !ruby/object:Gem::Requirement
@@ -178,20 +192,20 @@ dependencies:
178
192
  requirements:
179
193
  - - "~>"
180
194
  - !ruby/object:Gem::Version
181
- version: '2.1'
195
+ version: '2.2'
182
196
  - - ">="
183
197
  - !ruby/object:Gem::Version
184
- version: 2.1.4
198
+ version: 2.2.17
185
199
  type: :development
186
200
  prerelease: false
187
201
  version_requirements: !ruby/object:Gem::Requirement
188
202
  requirements:
189
203
  - - "~>"
190
204
  - !ruby/object:Gem::Version
191
- version: '2.1'
205
+ version: '2.2'
192
206
  - - ">="
193
207
  - !ruby/object:Gem::Version
194
- version: 2.1.4
208
+ version: 2.2.17
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: coveralls
197
211
  requirement: !ruby/object:Gem::Requirement
@@ -212,28 +226,34 @@ dependencies:
212
226
  requirements:
213
227
  - - "~>"
214
228
  - !ruby/object:Gem::Version
215
- version: '1.14'
229
+ version: '1.22'
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ version: 1.22.1
216
233
  type: :development
217
234
  prerelease: false
218
235
  version_requirements: !ruby/object:Gem::Requirement
219
236
  requirements:
220
237
  - - "~>"
221
238
  - !ruby/object:Gem::Version
222
- version: '1.14'
239
+ version: '1.22'
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: 1.22.1
223
243
  - !ruby/object:Gem::Dependency
224
244
  name: solargraph
225
245
  requirement: !ruby/object:Gem::Requirement
226
246
  requirements:
227
247
  - - "~>"
228
248
  - !ruby/object:Gem::Version
229
- version: 0.40.4
249
+ version: 0.44.0
230
250
  type: :development
231
251
  prerelease: false
232
252
  version_requirements: !ruby/object:Gem::Requirement
233
253
  requirements:
234
254
  - - "~>"
235
255
  - !ruby/object:Gem::Version
236
- version: 0.40.4
256
+ version: 0.44.0
237
257
  description: Allows you to keep using the power of ruby to test other systems
238
258
  email:
239
259
  - alexrfalkowski@gmail.com
@@ -307,17 +327,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
307
327
  requirements:
308
328
  - - ">="
309
329
  - !ruby/object:Gem::Version
310
- version: 2.7.0
330
+ version: 3.0.0
311
331
  - - "<"
312
332
  - !ruby/object:Gem::Version
313
- version: 2.8.0
333
+ version: 4.0.0
314
334
  required_rubygems_version: !ruby/object:Gem::Requirement
315
335
  requirements:
316
336
  - - ">="
317
337
  - !ruby/object:Gem::Version
318
338
  version: '0'
319
339
  requirements: []
320
- rubygems_version: 3.1.4
340
+ rubygems_version: 3.2.22
321
341
  signing_key:
322
342
  specification_version: 4
323
343
  summary: Allows you to keep using the power of ruby to test other systems