minitest-failure-reporter 0.1.3 → 0.1.4

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: 49b3fdf972726801240056770045862db1e3e5bb5c8fabf1284d2d8fd18cd84d
4
- data.tar.gz: adeba2ff7502a6cf98e453e280c03b71d9f0467734855e6a48aa04989b09bfa5
3
+ metadata.gz: e9f546969ce18387801f2cc76c577bb6d6c5afb31176541dfdb9d0cab20a7b86
4
+ data.tar.gz: f57e89257d1b1dd7db375aa6820b38939bb5716771f8b042a97ccf971df5969c
5
5
  SHA512:
6
- metadata.gz: 7a68a435421b26c5460ce1accbc523fdcf20fbd799b07995c0250e69fbcdd64f81cf111e6e1d30cf50608a45692a9292cd43b5a48ed67792d1b83c01579020a1
7
- data.tar.gz: e6e5169acba8155c2fc71feb78abbfae75d8067ccee3eb6a62bd50b576cffe0274e7824bba8c88a11d804c159a24b9fcde5df595dd18d303c16d87cfdfe9f296
6
+ metadata.gz: 6510a64f3cd299dbf035e3f263cf11e9a11d85c60eb8136fff1c10fd4f30c47ffc43731751749b7ad0420b1f3ae7a2bcce91a0574c79270cb3c4b0eb4ae80712
7
+ data.tar.gz: 7637bdbfb65ae14f8b3cb513a40e1b7eff8c4000bdf327d330cd5d47467a1b52142f7b85e8b14aa58117abc15f8bc00ee649a74e93754b21c9984b055b42a50e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minitest-failure-reporter (0.1.2)
4
+ minitest-failure-reporter (0.1.4)
5
5
  minitest (~> 5.0)
6
6
 
7
7
  GEM
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 'minitest_failure-reporter'
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 minitest_failure-reporter
34
+ $ gem install minitest-failure-reporter
35
35
 
36
36
  ## Usage
37
37
 
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module FailureReporter
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
@@ -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.3
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-07-23 00:00:00.000000000 Z
11
+ date: 2020-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest