mumuki-ruby-runner 1.10.0 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/expectations_hook.rb +5 -1
- data/lib/metadata_hook.rb +1 -1
- data/lib/query_hook.rb +1 -0
- data/lib/ruby_runner.rb +1 -1
- data/lib/test_hook.rb +21 -2
- data/lib/version.rb +1 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 886bcc31a42f5eeb17a9df1c7cd03816594fea921f694be8bf6a3adb27ff66b4
|
4
|
+
data.tar.gz: c731f96043331b3be5ca40c82515f0a6321a3a245aba9157d376be582862eacb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dffa424b1e5bc50dc26cbeccaf510891a49f9dcde5e6be552e0153fe360f7031d5532ac3ec9a64e4886f45cf31c404aede9637cd432c8072b2fcf953ac2fe99
|
7
|
+
data.tar.gz: 3909880b8aa4d27ef69046d6b2bd537a38ffc5bab478d00fb0a578500d25a6aa0f3fa57a63e6333099ffa02107fea977831d50276a667f965852e4f85e4fa3c6
|
data/lib/expectations_hook.rb
CHANGED
@@ -7,8 +7,12 @@ class RubyExpectationsHook < Mumukit::Templates::MulangExpectationsHook
|
|
7
7
|
'Mulang'
|
8
8
|
end
|
9
9
|
|
10
|
+
def original_language
|
11
|
+
'Ruby'
|
12
|
+
end
|
13
|
+
|
10
14
|
def compile_content(source)
|
11
|
-
Mulang::Ruby.parse(source)
|
15
|
+
Mulang::Ruby.parse(source, parser_class: Parser::Ruby26)
|
12
16
|
rescue => e
|
13
17
|
raise Mumukit::CompilationError, e
|
14
18
|
end
|
data/lib/metadata_hook.rb
CHANGED
data/lib/query_hook.rb
CHANGED
data/lib/ruby_runner.rb
CHANGED
@@ -2,7 +2,7 @@ require 'mumukit'
|
|
2
2
|
|
3
3
|
Mumukit.runner_name = 'ruby'
|
4
4
|
Mumukit.configure do |config|
|
5
|
-
config.docker_image = 'mumuki/mumuki-rspec-worker:2.
|
5
|
+
config.docker_image = 'mumuki/mumuki-rspec-worker:2.2'
|
6
6
|
config.comment_type = Mumukit::Directives::CommentType::Ruby
|
7
7
|
config.structured = true
|
8
8
|
config.stateful = true
|
data/lib/test_hook.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
class RubyTestHook < Mumukit::Templates::FileHook
|
2
|
+
line_number_offset 1, include_extra: true
|
3
|
+
|
2
4
|
mashup do |extra, content, test|
|
3
|
-
[
|
4
|
-
|
5
|
+
[
|
6
|
+
extra,
|
7
|
+
content,
|
5
8
|
<<RUBY
|
6
9
|
describe do
|
7
10
|
after(:all) do
|
@@ -23,6 +26,22 @@ RUBY
|
|
23
26
|
"rspec #{filename} -f json"
|
24
27
|
end
|
25
28
|
|
29
|
+
def post_process_unstructured_result(file, result, status)
|
30
|
+
if status.errored?
|
31
|
+
[
|
32
|
+
result
|
33
|
+
.gsub(/^.*(#{masked_tempfile_path}:\d+:)/) { $1 }
|
34
|
+
.lines
|
35
|
+
.reject { |it| it.start_with? " from /usr/local" }
|
36
|
+
.take(3)
|
37
|
+
.join + "\n",
|
38
|
+
status
|
39
|
+
]
|
40
|
+
else
|
41
|
+
super
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
26
45
|
def to_structured_result(result)
|
27
46
|
transform(super['examples'])
|
28
47
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-ruby-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.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:
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,28 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.40'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.40'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mulang
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 6.0.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 6.0.5
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: mulang-ruby
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '6.
|
47
|
+
version: '6.1'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '6.
|
54
|
+
version: '6.1'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|