rspec_n 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e2a6b63db25d81b062d933b0f9db3ba46e9f858869c3a3d2d3274ab1f8a8666
4
- data.tar.gz: a8821b81e6d853f588245792739b362ed10ed18bc64b56650e1ec0c923387867
3
+ metadata.gz: 8226b953bb261edbc90d400904894586076a26aac783653f081940ad04395ba9
4
+ data.tar.gz: 40961382d8a353a3cae419938c8d11442ea09936d4ae42271db4d03ab4719a84
5
5
  SHA512:
6
- metadata.gz: 9877b9317ef9dbda4a6c1c0806660276c6273a079cfe61206194dfc651b8b7dea7b33afc2a773c58fa2df70654b428f6da74c43e34e74b687b8fedc250cd7faa
7
- data.tar.gz: 57c47323728e63b50c0a3d1530b3e6e3d99c39eb295838871cd57185652a62b017ab88579ddd291d8d38093bd2f46e0c636e3cc4beffb9478b6fa4136e877536
6
+ metadata.gz: 38a18db6f3d1791b4af486c486cee70844dc950bbe7b8aad519ef0535988279458eb61309c80a1a2e0df9a9d2d7ab54e2b87d6c6239d356d648b03636a9e068b
7
+ data.tar.gz: 3a6f27b22f0b5aad7586e6d17477f50b9e697dbb6b5ffd1ddcd04ba989abde8f8956588f03f5e5938ef8536e7479648ef79cf305770b9095ad208693fdf9d43d
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Create a bug report to help us improve rspec_n
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## Describe the bug
11
+
12
+ <!-- Describe the bug clearly and concisely. -->
13
+
14
+ ## To Reproduce
15
+
16
+ <!-- List the exact steps that can reproduce the behavior. -->
17
+
18
+ ## Expected Behavior
19
+
20
+ <!-- Explain the behavior you expected. -->
21
+
22
+ ## Screenshots
23
+
24
+ <!-- Add screenshots if you have any. -->
25
+
26
+ ## Additional Info
27
+
28
+ <!-- Provide other info that might help. -->
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## Description
11
+
12
+ <!-- Provide a clear and concise description of the feature you would like. -->
13
+ <!-- If it's related to a problem or frustration, please tell us about it. -->
14
+
15
+ ## Alternatives
16
+
17
+ <!-- Describe alternative ideas or solutions you've considered. -->
18
+
19
+ ## Additional Info
20
+
21
+ <!-- Provide other info or screenshots that might help. -->
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: Security Issue
3
+ about: Tell us about a security issue
4
+ title: ''
5
+ labels: security
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ <!-- If you would prefer to submit a private issue, use: -->
13
+ <!-- https://github.com/roberts1000/rspec_n/security/advisories/new -->
14
+ <!-- Otherwise, provide a clear and concise description of what the security issue is. -->
15
+
16
+ ## Proof of Concept (PoC)
17
+
18
+ <!-- If you have example of how the security issue can be exploited, provide details here. -->
19
+
20
+ ## Screenshots
21
+
22
+ <!-- If you have screenshots, place them here. -->
23
+
24
+ ## Additional Info
25
+
26
+ <!-- Place any other info about the problem here. -->
@@ -1,3 +1,11 @@
1
- <!-- Replace XYZ with the related GitHub issue number -->
1
+ ## Supported Issue
2
+
3
+ <!-- Replace `XYZ` with the single associated GitHub issue number. -->
2
4
 
3
5
  Closes #XYZ
6
+
7
+ ## Additional Info
8
+
9
+ <!-- Provide details that will help the reviewers understand your work. -->
10
+
11
+ None
@@ -1,6 +1,9 @@
1
1
  # This workflow will download prebuilt Ruby versions, install dependencies and run checks against Pull Requests.
2
2
 
3
3
  name: Check Pull Request
4
+ permissions:
5
+ contents: read
6
+ pull-requests: write
4
7
  on:
5
8
  pull_request:
6
9
  branches: [ master ]
@@ -13,7 +16,7 @@ jobs:
13
16
  runs-on: ubuntu-latest
14
17
  strategy:
15
18
  matrix:
16
- ruby-version: ['3.0', '3.1', '3.2', '3.3']
19
+ ruby-version: ['3.3', '3.4', '4.0']
17
20
  steps:
18
21
  - uses: actions/checkout@v2
19
22
  - name: Set up Ruby
@@ -30,7 +33,7 @@ jobs:
30
33
  runs-on: ubuntu-latest
31
34
  strategy:
32
35
  matrix:
33
- ruby-version: ['3.0']
36
+ ruby-version: ['3.3']
34
37
  steps:
35
38
  - uses: actions/checkout@v2
36
39
  - name: Set up Ruby
data/.rubocop.yml CHANGED
@@ -12,7 +12,7 @@ inherit_gem:
12
12
  # do not attempt to merge these settings with their defaults. Long term changes should be ported to the rubocop_plus gem.
13
13
 
14
14
  AllCops:
15
- TargetRubyVersion: 3.0
15
+ TargetRubyVersion: 3.3
16
16
 
17
17
  Style/Documentation:
18
18
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  Issues are tracked at https://github.com/roberts1000/rspec_n/issues. Issues marked as **(Internal)** only affect development.
4
4
 
5
+ ## 2.1.0 (Jun 07, 2026)
6
+
7
+ 1. [#124](../../issues/124): Remove Ruby 3.0 support.
8
+ 1. [#126](../../issues/126): Update development and test gems. **(Internal)**
9
+ 1. [#128](../../issues/128): Add Ruby 3.4 support.
10
+ 1. [#131](../../issues/131): Remove Ruby 3.1 support.
11
+ 1. [#136](../../issues/136): Allow Bundler >= 2.0. **(Internal)**
12
+ 1. [#139](../../issues/139): Remove Ruby 3.2 support.
13
+ 1. [#141](../../issues/141): Add Ruby 4.0 support.
14
+ 1. [#151](../../issues/151): Add workflow permissions. **(Internal)**
15
+
5
16
  ## 2.0.0 (Mar 08, 2024)
6
17
 
7
18
  1. [#118](../../issues/118): Use `db:schema:load` to prepare databases instead of `db:migrate`.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,8 @@
1
+ # CONTRIBUTING
2
+
3
+ Contributions are welcome. Please us the following process when submitting work:
4
+
5
+ 1. Create an issue on the [issue page](https://github.com/roberts1000/rspec_n/issues) that targets a **single** problem/enhancement. All PRs should be tied to an issue.
6
+ 1. Fork the project.
7
+ 1. Create a branch. The name of the branch should start with the issue number that the branch will address.
8
+ 1. Submit the PR (and add the requested information in the PR template).
data/Gemfile CHANGED
@@ -8,8 +8,8 @@ group :development do
8
8
  end
9
9
 
10
10
  group :develoment, :test do
11
- gem 'bundler', '~> 2.0'
12
- gem 'pry', '~> 0.14.0'
11
+ gem 'bundler', '>= 2.0'
12
+ gem 'pry', '~> 0.16.0'
13
13
  gem 'rake', '~> 13.0'
14
14
  gem 'rspec', '~> 3.0'
15
15
  end
data/README.md CHANGED
@@ -4,15 +4,6 @@ rspec_n is a Ruby gem that makes it easy to run a project's RSpec test suite N t
4
4
 
5
5
  ![example](https://user-images.githubusercontent.com/2053901/53691471-c6956880-3d4c-11e9-8248-68bbb4c24786.png)
6
6
 
7
- #### Automatic Command Selection
8
-
9
- rspec_n inspects files in your project and determines the best way to start RSpec. If it can't make an educated guess, it will use `bundle exec rspec` as the base command and add any extra information you've entered on the command line (like the order or paths). The following is a list of project types that rspec_n can identify and the associated commands it will try to execute:
10
-
11
- 1. Ruby on Rails Applications: `DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load && bundle exec rspec`.
12
- 2. Everything else: `bundle exec rspec`.
13
-
14
- **Note:** You can override this behavior by using the `-c` option, which lets you specify your own command. See the [Use a Custom Command to Start RSpec](#Use-a-Custom-Command-to-Start-RSpec) section for more info.
15
-
16
7
  ## Versioning Strategy
17
8
 
18
9
  Releases are versioned using [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html) with the following caveats:
@@ -21,13 +12,13 @@ Releases are versioned using [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html)
21
12
 
22
13
  ## Supported Ruby Versions
23
14
 
24
- Ruby 3.0+ is supported.
15
+ Ruby 3.3, 3.4 and 4.0 are supported.
25
16
 
26
17
  ## Installation
27
18
 
28
19
  Install by executing:
29
20
 
30
- $ gem install rspec_n
21
+ gem install rspec_n
31
22
 
32
23
  The gem will install an executable called `rspec_n`.
33
24
 
@@ -45,128 +36,12 @@ gem 'rspec_n', require: false
45
36
 
46
37
  ## Usage
47
38
 
48
- ### Considerations
49
-
50
- #### Ruby on Rails
51
-
52
- 1. By default, rspec_n will attempt to prepare the test database by executing the following code **before each run**:
53
-
54
- ```
55
- DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load rake db:drop db:create db:schema:load
56
- ```
57
-
58
- 1. `DISABLE_DATABASE_ENVIRONMENT_CHECK=1` disables a Rails check that can prevent the test database from being dropped.
59
- 1. Since `db:schema:load` is used to prepare the test database, projects must have a correct `schema.rb` or `structure.sql`.
60
- 1. By default, rspec_n tries to ensure an empty database **before each run** so it does not load seed files. If your test suite depends on seeded data, or other special setup, you will need to specify the exact command that rspec_n uses to invoke each run. See the [Use a Custom Command to Start RSpec](#Use-a-Custom-Command-to-Start-RSpec) section for more info.
61
-
62
- ### Basic Usage
63
-
64
- The simplest way to run rspec_n is to give it a positive integer which tells it how many times to run RSpec:
65
-
66
- $ rspec_n 5
67
-
68
- As iterations complete, summary output is sent to the screen and detailed output is written to files (in the project's root).
69
-
70
- To target specific specs, provide one or more paths. You can do anything you would normally do when passing paths to RSpec:
71
-
72
- $ rspec_n 5 spec/path/to/something_spec.rb
73
- $ rspec_n 5 spec/path/to/folder spec/path/to/some/other/file_spec.rb
74
- $ rspec_n 5 spec/path/to/folder
75
- $ rspec_n 5 spec/path/to/something_spec.rb:5
76
-
77
- By default, `--order rand` is always sent to RSpec to force it to run specs in random order. You can use a `defined` order if you don't want randomness:
78
-
79
- $ rspec_n 5 --order defined
80
-
81
- Or, let the RSpec configuration in the project determine the order:
82
-
83
- $ rspec_n 5 --order project
84
-
85
- ### Use a Custom Command to Start RSpec
86
-
87
- Use the `-c` option if you want to specify your own command. The following example deletes the `tmp` folder before starting RSpec:
88
-
89
- $ rspec_n 5 -c 'rm -rf tmp && bundle exec rspec'
90
-
91
- There are a couple points to consider:
92
-
93
- 1. Wrap your entire command in a single or double quoted string.
94
- 1. Use `&&` to create compound commands.
95
- 1. rspec_n was created to help discover flaky test suites so it will add `--order rand` to your custom command (which gets passed to RSpec and causes RSpec to run tests randomly). If you need to change the test order, you must add the `--order defined` or `--order project` options to the control the order like this:
96
-
97
- ```
98
- $ rspec_n 5 -c 'rm -rf tmp && bundle exec rspec' --order defined
99
- ```
100
-
101
- ### Control the File Output
102
-
103
- rspec_n writes output to the project's root folder, for each iteration, to files with the iteration number in the name (`rspec_n_iteration.1`, `rspec_n_iteration.2`, etc...). If you want to disable this, add the `--no-file` option to the command.
104
-
105
- $ rspec_n 5 --no-file
106
-
107
- **Note:** rspec_n deletes all files matching `rspec_n_iteration.*` when it starts, so be sure to move those files to another location if you want to save them.
108
-
109
- ### Stop on First Failure
110
-
111
- You can tell rspec_n to abort the first time an iteration fails by using the `-s` flag. All remaining iterations are skipped.
112
-
113
- ### Run Specs in Parallel
114
-
115
- rspec_n doesn't directly support running specs in parallel, however, you should be able to use the `-c` option to pass a rspec_n the command you use to run parallel specs.
116
-
117
- ## Configuration
118
-
119
- You can create a `.rspec_n` file in your project's root and add command line options to it. They'll be used if `rspec_n` is run without options. Options are any arguments that start with `-` or `--`. For example, `rspec_n 10` or `rspec_n 10 spec/some_spec.rb` will make rspec_n consider `.rspec_n`, but `rspec_n 10 -c "rm -rf /tmp/* && bundle exec rspec"` won't.
120
-
121
- Example file format:
122
-
123
- ```text
124
- --no-file
125
- -s
126
- --order defined
127
- -c "rm -rf tmp && bundle exec rspec"
128
- ```
129
-
130
- The config file can be multi line or single line.
131
-
132
- ## Understanding the Results
133
-
134
- rspec_n uses the `STDOUT`, `STDERR` and `EXIT STATUS` of the `rspec` command to decide if the run passed or failed. The run is considered successful if RSpec returns an `EXIT STATUS` of `0` **regardless of any content in the STDERR stream**. rspec_n considers the run to be a failure if RSpec's `EXIT STATUS` `> 0`.
135
-
136
- There are times when `STDERR` has content, even though RSpec returns an `EXIT STATUS` of `0`. This frequently happens with deprecation notices and RSpec itself will pass the test suite in this situation. Also, it's not uncommon for code to write messages to `STDERR` that look like errors, but not actually cause RSpec to fail a spec example. If rspec_n is able to detect this situation, it adds `(Warning)` to the results to indicate there's something extra in the `STDERR` that you might want to investigate.
137
-
138
- The results of each run (number of tests, number of failures, etc...) are determined by parsing `STDOUT` and extracting information from the line that says `xyz examples, xyz failures, xyz pending`.
39
+ See the [Usage Guide](https://github.com/roberts1000/rspec_n/wiki/usage-guide).
139
40
 
140
41
  ## Development
141
42
 
142
- ### Setup
143
-
144
- Install dependencies:
145
-
146
- $ bin/setup
147
-
148
- That's it!
149
-
150
- ### Run Automated Tests
151
-
152
- Run the automated test suite with:
153
-
154
- $ rspec
155
-
156
- ### Start a Console
157
-
158
- Choose one of the following to start a console with the gem loaded:
159
-
160
- ```bash
161
- $ bin/console # for Pry
162
- $ rake console # for IRB
163
- ```
43
+ See the [Development Guide](https://github.com/roberts1000/rspec_n/wiki/development-guide).
164
44
 
165
45
  ## Contributing
166
46
 
167
- Contributions are welcome. Please us the following process when submitting work:
168
-
169
- 1. Create an issue on the [issue page](https://github.com/roberts1000/rspec_n/issues) that targets a single problem/enhancement. All PRs should be tied to an issue.
170
- 1. Fork the project.
171
- 1. Create a branch. The name of the branch should start with the issue number that the branch will address.
172
- 1. Submit the PR. In the PR comment (in the UI), add `Closes #xyz` or `Supports #xyz` where `xyz` is the issue number that the PR addresses. The title of the PR (in the UI) should start with `[PR for #xyz] `.
47
+ See [CONTRIBUTING](https://github.com/roberts1000/rspec_n/blob/master/CONTRIBUTING.md) or [SECURITY](https://github.com/roberts1000/rspec_n/blob/master/SECURITY.md).
data/SECURITY.md ADDED
@@ -0,0 +1,15 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 2.1.x | :white_check_mark: |
8
+ | < 2.0 | :x: |
9
+
10
+ ## Report a Vulnerability
11
+
12
+ To report a Security issue:
13
+
14
+ - (**Preferred Method ⭐**) Submit a private GitHub Advisory using [this form](https://github.com/roberts1000/rspec_n/security/advisories/new), to the maintainers. See [Github Security Advisories](https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/about-repository-security-advisories) for more info.
15
+ - Submit a [GitHub Issue](https://github.com/roberts1000/rspec_n/issues/new?template=security_issue.md).
@@ -1,3 +1,3 @@
1
1
  module RspecN
2
- VERSION = "2.0.0".freeze
2
+ VERSION = "2.1.0".freeze
3
3
  end
data/rspec_n.gemspec CHANGED
@@ -20,8 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.metadata["source_code_uri"] = "https://github.com/roberts1000/rspec_n"
21
21
  spec.metadata["changelog_uri"] = "https://github.com/roberts1000/rspec_n/blob/master/CHANGELOG.md"
22
22
  else
23
- raise "RubyGems 2.0 or newer is required to protect against " \
24
- "public gem pushes."
23
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
25
24
  end
26
25
 
27
26
  # Specify which files should be added to the gem when it is released.
@@ -32,7 +31,7 @@ Gem::Specification.new do |spec|
32
31
  spec.bindir = "exe"
33
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
33
  spec.require_paths = ["lib"]
35
- spec.required_ruby_version = '>= 3.0'
34
+ spec.required_ruby_version = ">= 3.3"
36
35
 
37
36
  spec.add_dependency "colorize", "~> 1.1.0"
38
37
  spec.add_dependency "cri", "~> 2.15.3"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_n
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - roberts1000
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-03-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: colorize
@@ -46,16 +45,21 @@ executables:
46
45
  extensions: []
47
46
  extra_rdoc_files: []
48
47
  files:
48
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
49
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
50
+ - ".github/ISSUE_TEMPLATE/security_issue.md"
49
51
  - ".github/pull_request_template.md"
50
52
  - ".github/workflows/check_pull_request.yml"
51
53
  - ".gitignore"
52
54
  - ".rspec"
53
55
  - ".rubocop.yml"
54
56
  - CHANGELOG.md
57
+ - CONTRIBUTING.md
55
58
  - Gemfile
56
59
  - LICENSE.md
57
60
  - README.md
58
61
  - Rakefile
62
+ - SECURITY.md
59
63
  - bin/console
60
64
  - bin/setup
61
65
  - exe/rspec_n
@@ -80,7 +84,6 @@ metadata:
80
84
  homepage_uri: https://github.com/roberts1000/rspec_n
81
85
  source_code_uri: https://github.com/roberts1000/rspec_n
82
86
  changelog_uri: https://github.com/roberts1000/rspec_n/blob/master/CHANGELOG.md
83
- post_install_message:
84
87
  rdoc_options: []
85
88
  require_paths:
86
89
  - lib
@@ -88,15 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
91
  requirements:
89
92
  - - ">="
90
93
  - !ruby/object:Gem::Version
91
- version: '3.0'
94
+ version: '3.3'
92
95
  required_rubygems_version: !ruby/object:Gem::Requirement
93
96
  requirements:
94
97
  - - ">="
95
98
  - !ruby/object:Gem::Version
96
99
  version: '0'
97
100
  requirements: []
98
- rubygems_version: 3.5.6
99
- signing_key:
101
+ rubygems_version: 4.0.13
100
102
  specification_version: 4
101
103
  summary: A ruby gem that runs RSpec N times.
102
104
  test_files: []