Skip to content

Commit e9e21da

Browse files
committed
📝 Documentation updates
1 parent 8239c73 commit e9e21da

File tree

4 files changed

+137
-33
lines changed

4 files changed

+137
-33
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ liberapay: pboling # Replace with a single Liberapay username
99
open_collective: # Replace with a single Open Collective username
1010
patreon: galtzo # Replace with a single Patreon username
1111
polar: pboling
12-
thanks_dev: gh/pboling
12+
thanks_dev: u/gh/pboling
1313
tidelift: rubygems/oauth2 # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ updates:
88
open-pull-requests-limit: 10
99
ignore:
1010
- dependency-name: "rubocop-lts"
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "daily"

CONTRIBUTING.md

Lines changed: 131 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,138 @@
22

33
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/oauth2][🚎src-main]
44
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
5-
the [code of conduct][conduct].
6-
7-
To submit a patch, please fork the project and create a patch with
8-
tests. Once you're happy with it send a pull request and post a message to the
9-
[google group][mailinglist] or on the [gitter chat][🏘chat].
10-
11-
## Detailed instructions on Submitting a Pull Request
12-
1. [Fork the repository.][fork]
13-
2. [Create a topic branch.][branch]
14-
3. Add specs for your unimplemented feature or bug fix.
15-
4. Run `bundle exec rake spec`. If your specs pass, return to step 3.
16-
5. Implement your feature or bug fix.
17-
6. Run `bundle exec rake`. If your specs fail, return to step 5.
18-
7. Run `open coverage/index.html`. If your changes are not completely covered
19-
by your tests, return to step 3.
20-
8. Add documentation for your feature or bug fix.
21-
9. Run `bundle exec rake verify_measurements`. If your changes are not 100%
22-
documented, go back to step 8.
23-
10. Commit and push your changes.
24-
11. [Submit a pull request.][pr]
25-
26-
[fork]: http://help.github.com/fork-a-repo/
27-
[branch]: http://learn.github.com/p/branching.html
28-
[pr]: http://help.github.com/send-pull-requests/
5+
the [code of conduct][🤝conduct].
6+
7+
To submit a patch, please fork the project and create a patch with tests.
8+
Once you're happy with it send a pull request.
9+
10+
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
11+
12+
## You can help!
13+
14+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
15+
16+
Simply follow these instructions:
17+
18+
1. Fork the repository
19+
2. Create your feature branch (`git checkout -b my-new-feature`)
20+
3. Make some fixes.
21+
4. Commit your changes (`git commit -am 'Added some feature'`)
22+
5. Push to the branch (`git push origin my-new-feature`)
23+
6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
24+
7. Create new Pull Request.
25+
26+
## Appraisals
27+
28+
From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
29+
They are created and updated with the commands:
30+
31+
NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
32+
33+
Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
34+
35+
```shell
36+
BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
37+
BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
38+
bundle exec rake rubocop_gradual:autocorrect
39+
```
40+
41+
When adding an appraisal to CI check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
42+
43+
## The Reek List
44+
45+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
46+
47+
To refresh the `reek` list:
48+
49+
```bash
50+
bundle exec reek > REEK
51+
```
52+
53+
## Run Tests
54+
55+
To run all tests
56+
57+
```bash
58+
bundle exec rake test
59+
```
60+
61+
## Lint It
62+
63+
Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
64+
65+
```bash
66+
bundle exec rake
67+
```
68+
69+
Or just run the linter.
70+
71+
```bash
72+
bundle exec rake rubocop_gradual:autocorrect
73+
```
2974

3075
## Contributors
3176

32-
See: [https://gitlab.com/oauth-xx/oauth2/-/graphs/main][🚎contributors]
77+
Your picture could be here!
78+
79+
[![Contributors][🖐contributors-img]][🖐contributors]
80+
81+
Made with [contributors-img][🖐contrib-rocks].
82+
83+
Also see GitLab Contributors: [https://gitlab.com/oauth-xx/oauth2/-/graphs/main][🚎contributors-gl]
84+
85+
## For Maintainers
86+
87+
### One-time, Per-maintainer, Setup
88+
89+
**IMPORTANT**: If you want to sign the build you create,
90+
your public key for signing gems will need to be picked up by the line in the
91+
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
92+
All releases to RubyGems.org will be signed.
93+
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
94+
95+
NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment.
96+
97+
### To release a new version:
98+
99+
1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
100+
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
101+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
102+
4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
103+
5. Run `git push` to trigger the final CI pipeline before release, & merge PRs
104+
- NOTE: Remember to [check the build][🧪build]!
105+
6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
106+
7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
107+
8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure you will release the latest trunk code
108+
9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
109+
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
110+
- If the echo above has no output, then it didn't work.
111+
- Note that you'll need the `zsh/datetime` module, if running `zsh`.
112+
- In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
113+
10. Run `bundle exec rake build`
114+
11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
115+
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
116+
[gem][💎stone_checksums].
117+
- Checksums will be committed automatically by the script, but not pushed
118+
12. Run `bundle exec rake release` which will create a git tag for the version,
119+
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
33120

34-
[comment]: <> (Following links are used by README, CONTRIBUTING, Homepage)
35-
[conduct]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CODE_OF_CONDUCT.md
36-
[🚎contributors]: https://gitlab.com/oauth-xx/oauth2/-/graphs/main
37-
[mailinglist]: http://groups.google.com/group/oauth-ruby
38-
[🚎src-main]: https://gitlab.com/oauth-xx/oauth2/-/tree/main
39-
[🏘chat]: https://gitter.im/oauth-xx/oauth2
121+
[🚎src-main]: https://gitlab.com/oauth-xx/oauth2
122+
[🧪build]: https://github.com/oauth-xx/oauth2/actions
123+
[🤝conduct]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CODE_OF_CONDUCT.md
124+
[🖐contrib-rocks]: https://contrib.rocks
125+
[🖐contributors]: https://github.com/oauth-xx/oauth2/graphs/contributors
126+
[🚎contributors-gl]: https://gitlab.com/oauth-xx/oauth2/-/graphs/main
127+
[🖐contributors-img]: https://contrib.rocks/image?repo=oauth-xx/oauth2
128+
[💎rubygems]: https://rubygems.org
129+
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
130+
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
131+
[🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
132+
[💎stone_checksums]: https://github.com/pboling/stone_checksums
133+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
134+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
135+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
136+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
137+
[🚎appraisal-eval-gemfile-pr]: https://github.com/thoughtbot/appraisal/pull/248
138+
[🚎appraisal-fork]: https://github.com/pboling/appraisal/tree/galtzo
139+
[🏃‍♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache

oauth2.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Support will be dropped for Ruby 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1 and any
5050
3. Gem releases are now cryptographically signed with a 20-year cert, with checksums by stone_checksums.
5151
4. I need your support.
5252
53-
If you are a sentient, please consider a donation as I move toward supporting myself with Open Source work:
53+
If you are sentient, please consider a donation as I move toward supporting myself with Open Source work:
5454
• https://liberapay.com/pboling
5555
• https://ko-fi.com/pboling
5656
• https://www.buymeacoffee.com/pboling

0 commit comments

Comments
 (0)