mumuki-ruby-runner 1.8.0 → 1.12.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 +29 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c29865d4e4845b128903883f80e8e56a7034b15f2be20265b7233a2005b99bf5
|
4
|
+
data.tar.gz: df9363caf7a3e9ea2882de2b6c238caf51bc48031322ca5970561c63548a53ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d8630bdc4d9e43978186a2168b71e10529c4a199d330b8417f8246f352b3c346e6a01100abb0448d335577143812ac94d86eeb5d7868f47a680551b7a622e70
|
7
|
+
data.tar.gz: e457273266b9a2c516b5c82970ed996e081f606f520c0334dab4fbac5eac8529bfaebcda80ab45704f070bf2547893c34df0d4512b1a968636ae5ae2fd3c2e9a
|
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.12.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: 2021-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,42 +16,62 @@ 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: '
|
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: '
|
54
|
+
version: '6.1'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '1.7'
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '3'
|
48
65
|
type: :development
|
49
66
|
prerelease: false
|
50
67
|
version_requirements: !ruby/object:Gem::Requirement
|
51
68
|
requirements:
|
52
|
-
- - "
|
69
|
+
- - ">="
|
53
70
|
- !ruby/object:Gem::Version
|
54
71
|
version: '1.7'
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3'
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
76
|
name: rake
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
160
|
- !ruby/object:Gem::Version
|
141
161
|
version: '0'
|
142
162
|
requirements: []
|
143
|
-
rubygems_version: 3.0.
|
163
|
+
rubygems_version: 3.0.3
|
144
164
|
signing_key:
|
145
165
|
specification_version: 4
|
146
166
|
summary: Ruby Runner for Mumuki
|