rspec-rfc-helper 0.2.0 → 0.2.2

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: 617f5c1b9bb3004b21596e44926cb45b231460685238b6cb38166935fc653b48
4
- data.tar.gz: 22d66950729d05cd571547409ef29d21b7eb848b3582a643639cf4d18e8d7b60
3
+ metadata.gz: 6d85b6bf08b7677d26788f5daf5eb61c96dcb9fe3961f90f5e2979a352eaf28c
4
+ data.tar.gz: b5d47da69ff6ef8ce1b28d9d57e299e5965ee985ef0838aa536c6794f93a4b75
5
5
  SHA512:
6
- metadata.gz: 7f06421f6a3105af0546cba88114e226c014074c53c0cf30c0b1d129da26656b3cf95cd6a3b58cbc78caf894967afa9f504f3bc22a7eeec28c71c36142c1946a
7
- data.tar.gz: 3af8fbb4a87448bab6349a3ffdf85da3f9acc92dfe4481fd55c9772c5c7966b2a196eaf1c43efda3a9a3fb60d6c63e6feb85bad0f33ef1104aa742b897a525d0
6
+ metadata.gz: ff181ab52467bfc5e1cda4eb6443a63b1baf38031f9045cb071804181d06654f80ba34ec26910c86cbca9dc358f0cc381e34c2c6167b3bfd11572c4a6de94c12
7
+ data.tar.gz: 2bb02060e4d1c781cda7ffa9b938c0e2011e280197ceffc7536d96be59190e36d014bb00a553acd1f02b071308ef5ffdfab831f7ad9d732a36f9b36109d75dbf
data/CHANGELOG.md CHANGED
@@ -28,6 +28,18 @@ Please, keep them in this order when updating.
28
28
 
29
29
  ## [Unreleased]
30
30
 
31
+ ## [0.2.2] - 2024-11-01
32
+
33
+ ### Removed
34
+
35
+ - Removed date from generated report
36
+
37
+ ## [0.2.1] - 2024-10-02
38
+
39
+ ### Fixed
40
+
41
+ - Fixed spec status value based on the last run. It now uses the correct current status.
42
+
31
43
  ## [0.2.0] - 2023-11-10 - JSON report and fixes
32
44
 
33
45
  ### 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
  ##
@@ -58,8 +58,6 @@ module RSpec
58
58
  <<~MD.chomp
59
59
  # #{title}
60
60
 
61
- Report generated on #{Time.now}
62
-
63
61
  Source specification: #{url}
64
62
  MD
65
63
  end
@@ -134,7 +132,7 @@ module RSpec
134
132
  spec.examples.each do |example|
135
133
  meta = example.metadata
136
134
  type = meta[:type] ? "`#{meta[:type]}`: " : ''
137
- lines << "| #{status(meta[:last_run_status])} | #{type}`#{meta[:location]}` |"
135
+ lines << "| #{status(example.execution_result.status)} | #{type}`#{meta[:location]}` |"
138
136
  end
139
137
 
140
138
  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.2'
6
6
  end
7
7
  end
data/report.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Compliance status: RSpec RFC Helper
2
2
 
3
- Report generated on 2023-11-15 11:30:49 +0100
4
-
5
3
  Source specification: [https://gitlab.com/experimentslabs/rspec-rfc-helper/-/blob/main/specification_example.md](https://gitlab.com/experimentslabs/rspec-rfc-helper/-/blob/main/specification_example.md)
6
4
 
7
5
  | status | id | section | verb | text |
@@ -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.2
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-11-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