mumuki-ruby-runner 1.10.0 → 1.13.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: 58c22a297b6d62607323dd8eed3e159568082bbaed12f25052ba6c78873f31ac
4
- data.tar.gz: 04d6d1a78b90c2f0d2df824e076cbc6911f5ac0ee24069682c6cdefdad22b7aa
3
+ metadata.gz: 886bcc31a42f5eeb17a9df1c7cd03816594fea921f694be8bf6a3adb27ff66b4
4
+ data.tar.gz: c731f96043331b3be5ca40c82515f0a6321a3a245aba9157d376be582862eacb
5
5
  SHA512:
6
- metadata.gz: 0c428b9c031ef56fd017da6cf9e1c2af925b75da264f73fa7a73999e150208430a01d4e64d539846d7ca86fe815f9de97f389996aa864169947cf672a9f52502
7
- data.tar.gz: f761819acb809f890f8fc1f6836b22272e4b5c0e97ab09aa2f762d88a42c10a20140a8e820d36090c42b027575f738bd0d4dac7e803c04fc84f30e2a53773b00
6
+ metadata.gz: 2dffa424b1e5bc50dc26cbeccaf510891a49f9dcde5e6be552e0153fe360f7031d5532ac3ec9a64e4886f45cf31c404aede9637cd432c8072b2fcf953ac2fe99
7
+ data.tar.gz: 3909880b8aa4d27ef69046d6b2bd537a38ffc5bab478d00fb0a578500d25a6aa0f3fa57a63e6333099ffa02107fea977831d50276a667f965852e4f85e4fa3c6
@@ -7,8 +7,12 @@ class RubyExpectationsHook < Mumukit::Templates::MulangExpectationsHook
7
7
  'Mulang'
8
8
  end
9
9
 
10
+ def original_language
11
+ 'Ruby'
12
+ end
13
+
10
14
  def compile_content(source)
11
- Mulang::Ruby.parse(source)
15
+ Mulang::Ruby.parse(source, parser_class: Parser::Ruby26)
12
16
  rescue => e
13
17
  raise Mumukit::CompilationError, e
14
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.10.0'
2
+ VERSION = '1.13.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.10.0
4
+ version: 1.13.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-20 00:00:00.000000000 Z
11
+ date: 2022-02-02 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.38'
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.38'
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