rspec-github 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec/github/formatter.rb +7 -0
- data/lib/rspec/github/version.rb +1 -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: dd0d5193cff4ec8793a8d1a69b3323db05399cb1147d021c51843706beec1cc0
|
4
|
+
data.tar.gz: 6be59b0609fdbb16663466df65dae210a16d864d2d14f09158ad7d34884fcefe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5020e2b3b781740bec68cf841d327251615cdc0b572bdfbb6c0200322d0f975c49797cb270d2602fcdb3a3a1b79e7c67b42999a3b838d76a85a5dd013377781f
|
7
|
+
data.tar.gz: a22208bc4c984718be816a9cdc744912bc282acf8d36239f08c411e8a969f551e7ccc05c549e20d7717019b1e01a3885c8ed194b837957dbc9d8f96d4f5a100b
|
@@ -8,13 +8,20 @@ module RSpec
|
|
8
8
|
class Formatter < RSpec::Core::Formatters::BaseFormatter
|
9
9
|
RSpec::Core::Formatters.register self, :example_failed, :example_pending
|
10
10
|
|
11
|
+
def self.relative_path(path)
|
12
|
+
workspace = File.realpath(ENV.fetch('GITHUB_WORKSPACE', '.'))
|
13
|
+
File.realpath(path).delete_prefix("#{workspace}#{File::SEPARATOR}")
|
14
|
+
end
|
15
|
+
|
11
16
|
def example_failed(failure)
|
12
17
|
file, line = failure.example.location.split(':')
|
18
|
+
file = self.class.relative_path(file)
|
13
19
|
output.puts "\n::error file=#{file},line=#{line}::#{failure.message_lines.join('%0A')}"
|
14
20
|
end
|
15
21
|
|
16
22
|
def example_pending(pending)
|
17
23
|
file, line = pending.example.location.split(':')
|
24
|
+
file = self.class.relative_path(file)
|
18
25
|
output.puts "\n::warning file=#{file},line=#{line}::#{pending.example.full_description}"
|
19
26
|
end
|
20
27
|
end
|
data/lib/rspec/github/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stef Schenkelaars
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-core
|