nonnative 1.72.0 → 1.74.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/.circleci/config.yml +13 -0
- data/CHANGELOG.md +55 -0
- data/Gemfile.lock +34 -37
- data/README.md +4 -1
- data/lib/nonnative/configuration.rb +3 -1
- data/lib/nonnative/go_command.rb +25 -4
- data/lib/nonnative/http_client.rb +12 -12
- data/lib/nonnative/observability.rb +14 -8
- data/lib/nonnative/version.rb +1 -1
- data/lib/nonnative.rb +2 -2
- 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: acae0845e2d98d06c04910a7ead3b22ff614926878afb268e37f916c74f470e3
|
|
4
|
+
data.tar.gz: 04705b7c6f13f20f9dcf67cee5e9a63bf835abc927a8ccaff196fcf2748a3e4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d539314d85773631c3880930aae5a2ffbe51bcd448511fed27fb611294410af0062af8806c0527a1bb2616ddaaff1de62f897a3793784502009ceac74ab95ecf
|
|
7
|
+
data.tar.gz: b1545342354a75d7010122304bebda429cb01eeb5f563130b4a79d293a66bf44ec27fd6e75a558278405ed8db74d567fddf8cdd7e1859addf61a23d99c4cac6c
|
data/.circleci/config.yml
CHANGED
|
@@ -4,11 +4,23 @@ jobs:
|
|
|
4
4
|
build:
|
|
5
5
|
docker:
|
|
6
6
|
- image: alexfalkowski/ruby:3.2
|
|
7
|
+
working_directory: ~/nonnative
|
|
7
8
|
steps:
|
|
8
9
|
- checkout
|
|
9
10
|
- run: git submodule sync
|
|
10
11
|
- run: git submodule update --init
|
|
12
|
+
- run: make setup
|
|
13
|
+
- restore_cache:
|
|
14
|
+
name: restore deps
|
|
15
|
+
keys:
|
|
16
|
+
- nonnative-cache-{{ checksum "Gemfile.lock" }}
|
|
17
|
+
- nonnative-cache-
|
|
11
18
|
- run: make dep
|
|
19
|
+
- save_cache:
|
|
20
|
+
name: save deps
|
|
21
|
+
key: nonnative-cache-{{ checksum "Gemfile.lock" }}
|
|
22
|
+
paths:
|
|
23
|
+
- vendor
|
|
12
24
|
- run: make lint
|
|
13
25
|
- run: make features
|
|
14
26
|
- store_test_results:
|
|
@@ -19,6 +31,7 @@ jobs:
|
|
|
19
31
|
release:
|
|
20
32
|
docker:
|
|
21
33
|
- image: alexfalkowski/release:3.1
|
|
34
|
+
working_directory: ~/nonnative
|
|
22
35
|
steps:
|
|
23
36
|
- checkout
|
|
24
37
|
- run: release
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,61 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## [v1.74.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.74.0) - 2023-11-16
|
|
10
|
+
|
|
11
|
+
- [`82fa7dc`](https://github.com/alexfalkowski/nonnative/commit/82fa7dccda6acd5bccc2bc146decf8d1bad850db) feat(http): use resource so we can use opts (#276)
|
|
12
|
+
- [`4955fe9`](https://github.com/alexfalkowski/nonnative/commit/4955fe9d7b1e92c1438b43d88aeba12516df75ae) ci: cache deps (#275)
|
|
13
|
+
- [`2b372b8`](https://github.com/alexfalkowski/nonnative/commit/2b372b86ebbb2c0e45b4dc7503990a65aa75d906) build(deps): update bin (#274)
|
|
14
|
+
- [`02a15e5`](https://github.com/alexfalkowski/nonnative/commit/02a15e54035b7d1f68995733a8b0c0fd37e07a94) build(deps): update bin (#273)
|
|
15
|
+
- [`27755f0`](https://github.com/alexfalkowski/nonnative/commit/27755f0902ffccb254aa103d69bf38b453be5bc6) build(deps): update bin (#272)
|
|
16
|
+
|
|
17
|
+
## [v1.73.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.73.0) - 2023-11-13
|
|
18
|
+
|
|
19
|
+
- [`37c5dd2`](https://github.com/alexfalkowski/nonnative/commit/37c5dd26b44b51b5f7b56ab36a0da226f9dd4222) feat(command): add tools to go command (#271)
|
|
20
|
+
- [`08912b1`](https://github.com/alexfalkowski/nonnative/commit/08912b14940da14b0ecf71f4531f30dc621f28ca) build(deps): update bin (#270)
|
|
21
|
+
- [`f94a4ef`](https://github.com/alexfalkowski/nonnative/commit/f94a4ef7d62cefd92e75de3e987c459043e927e2) build(deps): update bin (#269)
|
|
22
|
+
|
|
23
|
+
## [v1.72.10](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.10) - 2023-11-02
|
|
24
|
+
|
|
25
|
+
- [`2f472aa`](https://github.com/alexfalkowski/nonnative/commit/2f472aad913ebddeb3f92f069891032f51fe3fce) fix(deps): bump grpc from 1.59.0 to 1.59.2 (#268)
|
|
26
|
+
|
|
27
|
+
## [v1.72.9](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.9) - 2023-10-27
|
|
28
|
+
|
|
29
|
+
- [`b242203`](https://github.com/alexfalkowski/nonnative/commit/b242203c1cd8f3326dbdb8a0f39436bb3f67cd9d) fix(deps): bump rubocop from 1.57.1 to 1.57.2 (#267)
|
|
30
|
+
- [`0c1692d`](https://github.com/alexfalkowski/nonnative/commit/0c1692d336d770394727b57a2a36a388110739d6) build(deps): update bin (#266)
|
|
31
|
+
|
|
32
|
+
## [v1.72.8](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.8) - 2023-10-16
|
|
33
|
+
|
|
34
|
+
- [`47160a4`](https://github.com/alexfalkowski/nonnative/commit/47160a47294a52cce3d894496d2cc69de5938018) fix(deps): bump rubocop from 1.57.0 to 1.57.1 (#263)
|
|
35
|
+
|
|
36
|
+
## [v1.72.7](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.7) - 2023-10-12
|
|
37
|
+
|
|
38
|
+
- [`c38719a`](https://github.com/alexfalkowski/nonnative/commit/c38719a61df4053a437ccf1f6b993f526aecf585) fix(deps): bump rubocop from 1.56.4 to 1.57.0 (#262)
|
|
39
|
+
|
|
40
|
+
## [v1.72.6](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.6) - 2023-10-02
|
|
41
|
+
|
|
42
|
+
- [`e55eb9d`](https://github.com/alexfalkowski/nonnative/commit/e55eb9d6f81cf225d90d4f0b31b13578edb21976) fix(deps): bump rubocop from 1.56.3 to 1.56.4 (#261)
|
|
43
|
+
|
|
44
|
+
## [v1.72.5](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.5) - 2023-09-27
|
|
45
|
+
|
|
46
|
+
- [`31fdfb9`](https://github.com/alexfalkowski/nonnative/commit/31fdfb9dd6e6d51bb81ec011c70e0431512d3f19) fix(deps): add arm64 (#260)
|
|
47
|
+
|
|
48
|
+
## [v1.72.4](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.4) - 2023-09-22
|
|
49
|
+
|
|
50
|
+
- [`ee3d759`](https://github.com/alexfalkowski/nonnative/commit/ee3d75921450f7fedef5a257a8e8ba3a4c8b153c) fix(deps): bump puma from 6.3.1 to 6.4.0 (#259)
|
|
51
|
+
|
|
52
|
+
## [v1.72.3](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.3) - 2023-09-12
|
|
53
|
+
|
|
54
|
+
- [`f71186b`](https://github.com/alexfalkowski/nonnative/commit/f71186b3ab3e1042e557adb91b64efa37d2ac923) fix(deps): bump cucumber from 9.0.1 to 9.0.2 (#255)
|
|
55
|
+
|
|
56
|
+
## [v1.72.2](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.2) - 2023-09-12
|
|
57
|
+
|
|
58
|
+
- [`83dbf7b`](https://github.com/alexfalkowski/nonnative/commit/83dbf7b26ce7def15de989630ca5e691f3b5fd1f) fix(deps): bump rubocop from 1.56.2 to 1.56.3 (#256)
|
|
59
|
+
|
|
60
|
+
## [v1.72.1](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.1) - 2023-09-11
|
|
61
|
+
|
|
62
|
+
- [`f429bb9`](https://github.com/alexfalkowski/nonnative/commit/f429bb9238a86e67cdcb0dc5f0bf187e15e8857d) fix(deps): bump grpc from 1.57.0 to 1.58.0 (#254)
|
|
63
|
+
|
|
9
64
|
## [v1.72.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.72.0) - 2023-09-06
|
|
10
65
|
|
|
11
66
|
- [`c105469`](https://github.com/alexfalkowski/nonnative/commit/c1054693e9040fd55e0ec45ffd843405826c9f03) feat(cucumber): update to version 9.0.1 (#253)
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nonnative (1.
|
|
4
|
+
nonnative (1.74.0)
|
|
5
5
|
concurrent-ruby (~> 1.0, >= 1.0.5)
|
|
6
6
|
cucumber (>= 7, < 10)
|
|
7
7
|
get_process_mem (~> 0.2.1)
|
|
@@ -17,8 +17,7 @@ GEM
|
|
|
17
17
|
specs:
|
|
18
18
|
ast (2.4.2)
|
|
19
19
|
backport (1.2.0)
|
|
20
|
-
|
|
21
|
-
benchmark (0.2.1)
|
|
20
|
+
benchmark (0.3.0)
|
|
22
21
|
benchmark-malloc (0.2.0)
|
|
23
22
|
benchmark-perf (0.6.0)
|
|
24
23
|
benchmark-trend (0.4.0)
|
|
@@ -29,43 +28,42 @@ GEM
|
|
|
29
28
|
term-ansicolor (~> 1.7)
|
|
30
29
|
thor (~> 1.2)
|
|
31
30
|
tins (~> 1.32)
|
|
32
|
-
cucumber (9.0
|
|
31
|
+
cucumber (9.1.0)
|
|
33
32
|
builder (~> 3.2, >= 3.2.4)
|
|
34
33
|
cucumber-ci-environment (~> 9.2, >= 9.2.0)
|
|
35
|
-
cucumber-core (~>
|
|
36
|
-
cucumber-cucumber-expressions (~>
|
|
37
|
-
cucumber-gherkin (>=
|
|
34
|
+
cucumber-core (~> 12.0)
|
|
35
|
+
cucumber-cucumber-expressions (~> 17.0)
|
|
36
|
+
cucumber-gherkin (>= 24, < 27)
|
|
38
37
|
cucumber-html-formatter (~> 20.4, >= 20.4.0)
|
|
39
|
-
cucumber-messages (>=
|
|
38
|
+
cucumber-messages (>= 19, < 23)
|
|
40
39
|
diff-lcs (~> 1.5, >= 1.5.0)
|
|
41
40
|
mini_mime (~> 1.1, >= 1.1.5)
|
|
42
41
|
multi_test (~> 1.1, >= 1.1.0)
|
|
43
42
|
sys-uname (~> 1.2, >= 1.2.3)
|
|
44
43
|
cucumber-ci-environment (9.2.0)
|
|
45
|
-
cucumber-core (
|
|
46
|
-
cucumber-gherkin (>=
|
|
47
|
-
cucumber-messages (>=
|
|
48
|
-
cucumber-tag-expressions (~>
|
|
49
|
-
cucumber-cucumber-expressions (
|
|
44
|
+
cucumber-core (12.0.0)
|
|
45
|
+
cucumber-gherkin (>= 25, < 27)
|
|
46
|
+
cucumber-messages (>= 20, < 23)
|
|
47
|
+
cucumber-tag-expressions (~> 5.0, >= 5.0.4)
|
|
48
|
+
cucumber-cucumber-expressions (17.0.0)
|
|
50
49
|
cucumber-gherkin (26.2.0)
|
|
51
50
|
cucumber-messages (>= 19.1.4, < 22.1)
|
|
52
51
|
cucumber-html-formatter (20.4.0)
|
|
53
52
|
cucumber-messages (>= 18.0, < 22.1)
|
|
54
|
-
cucumber-messages (
|
|
55
|
-
cucumber-tag-expressions (
|
|
53
|
+
cucumber-messages (22.0.0)
|
|
54
|
+
cucumber-tag-expressions (5.0.6)
|
|
56
55
|
diff-lcs (1.5.0)
|
|
57
56
|
docile (1.4.0)
|
|
58
|
-
domain_name (0.
|
|
59
|
-
unf (>= 0.0.5, < 1.0.0)
|
|
57
|
+
domain_name (0.6.20231109)
|
|
60
58
|
e2mmap (0.1.0)
|
|
61
|
-
ffi (1.
|
|
59
|
+
ffi (1.16.3)
|
|
62
60
|
get_process_mem (0.2.7)
|
|
63
61
|
ffi (~> 1.0)
|
|
64
|
-
google-protobuf (3.
|
|
65
|
-
googleapis-common-protos-types (1.
|
|
62
|
+
google-protobuf (3.25.0-x86_64-darwin)
|
|
63
|
+
googleapis-common-protos-types (1.10.0)
|
|
66
64
|
google-protobuf (~> 3.18)
|
|
67
|
-
grpc (1.
|
|
68
|
-
google-protobuf (~> 3.
|
|
65
|
+
grpc (1.59.2-x86_64-darwin)
|
|
66
|
+
google-protobuf (~> 3.24)
|
|
69
67
|
googleapis-common-protos-types (~> 1.0)
|
|
70
68
|
http-accept (1.7.0)
|
|
71
69
|
http-cookie (1.0.5)
|
|
@@ -79,30 +77,32 @@ GEM
|
|
|
79
77
|
language_server-protocol (3.17.0.3)
|
|
80
78
|
mime-types (3.5.1)
|
|
81
79
|
mime-types-data (~> 3.2015)
|
|
82
|
-
mime-types-data (3.2023.
|
|
80
|
+
mime-types-data (3.2023.1003)
|
|
83
81
|
mini_mime (1.1.5)
|
|
84
82
|
multi_test (1.1.0)
|
|
85
83
|
mustermann (3.0.0)
|
|
86
84
|
ruby2_keywords (~> 0.0.1)
|
|
87
85
|
netrc (0.11.0)
|
|
88
86
|
nio4r (2.5.9)
|
|
87
|
+
nokogiri (1.15.4-arm64-darwin)
|
|
88
|
+
racc (~> 1.4)
|
|
89
89
|
nokogiri (1.15.4-x86_64-darwin)
|
|
90
90
|
racc (~> 1.4)
|
|
91
91
|
nokogiri (1.15.4-x86_64-linux)
|
|
92
92
|
racc (~> 1.4)
|
|
93
93
|
parallel (1.23.0)
|
|
94
|
-
parser (3.2.2.
|
|
94
|
+
parser (3.2.2.4)
|
|
95
95
|
ast (~> 2.4.1)
|
|
96
96
|
racc
|
|
97
|
-
puma (6.
|
|
97
|
+
puma (6.4.0)
|
|
98
98
|
nio4r (~> 2.0)
|
|
99
|
-
racc (1.7.
|
|
99
|
+
racc (1.7.3)
|
|
100
100
|
rack (2.2.8)
|
|
101
101
|
rack-protection (3.1.0)
|
|
102
102
|
rack (~> 2.2, >= 2.2.4)
|
|
103
103
|
rainbow (3.1.1)
|
|
104
104
|
rbs (2.8.4)
|
|
105
|
-
regexp_parser (2.8.
|
|
105
|
+
regexp_parser (2.8.2)
|
|
106
106
|
rest-client (2.1.0)
|
|
107
107
|
http-accept (>= 1.7.0, < 2.0)
|
|
108
108
|
http-cookie (>= 1.0.2, < 2.0)
|
|
@@ -129,19 +129,18 @@ GEM
|
|
|
129
129
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
130
130
|
rspec-support (~> 3.12.0)
|
|
131
131
|
rspec-support (3.12.1)
|
|
132
|
-
rubocop (1.
|
|
133
|
-
base64 (~> 0.1.1)
|
|
132
|
+
rubocop (1.57.2)
|
|
134
133
|
json (~> 2.3)
|
|
135
134
|
language_server-protocol (>= 3.17.0)
|
|
136
135
|
parallel (~> 1.10)
|
|
137
|
-
parser (>= 3.2.2.
|
|
136
|
+
parser (>= 3.2.2.4)
|
|
138
137
|
rainbow (>= 2.2.2, < 4.0)
|
|
139
138
|
regexp_parser (>= 1.8, < 3.0)
|
|
140
139
|
rexml (>= 3.2.5, < 4.0)
|
|
141
140
|
rubocop-ast (>= 1.28.1, < 2.0)
|
|
142
141
|
ruby-progressbar (~> 1.7)
|
|
143
142
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
144
|
-
rubocop-ast (1.
|
|
143
|
+
rubocop-ast (1.30.0)
|
|
145
144
|
parser (>= 3.2.1.0)
|
|
146
145
|
ruby-progressbar (1.13.0)
|
|
147
146
|
ruby2_keywords (0.0.5)
|
|
@@ -177,17 +176,15 @@ GEM
|
|
|
177
176
|
ffi (~> 1.1)
|
|
178
177
|
term-ansicolor (1.7.1)
|
|
179
178
|
tins (~> 1.0)
|
|
180
|
-
thor (1.
|
|
181
|
-
tilt (2.
|
|
179
|
+
thor (1.3.0)
|
|
180
|
+
tilt (2.3.0)
|
|
182
181
|
tins (1.32.1)
|
|
183
182
|
sync
|
|
184
|
-
|
|
185
|
-
unf_ext
|
|
186
|
-
unf_ext (0.0.8.2)
|
|
187
|
-
unicode-display_width (2.4.2)
|
|
183
|
+
unicode-display_width (2.5.0)
|
|
188
184
|
yard (0.9.34)
|
|
189
185
|
|
|
190
186
|
PLATFORMS
|
|
187
|
+
arm64-darwin-22
|
|
191
188
|
x86_64-darwin-21
|
|
192
189
|
x86_64-linux
|
|
193
190
|
|
data/README.md
CHANGED
|
@@ -570,7 +570,9 @@ go test -mod vendor -c -tags features -covermode=count -o your_binary -coverpkg=
|
|
|
570
570
|
Setup it up programmatically:
|
|
571
571
|
|
|
572
572
|
```ruby
|
|
573
|
-
|
|
573
|
+
tools = %w[prof trace cover]
|
|
574
|
+
|
|
575
|
+
Nonnative.go_executable(tools, 'reports', 'your_binary', 'sub_command', '--config config.yaml')
|
|
574
576
|
```
|
|
575
577
|
|
|
576
578
|
Setup it up through configuration:
|
|
@@ -581,6 +583,7 @@ processes:
|
|
|
581
583
|
-
|
|
582
584
|
name: go
|
|
583
585
|
go:
|
|
586
|
+
tools: [prof, trace, cover]
|
|
584
587
|
output: reports
|
|
585
588
|
executable: your_binary
|
|
586
589
|
command: sub_command
|
|
@@ -69,7 +69,9 @@ module Nonnative
|
|
|
69
69
|
go = process['go']
|
|
70
70
|
if go
|
|
71
71
|
params = go['parameters'] || []
|
|
72
|
-
|
|
72
|
+
tools = go['tools'] || []
|
|
73
|
+
|
|
74
|
+
-> { Nonnative.go_executable(tools, go['output'], go['executable'], go['command'], *params) }
|
|
73
75
|
else
|
|
74
76
|
-> { process['command'] }
|
|
75
77
|
end
|
data/lib/nonnative/go_command.rb
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Nonnative
|
|
4
4
|
class GoCommand
|
|
5
|
-
def initialize(exec, output)
|
|
5
|
+
def initialize(tools, exec, output)
|
|
6
|
+
@tools = tools.nil? || tools.empty? ? %w[prof trace cover] : tools
|
|
6
7
|
@exec = exec
|
|
7
8
|
@output = output
|
|
8
9
|
end
|
|
@@ -14,7 +15,7 @@ module Nonnative
|
|
|
14
15
|
|
|
15
16
|
private
|
|
16
17
|
|
|
17
|
-
attr_reader :exec, :output
|
|
18
|
+
attr_reader :tools, :exec, :output
|
|
18
19
|
|
|
19
20
|
def flags(cmd, params)
|
|
20
21
|
suffix = SecureRandom.alphanumeric(4)
|
|
@@ -23,14 +24,34 @@ module Nonnative
|
|
|
23
24
|
name = [m, cmd, p].reject(&:empty?).join('-')[0...15]
|
|
24
25
|
path = "#{output}/#{name}-#{suffix}"
|
|
25
26
|
|
|
27
|
+
prof(path) + trace(path) + cover(path)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def prof(path)
|
|
31
|
+
return [] unless tools.include?('prof')
|
|
32
|
+
|
|
26
33
|
[
|
|
27
34
|
"-test.cpuprofile=#{path}-cpu.prof",
|
|
28
35
|
"-test.memprofile=#{path}-mem.prof",
|
|
29
36
|
"-test.blockprofile=#{path}-block.prof",
|
|
30
|
-
"-test.mutexprofile=#{path}-mutex.prof"
|
|
31
|
-
|
|
37
|
+
"-test.mutexprofile=#{path}-mutex.prof"
|
|
38
|
+
]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def trace(path)
|
|
42
|
+
return [] unless tools.include?('trace')
|
|
43
|
+
|
|
44
|
+
[
|
|
32
45
|
"-test.trace=#{path}-trace.out"
|
|
33
46
|
]
|
|
34
47
|
end
|
|
48
|
+
|
|
49
|
+
def cover(path)
|
|
50
|
+
return [] unless tools.include?('cover')
|
|
51
|
+
|
|
52
|
+
[
|
|
53
|
+
"-test.coverprofile=#{path}.cov"
|
|
54
|
+
]
|
|
55
|
+
end
|
|
35
56
|
end
|
|
36
57
|
end
|
|
@@ -8,34 +8,34 @@ module Nonnative
|
|
|
8
8
|
|
|
9
9
|
protected
|
|
10
10
|
|
|
11
|
-
def get(pathname,
|
|
11
|
+
def get(pathname, opts = {})
|
|
12
12
|
with_exception do
|
|
13
|
-
|
|
14
|
-
RestClient::Request.execute(method: :get, url: uri.to_s, headers:, timeout:)
|
|
13
|
+
resource(pathname, opts).get
|
|
15
14
|
end
|
|
16
15
|
end
|
|
17
16
|
|
|
18
|
-
def post(pathname, payload,
|
|
17
|
+
def post(pathname, payload, opts = {})
|
|
19
18
|
with_exception do
|
|
20
|
-
|
|
21
|
-
RestClient::Request.execute(method: :post, url: uri.to_s, payload: payload.to_json, headers:, timeout:)
|
|
19
|
+
resource(pathname, opts).post(payload)
|
|
22
20
|
end
|
|
23
21
|
end
|
|
24
22
|
|
|
25
|
-
def delete(pathname,
|
|
23
|
+
def delete(pathname, opts = {})
|
|
26
24
|
with_exception do
|
|
27
|
-
|
|
28
|
-
RestClient::Request.execute(method: :delete, url: uri.to_s, headers:, timeout:)
|
|
25
|
+
resource(pathname, opts).delete
|
|
29
26
|
end
|
|
30
27
|
end
|
|
31
28
|
|
|
32
|
-
def put(pathname, payload,
|
|
29
|
+
def put(pathname, payload, opts = {})
|
|
33
30
|
with_exception do
|
|
34
|
-
|
|
35
|
-
RestClient::Request.execute(method: :put, url: uri.to_s, payload: payload.to_json, headers:, timeout:)
|
|
31
|
+
resource(pathname, opts).put(payload)
|
|
36
32
|
end
|
|
37
33
|
end
|
|
38
34
|
|
|
35
|
+
def resource(pathname, opts)
|
|
36
|
+
RestClient::Resource.new(URI.join(host, pathname).to_s, opts)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
39
|
private
|
|
40
40
|
|
|
41
41
|
attr_reader :host
|
|
@@ -2,20 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
module Nonnative
|
|
4
4
|
class Observability < Nonnative::HTTPClient
|
|
5
|
-
def health
|
|
6
|
-
|
|
5
|
+
def health(opts = {})
|
|
6
|
+
opts[:headers] ||= { content_type: :json, accept: :json }
|
|
7
|
+
|
|
8
|
+
get('healthz', opts)
|
|
7
9
|
end
|
|
8
10
|
|
|
9
|
-
def liveness
|
|
10
|
-
|
|
11
|
+
def liveness(opts = {})
|
|
12
|
+
opts[:headers] ||= { content_type: :json, accept: :json }
|
|
13
|
+
|
|
14
|
+
get('livez', opts)
|
|
11
15
|
end
|
|
12
16
|
|
|
13
|
-
def readiness
|
|
14
|
-
|
|
17
|
+
def readiness(opts = {})
|
|
18
|
+
opts[:headers] ||= { content_type: :json, accept: :json }
|
|
19
|
+
|
|
20
|
+
get('readyz', opts)
|
|
15
21
|
end
|
|
16
22
|
|
|
17
|
-
def metrics
|
|
18
|
-
get('metrics')
|
|
23
|
+
def metrics(opts = {})
|
|
24
|
+
get('metrics', opts)
|
|
19
25
|
end
|
|
20
26
|
end
|
|
21
27
|
end
|
data/lib/nonnative/version.rb
CHANGED
data/lib/nonnative.rb
CHANGED
|
@@ -58,8 +58,8 @@ module Nonnative
|
|
|
58
58
|
File.readlines(path).select { |l| predicate.call(l) }
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
def go_executable(output, exec, cmd, *params)
|
|
62
|
-
Nonnative::GoCommand.new(exec, output).executable(cmd, params)
|
|
61
|
+
def go_executable(tools, output, exec, cmd, *params)
|
|
62
|
+
Nonnative::GoCommand.new(tools, exec, output).executable(cmd, params)
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def configuration
|
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.74.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: 2023-
|
|
11
|
+
date: 2023-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|