nonnative 1.77.0 → 1.79.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f22a3a7aaae0b348a070c1287687f076c6a4cb1c9a9b230adc0e91594d24e2c4
4
- data.tar.gz: 13f073f2ca2c35985cba0d9d24cdd35983a534001b39c2fafb0d32370b90084e
3
+ metadata.gz: 98cbbbcdb766112cebe63d15b17f52c243f5a912dc286d05fbde6a9baec933c1
4
+ data.tar.gz: 61f268c5e513e89b16d7dfdf53a49b7a4a509f577ab29574633d3a69cae43a87
5
5
  SHA512:
6
- metadata.gz: 13a8d3978ef75c3d748842ea5dcc54c0b48d685f2a8824449abfc5b85e0867f3f303eb550f3bc6286ad686e6fc65c35a6c6eb02cf7fcfd541a0b3cf2e3fede67
7
- data.tar.gz: 392a1e59617119c7d39bd585c58c4f5f064b02612ed1b500226c392d272872f50f7c089adff024dda5b48c3d6d141c897fc68712f2cb39a7fba6ae408bfe1615
6
+ metadata.gz: 1864db35d2e1b49ecc421f0c570c046a2f755715cca8097933ba81e562ba02506189017a3f943daa802ed419391b08dc52d0aca2facf9b9bab92cccc73dd07a1
7
+ data.tar.gz: 674019ec3a3a8a5029d279010f7b14f61c478d09da70d419efce1666c12735d1c72828f58166ebcd9e92c645236e462004d6fbfa43385e027294bc8c7758f158
data/.rubocop.yml CHANGED
@@ -17,7 +17,7 @@ Metrics/BlockLength:
17
17
  Max: 80
18
18
 
19
19
  Metrics/AbcSize:
20
- Max: 22
20
+ Max: 25
21
21
 
22
22
  Style/Documentation:
23
23
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -6,6 +6,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [v1.78.3](https://github.com/alexfalkowski/nonnative/releases/tag/v1.78.3) - 2024-03-12
10
+
11
+ - [`0ecf0b1`](https://github.com/alexfalkowski/nonnative/commit/0ecf0b1acd8e2526c94c17c782482e06af71ceee) fix(deps): bump rubocop from 1.62.0 to 1.62.1 (#318)
12
+
13
+ ## [v1.78.2](https://github.com/alexfalkowski/nonnative/releases/tag/v1.78.2) - 2024-03-12
14
+
15
+ - [`e2ae72b`](https://github.com/alexfalkowski/nonnative/commit/e2ae72b41aaf13820e093a56ca874b739586956a) fix(deps): bump ruby-lsp from 0.14.4 to 0.14.5 (#316)
16
+ - [`514fd42`](https://github.com/alexfalkowski/nonnative/commit/514fd42db2761ec6c14d5c0d2a77011d9f8cdcc9) build(deps): bump bin from `e6271f5` to `66f6a24` (#317)
17
+
18
+ ## [v1.78.1](https://github.com/alexfalkowski/nonnative/releases/tag/v1.78.1) - 2024-03-07
19
+
20
+ - [`cfe85d0`](https://github.com/alexfalkowski/nonnative/commit/cfe85d0d4c387145291c4116ece9d4fbd72896d6) fix(deps): bump rubocop from 1.61.0 to 1.62.0 (#315)
21
+
22
+ ## [v1.78.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.78.0) - 2024-03-05
23
+
24
+ - [`84b23b9`](https://github.com/alexfalkowski/nonnative/commit/84b23b974d7dff216b1617c68b46a89523170c4c) feat: add ability to wait for start (#314)
25
+
26
+ ## [v1.77.5](https://github.com/alexfalkowski/nonnative/releases/tag/v1.77.5) - 2024-03-05
27
+
28
+ - [`caa09a9`](https://github.com/alexfalkowski/nonnative/commit/caa09a910e726e36a7f096aebc8aa4bd1c258c66) fix(deps): bump ruby-lsp from 0.14.3 to 0.14.4 (#313)
29
+
30
+ ## [v1.77.4](https://github.com/alexfalkowski/nonnative/releases/tag/v1.77.4) - 2024-03-04
31
+
32
+ - [`87c62df`](https://github.com/alexfalkowski/nonnative/commit/87c62dfe63ea3df015cfc460466087476bbec222) fix(deps): bump config from 5.1.0 to 5.3.0 (#312)
33
+
34
+ ## [v1.77.3](https://github.com/alexfalkowski/nonnative/releases/tag/v1.77.3) - 2024-03-01
35
+
36
+ - [`2032a0b`](https://github.com/alexfalkowski/nonnative/commit/2032a0bf38c6a6bd277b659d32745e3088152816) fix(deps): bump rubocop from 1.60.2 to 1.61.0 (#311)
37
+
38
+ ## [v1.77.2](https://github.com/alexfalkowski/nonnative/releases/tag/v1.77.2) - 2024-02-26
39
+
40
+ - [`01d569d`](https://github.com/alexfalkowski/nonnative/commit/01d569d4c7439b7d9e2c868d7393a343c07699fa) fix(deps): bump ruby-lsp from 0.14.2 to 0.14.3 (#310)
41
+
42
+ ## [v1.77.1](https://github.com/alexfalkowski/nonnative/releases/tag/v1.77.1) - 2024-02-23
43
+
44
+ - [`5fc410c`](https://github.com/alexfalkowski/nonnative/commit/5fc410c1d0984f44a5c06f190abae36e5b542f4a) fix(deps): bump ruby-lsp from 0.14.1 to 0.14.2 (#309)
45
+
9
46
  ## [v1.77.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.77.0) - 2024-02-22
10
47
 
11
48
  - [`f61c644`](https://github.com/alexfalkowski/nonnative/commit/f61c64447c64ce95abbaa8804d3522d260bd7760) feat: upgrade to ruby 3.3.0 (#308)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nonnative (1.77.0)
4
+ nonnative (1.79.0)
5
5
  concurrent-ruby (>= 1, < 2)
6
6
  config (>= 5, < 6)
7
7
  cucumber (>= 7, < 10)
@@ -21,12 +21,11 @@ GEM
21
21
  benchmark-malloc (0.2.0)
22
22
  benchmark-perf (0.6.0)
23
23
  benchmark-trend (0.4.0)
24
- bigdecimal (3.1.6)
24
+ bigdecimal (3.1.7)
25
25
  builder (3.2.4)
26
26
  concurrent-ruby (1.2.3)
27
- config (5.1.0)
27
+ config (5.3.0)
28
28
  deep_merge (~> 1.2, >= 1.2.1)
29
- dry-validation (~> 1.0, >= 1.0.0)
30
29
  coveralls_reborn (0.28.0)
31
30
  simplecov (~> 0.22.0)
32
31
  term-ansicolor (~> 1.7)
@@ -61,46 +60,13 @@ GEM
61
60
  diff-lcs (1.5.1)
62
61
  docile (1.4.0)
63
62
  domain_name (0.6.20240107)
64
- dry-configurable (1.1.0)
65
- dry-core (~> 1.0, < 2)
66
- zeitwerk (~> 2.6)
67
- dry-core (1.0.1)
68
- concurrent-ruby (~> 1.0)
69
- zeitwerk (~> 2.6)
70
- dry-inflector (1.0.0)
71
- dry-initializer (3.1.1)
72
- dry-logic (1.5.0)
73
- concurrent-ruby (~> 1.0)
74
- dry-core (~> 1.0, < 2)
75
- zeitwerk (~> 2.6)
76
- dry-schema (1.13.3)
77
- concurrent-ruby (~> 1.0)
78
- dry-configurable (~> 1.0, >= 1.0.1)
79
- dry-core (~> 1.0, < 2)
80
- dry-initializer (~> 3.0)
81
- dry-logic (>= 1.4, < 2)
82
- dry-types (>= 1.7, < 2)
83
- zeitwerk (~> 2.6)
84
- dry-types (1.7.2)
85
- bigdecimal (~> 3.0)
86
- concurrent-ruby (~> 1.0)
87
- dry-core (~> 1.0)
88
- dry-inflector (~> 1.0)
89
- dry-logic (~> 1.4)
90
- zeitwerk (~> 2.6)
91
- dry-validation (1.10.0)
92
- concurrent-ruby (~> 1.0)
93
- dry-core (~> 1.0, < 2)
94
- dry-initializer (~> 3.0)
95
- dry-schema (>= 1.12, < 2)
96
- zeitwerk (~> 2.6)
97
63
  ffi (1.16.3)
98
64
  get_process_mem (0.2.7)
99
65
  ffi (~> 1.0)
100
66
  google-protobuf (3.25.3-arm64-darwin)
101
67
  google-protobuf (3.25.3-x86_64-darwin)
102
68
  google-protobuf (3.25.3-x86_64-linux)
103
- googleapis-common-protos-types (1.12.0)
69
+ googleapis-common-protos-types (1.13.0)
104
70
  google-protobuf (~> 3.18)
105
71
  grpc (1.62.0-arm64-darwin)
106
72
  google-protobuf (~> 3.25)
@@ -118,7 +84,7 @@ GEM
118
84
  language_server-protocol (3.17.0.3)
119
85
  mime-types (3.5.2)
120
86
  mime-types-data (~> 3.2015)
121
- mime-types-data (3.2024.0206)
87
+ mime-types-data (3.2024.0305)
122
88
  mini_mime (1.1.5)
123
89
  multi_test (1.1.0)
124
90
  mustermann (3.0.0)
@@ -164,8 +130,8 @@ GEM
164
130
  rspec-mocks (3.13.0)
165
131
  diff-lcs (>= 1.2.0, < 2.0)
166
132
  rspec-support (~> 3.13.0)
167
- rspec-support (3.13.0)
168
- rubocop (1.60.2)
133
+ rspec-support (3.13.1)
134
+ rubocop (1.62.1)
169
135
  json (~> 2.3)
170
136
  language_server-protocol (>= 3.17.0)
171
137
  parallel (~> 1.10)
@@ -173,12 +139,12 @@ GEM
173
139
  rainbow (>= 2.2.2, < 4.0)
174
140
  regexp_parser (>= 1.8, < 3.0)
175
141
  rexml (>= 3.2.5, < 4.0)
176
- rubocop-ast (>= 1.30.0, < 2.0)
142
+ rubocop-ast (>= 1.31.1, < 2.0)
177
143
  ruby-progressbar (~> 1.7)
178
144
  unicode-display_width (>= 2.4.0, < 3.0)
179
- rubocop-ast (1.30.0)
180
- parser (>= 3.2.1.0)
181
- ruby-lsp (0.14.1)
145
+ rubocop-ast (1.31.2)
146
+ parser (>= 3.3.0.4)
147
+ ruby-lsp (0.14.5)
182
148
  language_server-protocol (~> 3.17.0)
183
149
  prism (>= 0.22.0, < 0.25)
184
150
  sorbet-runtime (>= 0.5.10782)
@@ -196,18 +162,17 @@ GEM
196
162
  rack-protection (= 4.0.0)
197
163
  rack-session (>= 2.0.0, < 3)
198
164
  tilt (~> 2.0)
199
- sorbet-runtime (0.5.11264)
165
+ sorbet-runtime (0.5.11292)
200
166
  sync (0.5.0)
201
167
  sys-uname (1.2.3)
202
168
  ffi (~> 1.1)
203
169
  term-ansicolor (1.7.1)
204
170
  tins (~> 1.0)
205
- thor (1.3.0)
171
+ thor (1.3.1)
206
172
  tilt (2.3.0)
207
173
  tins (1.32.1)
208
174
  sync
209
175
  unicode-display_width (2.5.0)
210
- zeitwerk (2.6.13)
211
176
 
212
177
  PLATFORMS
213
178
  arm64-darwin-22
data/LICENSE CHANGED
@@ -1,24 +1,21 @@
1
- This is free and unencumbered software released into the public domain.
1
+ MIT License
2
2
 
3
- Anyone is free to copy, modify, publish, use, compile, sell, or
4
- distribute this software, either in source code form or as a compiled
5
- binary, for any purpose, commercial or non-commercial, and by any
6
- means.
3
+ Copyright (c) Alejandro Falkowski
7
4
 
8
- In jurisdictions that recognize copyright laws, the author or authors
9
- of this software dedicate any and all copyright interest in the
10
- software to the public domain. We make this dedication for the benefit
11
- of the public at large and to the detriment of our heirs and
12
- successors. We intend this dedication to be an overt act of
13
- relinquishment in perpetuity of all present and future rights to this
14
- software under copyright law.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
15
11
 
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
23
14
 
24
- For more information, please refer to <http://unlicense.org>
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -35,6 +35,7 @@ Configure nonnative with the following:
35
35
 
36
36
  - Process, Server or Service that you want to start.
37
37
  - A timeout value.
38
+ - A time to wait.
38
39
  - Port to verify.
39
40
  - The class for servers.
40
41
  - The log for servers/processes
@@ -61,6 +62,7 @@ Nonnative.configure do |config|
61
62
  p.name = 'start_1'
62
63
  p.command = -> { 'features/support/bin/start 12_321' }
63
64
  p.timeout = 5
65
+ p.wait = 0.1
64
66
  p.port = 12_321
65
67
  p.log = 'reports/12_321.log'
66
68
  p.signal = 'INT' # Possible values are described in Signal.list.keys.
@@ -73,6 +75,7 @@ Nonnative.configure do |config|
73
75
  p.name = 'start_2'
74
76
  p.command = -> { 'features/support/bin/start 12_322' }
75
77
  p.timeout = 0.5
78
+ p.wait = 0.1
76
79
  p.port = 12_322
77
80
  p.log = 'reports/12_322.log'
78
81
  end
@@ -88,6 +91,7 @@ processes:
88
91
  name: start_1
89
92
  command: features/support/bin/start 12_321
90
93
  timeout: 5
94
+ wait: 0.1
91
95
  port: 12321
92
96
  log: reports/12_321.log
93
97
  signal: INT # Possible values are described in Signal.list.keys.
@@ -97,6 +101,7 @@ processes:
97
101
  name: start_2
98
102
  command: features/support/bin/start 12_322
99
103
  timeout: 5
104
+ wait: 0.1
100
105
  port: 12322
101
106
  log: reports/12_322.log
102
107
  ```
@@ -55,6 +55,7 @@ module Nonnative
55
55
  d.name = fd.name
56
56
  d.command = command(fd)
57
57
  d.timeout = fd.timeout
58
+ d.wait = fd.wait if fd.wait
58
59
  d.port = fd.port
59
60
  d.log = fd.log
60
61
  d.signal = fd.signal
@@ -84,6 +85,7 @@ module Nonnative
84
85
  s.name = fd.name
85
86
  s.klass = Object.const_get(fd.class)
86
87
  s.timeout = fd.timeout
88
+ s.wait = fd.wait if fd.wait
87
89
  s.port = fd.port
88
90
  s.log = fd.log
89
91
 
@@ -2,12 +2,13 @@
2
2
 
3
3
  module Nonnative
4
4
  class ConfigurationRunner
5
- attr_accessor :name, :host, :port
5
+ attr_accessor :name, :host, :port, :wait
6
6
  attr_reader :proxy
7
7
 
8
8
  def initialize
9
9
  self.host = '0.0.0.0'
10
10
  self.port = 0
11
+ self.wait = 0.1
11
12
 
12
13
  @proxy = Nonnative::ConfigurationProxy.new
13
14
  end
@@ -72,8 +72,8 @@ module Nonnative
72
72
  end
73
73
 
74
74
  def yield_results(all, pids, ports)
75
- all.zip(pids, ports).each do |type, id, result|
76
- yield type.name, id, result
75
+ all.zip(pids, ports).each do |type, values, result|
76
+ yield type.name, values, result
77
77
  end
78
78
  end
79
79
  end
@@ -15,7 +15,7 @@ module Nonnative
15
15
  wait_start
16
16
  end
17
17
 
18
- pid
18
+ [pid, ::Process.waitpid2(pid, ::Process::WNOHANG).nil?]
19
19
  end
20
20
 
21
21
  def stop
@@ -18,11 +18,11 @@ module Nonnative
18
18
  attr_reader :service
19
19
 
20
20
  def wait_start
21
- sleep 0.1
21
+ sleep service.wait
22
22
  end
23
23
 
24
24
  def wait_stop
25
- sleep 0.1
25
+ sleep service.wait
26
26
  end
27
27
  end
28
28
  end
@@ -16,7 +16,7 @@ module Nonnative
16
16
  wait_start
17
17
  end
18
18
 
19
- object_id
19
+ [object_id, true]
20
20
  end
21
21
 
22
22
  def stop
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nonnative
4
- VERSION = '1.77.0'
4
+ VERSION = '1.79.0'
5
5
  end
data/lib/nonnative.rb CHANGED
@@ -80,8 +80,9 @@ module Nonnative
80
80
  @pool ||= Nonnative::Pool.new(configuration)
81
81
  errors = []
82
82
 
83
- @pool.start do |name, id, result|
84
- errors << "Started #{name} with id #{id}, though did respond in time" unless result
83
+ @pool.start do |name, values, result|
84
+ id, started = values
85
+ errors << "Started #{name} with id #{id}, though did respond in time" if !started || !result
85
86
  end
86
87
 
87
88
  raise Nonnative::StartError, errors.join("\n") unless errors.empty?
data/nonnative.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.summary = 'Allows you to keep using the power of ruby to test other systems'
15
15
  spec.description = spec.summary
16
16
  spec.homepage = 'https://github.com/alexfalkowski/nonnative'
17
- spec.license = 'Unlicense'
17
+ spec.license = 'MIT'
18
18
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
19
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
20
  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.77.0
4
+ version: 1.79.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: 2024-02-22 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -271,7 +271,7 @@ files:
271
271
  - nonnative.gemspec
272
272
  homepage: https://github.com/alexfalkowski/nonnative
273
273
  licenses:
274
- - Unlicense
274
+ - MIT
275
275
  metadata:
276
276
  rubygems_mfa_required: 'true'
277
277
  post_install_message: