Skip to content

Commit 56a9995

Browse files
committed
Merge branch 'docs' into 'main'
📝 Upgrade CoC to v2.1 See merge request oauth-xx/oauth-tty!1
2 parents 74e72f3 + 7c39054 commit 56a9995

File tree

5 files changed

+511
-69
lines changed

5 files changed

+511
-69
lines changed

CODE_OF_CONDUCT.md

Lines changed: 80 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,135 @@
1+
12
# Contributor Covenant Code of Conduct
23

34
## Our Pledge
45

5-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
612

7-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
815

916
## Our Standards
1017

11-
Examples of behavior that contributes to a positive environment for our community include:
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
1220

1321
* Demonstrating empathy and kindness toward other people
1422
* Being respectful of differing opinions, viewpoints, and experiences
1523
* Giving and gracefully accepting constructive feedback
16-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17-
* Focusing on what is best not just for us as individuals, but for the overall community
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
1828

1929
Examples of unacceptable behavior include:
2030

21-
* The use of sexualized language or imagery, and sexual attention or
22-
advances of any kind
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
2333
* Trolling, insulting or derogatory comments, and personal or political attacks
2434
* Public or private harassment
25-
* Publishing others' private information, such as a physical or email
26-
address, without their explicit permission
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
2737
* Other conduct which could reasonably be considered inappropriate in a
2838
professional setting
2939

3040
## Enforcement Responsibilities
3141

32-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
3346

34-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
3551

3652
## Scope
3753

38-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official email address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
3959

4060
## Enforcement
4161

42-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
[![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact].
65+
All complaints will be reviewed and investigated promptly and fairly.
4366

44-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
4569

4670
## Enforcement Guidelines
4771

48-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
4974

5075
### 1. Correction
5176

52-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
5379

54-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
5583

5684
### 2. Warning
5785

58-
**Community Impact**: A violation through a single incident or series of actions.
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
5988

60-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
6195

6296
### 3. Temporary Ban
6397

64-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
65100

66-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
67106

68107
### 4. Permanent Ban
69108

70-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
71112

72-
**Consequence**: A permanent ban from any sort of public interaction within the community.
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
73115

74116
## Attribution
75117

76-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78-
79-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
80121

81-
[homepage]: https://www.contributor-covenant.org
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
82124

83125
For answers to common questions about this code of conduct, see the FAQ at
84-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations
134+
[🚂bdfl-contact]: http://www.railsbling.com/contact
135+
[🚂bdfl-contact-img]: https://img.shields.io/badge/Contact-BDFL-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red

CONTRIBUTING.md

Lines changed: 129 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,137 @@
11
## Contributing
22

3-
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/oauth-tty/][🚎src-main]. This project is
4-
intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
5-
the [code of conduct][conduct].
3+
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/oauth-tty][🚎src-main].
4+
This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to
5+
the [code of conduct][🤝conduct].
66

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].
7+
To submit a patch, please fork the project, create a patch with tests, and send a pull request.
8+
9+
Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
10+
11+
## Help out!
12+
13+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
14+
15+
Follow these instructions:
16+
17+
1. Fork the repository
18+
2. Create a feature branch (`git checkout -b my-new-feature`)
19+
3. Make some fixes.
20+
4. Commit changes (`git commit -am 'Added some feature'`)
21+
5. Push to the branch (`git push origin my-new-feature`)
22+
6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
23+
7. Create new Pull Request.
24+
25+
## Appraisals
26+
27+
From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
28+
29+
NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
30+
31+
Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
32+
33+
Create or update them with the commands:
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+
```
1074

1175
## Contributors
1276

13-
See: [https://gitlab.com/oauth-xx/oauth-tty/-/graphs/main][🚎contributors]
77+
[![Contributors][🖐contributors-img]][🖐contributors]
78+
79+
Made with [contributors-img][🖐contrib-rocks].
80+
81+
Also see GitLab Contributors: [https://gitlab.com/oauth-xx/oauth-tty/-/graphs/main][🚎contributors-gl]
82+
83+
## For Maintainers
84+
85+
### One-time, Per-maintainer, Setup
86+
87+
**IMPORTANT**: To sign a build,
88+
a public key for signing gems will need to be picked up by the line in the
89+
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
90+
All releases to RubyGems.org are signed releases.
91+
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
92+
93+
NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
94+
95+
### To release a new version:
1496

15-
[comment]: <> (Following links are used by README, CONTRIBUTING, Homepage)
97+
1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
98+
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
99+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
100+
4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
101+
5. Run `git push` to trigger the final CI pipeline before release, and merge PRs
102+
- NOTE: Remember to [check the build][🧪build].
103+
6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
104+
7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
105+
8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
106+
9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
107+
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
108+
- If the echo above has no output, then it didn't work.
109+
- Note: `zsh/datetime` module is needed, if running `zsh`.
110+
- In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
111+
10. Run `bundle exec rake build`
112+
11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
113+
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
114+
[gem][💎stone_checksums].
115+
- The script automatically commits but does not push the checksums
116+
12. Run `bundle exec rake release` which will create a git tag for the version,
117+
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
16118

17-
[conduct]: https://gitlab.com/oauth-xx/oauth-tty/-/blob/main/CODE_OF_CONDUCT.md
18-
[🚎contributors]: https://gitlab.com/oauth-xx/oauth-tty/-/graphs/main
19-
[mailinglist]: http://groups.google.com/group/oauth-ruby
20-
[🚎src-main]: https://gitlab.com/oauth-xx/oauth-tty/-/tree/main
119+
[🚎src-main]: https://gitlab.com/oauth-xx/oauth-tty
120+
[🧪build]: https://github.com/oauth-xx/oauth-tty/actions
121+
[🤝conduct]: https://gitlab.com/oauth-xx/oauth-tty/-/blob/main/CODE_OF_CONDUCT.md
122+
[🖐contrib-rocks]: https://contrib.rocks
123+
[🖐contributors]: https://github.com/oauth-xx/oauth-tty/graphs/contributors
124+
[🚎contributors-gl]: https://gitlab.com/oauth-xx/oauth-tty/-/graphs/main
125+
[🖐contributors-img]: https://contrib.rocks/image?repo=oauth-xx/oauth-tty
126+
[💎rubygems]: https://rubygems.org
127+
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
128+
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
129+
[🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
130+
[💎stone_checksums]: https://github.com/pboling/stone_checksums
131+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
132+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
133+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
134+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
135+
[🚎appraisal-eval-gemfile-pr]: https://github.com/thoughtbot/appraisal/pull/248
136+
[🚎appraisal-fork]: https://github.com/pboling/appraisal/tree/galtzo
137+
[🏃‍♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache

LICENSE.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 - 2017, 2021 - 2022 Thiago Pinto & Peter Boling
3+
Copyright (c) 2021-2022 Peter H. Boling, of Galtzo.com, and oauth2 contributors
4+
Copyright (c) 2016-2017 Thiago Pinto
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)