Skip to content

Commit 3af7ae2

Browse files
committed
Merge pull request #1530 from bf4/gh_templates
Simplify contributing.md; move details into GitHub templates
2 parents 04e0e7a + 5d9039e commit 3af7ae2

File tree

4 files changed

+151
-151
lines changed

4 files changed

+151
-151
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#### Expected behavior vs actual behavior
2+
<br><br>
3+
4+
#### Steps to reproduce
5+
*(e.g., detailed walkthrough, runnable script, example application)*
6+
<br><br><br>
7+
8+
#### Environment
9+
10+
ActiveModelSerializers Version *(commit ref if not on tag)*:
11+
12+
Output of `ruby -e "puts RUBY_DESCRIPTION"`:
13+
14+
OS Type & Version:
15+
16+
Integrated application and version *(e.g., Rails, Grape, etc)*:
17+
<br><br>
18+
19+
#### Backtrace
20+
*(e.g., provide any applicable backtraces from your application)*
21+
<br><br><br>
22+
23+
#### Additonal helpful information
24+
*(e.g., Gemfile.lock, configurations, PR containing a failing test, git bisect results)*
25+
<br><br><br>

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#### Purpose
2+
<br><br>
3+
4+
#### Changes
5+
<br><br>
6+
7+
#### Caveats
8+
<br><br>
9+
10+
#### Related GitHub issues
11+
<br><br>
12+
13+
#### Additonal helpful information
14+
<br><br>

CONTRIBUTING.md

Lines changed: 54 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,80 @@
1-
First of all, **thank you**!
1+
## Have an issue?
22

3-
![Commit Strip
4-
http://www.commitstrip.com/en/2014/05/07/the-truth-behind-open-source-apps/](docs/how-open-source-maintained.jpg)
3+
Before opening an issue, try the following:
54

6-
## Common issues and resolutions
5+
##### Consult the documentation
76

8-
- Using `grape-active_model_serializers`, or any non-Rails server. See
9-
[issue](https://github.com/rails-api/active_model_serializers/issues/1258).
7+
See if your issue can be resolved by information in the documentation.
108

11-
## How can I help?
9+
- [0.10 (master) Documentation](https://github.com/rails-api/active_model_serializers/tree/master/docs)
10+
- [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers/v0.10.0.rc4)
11+
- [Guides](docs)
12+
- [0.9 (0-9-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-9-stable)
13+
- [0.8 (0-8-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-8-stable)
1214

13-
- [Filing an issue](CONTRIBUTING.md#filing-an-issue)
14-
- [Writing code and comments](CONTRIBUTING.md#writing-code-and-comments)
15+
##### Check for an existing issue
1516

16-
### Filing an issue
17+
Take a look at the issues to see if a similar one has already been created. If
18+
one exists, please add any additional information that might expedite
19+
resolution.
1720

18-
Everyone is encouraged to open issues that are affecting them:
19-
bugs, ideas, documentation (`/docs`), performance problems – everything helps!
21+
#### Open an issue
2022

21-
#### Before
23+
If the documentation wasn't able to help resolve the issue and no issue already
24+
exists, please open a new issue with the following in mind:
2225

23-
1. Start by looking at our [GitHub Issues](https://github.com/rails-api/active_model_serializers/issues).
26+
- Please make sure only to include one issue per report. If you encounter
27+
multiple, unrelated issues, please report them as such.
28+
- Be detailed. Provide backtraces and example code when possible. Provide
29+
information about your environment. e.g., Ruby version, rails version, etc.
30+
- Own your issue. Actively participate in the discussion and help drive the
31+
issue to closure.
32+
- If you resolve your own issue, please share the details on the issue and close
33+
it out. Others might have the same issue and sharing solutions is helpful.
2434

25-
- Check if your issue has already been reported.
26-
- If you find an existing issue report, feel free to add further information to that report.
35+
## Contributing
2736

28-
#### Writing
37+
Contributing can be done in many ways and is not exclusive to code. If you have
38+
thoughts on a particular issue or feature, we encourage you to open new issues
39+
for discussion or add your comments to existing ones.
2940

30-
If possible, please include the following information when [reporting an
31-
issue](https://github.com/rails-api/active_model_serializers/issues/new):
41+
#### Pull requests
3242

33-
- ActiveModelSerializers version (0.8.x, 0.9.x, 0.10.x, commit ref).
34-
- What are you using ActiveModelSerializers with? Rails? Grape? Other? Which versions?
35-
- Operating system type + version.
36-
- Ruby version: `ruby -e "puts RUBY_DESCRIPTION"`.
37-
- Steps to reproduce the issue (i.e. "Show me how to show myself." ). What did you expect to happen? What happened? What did you try?
43+
We also gladly welcome pull requests. When preparing to work on pull request,
44+
please adhere to these standards:
3845

39-
Simon Tatham has written an excellent on article on
40-
[How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html)
41-
which is [well worth reading](http://yourbugreportneedsmore.info/), although it is not specific to ActiveModelSerializers.
46+
- Base work on the master branch unless fixing an issue with
47+
[0.9-stable](https://github.com/rails-api/active_model_serializers/tree/0-9-stable)
48+
or
49+
[0.8-stable](https://github.com/rails-api/active_model_serializers/tree/0-8-stable)
50+
- Squash your commits and regularly rebase off master.
51+
- Provide a description of the changes contained in the pull request.
52+
- Note any specific areas that should be reviewed.
53+
- Include tests.
54+
- The test suite must pass on [supported Ruby versions](.travis.yml)
55+
- Include updates to the [documentation](https://github.com/rails-api/active_model_serializers/tree/master/docs)
56+
where applicable.
57+
- Update the
58+
[CHANGELOG](https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md)
59+
to the appropriate sections with a brief description of the changes.
60+
- Do not change the VERSION file.
4261

43-
Thanks!
62+
#### Running tests
4463

45-
#### After
64+
Run all tests
4665

47-
Thanks to everyone involved!
66+
`$ rake test`
4867

49-
If you get help, sharing it back in the form of a pull-request or making an issue to document
50-
what you've found is *extremely* helpful.
68+
Run a single test suite
5169

52-
If you solve your issue, stop working on it, or realize the problem was something else,
53-
please share that in a comment to an issue and close it. That way, everyone can learn and
54-
we don't have closed issues without a clear resolution. Even if it's just a stackoverflow link :)
55-
And please don't forget to stay involved in the issue until it is closed! Thanks to all!
56-
57-
### Writing code and comments
58-
59-
- We are actively working to identify tasks under the label [**Good for New
60-
Contributors**](https://github.com/rails-api/active_model_serializers/labels/Good%20for%20New%20Contributors).
61-
- [Changelog
62-
Missing](https://github.com/rails-api/active_model_serializers/issues?q=label%3A%22Changelog+Missing%22+is%3Aclosed) is
63-
an easy way to help out.
64-
65-
- [Fix a bug](https://github.com/rails-api/active_model_serializers/labels/Ready%20for%20PR).
66-
- Ready for PR - A well defined bug, needs someone to PR a fix.
67-
- Bug - Anything that is broken.
68-
- Regression - A bug that did not exist in previous versions and isn't a new feature (applied in tandem with Bug).
69-
- Performance - A performance related issue. We could track this as a bug, but usually these would have slightly lower priority than standard bugs.
70-
71-
- [Develop new features](https://github.com/rails-api/active_model_serializers/labels/Feature).
72-
73-
- [Improve code quality](https://codeclimate.com/github/rails-api/active_model_serializers/code?sort=smell_count&sort_direction=desc).
74-
75-
- [Improve amount of code exercised by tests](https://codeclimate.com/github/rails-api/active_model_serializers/coverage?sort=covered_percent&sort_direction=asc).
76-
77-
- [Fix RuboCop (Style) TODOS](https://github.com/rails-api/active_model_serializers/blob/master/.rubocop_todo.yml).
78-
- Delete and offsense, run `rake rubocop` (or possibly `rake rubocop:auto_correct`),
79-
and [submit a PR](CONTRIBUTING.md#submitting-a-pull-request-pr).
80-
81-
- We are also encouraging comments to substantial changes (larger than bugfixes and simple features) under an
82-
"RFC" (Request for Comments) process before we start active development.
83-
Look for the [**RFC**](https://github.com/rails-api/active_model_serializers/labels/RFC) label.
84-
85-
#### Submitting a pull request (PR)
86-
87-
1. The vast majority of development is happening under the `master` branch.
88-
This is where we would suggest you start.
89-
1. Fixing bugs is extraordinarily helpful and requires the least familiarity with ActiveModelSerializers.
90-
Look for issues labeled [**Needs Bug Verification**](https://github.com/rails-api/active_model_serializers/labels/Needs%20Bug%20Verification) and [**Bug**](https://github.com/rails-api/active_model_serializers/labels/bug).
91-
1. Adding or fixing documentation is also fantastic!
92-
93-
To fetch & test the library for development, do:
94-
95-
1. Fork the repository ( https://github.com/rails-api/active_model_serializers/fork )
96-
1. `git clone https://github.com/{whoami}/active_model_serializers.git`
97-
1. `cd active_model_serializers`
98-
1. `bundle`
99-
- To test against a particular rails version-- 4.0 is usually the most buggy-- set then
100-
RAILS_VERSION environment variable as described in the [.travis.yml](.travis.yml).
101-
e.g. `export RAILS_VERSION=4.0`.
102-
1. Create your PR branch (`git checkout -b my-helpful-pr`)
103-
1. Write tests for your feature, or regression tests highlighting a bug.
104-
This is important so ActiveModelSerializers doesn't break it in a future version unintentionally.
105-
1. Write the feature itself, or fix your bug
106-
1. `bundle exec rake`
107-
1. Commit your changes (`git commit -am 'Add some feature'`)
108-
- Use well-described, small (atomic) commits.
109-
1. Push to the branch (`git push origin my-helpful-pr`)
110-
1. Create a new Pull Request
111-
- Include links to any relevant github issues.
112-
- *Don't* change the VERSION file.
113-
- Update `/docs` to include, whenever possible, a new, suitable recommendation about how to use
114-
the feature.
115-
- Extra Credit: [Confirm it runs and tests pass on the rubies specified in the travis
116-
config](.travis.yml). A maintainer will otherwise confirm it runs on these.
117-
118-
1. *Bonus Points* Update [CHANGELOG.md](https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md)
119-
with a brief description of any breaking changes, fixes, features, or
120-
miscellaneous changes under the proper version section.
121-
1. Iterate on feedback given by the community (fix syntax, modify bits of code, add
122-
tests), pushing the new commits to the PR each time
123-
124-
Remember to [squash your commits](CONTRIBUTING.md#about-pull-requests-prs) and rebase off `master`.
125-
126-
#### How maintainers handle pull requests:
127-
128-
- If the tests pass and the pull request looks good, a maintainer will merge it.
129-
- If the pull request needs to be changed,
130-
- you can change it by updating the branch you generated the pull request from
131-
- either by adding more commits, or
132-
- by force pushing to it
133-
- A maintainer can make any changes themselves and manually merge the code in.
134-
135-
#### Commit Messages
136-
137-
- [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
138-
- [http://stopwritingramblingcommitmessages.com/](http://stopwritingramblingcommitmessages.com/)
139-
- [ThoughtBot style guide](https://github.com/thoughtbot/guides/tree/master/style#git)
140-
141-
#### About Pull Requests (PR's)
70+
`$ rake test TEST=path/to/test.rb`
14271

143-
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
144-
- [Github pull requests made easy](http://www.element84.com/github-pull-requests-made-easy.html)
145-
- [Exercism Git Workflow](http://help.exercism.io/git-workflow.html).
146-
- [Level up your Git](http://rakeroutes.com/blog/deliberate-git/)
147-
- [All Your Open Source Code Are Belong To Us](http://www.benjaminfleischer.com/2013/07/30/all-your-open-source-code-are-belong-to-us/)
72+
Run a single test
14873

149-
## Issue Labeling
150-
151-
ActiveModelSerializers uses a subset of [StandardIssueLabels](https://github.com/wagenet/StandardIssueLabels) for Github Issues. You can [see our labels here](https://github.com/rails-api/active_model_serializers/labels).
152-
153-
## Running tests
74+
`$ rake test TEST=path/to/test.rb TESTOPTS="--name=test_something"`
15475

15576
Run tests against different Rails versions by setting the RAILS_VERSION variable
156-
and bundling gems. To test against all versions, you can do something like:
77+
and bundling gems.
15778

15879
```bash
15980
for version in 4.0 4.1 4.2 master; do
@@ -172,21 +93,3 @@ for version in 4.0 4.1 4.2 master; do
17293
done
17394
```
17495

175-
176-
### Running with Rake
177-
178-
The easiest way to run the unit tests is through Rake. The default task runs
179-
the entire test suite for all classes. For more information, checkout the
180-
full array of rake tasks with "rake -T"
181-
182-
Rake can be found at http://docs.seattlerb.org/rake/.
183-
184-
To run a single test suite
185-
186-
`$ rake test TEST=path/to/test.rb`
187-
188-
Which can be further narrowed down to one test:
189-
190-
`$ rake test TEST=path/to/test.rb TESTOPTS="--name=test_something"`
191-
192-
:heart: :sparkling_heart: :heart:

docs/STYLE.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# STYLE
2+
3+
## Code and comments
4+
5+
- We are actively working to identify tasks under the label [**Good for New
6+
Contributors**](https://github.com/rails-api/active_model_serializers/labels/Good%20for%20New%20Contributors).
7+
- [Changelog
8+
Missing](https://github.com/rails-api/active_model_serializers/issues?q=label%3A%22Changelog+Missing%22+is%3Aclosed) is
9+
an easy way to help out.
10+
11+
- [Fix a bug](https://github.com/rails-api/active_model_serializers/labels/Ready%20for%20PR).
12+
- Ready for PR - A well defined bug, needs someone to PR a fix.
13+
- Bug - Anything that is broken.
14+
- Regression - A bug that did not exist in previous versions and isn't a new feature (applied in tandem with Bug).
15+
- Performance - A performance related issue. We could track this as a bug, but usually these would have slightly lower priority than standard bugs.
16+
17+
- [Develop new features](https://github.com/rails-api/active_model_serializers/labels/Feature).
18+
19+
- [Improve code quality](https://codeclimate.com/github/rails-api/active_model_serializers/code?sort=smell_count&sort_direction=desc).
20+
21+
- [Improve amount of code exercised by tests](https://codeclimate.com/github/rails-api/active_model_serializers/coverage?sort=covered_percent&sort_direction=asc).
22+
23+
- [Fix RuboCop (Style) TODOS](https://github.com/rails-api/active_model_serializers/blob/master/.rubocop_todo.yml).
24+
- Delete and offsense, run `rake rubocop` (or possibly `rake rubocop:auto_correct`),
25+
and [submit a PR](CONTRIBUTING.md#submitting-a-pull-request-pr).
26+
27+
- We are also encouraging comments to substantial changes (larger than bugfixes and simple features) under an
28+
"RFC" (Request for Comments) process before we start active development.
29+
Look for the [**RFC**](https://github.com/rails-api/active_model_serializers/labels/RFC) label.
30+
31+
32+
## Pull requests
33+
34+
- If the tests pass and the pull request looks good, a maintainer will merge it.
35+
- If the pull request needs to be changed,
36+
- you can change it by updating the branch you generated the pull request from
37+
- either by adding more commits, or
38+
- by force pushing to it
39+
- A maintainer can make any changes themselves and manually merge the code in.
40+
41+
## Commit messages
42+
43+
- [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
44+
- [http://stopwritingramblingcommitmessages.com/](http://stopwritingramblingcommitmessages.com/)
45+
- [ThoughtBot style guide](https://github.com/thoughtbot/guides/tree/master/style#git)
46+
47+
#### About Pull Requests (PR's)
48+
49+
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
50+
- [Github pull requests made easy](http://www.element84.com/github-pull-requests-made-easy.html)
51+
- [Exercism Git Workflow](http://help.exercism.io/git-workflow.html).
52+
- [Level up your Git](http://rakeroutes.com/blog/deliberate-git/)
53+
- [All Your Open Source Code Are Belong To Us](http://www.benjaminfleischer.com/2013/07/30/all-your-open-source-code-are-belong-to-us/)
54+
55+
## Issue Labeling
56+
57+
ActiveModelSerializers uses a subset of [StandardIssueLabels](https://github.com/wagenet/StandardIssueLabels) for Github Issues. You can [see our labels here](https://github.com/rails-api/active_model_serializers/labels).
58+

0 commit comments

Comments
 (0)