nonnative 1.36.0 → 1.37.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 +1 -1
- data/README.md +2 -6
- data/lib/nonnative.rb +4 -0
- data/lib/nonnative/go_command.rb +0 -6
- 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: 7bcf9cffec3971770b2593b373938a6c084ab34381228bb2d9e43f794fb87d4a
|
4
|
+
data.tar.gz: f1ef1bbb290b1a28d6036d06af5bf1230e32c22f4ea8e075c240480e807b212d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8efcbbbbccf80e445d95c94207e521c8525a835abf544dd0f47ac37dad2e9af02ba2bd1af86a0475bc0c9c3db2f8d7d1b40be7487cf33ec7dbcdd4661125af34
|
7
|
+
data.tar.gz: 1e69e4fd86e440c75b2ba4abf7eb1e929f3129e4d01b1a852ea9d0966e35e081ce6a4b40bb69ae3a984c1c36a743ae2b7c85f9af04a0fba5639afd451e636388
|
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.36.0](https://github.com/alexfalkowski/nonnative/compare/v1.35.2...v1.36.0) (2021-04-21)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* remove badge from docs ([#72](https://github.com/alexfalkowski/nonnative/issues/72)) ([2cd384c](https://github.com/alexfalkowski/nonnative/commit/2cd384cb9f73da1f131829f1eaf9b0c9e1ae3cdf))
|
11
|
+
|
5
12
|
### [1.35.2](https://github.com/alexfalkowski/nonnative/compare/v1.35.1...v1.35.2) (2021-04-21)
|
6
13
|
|
7
14
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
[](https://circleci.com/gh/alexfalkowski/nonnative)
|
2
|
-
[](https://sonarcloud.io/dashboard?id=alexfalkowski_nonnative)
|
3
2
|
|
4
3
|
# Nonnative
|
5
4
|
|
@@ -374,7 +373,6 @@ server.proxy.close_all # To use close_all.
|
|
374
373
|
server.proxy.reset # To reset it back to a good state.
|
375
374
|
```
|
376
375
|
|
377
|
-
|
378
376
|
### Go
|
379
377
|
|
380
378
|
As we love using go as a language for services we have added support to start binaries with defined parameters. This expects that you build your services in the format of `command sub_command --params`
|
@@ -382,8 +380,6 @@ As we love using go as a language for services we have added support to start bi
|
|
382
380
|
To get this to work you will need to create a `main_test.go` file with these contents:
|
383
381
|
|
384
382
|
```go
|
385
|
-
// +build features
|
386
|
-
|
387
383
|
package main
|
388
384
|
|
389
385
|
import (
|
@@ -401,11 +397,11 @@ func TestFeatures(t *testing.T) {
|
|
401
397
|
Then to compile this binary you will need to do the following:
|
402
398
|
|
403
399
|
```sh
|
404
|
-
go test -mod vendor -c -
|
400
|
+
go test -mod vendor -c -covermode=count -o your_binary -coverpkg=./... github.com/your_location
|
405
401
|
```
|
406
402
|
|
407
403
|
Then to get an executable you do the following:
|
408
404
|
|
409
405
|
```ruby
|
410
|
-
Nonnative
|
406
|
+
Nonnative.go_executable('reports', 'your_binary', 'sub_command', '--config config.yaml')
|
411
407
|
```
|
data/lib/nonnative.rb
CHANGED
@@ -46,6 +46,10 @@ module Nonnative
|
|
46
46
|
class << self
|
47
47
|
attr_reader :pool
|
48
48
|
|
49
|
+
def go_executable(output, exec, cmd, *params)
|
50
|
+
Nonnative::GoCommand.new(exec, output).executable(cmd, params)
|
51
|
+
end
|
52
|
+
|
49
53
|
def load_configuration(path)
|
50
54
|
@configuration ||= Nonnative::Configuration.load_file(path) # rubocop:disable Naming/MemoizedInstanceVariableName
|
51
55
|
end
|
data/lib/nonnative/go_command.rb
CHANGED
@@ -12,12 +12,6 @@ module Nonnative
|
|
12
12
|
"#{exec} #{flags(cmd, params).join(' ')} #{cmd} #{params}".strip
|
13
13
|
end
|
14
14
|
|
15
|
-
def execute(cmd, *params)
|
16
|
-
Open3.popen3(executable(cmd, params)) do |_stdin, stdout, stderr, wait_thr|
|
17
|
-
return stdout.read, stderr.read, wait_thr.value
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
15
|
private
|
22
16
|
|
23
17
|
attr_reader :exec, :output
|
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.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Falkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|