mumuki-ruby-runner 1.2.0 → 1.2.1

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: ec079dd901661cc3c9706983cfcd35d59a7ad829
4
- data.tar.gz: c6effb3a08223b602509dfe55d9d4b5792a07d68
3
+ metadata.gz: 4a2bedb07a8e9c63e70eb70e83d93b50f7a60273
4
+ data.tar.gz: 0b5b54432935f0c91ae89bf6a6c7e125740d7953
5
5
  SHA512:
6
- metadata.gz: dce9578820271fe56f065de433de641fca662f0700931bf626cd43f92b8b385895c8eb3d21d3d0482c52a78d98b3b113a82a831fcbf72e4c4fd24f1ff20f7e6e
7
- data.tar.gz: de2091d5c1742418aafcb51d7607a5327821538d0501a70255e4616cc7ee4d8b5acbcbd46bf0d3c610e42147924e5f1e2ffdd6eedd88502014ccf7f72c251d32
6
+ metadata.gz: e1600a9ae10500f298096e123f99695afcb1b466daf570f82a4974f2f54006bdd9046ca84a920bca41219bdbc8fced61d707b51f8f87a6e50819ed7581c5d048
7
+ data.tar.gz: db6869d69ea366d1c38a9db756a9b5d6365ae277512c9515c7dd9a377e5a1e459a076f1494cc5a4d4b6840a8c529150c9a21926e8515d2920111bac2295352eb
data/lib/metadata_hook.rb CHANGED
@@ -10,7 +10,7 @@ class RubyMetadataHook < Mumukit::Hook
10
10
  test_framework: {
11
11
  name: 'rspec',
12
12
  version: '2.13',
13
- test_extension: '.rb'
13
+ test_extension: 'rb'
14
14
  }}
15
15
  end
16
16
  end
data/lib/query_hook.rb CHANGED
@@ -63,10 +63,17 @@ ruby
63
63
  end
64
64
 
65
65
  def error_output?(result)
66
- /\.rb:(\d)+:in `<main>': / =~ result
66
+ error_regexp =~ result
67
67
  end
68
68
 
69
69
  def sanitize_error_output(result)
70
- result.split("<main>': ").second
70
+ result.gsub(error_regexp, '').strip
71
+ end
72
+
73
+ def error_regexp
74
+ # Matches lines like:
75
+ # * from /tmp/mumuki.compile20170404-3221-1db8ntk.rb:17:in `<main>'
76
+ # * /tmp/mumuki.compile20170404-3221-1db8ntk.rb:17:in `respond_to?':
77
+ /(from )?(.)+\.rb:(\d)+:in `([\w|<|>|?|!|+|*|-|\/|=]+)'(:)?/
71
78
  end
72
79
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RubyVersionHook
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
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.2.0
4
+ version: 1.2.1
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-03-31 00:00:00.000000000 Z
11
+ date: 2017-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit