mumuki-ruby-runner 1.7.0 → 1.8.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/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73812cd6f3268c7ed802e7f73bd7297f4012e258b411d0e660b46f69aea8560c
|
4
|
+
data.tar.gz: 8cf3c2bff84fe5070845a6132a3b9d16d89b47d3579ddee9ad123799908eb2e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34193c160f96ed07ef23d9b47190f3f6a0210e0a948c3e679ea26b416efe00963867ab4c6cd53d3b38887b0d36bef0dff475fd48f1480ccf3168f6c96213136
|
7
|
+
data.tar.gz: 7c4043a5607c9a69f99d6a484fdce1358ab0f148b7cbbb9123bcace8e9371ab06d51c85a31336bb91edf03c6ac0bdc7eb09730346813cf521b3f070b849ac942
|
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/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.8.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: 2019-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.30'
|
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.30'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mulang-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,8 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
|
144
|
-
rubygems_version: 2.7.7
|
143
|
+
rubygems_version: 3.0.2
|
145
144
|
signing_key:
|
146
145
|
specification_version: 4
|
147
146
|
summary: Ruby Runner for Mumuki
|