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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 471401130b2d055194d0650b003e6bcf30493a94
4
- data.tar.gz: fa610177e9e9b5faf982a70a6a29838c0d94017d
3
+ metadata.gz: 574e6a0ea81078907174141cac16d443725f8c98
4
+ data.tar.gz: 47a5650869f3972941ed489848441ea6de7d8e9f
5
5
  SHA512:
6
- metadata.gz: adc1bf045337cb6b857e462c925177429e4a0110aaa8e8387711b01195d7a41d8990345ec6698f1f4edec4864483402846a51573441be5c0d9978fc9ad12694d
7
- data.tar.gz: 33b04c0354d2924a5c9765ba148664ae177df1170bb88e126d889efc1305af83099ef0b90c9333549dbe6f84617bf3815d4c630ae218622a3fb7173db475358d
6
+ metadata.gz: 33bc06ffd800acfb2600391c169a2f1cfcccb9618571dd446994418bb16e080338e11af5f48dfd0e4f9a8d0651ab0eca3d18db53c4d1c1df1d7556b816a87339
7
+ data.tar.gz: ada171decfa701a8b97332d34c7075e31f1a53b5b8af9735d2aa670b1a3b8f930c5e487b326a0e12ee7a25b439d939e01ab9c314c74d8db0fa99b400b17826bd
@@ -0,0 +1,2 @@
1
+ en:
2
+ unrecognized_command: 'Unrecognized command. Please try rake test'
@@ -0,0 +1,2 @@
1
+ es:
2
+ unrecognized_command: 'Comando no reconocido. Probá rake test'
@@ -1,16 +1,15 @@
1
1
  class MinitestMetadataHook < Mumukit::Hook
2
2
  def metadata
3
3
  {language: {
4
- name: 'ruby',
4
+ name: 'minitest',
5
5
  icon: {type: 'devicon', name: 'ruby'},
6
- version: '2.0',
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
- version: '5.9.0',
13
- test_extension: '.yml'
11
+ name: 'minitest-metatest',
12
+ test_extension: 'yml'
14
13
  }}
15
14
  end
16
- end
15
+ end
@@ -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 './test_hook'
15
+ require_relative './query_hook'
16
+ require_relative './test_hook'
@@ -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
+
@@ -0,0 +1,3 @@
1
+ module MinitestVersionHook
2
+ VERSION = '1.1.0'
3
+ end
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.0.0
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: 2016-09-28 00:00:00.000000000 Z
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.5'
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.5'
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.4.8
131
+ rubygems_version: 2.6.12
128
132
  signing_key:
129
133
  specification_version: 4
130
134
  summary: Minitest Runner for Mumuki