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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/rspec/rfc_helper/json_renderer.rb +1 -1
- data/lib/rspec/rfc_helper/markdown_renderer.rb +4 -6
- data/lib/rspec/rfc_helper/spec.rb +3 -2
- data/lib/rspec/rfc_helper/version.rb +1 -1
- data/report.md +0 -2
- data/rspec-rfc-helper.gemspec +36 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d85b6bf08b7677d26788f5daf5eb61c96dcb9fe3961f90f5e2979a352eaf28c
|
4
|
+
data.tar.gz: b5d47da69ff6ef8ce1b28d9d57e299e5965ee985ef0838aa536c6794f93a4b75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
@@ -13,9 +13,9 @@ module RSpec
|
|
13
13
|
unknown: 'gray',
|
14
14
|
|
15
15
|
# Statuses from RSpec::Core::Example
|
16
|
-
|
17
|
-
|
18
|
-
|
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(
|
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.
|
51
|
-
return :has_pending if example.
|
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
|
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.
|
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:
|
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
|