mumuki-ruby-runner 1.8.0 → 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: 73812cd6f3268c7ed802e7f73bd7297f4012e258b411d0e660b46f69aea8560c
4
- data.tar.gz: 8cf3c2bff84fe5070845a6132a3b9d16d89b47d3579ddee9ad123799908eb2e5
3
+ metadata.gz: c29865d4e4845b128903883f80e8e56a7034b15f2be20265b7233a2005b99bf5
4
+ data.tar.gz: df9363caf7a3e9ea2882de2b6c238caf51bc48031322ca5970561c63548a53ee
5
5
  SHA512:
6
- metadata.gz: d34193c160f96ed07ef23d9b47190f3f6a0210e0a948c3e679ea26b416efe00963867ab4c6cd53d3b38887b0d36bef0dff475fd48f1480ccf3168f6c96213136
7
- data.tar.gz: 7c4043a5607c9a69f99d6a484fdce1358ab0f148b7cbbb9123bcace8e9371ab06d51c85a31336bb91edf03c6ac0bdc7eb09730346813cf521b3f070b849ac942
6
+ metadata.gz: 0d8630bdc4d9e43978186a2168b71e10529c4a199d330b8417f8246f352b3c346e6a01100abb0448d335577143812ac94d86eeb5d7868f47a680551b7a622e70
7
+ data.tar.gz: e457273266b9a2c516b5c82970ed996e081f606f520c0334dab4fbac5eac8529bfaebcda80ab45704f070bf2547893c34df0d4512b1a968636ae5ae2fd3c2e9a
@@ -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.8.0'
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.8.0
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: 2019-02-26 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,42 +16,62 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.30'
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.30'
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: '4.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: '4.0'
54
+ version: '6.1'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
61
  version: '1.7'
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '3'
48
65
  type: :development
49
66
  prerelease: false
50
67
  version_requirements: !ruby/object:Gem::Requirement
51
68
  requirements:
52
- - - "~>"
69
+ - - ">="
53
70
  - !ruby/object:Gem::Version
54
71
  version: '1.7'
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '3'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: rake
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
160
  - !ruby/object:Gem::Version
141
161
  version: '0'
142
162
  requirements: []
143
- rubygems_version: 3.0.2
163
+ rubygems_version: 3.0.3
144
164
  signing_key:
145
165
  specification_version: 4
146
166
  summary: Ruby Runner for Mumuki