rspec-rfc-helper 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 617f5c1b9bb3004b21596e44926cb45b231460685238b6cb38166935fc653b48
4
- data.tar.gz: 22d66950729d05cd571547409ef29d21b7eb848b3582a643639cf4d18e8d7b60
3
+ metadata.gz: d2c175dc6472f0b7a8c77965b5c901f966c072df84291a5688776d91fb8311c5
4
+ data.tar.gz: e83cc059ea1fbd555b49f55b02cc7a0755298aba2280f4b7bcbd2f724770ef68
5
5
  SHA512:
6
- metadata.gz: 7f06421f6a3105af0546cba88114e226c014074c53c0cf30c0b1d129da26656b3cf95cd6a3b58cbc78caf894967afa9f504f3bc22a7eeec28c71c36142c1946a
7
- data.tar.gz: 3af8fbb4a87448bab6349a3ffdf85da3f9acc92dfe4481fd55c9772c5c7966b2a196eaf1c43efda3a9a3fb60d6c63e6feb85bad0f33ef1104aa742b897a525d0
6
+ metadata.gz: ba94fbf149ae5ae3f5621670517659666ee9a7356144ab79636c18794e20bbfca02a54bf445ebf43e34f5b0572457e42c5d96e3249952556eeb1874cba42baae
7
+ data.tar.gz: 69f220d59a38ec71be0ec675ac2270a32d53c30e34d06aafb32982f2e25c2fd5e6c8ef8f5e93f4d80f0738d5ad5d7139d171b4e54cbc435c9faac6ebeae6a28f
data/CHANGELOG.md CHANGED
@@ -28,6 +28,12 @@ Please, keep them in this order when updating.
28
28
 
29
29
  ## [Unreleased]
30
30
 
31
+ ## [0.2.1] - 2024-10-02
32
+
33
+ ### Fixed
34
+
35
+ - Fixed spec status value based on the last run. It now uses the correct current status.
36
+
31
37
  ## [0.2.0] - 2023-11-10 - JSON report and fixes
32
38
 
33
39
  ### Added
@@ -72,7 +72,7 @@ module RSpec
72
72
  list = []
73
73
  spec.examples.each do |example|
74
74
  meta = example.metadata
75
- list.push status: meta[:last_run_status],
75
+ list.push status: example.execution_result.status,
76
76
  type: meta[:type],
77
77
  location: meta[:location]
78
78
  end
@@ -13,9 +13,9 @@ module RSpec
13
13
  unknown: 'gray',
14
14
 
15
15
  # Statuses from RSpec::Core::Example
16
- 'failed' => 'red',
17
- 'pending' => 'orange',
18
- 'passed' => 'green',
16
+ failed: 'red',
17
+ pending: 'orange',
18
+ passed: 'green',
19
19
  }.freeze
20
20
 
21
21
  ##
@@ -134,7 +134,7 @@ module RSpec
134
134
  spec.examples.each do |example|
135
135
  meta = example.metadata
136
136
  type = meta[:type] ? "`#{meta[:type]}`: " : ''
137
- lines << "| #{status(meta[:last_run_status])} | #{type}`#{meta[:location]}` |"
137
+ lines << "| #{status(example.execution_result.status)} | #{type}`#{meta[:location]}` |"
138
138
  end
139
139
 
140
140
  return "**No related examples**\n" if lines.empty?
@@ -47,8 +47,9 @@ module RSpec
47
47
  def status
48
48
  value = :unknown
49
49
  @examples.each do |example|
50
- return :failing if example.metadata[:last_run_status] == 'failed'
51
- return :has_pending if example.metadata[:last_run_status] == 'pending'
50
+ return :failing if example.execution_result.status == :failed
51
+ return :has_pending if example.execution_result.status == :pending
52
+ raise "Unhandled example status: #{example.execution_result.status}" if example.execution_result.status != :passed
52
53
 
53
54
  value = :pass
54
55
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rspec
4
4
  module RfcHelper
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/rspec/rfc_helper/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'rspec-rfc-helper'
7
+ spec.version = Rspec::RfcHelper::VERSION
8
+ spec.authors = ['Manuel Tancoigne']
9
+ spec.email = ['manu@experimentslabs.com']
10
+
11
+ spec.summary = 'RSpec plugin to track RFC compliance'
12
+ spec.description = 'Helps keeping track of specifications with more context than just RSpec examples'
13
+ spec.homepage = 'https://gitlab.com/experimentslabs/rspec-rfc-helper'
14
+ spec.required_ruby_version = '>= 3.1.2'
15
+
16
+ spec.metadata['rubygems_mfa_required'] = 'true'
17
+
18
+ spec.metadata['homepage_uri'] = spec.homepage
19
+ spec.metadata['source_code_uri'] = 'https://gitlab.com/experimentslabs/rspec-rfc-helper'
20
+ spec.metadata['changelog_uri'] = 'https://gitlab.com/experimentslabs/rspec-rfc-helper/-/blob/main/CHANGELOG.md'
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(__dir__) do
25
+ `git ls-files -z`.split("\x0").reject do |f|
26
+ (File.expand_path(f) == __FILE__) ||
27
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
28
+ end
29
+ end
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ['lib']
33
+
34
+ # Uncomment to register a new dependency of your gem
35
+ spec.add_dependency 'rspec', '~> 3.0'
36
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rfc-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Tancoigne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-15 00:00:00.000000000 Z
11
+ date: 2024-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -46,6 +46,7 @@ files:
46
46
  - lib/rspec/rfc_helper/specs.rb
47
47
  - lib/rspec/rfc_helper/version.rb
48
48
  - report.md
49
+ - rspec-rfc-helper.gemspec
49
50
  - sig/rspec/rfc_helper.rbs
50
51
  - sig/rspec/rfc_helper/json_renderer.rbs
51
52
  - sig/rspec/rfc_helper/markdown_renderer.rbs