mumukit-bridge 3.6.0 → 3.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b58fbaed7b8f322059e7482edbdc170f0ef4cacc3a51a8e9e841d5181befde3f
4
- data.tar.gz: 472387132d4119364c755be1072b1b85acf4a3e8fc413c84e0b291f812e837e3
3
+ metadata.gz: b92856b6d6f1a7760ca0b0b748e94f0db57e3bba72389b61769121644fd60def
4
+ data.tar.gz: 12492314955a16949836cd8615697e2cf3e39b9cd65b3616026f2c7e58d40b1a
5
5
  SHA512:
6
- metadata.gz: 16a4a415717dcd553376e095ca10bf252e9b4e8ecdd012745ce7a528c1ab19a3eb9fb9674465a110253a5f561ef8d540c50bc17fb362422170265d18ea6b3812
7
- data.tar.gz: 20cac161fc03789592bd256489ad54324133c19defc2cf20027f4a8777891a047e849726a8a4f79ec07b734935bae33aa53619864aaa02c29129603f89e7cc2c
6
+ metadata.gz: 21f954a58e350c5cedc6d34b519688eb65d727608bfe61dcc53ed23aca5eba1e1c5ed804aea27961ad5c3955ef5912e2fdb7bcc242ebe680e438d6615408a8f9
7
+ data.tar.gz: 2cee461421396708169b55c9faeabfd0d31d56faec3786e3a8d9739705daf4fd5fcc6f11220606dd48b0bb37b7b5c536f8c98a9367618670b24be973a874aa33
@@ -1,19 +1,19 @@
1
1
  module Mumukit::Bridge
2
2
  module ResponseType
3
3
  class Base
4
- def parse(response)
4
+ def parse(response, request)
5
5
  expectation_results = parse_expectation_results(response['expectationResults'] || [])
6
6
  feedback = response['feedback'] || ''
7
7
  result = response['out'] || ''
8
8
 
9
9
  build_hash(response).
10
10
  merge(feedback: feedback, expectation_results: expectation_results, result: result).
11
- update(status: expectation_results.fetch_mumuki_status(:result)) { |_, t, e| global_status(t, e) }
11
+ update(status: expectation_results.fetch_mumuki_status(:result)) { |_, t, e| global_status(t, e, request) }
12
12
  end
13
13
 
14
- def global_status(test_status, expectation_status)
14
+ def global_status(test_status, expectation_status, request)
15
15
  if test_status == :passed && expectation_status == :failed
16
- :passed_with_warnings
16
+ request[:test].blank? ? :failed : :passed_with_warnings
17
17
  else
18
18
  test_status
19
19
  end
@@ -25,7 +25,7 @@ module Mumukit
25
25
  def run_tests!(request, headers={})
26
26
  with_server_response 'test', request, headers do |response|
27
27
  response_type = ResponseType.for_response response
28
- response_type.parse response
28
+ response_type.parse response, request
29
29
  end
30
30
  end
31
31
 
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Bridge
3
- VERSION = '3.6.0'
3
+ VERSION = '3.7.0'
4
4
  end
5
5
  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.6.0
4
+ version: 3.7.0
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-04-20 00:00:00.000000000 Z
11
+ date: 2018-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -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.6
118
+ rubygems_version: 2.7.7
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Library for connecting to a Mumuki test runner