simplecov-rspec 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.commitlintrc.yml +16 -0
- data/.husky/commit-msg +1 -0
- data/.rubocop.yml +3 -30
- data/CHANGELOG.md +14 -0
- data/README.md +54 -16
- data/Rakefile +2 -7
- data/lib/simplecov-rspec/version.rb +1 -1
- data/package.json +11 -0
- metadata +23 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6700c02ee99fdfde4191bd23c07fe67cc573a53f088741a2c49d3d34c0a0633
|
4
|
+
data.tar.gz: c9a373acb23929feb2c5688e10c584ecd1c37780a6f20db90c18df6940d6b256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ccc7d29d68e55668534b2e2cba528c38244beaceb7e24f386a0401e9cd0d008f2a23361b79ec94b786b3fdefb84ef37d1e1a0c36e0f97a0e19fbbd0ce2af261
|
7
|
+
data.tar.gz: cf6c195cff9a812671d3e651f8c7dba561a4e76ade2a0313c166e1ee71362fe3df102c6759a705a70c7dca11b7cefdcf74297a9f78d11f280def0d0c83b2cf44
|
data/.commitlintrc.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
extends: '@commitlint/config-conventional'
|
3
|
+
|
4
|
+
rules:
|
5
|
+
# See: https://commitlint.js.org/reference/rules.html
|
6
|
+
#
|
7
|
+
# Rules are made up by a name and a configuration array. The configuration array contains:
|
8
|
+
#
|
9
|
+
# * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if violated
|
10
|
+
# * Applicability [always|never]: never inverts the rule
|
11
|
+
# * Value: value to use for this rule
|
12
|
+
#
|
13
|
+
# Run `npx commitlint --print-config` to see the current setting for all rules.
|
14
|
+
#
|
15
|
+
body-leading-blank: [2, 'always']
|
16
|
+
footer-leading-blank: [2, 'always']
|
data/.husky/commit-msg
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
npx --no-install commitlint --edit "$1"
|
data/.rubocop.yml
CHANGED
@@ -1,38 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
SuggestExtensions: false
|
4
|
-
DefaultFormatter: fuubar
|
5
|
-
|
6
|
-
# Output extra information for each offense to make it easier to diagnose:
|
7
|
-
DisplayCopNames: true
|
8
|
-
DisplayStyleGuide: true
|
9
|
-
ExtraDetails: true
|
1
|
+
inherit_gem:
|
2
|
+
main_branch_shared_rubocop_config: config/rubocop.yml
|
10
3
|
|
4
|
+
AllCops:
|
11
5
|
# RuboCop enforces rules depending on the oldest version of Ruby which
|
12
6
|
# your project supports:
|
13
7
|
TargetRubyVersion: 3.1
|
14
8
|
|
15
|
-
Gemspec/DevelopmentDependencies:
|
16
|
-
Enabled: false
|
17
|
-
|
18
|
-
Layout/LineLength:
|
19
|
-
Max: 120
|
20
|
-
|
21
|
-
# The DSL for RSpec and the gemspec file make it very hard to limit block length
|
22
|
-
Metrics/BlockLength:
|
23
|
-
Exclude:
|
24
|
-
- '**/*_spec.rb'
|
25
|
-
- '*.gemspec'
|
26
|
-
|
27
|
-
Metrics/ModuleLength:
|
28
|
-
CountAsOne: ['hash']
|
29
|
-
|
30
|
-
Metrics/ClassLength:
|
31
|
-
CountAsOne: ['hash']
|
32
|
-
|
33
|
-
Style/AsciiComments:
|
34
|
-
Enabled: false
|
35
|
-
|
36
9
|
Style/StderrPuts:
|
37
10
|
Enabled: false
|
38
11
|
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,20 @@ Changes for each release are listed in this file.
|
|
4
4
|
|
5
5
|
This project adheres to [Semantic Versioning](https://semver.org/) for its releases.
|
6
6
|
|
7
|
+
## v0.4.0 (2024-10-10)
|
8
|
+
|
9
|
+
[Full Changelog](https://github.com/main-branch/simplecov-rspec/compare/v0.3.2..v0.4.0)
|
10
|
+
|
11
|
+
Changes since v0.3.2:
|
12
|
+
|
13
|
+
* e06d866 build: update create_github_release dependency
|
14
|
+
* b8aafa3 docs: add conventional commit badge to README
|
15
|
+
* 596b217 build: remove semver pr label check
|
16
|
+
* bed5192 build: enforce conventional commit message formatting
|
17
|
+
* d036188 Clarify gem installation and configuration via env variables
|
18
|
+
* 1d89785 Add TargetRubyVersion in .rubocop.yml
|
19
|
+
* 2017a2f Use shared Rubocop config
|
20
|
+
|
7
21
|
## v0.3.2 (2024-09-17)
|
8
22
|
|
9
23
|
[Full Changelog](https://github.com/main-branch/simplecov-rspec/compare/v0.3.1..v0.3.2)
|
data/README.md
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
[![Build Status](https://github.com/main-branch/simplecov-rspec/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/main-branch/simplecov-rspec/actions/workflows/continuous_integration.yml)
|
7
7
|
[![Maintainability](https://api.codeclimate.com/v1/badges/9a58b51d18910db724c7/maintainability)](https://codeclimate.com/github/main-branch/simplecov-rspec/maintainability)
|
8
8
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/9a58b51d18910db724c7/test_coverage)](https://codeclimate.com/github/main-branch/simplecov-rspec/test_coverage)
|
9
|
+
[![Conventional
|
10
|
+
Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
|
9
11
|
[![Slack](https://img.shields.io/badge/slack-main--branch/simplecov--rspec-yellow.svg?logo=slack)](https://main-branch.slack.com/archives/C07MCM9J72B)
|
10
12
|
|
11
13
|
`simplecov-rspec` is a Ruby gem that integrates SimpleCov with RSpec to ensure your
|
@@ -31,29 +33,41 @@ If configured to list the lines that were not covered by tests, RSpec will addit
|
|
31
33
|
```
|
32
34
|
|
33
35
|
* [Installation](#installation)
|
34
|
-
* [Getting
|
35
|
-
* [Basic
|
36
|
-
* [Configuration from
|
36
|
+
* [Getting started](#getting-started)
|
37
|
+
* [Basic setup](#basic-setup)
|
38
|
+
* [Configuration from environment variables](#configuration-from-environment-variables)
|
37
39
|
* [Development](#development)
|
38
40
|
* [Contributing](#contributing)
|
41
|
+
* [Commit message guidelines](#commit-message-guidelines)
|
42
|
+
* [Pull request guidelines](#pull-request-guidelines)
|
39
43
|
* [License](#license)
|
40
|
-
* [Code of
|
44
|
+
* [Code of conduct](#code-of-conduct)
|
41
45
|
|
42
46
|
## Installation
|
43
47
|
|
44
|
-
|
48
|
+
To install the gem, add to the following line to your application's gemspec OR Gemfile:
|
45
49
|
|
46
|
-
|
47
|
-
|
50
|
+
gemspec:
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
spec.add_development_dependency "simplecov-rspec", '~> 0.1'
|
48
54
|
```
|
49
55
|
|
56
|
+
Gemfile:
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
gem "simplecov-rspec", "~> 0.1", groups: [:development, :test]
|
60
|
+
```
|
61
|
+
|
62
|
+
and then run `bundle install`
|
63
|
+
|
50
64
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
51
65
|
|
52
66
|
```bash
|
53
67
|
gem install simplecov-rspec
|
54
68
|
```
|
55
69
|
|
56
|
-
## Getting
|
70
|
+
## Getting started
|
57
71
|
|
58
72
|
To use `simplecov-rspec`, follow these steps:
|
59
73
|
|
@@ -76,7 +90,7 @@ This will configure RSpec to fail when test coverage falls below 100%.
|
|
76
90
|
|
77
91
|
That is it!
|
78
92
|
|
79
|
-
### Basic
|
93
|
+
### Basic setup
|
80
94
|
|
81
95
|
To initialize simplecov-rspec with defaults, add the following to your `spec_helper.rb`:
|
82
96
|
|
@@ -117,11 +131,10 @@ This block is passed on to `SimpleCov::RSpec.start`. See [Configuring
|
|
117
131
|
SimpleCov](https://github.com/simplecov-ruby/simplecov?tab=readme-ov-file#configuring-simplecov)
|
118
132
|
for details.
|
119
133
|
|
120
|
-
### Configuration from
|
121
|
-
|
122
|
-
Environment variables can be used to set these options as follows:
|
134
|
+
### Configuration from environment variables
|
123
135
|
|
124
|
-
|
136
|
+
Environment variables can be used to configure `simplecov-rspec`. These environment
|
137
|
+
variables take presidence over the values passed to `SimpleCov::RSpec.start`.
|
125
138
|
|
126
139
|
* **`COVERAGE_THRESHOLD`**: Sets the minimum coverage threshold (0-100). Overrides
|
127
140
|
`coverage_threshold`.
|
@@ -145,8 +158,8 @@ uncovered lines on different platforms than the one you run for local developmen
|
|
145
158
|
If you want to contribute or experiment with the gem, follow these steps to set up
|
146
159
|
your development environment:
|
147
160
|
|
148
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake
|
149
|
-
|
161
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake`
|
162
|
+
to run linting, tests, etc. just like the CI build. You can also run `bin/console` for an interactive prompt that
|
150
163
|
will allow you to experiment.
|
151
164
|
|
152
165
|
To install this gem onto your local machine, run `bundle exec rake install`. To
|
@@ -163,12 +176,37 @@ welcoming space for collaboration, and contributors are expected to adhere to th
|
|
163
176
|
[code of
|
164
177
|
conduct](https://github.com/main-branch/simplecov-rspec/blob/main/CODE_OF_CONDUCT.md).
|
165
178
|
|
179
|
+
### Commit message guidelines
|
180
|
+
|
181
|
+
All commit messages must follow the [Conventional Commits
|
182
|
+
standard](https://www.conventionalcommits.org/en/v1.0.0/). This helps us maintain a
|
183
|
+
clear and structured commit history, automate versioning, and generate changelogs
|
184
|
+
effectively.
|
185
|
+
|
186
|
+
To ensure compliance, this project includes:
|
187
|
+
|
188
|
+
* A git commit-msg hook that validates your commit messages before they are accepted.
|
189
|
+
|
190
|
+
To activate the hook, you must have node installed and run `npm install`.
|
191
|
+
|
192
|
+
* A GitHub Actions workflow that will enforce the Conventional Commit standard as
|
193
|
+
part of the continuous integration pipeline.
|
194
|
+
|
195
|
+
Any commit message that does not conform to the Conventional Commits standard will
|
196
|
+
cause the workflow to fail and not allow the PR to be merged.
|
197
|
+
|
198
|
+
### Pull request guidelines
|
199
|
+
|
200
|
+
All pull requests must be merged using rebase merges. This ensures that commit
|
201
|
+
messages from the feature branch are preserved in the release branch, keeping the
|
202
|
+
history clean and meaningful.
|
203
|
+
|
166
204
|
## License
|
167
205
|
|
168
206
|
The gem is available as open source under the terms of the [MIT
|
169
207
|
License](https://opensource.org/licenses/MIT).
|
170
208
|
|
171
|
-
## Code of
|
209
|
+
## Code of conduct
|
172
210
|
|
173
211
|
Everyone interacting in the Simplecov::Rspec project's codebases, issue trackers,
|
174
212
|
chat rooms and mailing lists is expected to follow the [code of
|
data/Rakefile
CHANGED
@@ -44,14 +44,9 @@ CLEAN << 'rspec-report.xml'
|
|
44
44
|
|
45
45
|
require 'rubocop/rake_task'
|
46
46
|
|
47
|
-
RuboCop::RakeTask.new
|
48
|
-
t.options = %w[
|
49
|
-
--format progress
|
50
|
-
--format json --out rubocop-report.json
|
51
|
-
]
|
52
|
-
end
|
47
|
+
RuboCop::RakeTask.new
|
53
48
|
|
54
|
-
|
49
|
+
# YARD
|
55
50
|
|
56
51
|
unless RUBY_PLATFORM == 'java'
|
57
52
|
# yard:build
|
data/package.json
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Couball
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1
|
47
|
+
version: '2.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1
|
54
|
+
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: fuubar
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.5'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: main_branch_shared_rubocop_config
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.1'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,6 +208,8 @@ executables: []
|
|
194
208
|
extensions: []
|
195
209
|
extra_rdoc_files: []
|
196
210
|
files:
|
211
|
+
- ".commitlintrc.yml"
|
212
|
+
- ".husky/commit-msg"
|
197
213
|
- ".markdownlint.yml"
|
198
214
|
- ".rspec"
|
199
215
|
- ".rubocop.yml"
|
@@ -205,6 +221,7 @@ files:
|
|
205
221
|
- Rakefile
|
206
222
|
- lib/simplecov-rspec.rb
|
207
223
|
- lib/simplecov-rspec/version.rb
|
224
|
+
- package.json
|
208
225
|
homepage: https://github.com/main-branch/simplecov-rspec
|
209
226
|
licenses:
|
210
227
|
- MIT
|
@@ -212,8 +229,8 @@ metadata:
|
|
212
229
|
allowed_push_host: https://rubygems.org
|
213
230
|
homepage_uri: https://github.com/main-branch/simplecov-rspec
|
214
231
|
source_code_uri: https://github.com/main-branch/simplecov-rspec
|
215
|
-
documentation_uri: https://rubydoc.info/gems/simplecov-rspec/0.
|
216
|
-
changelog_uri: https://rubydoc.info/gems/simplecov-rspec/0.
|
232
|
+
documentation_uri: https://rubydoc.info/gems/simplecov-rspec/0.4.0
|
233
|
+
changelog_uri: https://rubydoc.info/gems/simplecov-rspec/0.4.0/file/CHANGELOG.md
|
217
234
|
rubygems_mfa_required: 'true'
|
218
235
|
post_install_message:
|
219
236
|
rdoc_options: []
|