lex-exec 0.1.5 → 0.1.6
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 +2 -56
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -0
- data/lib/legion/extensions/exec/runners/bundler.rb +3 -3
- data/lib/legion/extensions/exec/runners/git.rb +2 -2
- data/lib/legion/extensions/exec/runners/shell.rb +2 -2
- data/lib/legion/extensions/exec/version.rb +1 -1
- data/lib/legion/extensions/exec.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: 7b2fbeab776f3905427aacc575cfcae9c9e101bb78637b3082f707572709e13f
|
|
4
|
+
data.tar.gz: 5c746408c3fb7fc484c8c8da9f54b2319f832aace2e43e78d34d413c60263ce0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ccfc95535ed4c768b5aa50fcfb2d4f8a417f32b0db0d005e9d479cd4e558c9f43e1233273d1cfda8ee6c60d5c1801e2e948610d43d0370ae234c1d61887c681
|
|
7
|
+
data.tar.gz: a0193fae4bee505f012cee6ca6e9435d9311b7369ca2751f5781dedfcd1df12953f04d312c03a6fe2524c7eb30cba45cb2036ede4a4ab964e427ec6468270d24
|
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,56 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
NewCops: enable
|
|
4
|
-
SuggestExtensions: false
|
|
5
|
-
|
|
6
|
-
Layout/LineLength:
|
|
7
|
-
Max: 160
|
|
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:
|
|
40
|
-
Enabled: false
|
|
41
|
-
|
|
42
|
-
Style/SymbolArray:
|
|
43
|
-
Enabled: true
|
|
44
|
-
|
|
45
|
-
Style/FrozenStringLiteralComment:
|
|
46
|
-
Enabled: true
|
|
47
|
-
EnforcedStyle: always
|
|
48
|
-
|
|
49
|
-
Naming/FileName:
|
|
50
|
-
Enabled: false
|
|
51
|
-
|
|
52
|
-
Naming/PredicateMethod:
|
|
53
|
-
Enabled: false
|
|
54
|
-
|
|
55
|
-
Naming/PredicatePrefix:
|
|
56
|
-
Enabled: false
|
|
1
|
+
inherit_gem:
|
|
2
|
+
rubocop-legion: config/lex.yml
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -4,7 +4,7 @@ module Legion
|
|
|
4
4
|
module Extensions
|
|
5
5
|
module Exec
|
|
6
6
|
module Runners
|
|
7
|
-
module Bundler
|
|
7
|
+
module Bundler # rubocop:disable Legion/Extension/RunnerIncludeHelpers
|
|
8
8
|
module_function
|
|
9
9
|
|
|
10
10
|
def install(path:, **)
|
|
@@ -17,7 +17,7 @@ module Legion
|
|
|
17
17
|
cwd: path,
|
|
18
18
|
timeout: 300_000
|
|
19
19
|
)
|
|
20
|
-
return result unless result[:stdout] || result[:stderr]
|
|
20
|
+
return result unless result[:stdout] || result[:stderr] # rubocop:disable Legion/Extension/RunnerReturnHash
|
|
21
21
|
|
|
22
22
|
raw = result[:stdout] || result[:stderr] || ''
|
|
23
23
|
parsed = Helpers::ResultParser.parse_rspec(raw)
|
|
@@ -27,7 +27,7 @@ module Legion
|
|
|
27
27
|
def exec_rubocop(path:, autocorrect: false, **)
|
|
28
28
|
cmd = autocorrect ? 'bundle exec rubocop -A' : 'bundle exec rubocop'
|
|
29
29
|
result = Runners::Shell.execute(command: cmd, cwd: path, timeout: 120_000)
|
|
30
|
-
return result unless result[:stdout]
|
|
30
|
+
return result unless result[:stdout] # rubocop:disable Legion/Extension/RunnerReturnHash
|
|
31
31
|
|
|
32
32
|
parsed = Helpers::ResultParser.parse_rubocop(result[:stdout] || '')
|
|
33
33
|
result.merge(parsed: parsed)
|
|
@@ -4,7 +4,7 @@ module Legion
|
|
|
4
4
|
module Extensions
|
|
5
5
|
module Exec
|
|
6
6
|
module Runners
|
|
7
|
-
module Git
|
|
7
|
+
module Git # rubocop:disable Legion/Extension/RunnerIncludeHelpers
|
|
8
8
|
module_function
|
|
9
9
|
|
|
10
10
|
def init(path:, **)
|
|
@@ -28,7 +28,7 @@ module Legion
|
|
|
28
28
|
|
|
29
29
|
def status(path:, **)
|
|
30
30
|
result = Runners::Shell.execute(command: 'git status --porcelain', cwd: path)
|
|
31
|
-
return result unless result[:success]
|
|
31
|
+
return result unless result[:success] # rubocop:disable Legion/Extension/RunnerReturnHash
|
|
32
32
|
|
|
33
33
|
parsed = Helpers::ResultParser.parse_git_status(result[:stdout] || '')
|
|
34
34
|
result.merge(parsed: parsed)
|
|
@@ -21,7 +21,7 @@ module Legion
|
|
|
21
21
|
stdout, stderr, status = Timeout.timeout(timeout_secs) do
|
|
22
22
|
Open3.capture3(env, command, chdir: cwd)
|
|
23
23
|
end
|
|
24
|
-
rescue Timeout::Error
|
|
24
|
+
rescue Timeout::Error => _e
|
|
25
25
|
return { success: false, error: :timeout, timeout_ms: timeout }
|
|
26
26
|
rescue ArgumentError => e
|
|
27
27
|
return { success: false, error: e.message }
|
|
@@ -41,7 +41,7 @@ module Legion
|
|
|
41
41
|
audit_log.record(command: command, cwd: cwd, exit_code: exit_code,
|
|
42
42
|
duration_ms: duration_ms, truncated: truncated)
|
|
43
43
|
|
|
44
|
-
Legion::Logging.debug("[lex-exec] exit=#{exit_code} duration=#{duration_ms}ms cmd=#{command}")
|
|
44
|
+
Legion::Logging.debug("[lex-exec] exit=#{exit_code} duration=#{duration_ms}ms cmd=#{command}") # rubocop:disable Legion/HelperMigration/DirectLogging
|
|
45
45
|
|
|
46
46
|
{
|
|
47
47
|
success: exit_code.zero?,
|
|
@@ -16,7 +16,7 @@ require_relative 'exec/client'
|
|
|
16
16
|
module Legion
|
|
17
17
|
module Extensions
|
|
18
18
|
module Exec
|
|
19
|
-
extend Legion::Extensions::Core if Legion::Extensions.const_defined? :Core
|
|
19
|
+
extend Legion::Extensions::Core if Legion::Extensions.const_defined? :Core, false
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
end
|