mumuki-minitest-runner 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/locales/en.yml +2 -0
- data/lib/locales/es.yml +2 -0
- data/lib/metadata_hook.rb +5 -6
- data/lib/minitest_runner.rb +5 -1
- data/lib/query_hook.rb +30 -0
- data/lib/version.rb +3 -0
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 574e6a0ea81078907174141cac16d443725f8c98
|
4
|
+
data.tar.gz: 47a5650869f3972941ed489848441ea6de7d8e9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33bc06ffd800acfb2600391c169a2f1cfcccb9618571dd446994418bb16e080338e11af5f48dfd0e4f9a8d0651ab0eca3d18db53c4d1c1df1d7556b816a87339
|
7
|
+
data.tar.gz: ada171decfa701a8b97332d34c7075e31f1a53b5b8af9735d2aa670b1a3b8f930c5e487b326a0e12ee7a25b439d939e01ab9c314c74d8db0fa99b400b17826bd
|
data/lib/locales/en.yml
ADDED
data/lib/locales/es.yml
ADDED
data/lib/metadata_hook.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
class MinitestMetadataHook < Mumukit::Hook
|
2
2
|
def metadata
|
3
3
|
{language: {
|
4
|
-
name: '
|
4
|
+
name: 'minitest',
|
5
5
|
icon: {type: 'devicon', name: 'ruby'},
|
6
|
-
version: '2.
|
6
|
+
version: 'minitest-5.9.0/ruby-2.1',
|
7
7
|
extension: 'rb',
|
8
8
|
ace_mode: 'ruby'
|
9
9
|
},
|
10
10
|
test_framework: {
|
11
|
-
name: 'minitest',
|
12
|
-
|
13
|
-
test_extension: '.yml'
|
11
|
+
name: 'minitest-metatest',
|
12
|
+
test_extension: 'yml'
|
14
13
|
}}
|
15
14
|
end
|
16
|
-
end
|
15
|
+
end
|
data/lib/minitest_runner.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'mumukit'
|
2
2
|
|
3
|
+
I18n.load_translations_path File.join(__dir__, 'locales', '*.yml')
|
4
|
+
|
3
5
|
Mumukit.runner_name = 'minitest'
|
4
6
|
Mumukit.configure do |config|
|
5
7
|
config.docker_image = 'mumuki/mumuki-minitest-worker'
|
@@ -8,5 +10,7 @@ Mumukit.configure do |config|
|
|
8
10
|
config.stateful = false
|
9
11
|
end
|
10
12
|
|
13
|
+
require_relative './version'
|
11
14
|
require_relative './metadata_hook'
|
12
|
-
require_relative './
|
15
|
+
require_relative './query_hook'
|
16
|
+
require_relative './test_hook'
|
data/lib/query_hook.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
class MinitestQueryHook < Mumukit::Templates::FileHook
|
3
|
+
isolated true
|
4
|
+
line_number_offset 2, include_extra: true
|
5
|
+
|
6
|
+
def tempfile_extension
|
7
|
+
'_test.yml'
|
8
|
+
end
|
9
|
+
|
10
|
+
def compile_file_content(request)
|
11
|
+
if request.query.strip != 'rake test'
|
12
|
+
raise Mumukit::CompilationError, t(:unrecognized_command)
|
13
|
+
end
|
14
|
+
|
15
|
+
"require 'minitest/autorun'\n#{request.extra}\n#{request.content}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def command_line(filename)
|
19
|
+
"ruby #{filename} --seed 0 2>&1"
|
20
|
+
end
|
21
|
+
|
22
|
+
def post_process_file(file, result, status)
|
23
|
+
if result =~ /^.+\n\n(# Running\:\n\n.+?\n\n).+?\n\n(.+)$/m
|
24
|
+
["#{$1}#{$2}", status]
|
25
|
+
else
|
26
|
+
super
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
data/lib/version.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-minitest-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.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:
|
11
|
+
date: 2017-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.9'
|
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.
|
26
|
+
version: '2.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,9 +101,13 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- lib/locales/en.yml
|
105
|
+
- lib/locales/es.yml
|
104
106
|
- lib/metadata_hook.rb
|
105
107
|
- lib/minitest_runner.rb
|
108
|
+
- lib/query_hook.rb
|
106
109
|
- lib/test_hook.rb
|
110
|
+
- lib/version.rb
|
107
111
|
homepage: http://github.com/mumuki/mumuki-minitest-server
|
108
112
|
licenses:
|
109
113
|
- MIT
|
@@ -124,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
128
|
version: '0'
|
125
129
|
requirements: []
|
126
130
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
131
|
+
rubygems_version: 2.6.12
|
128
132
|
signing_key:
|
129
133
|
specification_version: 4
|
130
134
|
summary: Minitest Runner for Mumuki
|