lex-uais 0.1.0 → 0.1.1
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/.github/workflows/ci.yml +3 -3
- data/.rubocop.yml +6 -46
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -0
- data/lib/legion/extensions/uais/helpers/client.rb +2 -2
- data/lib/legion/extensions/uais/runners/registration.rb +3 -3
- data/lib/legion/extensions/uais/version.rb +1 -1
- data/lib/legion/extensions/uais.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a69ce4750f4857bd82f7227a8776e3e79bb9c809b3d32a0a9efd1e78658d879
|
|
4
|
+
data.tar.gz: 05e293c0c387d46bd781d9e26901511e7cc2126394795eaac0704d59dfe3c8a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f0f98bfca3c6f96f208bd9b3087296e6bb1c436672483ec524e298dc74157240db57fe9ea39e74846a4ca966a528d5fcee204a766395c5d51cc3144d80e4086
|
|
7
|
+
data.tar.gz: 450bb369e9ca9ede6fc73c4dab5b4c601931e567576873639f1c65e9d08fecf8f5751519d46ad4adfa969fe554abb79f8cffc537e16969a94a21f8cb4400f31c
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -10,8 +10,8 @@ jobs:
|
|
|
10
10
|
ci:
|
|
11
11
|
uses: LegionIO/.github/.github/workflows/ci.yml@main
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
uses: LegionIO/.github/.github/workflows/
|
|
13
|
+
excluded-files:
|
|
14
|
+
uses: LegionIO/.github/.github/workflows/excluded-files.yml@main
|
|
15
15
|
|
|
16
16
|
security:
|
|
17
17
|
uses: LegionIO/.github/.github/workflows/security-scan.yml@main
|
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
uses: LegionIO/.github/.github/workflows/stale.yml@main
|
|
28
28
|
|
|
29
29
|
release:
|
|
30
|
-
needs: [ci,
|
|
30
|
+
needs: [ci, excluded-files]
|
|
31
31
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
32
32
|
uses: LegionIO/.github/.github/workflows/release.yml@main
|
|
33
33
|
secrets:
|
data/.rubocop.yml
CHANGED
|
@@ -1,50 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
NewCops: enable
|
|
4
|
-
SuggestExtensions: false
|
|
1
|
+
inherit_gem:
|
|
2
|
+
rubocop-legion: config/lex.yml
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
|
10
|
-
EnforcedStyle: space
|
|
11
|
-
|
|
12
|
-
Layout/HashAlignment:
|
|
13
|
-
EnforcedHashRocketStyle: table
|
|
14
|
-
EnforcedColonStyle: table
|
|
15
|
-
|
|
16
|
-
Metrics/MethodLength:
|
|
17
|
-
Max: 50
|
|
18
|
-
|
|
19
|
-
Metrics/ClassLength:
|
|
20
|
-
Max: 1500
|
|
21
|
-
|
|
22
|
-
Metrics/ModuleLength:
|
|
23
|
-
Max: 1500
|
|
24
|
-
|
|
25
|
-
Metrics/BlockLength:
|
|
26
|
-
Max: 40
|
|
27
|
-
Exclude:
|
|
28
|
-
- 'spec/**/*'
|
|
29
|
-
|
|
30
|
-
Metrics/AbcSize:
|
|
31
|
-
Max: 60
|
|
32
|
-
|
|
33
|
-
Metrics/CyclomaticComplexity:
|
|
34
|
-
Max: 15
|
|
35
|
-
|
|
36
|
-
Metrics/PerceivedComplexity:
|
|
37
|
-
Max: 17
|
|
38
|
-
|
|
39
|
-
Style/Documentation:
|
|
4
|
+
# Runner methods return hashes from private helpers (mock_register, mock_deregister)
|
|
5
|
+
Legion/Extension/RunnerReturnHash:
|
|
40
6
|
Enabled: false
|
|
41
7
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Style/FrozenStringLiteralComment:
|
|
46
|
-
Enabled: true
|
|
47
|
-
EnforcedStyle: always
|
|
48
|
-
|
|
49
|
-
Naming/FileName:
|
|
8
|
+
# Runner module uses include Helpers::Client at bottom, satisfying the intent
|
|
9
|
+
Legion/Extension/RunnerIncludeHelpers:
|
|
50
10
|
Enabled: false
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -17,7 +17,7 @@ module Legion
|
|
|
17
17
|
http.instance_variable_set(:@_api_key, api_key)
|
|
18
18
|
|
|
19
19
|
def http.api_key
|
|
20
|
-
@_api_key
|
|
20
|
+
@_api_key # rubocop:disable ThreadSafety/ClassInstanceVariable
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
http
|
|
@@ -36,7 +36,7 @@ module Legion
|
|
|
36
36
|
req = klass.new(path)
|
|
37
37
|
req['Content-Type'] = 'application/json'
|
|
38
38
|
req['Authorization'] = "Bearer #{api_key}" if api_key
|
|
39
|
-
req.body = Legion::JSON.dump(body) if body
|
|
39
|
+
req.body = Legion::JSON.dump(body) if body # rubocop:disable Legion/HelperMigration/DirectJson
|
|
40
40
|
req
|
|
41
41
|
end
|
|
42
42
|
end
|
|
@@ -85,8 +85,8 @@ module Legion
|
|
|
85
85
|
|
|
86
86
|
def parse_response(resp)
|
|
87
87
|
body = begin
|
|
88
|
-
Legion::JSON.load(resp.body)
|
|
89
|
-
rescue StandardError
|
|
88
|
+
Legion::JSON.load(resp.body) # rubocop:disable Legion/HelperMigration/DirectJson
|
|
89
|
+
rescue StandardError => _e
|
|
90
90
|
{}
|
|
91
91
|
end
|
|
92
92
|
{ success: resp.is_a?(Net::HTTPSuccess), status: resp.code.to_i, data: body }
|
|
@@ -107,7 +107,7 @@ module Legion
|
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
def soft_warn(message)
|
|
110
|
-
Legion::Logging.warn("[lex-uais] #{message}") if defined?(Legion::Logging)
|
|
110
|
+
Legion::Logging.warn("[lex-uais] #{message}") if defined?(Legion::Logging) # rubocop:disable Legion/HelperMigration/DirectLogging, Legion/HelperMigration/LoggingGuard
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
include Helpers::Client if defined?(Helpers::Client)
|
|
@@ -7,7 +7,7 @@ require 'legion/extensions/uais/runners/registration'
|
|
|
7
7
|
module Legion
|
|
8
8
|
module Extensions
|
|
9
9
|
module Uais
|
|
10
|
-
extend Legion::Extensions::Core if Legion::Extensions.const_defined? :Core
|
|
10
|
+
extend Legion::Extensions::Core if Legion::Extensions.const_defined? :Core, false
|
|
11
11
|
|
|
12
12
|
def self.default_settings
|
|
13
13
|
{
|