rspec-github 1.0.0.alpha.1 → 2.2.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
  SHA256:
3
- metadata.gz: 85366c1120dee3555bf63e5e7b81f24bdf37ffe45aae9666571825254de9dd23
4
- data.tar.gz: 0df575c31f3e7ff6203c1a743f8026866996ba9f70e56ef299e98909e0c09380
3
+ metadata.gz: dd0d5193cff4ec8793a8d1a69b3323db05399cb1147d021c51843706beec1cc0
4
+ data.tar.gz: 6be59b0609fdbb16663466df65dae210a16d864d2d14f09158ad7d34884fcefe
5
5
  SHA512:
6
- metadata.gz: dae1d783228a7af44526da52b5d5d69a1eee4eeae4f2ea4671fcdfdc34ad8afcd2526c20e1958a988373c15dd9b3d4208875153d6cff6aea4d27563187412a9d
7
- data.tar.gz: 8d612687ac982b83aea501ee05452335be1ce2bbf932352b543ef4bf6cb0e113a9e0cd282566ee4ca497073a7442236ffffd66ac972ae8bae59ad9f20ff17088
6
+ metadata.gz: 5020e2b3b781740bec68cf841d327251615cdc0b572bdfbb6c0200322d0f975c49797cb270d2602fcdb3a3a1b79e7c67b42999a3b838d76a85a5dd013377781f
7
+ data.tar.gz: a22208bc4c984718be816a9cdc744912bc282acf8d36239f08c411e8a969f551e7ccc05c549e20d7717019b1e01a3885c8ed194b837957dbc9d8f96d4f5a100b
@@ -3,7 +3,7 @@
3
3
  require 'rspec/github/version'
4
4
  require 'rspec/github/formatter'
5
5
 
6
- module Rspec
6
+ module RSpec
7
7
  module Github
8
8
  end
9
9
  end
@@ -1,22 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rspec/core/formatters/documentation_formatter'
3
+ require 'rspec/core'
4
+ require 'rspec/core/formatters/base_formatter'
4
5
 
5
6
  module RSpec
6
7
  module Github
7
- class Formatter < RSpec::Core::Formatters::DocumentationFormatter
8
+ class Formatter < RSpec::Core::Formatters::BaseFormatter
8
9
  RSpec::Core::Formatters.register self, :example_failed, :example_pending
9
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
+
10
16
  def example_failed(failure)
11
- super
12
17
  file, line = failure.example.location.split(':')
13
- output.puts "::error file=#{file},line=#{line}::#{failure.message_lines.join('%0A')}"
18
+ file = self.class.relative_path(file)
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
- super
18
23
  file, line = pending.example.location.split(':')
19
- output.puts "::warning file=#{file},line=#{line}::#{pending.example.full_description}"
24
+ file = self.class.relative_path(file)
25
+ output.puts "\n::warning file=#{file},line=#{line}::#{pending.example.full_description}"
20
26
  end
21
27
  end
22
28
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Rspec
3
+ module RSpec
4
4
  module Github
5
- VERSION = '1.0.0.alpha.1'
5
+ VERSION = '2.2.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.1
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-04-02 00:00:00.000000000 Z
11
+ date: 2020-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rspec
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,9 +80,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
66
80
  version: 2.3.0
67
81
  required_rubygems_version: !ruby/object:Gem::Requirement
68
82
  requirements:
69
- - - ">"
83
+ - - ">="
70
84
  - !ruby/object:Gem::Version
71
- version: 1.3.1
85
+ version: '0'
72
86
  requirements: []
73
87
  rubygems_version: 3.1.2
74
88
  signing_key: