mumuki-ruby-runner 1.5.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/query_hook.rb +11 -15
- data/lib/ruby_runner.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +17 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58c22a297b6d62607323dd8eed3e159568082bbaed12f25052ba6c78873f31ac
|
4
|
+
data.tar.gz: 04d6d1a78b90c2f0d2df824e076cbc6911f5ac0ee24069682c6cdefdad22b7aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c428b9c031ef56fd017da6cf9e1c2af925b75da264f73fa7a73999e150208430a01d4e64d539846d7ca86fe815f9de97f389996aa864169947cf672a9f52502
|
7
|
+
data.tar.gz: f761819acb809f890f8fc1f6836b22272e4b5c0e97ab09aa2f762d88a42c10a20140a8e820d36090c42b027575f738bd0d4dac7e803c04fc84f30e2a53773b00
|
data/lib/query_hook.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
class RubyQueryHook < Mumukit::Templates::FileHook
|
2
|
+
with_error_patterns
|
2
3
|
isolated true
|
3
4
|
|
4
5
|
def tempfile_extension
|
@@ -31,12 +32,11 @@ ruby
|
|
31
32
|
"ruby #{filename}"
|
32
33
|
end
|
33
34
|
|
34
|
-
def
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
end
|
35
|
+
def error_patterns
|
36
|
+
[
|
37
|
+
Mumukit::ErrorPattern::Failed.new(runtime_error_regexp),
|
38
|
+
Mumukit::ErrorPattern::Errored.new(syntax_error_regexp)
|
39
|
+
]
|
40
40
|
end
|
41
41
|
|
42
42
|
def compile_query(query)
|
@@ -62,18 +62,14 @@ ruby
|
|
62
62
|
build_state(cookie).join("\n")
|
63
63
|
end
|
64
64
|
|
65
|
-
def
|
66
|
-
error_regexp =~ result
|
67
|
-
end
|
68
|
-
|
69
|
-
def sanitize_error_output(result)
|
70
|
-
result.gsub(error_regexp, '').strip
|
71
|
-
end
|
72
|
-
|
73
|
-
def error_regexp
|
65
|
+
def runtime_error_regexp
|
74
66
|
# Matches lines like:
|
75
67
|
# * from /tmp/mumuki.compile20170404-3221-1db8ntk.rb:17:in `<main>'
|
76
68
|
# * /tmp/mumuki.compile20170404-3221-1db8ntk.rb:17:in `respond_to?':
|
77
69
|
/(from )?(.)+\.rb:(\d)+:in `([\w|<|>|?|!|+|*|-|\/|=]+)'(:)?/
|
78
70
|
end
|
71
|
+
|
72
|
+
def syntax_error_regexp
|
73
|
+
/.+?\.rb:\d+: (?m)(?=.*syntax error)/
|
74
|
+
end
|
79
75
|
end
|
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.1'
|
6
6
|
config.comment_type = Mumukit::Directives::CommentType::Ruby
|
7
7
|
config.structured = true
|
8
8
|
config.stateful = true
|
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.10.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-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,42 +16,48 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.38'
|
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.38'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mulang-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.7'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '3'
|
48
51
|
type: :development
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - ">="
|
53
56
|
- !ruby/object:Gem::Version
|
54
57
|
version: '1.7'
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rake
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +106,14 @@ dependencies:
|
|
100
106
|
requirements:
|
101
107
|
- - "~>"
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
109
|
+
version: '3.0'
|
104
110
|
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
114
|
- - "~>"
|
109
115
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
116
|
+
version: '3.0'
|
111
117
|
description:
|
112
118
|
email:
|
113
119
|
- franco@mumuki.org
|
@@ -140,8 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
146
|
- !ruby/object:Gem::Version
|
141
147
|
version: '0'
|
142
148
|
requirements: []
|
143
|
-
|
144
|
-
rubygems_version: 2.7.3
|
149
|
+
rubygems_version: 3.0.3
|
145
150
|
signing_key:
|
146
151
|
specification_version: 4
|
147
152
|
summary: Ruby Runner for Mumuki
|