nonnative 1.44.0 → 1.45.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/CHANGELOG.md +9 -0
- data/Gemfile.lock +10 -10
- data/README.md +26 -13
- data/lib/nonnative.rb +4 -0
- data/lib/nonnative/configuration.rb +11 -2
- data/lib/nonnative/version.rb +1 -1
- data/nonnative.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85f5fe8fb5f61dce67f48ddf86ea0d2b76a6446e0e249af0f5afd22229bf3d3d
|
|
4
|
+
data.tar.gz: 178d46b667d50d4f8b68b0e18946ca2aa265e41fd3f8c869229a6e464ddf6e41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 782d41b50946ad3741bdf1deedaff39c47db9d890d00f6e2d3ea854c8dff0a9ca3e96d3960f6e2c9d8776b41f4dc6170ca7d0fd65fb86fb65809922258b9f2df
|
|
7
|
+
data.tar.gz: 317a75048db20140a4cd99dfc87ab8001fa4bcbfda7fc750fc3fb00ab8bfb7f7e25e16a38be17faff2c100c683281fac4f1fa9054cc4a39f510baabf6f174bb6
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.45.0](https://github.com/alexfalkowski/nonnative/compare/v1.44.1...v1.45.0) (2021-05-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add loading go command through config ([#86](https://github.com/alexfalkowski/nonnative/issues/86)) ([2f500d3](https://github.com/alexfalkowski/nonnative/commit/2f500d34ef6eb536b223651f84213f4f3d10c496))
|
|
11
|
+
|
|
12
|
+
### [1.44.1](https://github.com/alexfalkowski/nonnative/compare/v1.44.0...v1.44.1) (2021-05-06)
|
|
13
|
+
|
|
5
14
|
## [1.44.0](https://github.com/alexfalkowski/nonnative/compare/v1.43.0...v1.44.0) (2021-05-01)
|
|
6
15
|
|
|
7
16
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nonnative (1.
|
|
4
|
+
nonnative (1.45.0)
|
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
|
6
6
|
cucumber (>= 6, < 7)
|
|
7
7
|
grpc (>= 1, < 2)
|
|
@@ -15,7 +15,7 @@ PATH
|
|
|
15
15
|
GEM
|
|
16
16
|
remote: https://rubygems.org/
|
|
17
17
|
specs:
|
|
18
|
-
activesupport (6.1.3.
|
|
18
|
+
activesupport (6.1.3.2)
|
|
19
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
20
|
i18n (>= 1.6, < 2)
|
|
21
21
|
minitest (>= 5.1)
|
|
@@ -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.16.0)
|
|
77
77
|
googleapis-common-protos-types (1.0.6)
|
|
78
78
|
google-protobuf (~> 3.14)
|
|
79
79
|
grpc (1.37.1)
|
|
@@ -106,14 +106,14 @@ GEM
|
|
|
106
106
|
mini_portile2 (~> 2.5.0)
|
|
107
107
|
racc (~> 1.4)
|
|
108
108
|
parallel (1.20.1)
|
|
109
|
-
parser (3.0.1.
|
|
109
|
+
parser (3.0.1.1)
|
|
110
110
|
ast (~> 2.4.1)
|
|
111
111
|
protobuf-cucumber (3.10.8)
|
|
112
112
|
activesupport (>= 3.2)
|
|
113
113
|
middleware
|
|
114
114
|
thor
|
|
115
115
|
thread_safe
|
|
116
|
-
puma (5.
|
|
116
|
+
puma (5.3.0)
|
|
117
117
|
nio4r (~> 2.0)
|
|
118
118
|
racc (1.5.2)
|
|
119
119
|
rack (2.2.3)
|
|
@@ -147,17 +147,17 @@ GEM
|
|
|
147
147
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
148
148
|
rspec-support (~> 3.10.0)
|
|
149
149
|
rspec-support (3.10.2)
|
|
150
|
-
rubocop (1.
|
|
150
|
+
rubocop (1.14.0)
|
|
151
151
|
parallel (~> 1.10)
|
|
152
152
|
parser (>= 3.0.0.0)
|
|
153
153
|
rainbow (>= 2.2.2, < 4.0)
|
|
154
154
|
regexp_parser (>= 1.8, < 3.0)
|
|
155
155
|
rexml
|
|
156
|
-
rubocop-ast (>= 1.
|
|
156
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
|
157
157
|
ruby-progressbar (~> 1.7)
|
|
158
158
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
159
|
-
rubocop-ast (1.
|
|
160
|
-
parser (>=
|
|
159
|
+
rubocop-ast (1.5.0)
|
|
160
|
+
parser (>= 3.0.1.1)
|
|
161
161
|
ruby-progressbar (1.11.0)
|
|
162
162
|
ruby2_keywords (0.0.4)
|
|
163
163
|
simplecov (0.16.1)
|
|
@@ -210,7 +210,7 @@ DEPENDENCIES
|
|
|
210
210
|
bundler (~> 2.1, >= 2.1.4)
|
|
211
211
|
coveralls (~> 0.8.23)
|
|
212
212
|
nonnative!
|
|
213
|
-
rubocop (~> 1.
|
|
213
|
+
rubocop (~> 1.14)
|
|
214
214
|
solargraph (~> 0.40.4)
|
|
215
215
|
|
|
216
216
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -172,13 +172,13 @@ strategy: startup
|
|
|
172
172
|
servers:
|
|
173
173
|
-
|
|
174
174
|
name: server_1
|
|
175
|
-
|
|
175
|
+
class: Nonnative::EchoServer
|
|
176
176
|
timeout: 1
|
|
177
177
|
port: 12323
|
|
178
178
|
log: features/logs/server_1.log
|
|
179
179
|
-
|
|
180
180
|
name: server_2
|
|
181
|
-
|
|
181
|
+
class: Nonnative::EchoServer
|
|
182
182
|
timeout: 1
|
|
183
183
|
port: 12324
|
|
184
184
|
log: features/logs/server_2.log
|
|
@@ -244,7 +244,7 @@ strategy: startup
|
|
|
244
244
|
servers:
|
|
245
245
|
-
|
|
246
246
|
name: http_server_1
|
|
247
|
-
|
|
247
|
+
class: Nonnative::Features::HTTPServer
|
|
248
248
|
timeout: 1
|
|
249
249
|
port: 4567
|
|
250
250
|
log: features/logs/http_server_1.log
|
|
@@ -306,7 +306,7 @@ strategy: startup
|
|
|
306
306
|
servers:
|
|
307
307
|
-
|
|
308
308
|
name: grpc_server_1
|
|
309
|
-
|
|
309
|
+
class: Nonnative::Features::GRPCServer
|
|
310
310
|
timeout: 1
|
|
311
311
|
port: 9002
|
|
312
312
|
log: features/logs/grpc_server_1.log
|
|
@@ -561,16 +561,10 @@ To get this to work you will need to create a `main_test.go` file with these con
|
|
|
561
561
|
|
|
562
562
|
package main
|
|
563
563
|
|
|
564
|
-
import
|
|
565
|
-
"testing"
|
|
566
|
-
|
|
567
|
-
"github.com/your_location/cmd"
|
|
568
|
-
)
|
|
564
|
+
import "testing"
|
|
569
565
|
|
|
570
566
|
func TestFeatures(t *testing.T) {
|
|
571
|
-
|
|
572
|
-
t.Fatal(err.Error())
|
|
573
|
-
}
|
|
567
|
+
main()
|
|
574
568
|
}
|
|
575
569
|
```
|
|
576
570
|
|
|
@@ -580,8 +574,27 @@ Then to compile this binary you will need to do the following:
|
|
|
580
574
|
go test -mod vendor -c -tags features -covermode=count -o your_binary -coverpkg=./... github.com/your_location
|
|
581
575
|
```
|
|
582
576
|
|
|
583
|
-
|
|
577
|
+
Setup it up programmatically:
|
|
584
578
|
|
|
585
579
|
```ruby
|
|
586
580
|
Nonnative.go_executable('reports', 'your_binary', 'sub_command', '--config config.yaml')
|
|
587
581
|
```
|
|
582
|
+
|
|
583
|
+
Setup it up through configuration:
|
|
584
|
+
|
|
585
|
+
```yaml
|
|
586
|
+
version: 1.0
|
|
587
|
+
strategy: startup
|
|
588
|
+
processes:
|
|
589
|
+
-
|
|
590
|
+
name: go
|
|
591
|
+
go:
|
|
592
|
+
output: reports
|
|
593
|
+
executable: your_binary
|
|
594
|
+
command: sub_command
|
|
595
|
+
parameters:
|
|
596
|
+
- --config config.yaml
|
|
597
|
+
timeout: 5
|
|
598
|
+
port: 8000
|
|
599
|
+
log: features/logs/go.log
|
|
600
|
+
```
|
data/lib/nonnative.rb
CHANGED
|
@@ -52,6 +52,10 @@ module Nonnative
|
|
|
52
52
|
class << self
|
|
53
53
|
attr_reader :pool
|
|
54
54
|
|
|
55
|
+
def log_lines(path, predicate)
|
|
56
|
+
File.readlines(path).select { |l| predicate.call(l) }
|
|
57
|
+
end
|
|
58
|
+
|
|
55
59
|
def go_executable(output, exec, cmd, *params)
|
|
56
60
|
Nonnative::GoCommand.new(exec, output).executable(cmd, params)
|
|
57
61
|
end
|
|
@@ -22,7 +22,7 @@ module Nonnative
|
|
|
22
22
|
processes.each do |fd|
|
|
23
23
|
config.process do |d|
|
|
24
24
|
d.name = fd['name']
|
|
25
|
-
d.command = fd
|
|
25
|
+
d.command = command(fd)
|
|
26
26
|
d.timeout = fd['timeout']
|
|
27
27
|
d.port = fd['port']
|
|
28
28
|
d.log = fd['log']
|
|
@@ -33,12 +33,21 @@ module Nonnative
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def command(process)
|
|
37
|
+
go = process['go']
|
|
38
|
+
if go
|
|
39
|
+
Nonnative.go_executable(go['output'], go['executable'], go['command'], *go['parameters'])
|
|
40
|
+
else
|
|
41
|
+
process['command']
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
36
45
|
def servers(file, config)
|
|
37
46
|
servers = file['servers'] || []
|
|
38
47
|
servers.each do |fd|
|
|
39
48
|
config.server do |s|
|
|
40
49
|
s.name = fd['name']
|
|
41
|
-
s.klass = Object.const_get(fd['
|
|
50
|
+
s.klass = Object.const_get(fd['class'])
|
|
42
51
|
s.timeout = fd['timeout']
|
|
43
52
|
s.port = fd['port']
|
|
44
53
|
s.log = fd['log']
|
data/lib/nonnative/version.rb
CHANGED
data/nonnative.gemspec
CHANGED
|
@@ -8,7 +8,7 @@ require 'nonnative/version'
|
|
|
8
8
|
Gem::Specification.new do |spec|
|
|
9
9
|
spec.name = 'nonnative'
|
|
10
10
|
spec.version = Nonnative::VERSION
|
|
11
|
-
spec.authors = ['
|
|
11
|
+
spec.authors = ['Alejandro Falkowski']
|
|
12
12
|
spec.email = ['alexrfalkowski@gmail.com']
|
|
13
13
|
|
|
14
14
|
spec.summary = 'Allows you to keep using the power of ruby to test other systems'
|
|
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
|
|
36
36
|
spec.add_development_dependency 'bundler', '~> 2.1', '>= 2.1.4'
|
|
37
37
|
spec.add_development_dependency 'coveralls', '~> 0.8.23'
|
|
38
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
|
38
|
+
spec.add_development_dependency 'rubocop', '~> 1.14'
|
|
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.45.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-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|
|
@@ -212,14 +212,14 @@ dependencies:
|
|
|
212
212
|
requirements:
|
|
213
213
|
- - "~>"
|
|
214
214
|
- !ruby/object:Gem::Version
|
|
215
|
-
version: '1.
|
|
215
|
+
version: '1.14'
|
|
216
216
|
type: :development
|
|
217
217
|
prerelease: false
|
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
|
219
219
|
requirements:
|
|
220
220
|
- - "~>"
|
|
221
221
|
- !ruby/object:Gem::Version
|
|
222
|
-
version: '1.
|
|
222
|
+
version: '1.14'
|
|
223
223
|
- !ruby/object:Gem::Dependency
|
|
224
224
|
name: solargraph
|
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|