avm-git 0.1.0 → 0.2.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/lib/avm/git/issue/complete/test.rb +15 -20
- data/lib/avm/git/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: d0d9b01de7c9963912122916516e1865d3aa9189d1dcdbb6d3357232200b3943
|
|
4
|
+
data.tar.gz: f7b440303d272191767c46f98f9d5a56e723caca304151033ddc3361b20294cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 76101b99b34145270d3464d1a4163d1107dceee14af57b0cafb520f89fd49ba59ffaf5c5972c22ab270abda64196a8c0d98f060a63ff9c081738ca3998bb1714
|
|
7
|
+
data.tar.gz: b181e8e2d5f05929c57408ef392d9658bd3999dce78a03ee75a3cbb927bb252310f1d2b4cb0ed04f2d133763def2995dcdbe42e93d36b55b011d36cf21370085
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
require 'avm/sources/configuration'
|
|
4
4
|
require 'avm/result'
|
|
5
|
+
require 'avm/sources/base'
|
|
6
|
+
require 'avm/sources/tests/builder'
|
|
5
7
|
require 'eac_ruby_utils/fs/temp'
|
|
6
8
|
|
|
7
9
|
module Avm
|
|
@@ -10,33 +12,26 @@ module Avm
|
|
|
10
12
|
class Complete
|
|
11
13
|
module Test
|
|
12
14
|
def test_result
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
infom "Running test command \"#{test_command}\"..."
|
|
17
|
-
result = test_command.execute
|
|
18
|
-
test_result_log(result)
|
|
19
|
-
if result.fetch(:exit_code).zero?
|
|
20
|
-
::Avm::Result.success('yes')
|
|
21
|
-
else
|
|
22
|
-
::Avm::Result.error('no')
|
|
15
|
+
infom 'Running tests...'
|
|
16
|
+
test_performer.units.each do |single|
|
|
17
|
+
return ::Avm::Result.error(test_failed_result_message(single)) if single.failed?
|
|
23
18
|
end
|
|
19
|
+
::Avm::Result.success('all passed')
|
|
24
20
|
end
|
|
25
21
|
|
|
26
22
|
private
|
|
27
23
|
|
|
28
|
-
def
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
stdout_file.write(result.fetch(:stdout))
|
|
32
|
-
stderr_file.write(result.fetch(:stderr))
|
|
33
|
-
infov ' * Exit code', result.fetch(:exit_code)
|
|
34
|
-
infov ' * STDOUT', stdout_file.to_path
|
|
35
|
-
infov ' * STDERR', stderr_file.to_path
|
|
24
|
+
def test_failed_result_message(single)
|
|
25
|
+
{ 'Source' => single, 'STDOUT' => single.logs[:stdout],
|
|
26
|
+
'STDERR' => single.logs[:stderr] }.map { |k, v| "#{k}: #{v}" }.join(', ')
|
|
36
27
|
end
|
|
37
28
|
|
|
38
|
-
def
|
|
39
|
-
::Avm::Sources::
|
|
29
|
+
def test_performer
|
|
30
|
+
::Avm::Sources::Tests::Builder
|
|
31
|
+
.new(::Avm::Sources::Base.new(@git))
|
|
32
|
+
.include_main(true)
|
|
33
|
+
.include_subs(true)
|
|
34
|
+
.performer
|
|
40
35
|
end
|
|
41
36
|
end
|
|
42
37
|
end
|
data/lib/avm/git/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: avm-git
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Put here the authors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: avm-files
|