Skip to content

Commit 285dd6d

Browse files
committed
Add more info to CONTRIBUTING [ci skip]
1 parent 200625f commit 285dd6d

File tree

1 file changed

+148
-23
lines changed

1 file changed

+148
-23
lines changed

CONTRIBUTING.md

Lines changed: 148 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,167 @@
11
![Commit Strip
22
http://www.commitstrip.com/en/2014/05/07/the-truth-behind-open-source-apps/](docs/how-open-source-maintained.jpg)
33

4+
## Common issues and resolutions
5+
6+
- Using `grape-active_model_serializers`, or any non-Rails server. See
7+
[issue](https://github.com/rails-api/active_model_serializers/issues/1258).
8+
49
## How can I help?
510

6-
Everyone is encouraged to open issues that are affecting you: bugs, ideas, performance problems – everything helps!
11+
### Filing an issue
12+
13+
Everyone is encouraged to open issues that are affecting you:
14+
bugs, ideas, documentation, performance problems – everything helps!
15+
16+
#### Before
17+
18+
1. The first place to start is by looking at our [GitHub Issues](https://github.com/rails-api/active_model_serializers/issues).
19+
20+
- Check if your issue has already reported.
21+
- If you find an existing issue report, feel free to add further information to that report.
22+
23+
24+
#### Writing
25+
26+
If possible, please include the following information when [reporting an
27+
issue](https://github.com/rails-api/active_model_serializers/issues/new):
28+
29+
- ActiveModelSerializers version (0.8.x, 0.9.x, 0.10.x, commit ref).
30+
- What are you using ActiveModelSerializers with? Rails? Grape? Other? Which versions?
31+
- If you are not running the latest version (please check), and you cannot update it,
32+
please specify in your report why you can't update to the latest version.
33+
- Operating system type + version
34+
- Ruby version with patch level. And if you're using rvm, rbenv, etc.
35+
- Include your ruby -e "puts RUBY_DESCRIPTION".
36+
- Clearly-written steps to reproduce the issue (i.e. "Show me how to show myself." ), including:
37+
- What were you doing? Include code if possible.
38+
- Command line parameters used, if any.
39+
- RubyGems code in your Gemfile, if any. Gemfile.lock, if possible
40+
- Any configuration you've made
41+
- What did you expect to happen?
42+
- What happened? Include as much information as possible.
43+
- Nature of reported defect (e.g. user name missing, not "It doesn't work."). Is it intermittent?
44+
- The best help here is a failing test.
45+
- Then the steps to reproduce and/or a gist or repository that demonstrates the defect.
46+
- Then examples of the code you were using.
47+
- Any error messages (including stacktrace, i.e. ""Show me the error.")
48+
- Things you've tried.
49+
- A pull request for your fix would be great. Code should have tests.
50+
- Link to source code, if available
51+
52+
Please make sure only to include one issue per report.
53+
If you encounter multiple, unrelated issues, please report them as such.
54+
55+
Simon Tatham has written an excellent on article on
56+
[How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html)
57+
which is well worth reading, although it is not specific to ActiveModelSerializers.
58+
59+
760

8-
The first place to start is by looking at our [GitHub Issues](https://github.com/rails-api/active_model_serializers/issues).
61+
1. What have you tried?
962

10-
The vast majority of development is happening under the `master` branch, currently slated for release as `0.10.x`. This is where we would suggest you start.
63+
Include as much sample code as you can to help us reproduce the issue. (Inline, repo link, or gist, are fine. A failing test would help the most.)
1164

12-
Fixing bugs is extraordinarily helpful and requires the least familiarity with AMS. 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).
65+
This is extremely important for narrowing down the cause of your problem.
1366

14-
We are also actively working to identify tasks under the label [**Good for New Contributors**](https://github.com/rails-api/active_model_serializers/labels/Good%20for%20New%20Contributors). Some bugs are expressly not good for new contributors, so don't expect 100% overlap between the two.
67+
Thanks!
1568

16-
If you want to work on new feature development, look for the label [**Feature**](https://github.com/rails-api/active_model_serializers/labels/Feature).
69+
Sometimes an issue will be closed by a maintainer for various reasons. In some cases, this is
70+
an invitation to make a better case for your issue or be able to reproduce a bug, and
71+
its being close is just an opportunity to help out some more, and then re-open.
1772

18-
We are also encouraging comments to substantial changes (larger than bugfixes and simple features) under an "RFC" (Request for Comments) process before we start active development. Look for the [**RFC**](https://github.com/rails-api/active_model_serializers/labels/RFC) label.
73+
#### After
74+
75+
Thanks to everyone involved!
76+
77+
If you get help, sharing it back in the form of a pull-request or making an issue to document
78+
what you've found is *extremely* helpful.
79+
80+
If you solve your issue, stop working on it, or realize the problem was something else,
81+
please share that in a comment to an issue and close it. That way, everyone can learn and
82+
we don't have closing issues without a clear resolution. Even if it's just a stackoverflow link :)
83+
And please don't forget to stay involved in the issue until it is closed! Thanks to all!
84+
85+
### Writing code and comments
86+
87+
- We are actively working to identify tasks under the label [**Good for New
88+
Contributors**](https://github.com/rails-api/active_model_serializers/labels/Good%20for%20New%20Contributors).
89+
Some bugs are expressly not good for new contributors, so don't expect 100% overlap between the two.
90+
- [Changelog
91+
Missing](https://github.com/rails-api/active_model_serializers/issues?q=label%3A%22Changelog+Missing%22+is%3Aclosed) is
92+
an easy way to help out.
93+
94+
- If you want to work on new feature development, look for the label [**Feature**](https://github.com/rails-api/active_model_serializers/labels/Feature).
95+
96+
- We are also encouraging comments to substantial changes (larger than bugfixes and simple features) under an
97+
"RFC" (Request for Comments) process before we start active development.
98+
Look for the [**RFC**](https://github.com/rails-api/active_model_serializers/labels/RFC) label.
1999

20100
## Issue Labeling
21101

22-
AMS 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).
23-
24-
## Contributing
25-
26-
1. Fork it ( https://github.com/rails-api/active_model_serializers/fork )
27-
2. Create your feature branch (`git checkout -b my-new-feature`)
28-
3. Write tests for your feature, or regression tests highlighting a bug
29-
4. Write the feature itself, or fix your bug
30-
5. Commit your changes (`git commit -am 'Add some feature'`)
31-
6. Push to the branch (`git push origin my-new-feature`)
32-
7. Create a new Pull Request
33-
8. Update [CHANGELOG.md](https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md)
34-
with a brief description of any breaking changes, fixes, features, or
35-
miscellaneous changes under the proper version section.
36-
9. Iterate on feedback given by the community (fix syntax, modify bits of code, add
102+
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).
103+
104+
## Submitting a pull request (PR)
105+
106+
1. The vast majority of development is happening under the `master` branch, currently slated for release as `0.10.x`.
107+
This is where we would suggest you start.
108+
1. Fixing bugs is extraordinarily helpful and requires the least familiarity with ActiveModelSerializer.
109+
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).
110+
1. Adding or fixing documentation is also fantastic!
111+
112+
To fetch & test the library for development, do:
113+
114+
1. Fork the repository ( https://github.com/rails-api/active_model_serializers/fork )
115+
1. `git clone https://github.com/{whoami}/active_model_serializers.git`
116+
1. `cd active_model_serializers`
117+
1. `bundle`
118+
- To test against a particular rails version, 4.0 is usually the most buggy, set then
119+
RAILS_VERSION environment variable as described in the [.travis.yml](.travis.yml).
120+
e.g. `export RAILS_VERSION=4.0`.
121+
1. Create your PR branch (`git checkout -b my-helpful-pr`)
122+
1. Write tests for your feature, or regression tests highlighting a bug.
123+
This is important so AcitveModel Serializers doesn't break it in a future version unintentionally.
124+
1. Write the feature itself, or fix your bug
125+
1. `bundle exec rake`
126+
1. Commit your changes (`git commit -am 'Add some feature'`)
127+
- Use well-described, small (atomic) commits.
128+
1. Push to the branch (`git push origin my-helpful-pr`)
129+
1. Create a new Pull Request
130+
- Include links to any relevant github issues.
131+
- *Don't* change the VERSION file.
132+
- Extra Credit: [Confirm it runs and tests pass on the rubies specified in the travis
133+
config](.travis.yml). A maintainer will otherwise confirm it runs on these.
134+
135+
1. *Bonus Points** Update [CHANGELOG.md](https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md)
136+
with a brief description of any breaking changes, fixes, features, or
137+
miscellaneous changes under the proper version section.
138+
1. Iterate on feedback given by the community (fix syntax, modify bits of code, add
37139
tests), pushing the new commits to the PR each time
38140

39-
Remember to squash your commits and rebase off `master`.
141+
Remember to [squash your commits] and rebase off `master`.
142+
143+
#### How maintainers handle pull requests:
144+
145+
- If the tests pass and the pull request looks good, a maintainer will merge it.
146+
- If the pull request needs to be changed,
147+
- you can change it by updating the branch you generated the pull request from
148+
- either by adding more commits, or
149+
- by force pushing to it
150+
- A maintainer can make any changes themselves and manually merge the code in.
151+
152+
### Commit Messages
153+
154+
- [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
155+
- [http://stopwritingramblingcommitmessages.com/](http://stopwritingramblingcommitmessages.com/)
156+
- [ThoughtBot style guide](https://github.com/thoughtbot/guides/tree/master/style#git)
157+
158+
### About Pull Requests (PR's)
159+
160+
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
161+
- [Github pull requests made easy](http://www.element84.com/github-pull-requests-made-easy.html)
162+
- [Exercism Git Workflow](http://help.exercism.io/git-workflow.html).
163+
- [Level up your Git](http://rakeroutes.com/blog/deliberate-git/)
164+
- [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/)
40165

41166
### Running tests
42167

0 commit comments

Comments
 (0)