mumukit-bridge 3.7.0 → 3.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/bridge.rb +2 -2
- data/lib/mumukit/bridge/runner/array.rb +1 -1
- data/lib/mumukit/bridge/runner/response_type.rb +30 -6
- data/lib/mumukit/bridge/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6889a403cce8b6e167861d4b0ae9c6c085ef55e1ce55116b6e8a02c931255b39
|
4
|
+
data.tar.gz: 85f171d7e075aba74feecba7d61ba0a8a5d56a6de6c25c69982e3f58eda0c706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a56d718075d48a04349b3ea5dec213b6b9bdecb277aeeebfbbd431b9b31cf82057113f16b71f9f1493fb954f515b7f1cfd8a38680f1817da746567e2dd2563
|
7
|
+
data.tar.gz: be9b34edf084d0a056d961930437f79792d332e00110b32ddabc380f0d5e7a87d5bd7340508f582a947f3666fcd05334f244e53d1498bbaae8a9d23938e7f52b
|
data/lib/mumukit/bridge.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rest_client'
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'mumukit/core'
|
4
4
|
|
5
5
|
require_relative './bridge/version'
|
6
6
|
require_relative './bridge/runner'
|
@@ -11,4 +11,4 @@ require_relative './bridge/thesaurus'
|
|
11
11
|
module Mumukit
|
12
12
|
module Bridge
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -12,7 +12,7 @@ module Mumukit::Bridge
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def global_status(test_status, expectation_status, request)
|
15
|
-
if test_status
|
15
|
+
if test_status.passed? && expectation_status.failed?
|
16
16
|
request[:test].blank? ? :failed : :passed_with_warnings
|
17
17
|
else
|
18
18
|
test_status
|
@@ -39,10 +39,10 @@ module Mumukit::Bridge
|
|
39
39
|
private
|
40
40
|
|
41
41
|
def parse_test_results(results)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
results.map { |it| {
|
43
|
+
title: it['title'],
|
44
|
+
status: it['status'].to_sym,
|
45
|
+
result: it['result']} }
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -54,12 +54,36 @@ module Mumukit::Bridge
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
+
class Mixed < Structured
|
58
|
+
def build_hash(response)
|
59
|
+
structured_results = super(response)
|
60
|
+
structured_results.merge response_type: :mixed,
|
61
|
+
status: status(structured_results[:status], response['exit'].to_sym)
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
def status(tests_status, output_status)
|
67
|
+
tests_status.passed? && output_status.passed? ? :passed : :failed
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
57
71
|
def self.structured_test_results?(response)
|
58
72
|
response['testResults'].present?
|
59
73
|
end
|
60
74
|
|
75
|
+
def self.mixed_test_results?(response)
|
76
|
+
structured_test_results?(response) && response['out'].present?
|
77
|
+
end
|
78
|
+
|
61
79
|
def self.for_response(response)
|
62
|
-
|
80
|
+
if mixed_test_results?(response)
|
81
|
+
Mixed.new
|
82
|
+
elsif structured_test_results?(response)
|
83
|
+
Structured.new
|
84
|
+
else
|
85
|
+
Unstructured.new
|
86
|
+
end
|
63
87
|
end
|
64
88
|
end
|
65
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-bridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.3'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.3'
|
83
83
|
description:
|
84
84
|
email:
|
85
85
|
- flbulgarelli@yahoo.com.ar
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
117
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.7.
|
118
|
+
rubygems_version: 2.7.8
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Library for connecting to a Mumuki test runner
|