mumuki-java-runner 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/feedback_hook.rb +12 -0
- data/lib/locales/en.yml +2 -0
- data/lib/locales/es.yml +2 -0
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e31e5e85b2e5fdde64804564f781c126b9c711a
|
4
|
+
data.tar.gz: 7c81495ce913d96bcd308292e6307a12928d4328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6442e5247e725335098d87307814d75ef972eaa5bbb4ce9b845c74af5d62feab7510099f92ab9f386bcedc6a5638111c6bf748aa377a237e8d21aa99c5f7f2c4
|
7
|
+
data.tar.gz: 934791cbeda629f93acd602877420347497d778beb6c1e643c199f2e8b48aca57157cf9dd1e88f420207d7a5bb83943f9555229f8aca06fde6fbd1640243331b
|
data/lib/feedback_hook.rb
CHANGED
@@ -20,12 +20,24 @@ class JavaFeedbackHook < Mumukit::Hook
|
|
20
20
|
missing_character result, '\{'
|
21
21
|
end
|
22
22
|
|
23
|
+
def explain_missing_return_statement(_, result)
|
24
|
+
(/#{error} missing return statement#{near_regex}/.match result).try do |it|
|
25
|
+
{near: it[1]}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
23
29
|
def explain_cannot_find_symbol(_, result)
|
24
30
|
(/#{error} cannot find symbol#{near_regex}#{symbol_regex}#{location_regex}/.match result).try do |it|
|
25
31
|
{near: it[1], symbol: it[2].strip, location: it[3].strip}
|
26
32
|
end
|
27
33
|
end
|
28
34
|
|
35
|
+
def explain_incompatible_types(_, result)
|
36
|
+
(/#{error} incompatible types: (.*) cannot be converted to (.*)#{near_regex}/.match result).try do |it|
|
37
|
+
{down: it[1], up: it[2], near: it[3]}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
29
41
|
private
|
30
42
|
|
31
43
|
def start_regex(symbol=' ')
|
data/lib/locales/en.yml
CHANGED
@@ -3,3 +3,5 @@ en:
|
|
3
3
|
missing_parenthesis: "Missing '(' near `%{near}`"
|
4
4
|
missing_bracket: "Missing { near `%{near}`. Maybe you misspelled a class or method declaration."
|
5
5
|
cannot_find_symbol: "Cannot find `%{symbol}` declaration in `%{location}`"
|
6
|
+
missing_return_statement: "There is a method that must return something, but doesn't. Check your code again!"
|
7
|
+
incompatible_types: "Class `%{down}` should be a `%{up}`. Probably an _extends_ or _implements_ is missing near `%{near}`."
|
data/lib/locales/es.yml
CHANGED
@@ -3,3 +3,5 @@ es:
|
|
3
3
|
missing_parenthesis: "Parece que falta un '(' cerca de `%{near}`"
|
4
4
|
missing_bracket: "Se esperaba una { cerca de `%{near}`. Fijate si tal vez, introdujiste un paréntesis de más o está mal escrita la declaración de clase o método."
|
5
5
|
cannot_find_symbol: "No se encontró la definición de `%{symbol}` en `%{location}`"
|
6
|
+
missing_return_statement: "Hay un método que debería retornar algo, pero no está retornando nada. ¡Revisá bien tu código!"
|
7
|
+
incompatible_types: "La clase `%{down}` debería ser un `%{up}`. Revisá si no te falta un _extends_ o _implements_ cerca de `%{near}`."
|
data/lib/version.rb
CHANGED
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.
|
4
|
+
version: 1.3.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: 2017-
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|