minitest-failure-reporter 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/minitest/failure_reporter/version.rb +1 -1
- data/lib/minitest/failure_reporter_reporter.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9f546969ce18387801f2cc76c577bb6d6c5afb31176541dfdb9d0cab20a7b86
|
4
|
+
data.tar.gz: f57e89257d1b1dd7db375aa6820b38939bb5716771f8b042a97ccf971df5969c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6510a64f3cd299dbf035e3f263cf11e9a11d85c60eb8136fff1c10fd4f30c47ffc43731751749b7ad0420b1f3ae7a2bcce91a0574c79270cb3c4b0eb4ae80712
|
7
|
+
data.tar.gz: 7637bdbfb65ae14f8b3cb513a40e1b7eff8c4000bdf327d330cd5d47467a1b52142f7b85e8b14aa58117abc15f8bc00ee649a74e93754b21c9984b055b42a50e
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -22,7 +22,7 @@ The format of the file looks as follows:
|
|
22
22
|
Add this line to your application's Gemfile:
|
23
23
|
|
24
24
|
```ruby
|
25
|
-
gem '
|
25
|
+
gem 'minitest-failure-reporter'
|
26
26
|
```
|
27
27
|
|
28
28
|
And then execute:
|
@@ -31,7 +31,7 @@ And then execute:
|
|
31
31
|
|
32
32
|
Or install it yourself as:
|
33
33
|
|
34
|
-
$ gem install
|
34
|
+
$ gem install minitest-failure-reporter
|
35
35
|
|
36
36
|
## Usage
|
37
37
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
module Minitest
|
4
5
|
module FailureReporter
|
@@ -29,7 +30,7 @@ module Minitest
|
|
29
30
|
def format(test)
|
30
31
|
test_file, test_line = test.source_location
|
31
32
|
{
|
32
|
-
test_file_path: test_file,
|
33
|
+
test_file_path: normalize_file_path(test_file),
|
33
34
|
test_line: test_line,
|
34
35
|
test_id: "#{test.klass}##{test.name}",
|
35
36
|
test_name: test.name,
|
@@ -42,6 +43,11 @@ module Minitest
|
|
42
43
|
|
43
44
|
private
|
44
45
|
|
46
|
+
def normalize_file_path(file_path)
|
47
|
+
project_root = Pathname.new(Dir.pwd)
|
48
|
+
Pathname.new(file_path).relative_path_from(project_root).to_s
|
49
|
+
end
|
50
|
+
|
45
51
|
def has_failures?(test)
|
46
52
|
return false if test.skipped?
|
47
53
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-failure-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederik Dudzik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|