Skip to content

Commit a4d858e

Browse files
committed
Updated common plaintext files (from rspec-dev)main
1 parent 524b30a commit a4d858e

File tree

7 files changed

+134
-79
lines changed

7 files changed

+134
-79
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-12-23T21:24:00+01:00 from the rspec-dev repo.
1+
# This file was generated on 2020-12-25T18:48:30+00:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
github: [JonRowe, benoittgt]

BUILD_DETAIL.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!---
2-
This file was generated on 2019-12-05T21:32:23+00:00 from the rspec-dev repo.
2+
This file was generated on 2020-12-25T18:48:30+00:00 from the rspec-dev repo.
33
DO NOT modify it by hand as your changes will get lost the next time it is generated.
44
-->
55

@@ -97,22 +97,23 @@ $ bundle exec yard doc --no-cache
9797
$ bin/yard doc --no-cache
9898
```
9999

100-
## Rubocop
100+
## RuboCop
101101

102-
We use [Rubocop](https://github.com/rubocop-hq/rubocop) to enforce style conventions on the project so
103-
that the code has stylistic consistency throughout. Run with:
102+
We use [RuboCop](https://github.com/rubocop-hq/rubocop) to enforce style
103+
conventions on the project so that the code has stylistic consistency
104+
throughout. Run with:
104105

105106
```
106-
$ bundle exec rubocop
107+
$ bundle exec rubocop lib
107108
108109
# or, if you installed your bundle with `--standalone --binstubs`:
109110
110-
$ bin/rubocop
111+
$ bin/rubocop lib
111112
```
112113

113-
Our Rubocop configuration is a work-in-progress, so if you get a failure
114-
due to a Rubocop default, feel free to ask about changing the
115-
configuration. Otherwise, you'll need to address the Rubocop failure,
114+
Our RuboCop configuration is a work-in-progress, so if you get a failure
115+
due to a RuboCop default, feel free to ask about changing the
116+
configuration. Otherwise, you'll need to address the RuboCop failure,
116117
or, as a measure of last resort, by wrapping the offending code in
117118
comments like `# rubocop:disable SomeCheck` and `# rubocop:enable SomeCheck`.
118119

@@ -146,4 +147,3 @@ build for another repo, so our CI build includes a spec that runs the
146147
spec suite of each of the _other_ project repos. Note that we only run
147148
the spec suite, not the full build, of the other projects, as the spec
148149
suite runs very quickly compared to the full build.
149-

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!---
2-
This file was generated on 2019-12-05T21:32:23+00:00 from the rspec-dev repo.
2+
This file was generated on 2020-12-25T18:48:30+00:00 from the rspec-dev repo.
33
DO NOT modify it by hand as your changes will get lost the next time it is generated.
44
-->
55

CONTRIBUTING.md

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!---
2-
This file was generated on 2019-12-05T21:32:23+00:00 from the rspec-dev repo.
2+
This file was generated on 2020-12-25T18:48:30+00:00 from the rspec-dev repo.
33
DO NOT modify it by hand as your changes will get lost the next time it is generated.
44
-->
55

@@ -11,8 +11,8 @@ We welcome contributions from *everyone*. While contributing, please follow the
1111
If you'd like to help make RSpec better, here are some ways you can contribute:
1212

1313
- by running RSpec HEAD to help us catch bugs before new releases
14-
- by [reporting bugs you encounter](https://github.com/rspec/rspec-rails/issues/new?template=bug_report.md)
15-
- by [suggesting new features](https://github.com/rspec/rspec-rails/issues/new?template=feature_request.md)
14+
- by [reporting bugs you encounter](https://github.com/rspec/rspec-rails/issues/new) with [report template](#report-template)
15+
- by [suggesting new features](https://github.com/rspec/rspec-rails/issues/new)
1616
- by improving RSpec's [Relish](https://relishapp.com/rspec) or [API](https://rspec.info/documentation/) documentation
1717
- by improving [RSpec's website](https://rspec.info/) ([source](https://github.com/rspec/rspec.github.io))
1818
- by taking part in [feature and issue discussions](https://github.com/rspec/rspec-rails/issues)
@@ -24,47 +24,63 @@ If you need help getting started, check out the [DEVELOPMENT](DEVELOPMENT.md) fi
2424

2525
Thanks for helping us make RSpec better!
2626

27-
## Rspec issues labels definition
27+
## `Small` issues
2828

29-
### `Your first PR` issues
29+
These issue are ones that we be believe are best suited for new contributors to
30+
get started with. They represent a meaningful contribution to the project that
31+
should not be too hard to pull off.
3032

31-
These issues are the ones that we be believe are best suited for new
32-
contributors to get started on. They represent a potential meaningful
33-
contribution to the project that should not be too hard to pull off.
33+
## Report template
3434

35-
### `Needs reproduction case` issues
36-
37-
These issues are ones that have been labelled by the maintainers that we
38-
believe do not currently have enough information to be reproduced the RSpec
39-
team. While not directly counted by the GitHub contribution graph, we consider
40-
helping us to reproduce the issue with a repro case as an extremely meaningful
41-
contribution.
42-
43-
### `Has reproduction case` issues
44-
45-
These issues are the ones that have reproduction cases, able to start working on
46-
immediately. These are good ones to tackle to help us actively fix bugs.
35+
Having a way to reproduce your issue will be very helpful for others to help confirm,
36+
investigate and ultimately fix your issue. You can do this by providing an executable
37+
test case. To make this process easier, we have prepared one basic
38+
[bug report templates](REPORT_TEMPLATE.md) for you to use as a starting point.
4739

4840
## Maintenance branches
4941

5042
Maintenance branches are how we manage the different supported point releases
5143
of RSpec. As such, while they might look like good candidates to merge into
5244
main, please do not open pull requests to merge them.
5345

54-
## How do the cukes work?
55-
56-
The cucumber features for RSpec rails document how it works, but are also quasi
57-
executable tests for the framework. They execute in the context of a pre-setup
58-
Rails app.
59-
60-
1. Before the cucumber specs run, the directory `tmp/aruba` is cleared
61-
2. If the example app hasn't already been created,
62-
`bundle exec rake generate:app generate:stuff` is executed.
63-
3. The example app is copied in to `tmp/aruba`
64-
4. Everything in `tmp/aruba/spec/*` is deleted apart from `spec/spec_helper.rb` and
65-
`spec/rails_helper.rb`
66-
5. the cucumber suite executes, creating files in that app and executing them
67-
68-
The best way to debug the app is to run a failing cucumber feature, which will
69-
leave the test files intact in `tmp/aruba`, then you can cd in to that director
70-
and run it in the bundle context of the aruba app.
46+
## Working on multiple RSpec gems at the same time
47+
48+
RSpec is composed of multiple gems (`rspec-core`, `rspec-mocks`, etc). Sometimes you have
49+
to work on a combination of them at the same time. When submitting your code for review,
50+
we ask that you get a passing build (green CI). If you are working across the repositories,
51+
please add a commit that temporarily pins your PR to the right branch of the other repository
52+
you depend on. For example, if we wanted a change in `rspec-expectations` that relied on a
53+
change for on `rspec-mocks`. We add a commit with the title:
54+
55+
>[WIP] Use rspec-mocks with "custom-failure-message" branch
56+
57+
And content:
58+
59+
```diff
60+
diff --git a/Gemfile b/Gemfile
61+
62+
-%w[rspec rspec-core rspec-mocks rspec-support].each do |lib|
63+
+%w[rspec rspec-core rspec-support].each do |lib|
64+
library_path = File.expand_path("../../#{lib}", __FILE__)
65+
if File.exist?(library_path) && !ENV['USE_GIT_REPOS']
66+
gem lib, :path => library_path
67+
@@ -11,6 +11,7 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
68+
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch
69+
end
70+
end
71+
+gem 'rspec-mocks', :git => "https://github.com/rspec/rspec-mocks.git", :branch => "custom-failure-message"
72+
```
73+
74+
In general the process is:
75+
1. Create PRs explaining what you are trying to achieve.
76+
2. Pin the repositories to each other.
77+
3. Check they pass (go green).
78+
4. Await review if appropriate.
79+
5. Remove the commit from step 2. We will merge ignoring the failure.
80+
6. Remove the commit from the other, check it passes with the other commit now on `main`.
81+
7. Merge the other.
82+
8. We will trigger builds for the `main` branch of affected repositories to check if everything is in order.
83+
84+
Steps 5-8 should happen continuously (e.g. one after another but within a short timespan)
85+
so that we don't leave a broken main around. It is important to triage that build process
86+
and revert if necessary.

DEVELOPMENT.md

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!---
2-
This file was generated on 2019-12-05T21:32:23+00:00 from the rspec-dev repo.
2+
This file was generated on 2020-12-25T18:48:30+00:00 from the rspec-dev repo.
33
DO NOT modify it by hand as your changes will get lost the next time it is generated.
44
-->
55

@@ -108,7 +108,7 @@ Here's a short, non-exhaustive checklist of things we typically ask contributors
108108
- [ ] New behavior is covered by tests and all tests are passing.
109109
- [ ] No Ruby warnings are issued by your changes.
110110
- [ ] Documentation reflects changes and renders as intended.
111-
- [ ] Rubocop passes (e.g. `bundle exec rubocop`).
111+
- [ ] RuboCop passes (e.g. `bundle exec rubocop lib`).
112112
- [ ] Commits are squashed into a reasonable number of logical changesets that tell an easy-to-follow story.
113113
- [ ] No changelog entry is necessary (we'll add it as part of the merge process!)
114114

@@ -129,31 +129,3 @@ $ bin/yard server --reload
129129
```
130130

131131
Then navigate to `localhost:8808` to view the rendered docs.
132-
133-
### Publishing the documentation
134-
135-
In the other documented rspec gems, we use a rake command in rspec-dev
136-
to generate documentation for [rspec.info](https://rspec.info/).
137-
As `rspec-rails` is no longer sync with the other gems in terms of versioning
138-
since `rspec-rails` 4, if you want to publish updated documentation you will
139-
need to run the rake task from this repository.
140-
141-
1) First clone the `rspec.github.io` repository into a sibling folder.
142-
143-
> `cd .. && git clone https://github.com/rspec/rspec.github.io && cd rspec.github.io`
144-
145-
2) Check out the [source branch](https://github.com/rspec/rspec.github.io/tree/source)
146-
147-
> `git checkout source`
148-
149-
3) Install the template gem that will be needed as yard plugin: [rspec-docs-template](https://github.com/rspec/rspec.github.io#install-rspec-docs-template-yard-plugin).
150-
151-
> `gem build yard-rspec-docs-template.gemspec`
152-
153-
4) Change back to the `rspec-rails` directory
154-
155-
> `cd ../rspec-rails`
156-
157-
5) Generate the docs for the version you want, ensuring you are on the appropriate (released) commit.
158-
159-
> `bundle exec rake "update_docs[4.0, 4-0-maintenance]`

ISSUE_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### Subject of the issue
2+
<!---
3+
Describe your issue here.
4+
-->
5+
6+
### Your environment
7+
* Ruby version:
8+
* rspec-rails version:
9+
10+
### Steps to reproduce
11+
<!---
12+
Tell us how to reproduce this issue. Please provide a working demo, you can use
13+
this [templates](REPORT_TEMPLATE.md) as a base.
14+
-->
15+
16+
### Expected behavior
17+
<!---
18+
Tell us what should happen.
19+
-->
20+
21+
### Actual behavior
22+
<!---
23+
Tell us what happens instead.
24+
-->

REPORT_TEMPLATE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!---
2+
This file was generated on 2020-12-25T18:48:30+00:00 from the rspec-dev repo.
3+
DO NOT modify it by hand as your changes will get lost the next time it is generated.
4+
-->
5+
6+
# Report template
7+
8+
```ruby
9+
# frozen_string_literal: true
10+
11+
begin
12+
require "bundler/inline"
13+
rescue LoadError => e
14+
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
15+
raise e
16+
end
17+
18+
gemfile(true) do
19+
source "https://rubygems.org"
20+
21+
gem "rspec", "3.7.0" # Activate the gem and version you are reporting the issue against.
22+
end
23+
24+
puts "Ruby version is: #{RUBY_VERSION}"
25+
require 'rspec/autorun'
26+
27+
RSpec.describe 'additions' do
28+
it 'returns 2' do
29+
expect(1 + 1).to eq(2)
30+
end
31+
32+
it 'returns 1' do
33+
expect(3 - 1).to eq(-1)
34+
end
35+
end
36+
```
37+
38+
Simply copy the content of the appropriate template into a `.rb` file on your computer
39+
and make the necessary changes to demonstrate the issue. You can execute it by running
40+
`ruby rspec_report.rb` in your terminal.
41+
42+
You can then share your executable test case as a [gist](https://gist.github.com), or
43+
simply paste the content into the issue description.

0 commit comments

Comments
 (0)