simplecov-rspec 0.3.1 → 0.4.0
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 +4 -4
- data/.commitlintrc.yml +16 -0
- data/.husky/commit-msg +1 -0
- data/.rubocop.yml +3 -30
- data/CHANGELOG.md +24 -0
- data/README.md +55 -16
- data/Rakefile +2 -7
- data/lib/simplecov-rspec/version.rb +1 -1
- data/package.json +11 -0
- metadata +24 -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,30 @@ 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
|
+
|
21
|
+
## v0.3.2 (2024-09-17)
|
22
|
+
|
23
|
+
[Full Changelog](https://github.com/main-branch/simplecov-rspec/compare/v0.3.1..v0.3.2)
|
24
|
+
|
25
|
+
Changes since v0.3.1:
|
26
|
+
|
27
|
+
* 7da8291 Update links in gemspec
|
28
|
+
* c050356 Add Slack badge for this project in README
|
29
|
+
* b9e3dfb Release v0.3.1
|
30
|
+
|
7
31
|
## v0.3.1 (2024-09-16)
|
8
32
|
|
9
33
|
[Full Changelog](https://github.com/main-branch/simplecov-rspec/compare/v0.3.0..v0.3.1)
|
data/README.md
CHANGED
@@ -6,6 +6,9 @@
|
|
6
6
|
[](https://github.com/main-branch/simplecov-rspec/actions/workflows/continuous_integration.yml)
|
7
7
|
[](https://codeclimate.com/github/main-branch/simplecov-rspec/maintainability)
|
8
8
|
[](https://codeclimate.com/github/main-branch/simplecov-rspec/test_coverage)
|
9
|
+
[](https://conventionalcommits.org)
|
11
|
+
[](https://main-branch.slack.com/archives/C07MCM9J72B)
|
9
12
|
|
10
13
|
`simplecov-rspec` is a Ruby gem that integrates SimpleCov with RSpec to ensure your
|
11
14
|
tests meet a minimum coverage threshold. It enhances your test suite by automatically
|
@@ -30,29 +33,41 @@ If configured to list the lines that were not covered by tests, RSpec will addit
|
|
30
33
|
```
|
31
34
|
|
32
35
|
* [Installation](#installation)
|
33
|
-
* [Getting
|
34
|
-
* [Basic
|
35
|
-
* [Configuration from
|
36
|
+
* [Getting started](#getting-started)
|
37
|
+
* [Basic setup](#basic-setup)
|
38
|
+
* [Configuration from environment variables](#configuration-from-environment-variables)
|
36
39
|
* [Development](#development)
|
37
40
|
* [Contributing](#contributing)
|
41
|
+
* [Commit message guidelines](#commit-message-guidelines)
|
42
|
+
* [Pull request guidelines](#pull-request-guidelines)
|
38
43
|
* [License](#license)
|
39
|
-
* [Code of
|
44
|
+
* [Code of conduct](#code-of-conduct)
|
40
45
|
|
41
46
|
## Installation
|
42
47
|
|
43
|
-
|
48
|
+
To install the gem, add to the following line to your application's gemspec OR Gemfile:
|
44
49
|
|
45
|
-
|
46
|
-
|
50
|
+
gemspec:
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
spec.add_development_dependency "simplecov-rspec", '~> 0.1'
|
47
54
|
```
|
48
55
|
|
56
|
+
Gemfile:
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
gem "simplecov-rspec", "~> 0.1", groups: [:development, :test]
|
60
|
+
```
|
61
|
+
|
62
|
+
and then run `bundle install`
|
63
|
+
|
49
64
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
50
65
|
|
51
66
|
```bash
|
52
67
|
gem install simplecov-rspec
|
53
68
|
```
|
54
69
|
|
55
|
-
## Getting
|
70
|
+
## Getting started
|
56
71
|
|
57
72
|
To use `simplecov-rspec`, follow these steps:
|
58
73
|
|
@@ -75,7 +90,7 @@ This will configure RSpec to fail when test coverage falls below 100%.
|
|
75
90
|
|
76
91
|
That is it!
|
77
92
|
|
78
|
-
### Basic
|
93
|
+
### Basic setup
|
79
94
|
|
80
95
|
To initialize simplecov-rspec with defaults, add the following to your `spec_helper.rb`:
|
81
96
|
|
@@ -116,11 +131,10 @@ This block is passed on to `SimpleCov::RSpec.start`. See [Configuring
|
|
116
131
|
SimpleCov](https://github.com/simplecov-ruby/simplecov?tab=readme-ov-file#configuring-simplecov)
|
117
132
|
for details.
|
118
133
|
|
119
|
-
### Configuration from
|
120
|
-
|
121
|
-
Environment variables can be used to set these options as follows:
|
134
|
+
### Configuration from environment variables
|
122
135
|
|
123
|
-
|
136
|
+
Environment variables can be used to configure `simplecov-rspec`. These environment
|
137
|
+
variables take presidence over the values passed to `SimpleCov::RSpec.start`.
|
124
138
|
|
125
139
|
* **`COVERAGE_THRESHOLD`**: Sets the minimum coverage threshold (0-100). Overrides
|
126
140
|
`coverage_threshold`.
|
@@ -144,8 +158,8 @@ uncovered lines on different platforms than the one you run for local developmen
|
|
144
158
|
If you want to contribute or experiment with the gem, follow these steps to set up
|
145
159
|
your development environment:
|
146
160
|
|
147
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake
|
148
|
-
|
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
|
149
163
|
will allow you to experiment.
|
150
164
|
|
151
165
|
To install this gem onto your local machine, run `bundle exec rake install`. To
|
@@ -162,12 +176,37 @@ welcoming space for collaboration, and contributors are expected to adhere to th
|
|
162
176
|
[code of
|
163
177
|
conduct](https://github.com/main-branch/simplecov-rspec/blob/main/CODE_OF_CONDUCT.md).
|
164
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
|
+
|
165
204
|
## License
|
166
205
|
|
167
206
|
The gem is available as open source under the terms of the [MIT
|
168
207
|
License](https://opensource.org/licenses/MIT).
|
169
208
|
|
170
|
-
## Code of
|
209
|
+
## Code of conduct
|
171
210
|
|
172
211
|
Everyone interacting in the Simplecov::Rspec project's codebases, issue trackers,
|
173
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,14 +221,16 @@ 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
|
211
228
|
metadata:
|
212
229
|
allowed_push_host: https://rubygems.org
|
213
230
|
homepage_uri: https://github.com/main-branch/simplecov-rspec
|
214
|
-
|
215
|
-
documentation_uri: https://rubydoc.info/gems/simplecov-rspec/0.
|
231
|
+
source_code_uri: https://github.com/main-branch/simplecov-rspec
|
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
|
216
234
|
rubygems_mfa_required: 'true'
|
217
235
|
post_install_message:
|
218
236
|
rdoc_options: []
|