mumuki-ruby-runner 1.11.1 → 1.12.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
  SHA256:
3
- metadata.gz: 9b69bc4d5f1291c03e007da4a183e3c0de5a9d333b7b84aa338aee8bb5592ee0
4
- data.tar.gz: 93235aaf8285cc94e7cdff111e5e3a4b99130ab48e9de9befcc8565864ea777a
3
+ metadata.gz: c29865d4e4845b128903883f80e8e56a7034b15f2be20265b7233a2005b99bf5
4
+ data.tar.gz: df9363caf7a3e9ea2882de2b6c238caf51bc48031322ca5970561c63548a53ee
5
5
  SHA512:
6
- metadata.gz: 34646d46b2fbe7cc14ac5d57b57a9136180bdef606fbf1f49ca7b6cfe3d43933b008141e1d6af66772f30d86c120145255b1121f00ce809f3a4d34169bb0b03e
7
- data.tar.gz: aa98ce4fadde3bbadc677d7ac5678f230bb0584b00a6d2c6c4c5f0aba3a3a3de133851ab7bd735ec6dae3f50d15bad656c4b3f6e6fb12cd244e5485d0d70fe0b
6
+ metadata.gz: 0d8630bdc4d9e43978186a2168b71e10529c4a199d330b8417f8246f352b3c346e6a01100abb0448d335577143812ac94d86eeb5d7868f47a680551b7a622e70
7
+ data.tar.gz: e457273266b9a2c516b5c82970ed996e081f606f520c0334dab4fbac5eac8529bfaebcda80ab45704f070bf2547893c34df0d4512b1a968636ae5ae2fd3c2e9a
@@ -12,7 +12,7 @@ class RubyExpectationsHook < Mumukit::Templates::MulangExpectationsHook
12
12
  end
13
13
 
14
14
  def compile_content(source)
15
- Mulang::Ruby.parse(source)
15
+ Mulang::Ruby.parse(source, parser_class: Parser::Ruby26)
16
16
  rescue => e
17
17
  raise Mumukit::CompilationError, e
18
18
  end
data/lib/metadata_hook.rb CHANGED
@@ -3,7 +3,7 @@ class RubyMetadataHook < Mumukit::Hook
3
3
  {language: {
4
4
  name: 'ruby',
5
5
  icon: {type: 'devicon', name: 'ruby'},
6
- version: '2.0',
6
+ version: '2.6',
7
7
  extension: 'rb',
8
8
  ace_mode: 'ruby'
9
9
  },
data/lib/query_hook.rb CHANGED
@@ -8,6 +8,7 @@ class RubyQueryHook < Mumukit::Templates::FileHook
8
8
 
9
9
  def compile_file_content(r)
10
10
  <<ruby
11
+ require 'set'
11
12
  class MumukiConsole
12
13
  def self.write(string)
13
14
  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.1'
5
+ config.docker_image = 'mumuki/mumuki-rspec-worker:2.2'
6
6
  config.comment_type = Mumukit::Directives::CommentType::Ruby
7
7
  config.structured = true
8
8
  config.stateful = true
data/lib/test_hook.rb CHANGED
@@ -1,7 +1,10 @@
1
1
  class RubyTestHook < Mumukit::Templates::FileHook
2
+ line_number_offset 1, include_extra: true
3
+
2
4
  mashup do |extra, content, test|
3
- [extra,
4
- content,
5
+ [
6
+ extra,
7
+ content,
5
8
  <<RUBY
6
9
  describe do
7
10
  after(:all) do
@@ -23,6 +26,22 @@ RUBY
23
26
  "rspec #{filename} -f json"
24
27
  end
25
28
 
29
+ def post_process_unstructured_result(file, result, status)
30
+ if status.errored?
31
+ [
32
+ result
33
+ .gsub(/^.*(#{masked_tempfile_path}:\d+:)/) { $1 }
34
+ .lines
35
+ .reject { |it| it.start_with? " from /usr/local" }
36
+ .take(3)
37
+ .join + "\n",
38
+ status
39
+ ]
40
+ else
41
+ super
42
+ end
43
+ end
44
+
26
45
  def to_structured_result(result)
27
46
  transform(super['examples'])
28
47
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RubyVersionHook
2
- VERSION = '1.11.1'
2
+ VERSION = '1.12.0'
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.11.1
4
+ version: 1.12.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: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit
@@ -16,28 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.39'
19
+ version: '2.40'
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.39'
26
+ version: '2.40'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mulang
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 6.0.5
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 6.0.5
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: mulang-ruby
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '6.0'
47
+ version: '6.1'
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '6.0'
54
+ version: '6.1'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement