test_launcher 2.23.0 → 2.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/test_launcher/rubymine/launcher.rb +13 -3
- data/lib/test_launcher/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3b235d1355bd618fe24a99d7d5e02cfe0980e8b01b9b6332deb4fe6d0919d993
|
4
|
+
data.tar.gz: b10f49d251e4e519cbe3430c60de6bad16a656e5a7ba8ef2416083aa4ef31836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 661ee5a30a6357a99f4ca79c3ddb0902d8eb2e084f6737cb7fc85b4ab023be844ea3ae3be901b2d014fe6e197af9ede15d3448b27b71bebdb9343a7254f680c6
|
7
|
+
data.tar.gz: f77aeae0f9de49cf07fe7d2a5b210c65699e411c8ca375dca1e5f600dbcbbef8571494687d3b9ce2788f25d8515dbc867979a68e19b67a0b68977d449ee8d685
|
@@ -3,6 +3,9 @@ require "test_launcher/shell/runner"
|
|
3
3
|
|
4
4
|
module TestLauncher
|
5
5
|
module Rubymine
|
6
|
+
# Parsing command line args with regex is not ideal ...¯\_(ツ)_/¯
|
7
|
+
TEST_NAME_REGEX = %r{['"]*/?\^?([^/'"\$]*)\$?/?['"]*}
|
8
|
+
|
6
9
|
class Launcher
|
7
10
|
def initialize(args:, shell:, request:)
|
8
11
|
@args = args
|
@@ -14,7 +17,14 @@ module TestLauncher
|
|
14
17
|
if args.any? {|a| a.match("ruby-debug-ide")}
|
15
18
|
shell.puts "test_launcher: hijacking and debugging"
|
16
19
|
|
17
|
-
debug_command =
|
20
|
+
debug_command = (
|
21
|
+
if args.first.match(/bash/)
|
22
|
+
"cd #{test_case.app_root} && #{args.join(" ")}"
|
23
|
+
else
|
24
|
+
"cd #{test_case.app_root} && bundle exec ruby -I test #{args.join(" ")}"
|
25
|
+
end
|
26
|
+
)
|
27
|
+
|
18
28
|
shell.puts debug_command
|
19
29
|
shell.exec debug_command
|
20
30
|
else
|
@@ -40,13 +50,13 @@ module TestLauncher
|
|
40
50
|
if args[-1].match("--name=")
|
41
51
|
Frameworks::Minitest::TestCase.new(
|
42
52
|
file: args[-2],
|
43
|
-
example: args[-1][
|
53
|
+
example: args[-1][%r{--name=#{TEST_NAME_REGEX}}, 1],
|
44
54
|
request: request
|
45
55
|
)
|
46
56
|
elsif args[-2]&.match("--name")
|
47
57
|
Frameworks::Minitest::TestCase.new(
|
48
58
|
file: args[-3],
|
49
|
-
example: args[-1][
|
59
|
+
example: args[-1][TEST_NAME_REGEX, 1],
|
50
60
|
request: request
|
51
61
|
)
|
52
62
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Kinnecom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
|
-
|
96
|
-
rubygems_version: 2.5.2
|
95
|
+
rubygems_version: 3.0.3
|
97
96
|
signing_key:
|
98
97
|
specification_version: 4
|
99
98
|
summary: Easily run tests
|