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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb6f56fb668bf395fa18377baae1206f11ad7576
4
- data.tar.gz: cad91894bc082f9919f538b8609c1a7ed6dfec91
3
+ metadata.gz: 3e31e5e85b2e5fdde64804564f781c126b9c711a
4
+ data.tar.gz: 7c81495ce913d96bcd308292e6307a12928d4328
5
5
  SHA512:
6
- metadata.gz: 918bcabdcbcc2568ccc22aec4674919e3093a8c285d4c342ce144b3be68c70c445930f662ef5dcf42f3ad1f806d850ae2f12e7ef97b5345f1c383c3b9c72bf00
7
- data.tar.gz: d4bcec43802f5d4b1880cec12e676e724a5cef6d67b11457131316938757b6f8f3e018847669429c96ceb078fbf4f0a6bbee325967edd9f739cbf903176417fd
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
@@ -1,3 +1,3 @@
1
1
  module JavaVersionHook
2
- VERSION = '1.2.0'
2
+ VERSION = '1.3.0'
3
3
  end
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.2.0
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-07-24 00:00:00.000000000 Z
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit