mumuki-java-runner 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/test_hook.rb +7 -2
  3. data/lib/version.rb +1 -1
  4. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10e4feb7d56fe7193e13d3b1c43eb6324106759cc1297b06bc6bf9e35b58e20a
4
- data.tar.gz: 7f8278c4488b7a482cb7a22eee1cfa715e6e4391403eba2c91b82a7ef39b9baf
3
+ metadata.gz: 023122917d42a6f19f684a74788fba8504047391228c7e6d79d674e432625614
4
+ data.tar.gz: ec1365ba7c159817c67369005f17a8d3b47f7df54d3bc66b67a0c7a4e3351980
5
5
  SHA512:
6
- metadata.gz: 3a87326d060a3af795d8f2a9cabee05f17c5f93c5144aacfde23d7bb1a8718b5c252a61130cb642e3bfbaf920eeb5f652f9e9c9699f3efd15709d686c7ffc0ea
7
- data.tar.gz: 78f328a8d31e0d0c516565e2b0baf6283a07fa9b66bba872fd0b0b78681db1d800a65fd14a841941ee24ba8422ca98332a0d027049017c15651592b8d4ad8a97
6
+ metadata.gz: 317d813cf478b75cce92c34c4abac903e05d156775e11eb8c914ee0f4c0e0eae14f6cdd5868a555c69a35166f930ebba057688933e7017d70902a97f047b549f
7
+ data.tar.gz: 9f5ae68faa9b891f62c18cd18e569fd2dff89d54bd4e6aebbb188a937d7047d2db310e161b7841d82b1c61a1d0c76964d289955db3cd14b8bb292e636aaada8e
data/lib/test_hook.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  class JavaTestHook < Mumukit::Templates::FileHook
2
+ COMPILATION_ERROR_FLAG = '!!TEST FINISHED WITH COMPILATION ERROR!!'
2
3
  isolated true
3
4
  structured true, separator: '!!!JAVA-MUMUKI-OUTPUT!!!'
4
5
 
@@ -19,13 +20,17 @@ class JavaTestHook < Mumukit::Templates::FileHook
19
20
  end
20
21
 
21
22
  def post_process_file(file, result, status)
22
- if result.include? '!!TEST FINISHED WITH COMPILATION ERROR!!'
23
- [result, :errored]
23
+ if result.include? COMPILATION_ERROR_FLAG
24
+ [format_errored_result(result), :errored]
24
25
  else
25
26
  super
26
27
  end
27
28
  end
28
29
 
30
+ def format_errored_result(result)
31
+ Mumukit::ContentType::Markdown.highlighted_code :java, result.gsub(COMPILATION_ERROR_FLAG, '').gsub(/\/tmp\/tmp.*\/SubmissionTest/, "/tmp/SubmissionTest")
32
+ end
33
+
29
34
  def compile_file_content(request)
30
35
  <<EOF
31
36
  import java.util.*;
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JavaVersionHook
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-java-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.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: 2017-11-27 00:00:00.000000000 Z
11
+ date: 2018-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.3'
89
+ version: '3.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.3'
96
+ version: '3.0'
97
97
  description:
98
98
  email:
99
99
  - franco@mumuki.org
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.7.2
132
+ rubygems_version: 2.7.7
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Java Runner for Mumuki