|
| 1 | + |
| 3 | + |
| 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 | + |
1 | 9 | ## How can I help?
|
2 | 10 |
|
3 |
| -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 them: |
| 14 | +bugs, ideas, documentation (`/docs`), performance problems – everything helps! |
| 15 | + |
| 16 | +#### Before |
| 17 | + |
| 18 | +1. Start by looking at our [GitHub Issues](https://github.com/rails-api/active_model_serializers/issues). |
| 19 | + |
| 20 | + - Check if your issue has already been 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 whether 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. Even better if it's a PR. |
| 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. |
4 | 58 |
|
5 |
| -The first place to start is by looking at our [GitHub Issues](https://github.com/rails-api/active_model_serializers/issues). |
| 59 | +1. What have you tried? |
6 | 60 |
|
7 |
| -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. |
| 61 | +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.) |
8 | 62 |
|
9 |
| -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). |
| 63 | +This is extremely important for narrowing down the cause of your problem. |
10 | 64 |
|
11 |
| -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. |
| 65 | +Thanks! |
12 | 66 |
|
13 |
| -If you want to work on new feature development, look for the label [**Feature**](https://github.com/rails-api/active_model_serializers/labels/Feature). |
| 67 | +Sometimes an issue will be closed by a maintainer for various reasons. In some cases, this is |
| 68 | +an invitation to make a better case for your issue or be able to reproduce a bug, and |
| 69 | +its being close is just an opportunity to help out some more, and then re-open. |
14 | 70 |
|
15 |
| -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. |
| 71 | +#### After |
| 72 | + |
| 73 | +Thanks to everyone involved! |
| 74 | + |
| 75 | +If you get help, sharing it back in the form of a pull-request or making an issue to document |
| 76 | +what you've found is *extremely* helpful. |
| 77 | + |
| 78 | +If you solve your issue, stop working on it, or realize the problem was something else, |
| 79 | +please share that in a comment to an issue and close it. That way, everyone can learn and |
| 80 | +we don't have closed issues without a clear resolution. Even if it's just a stackoverflow link :) |
| 81 | +And please don't forget to stay involved in the issue until it is closed! Thanks to all! |
| 82 | + |
| 83 | +### Writing code and comments |
| 84 | + |
| 85 | +- We are actively working to identify tasks under the label [**Good for New |
| 86 | + Contributors**](https://github.com/rails-api/active_model_serializers/labels/Good%20for%20New%20Contributors). |
| 87 | + Some bugs are expressly not good for new contributors, so don't expect 100% overlap between the two. |
| 88 | + - [Changelog |
| 89 | + Missing](https://github.com/rails-api/active_model_serializers/issues?q=label%3A%22Changelog+Missing%22+is%3Aclosed) is |
| 90 | + an easy way to help out. |
| 91 | + |
| 92 | +- If you want to work on new feature development, look for the label [**Feature**](https://github.com/rails-api/active_model_serializers/labels/Feature). |
| 93 | + |
| 94 | +- We are also encouraging comments to substantial changes (larger than bugfixes and simple features) under an |
| 95 | + "RFC" (Request for Comments) process before we start active development. |
| 96 | + Look for the [**RFC**](https://github.com/rails-api/active_model_serializers/labels/RFC) label. |
16 | 97 |
|
17 | 98 | ## Issue Labeling
|
18 | 99 |
|
19 |
| -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). |
20 |
| - |
21 |
| -## Contributing |
22 |
| - |
23 |
| -1. Fork it ( https://github.com/rails-api/active_model_serializers/fork ) |
24 |
| -2. Create your feature branch (`git checkout -b my-new-feature`) |
25 |
| -3. Write tests for your feature, or regression tests highlighting a bug |
26 |
| -4. Write the feature itself, or fix your bug |
27 |
| -5. Commit your changes (`git commit -am 'Add some feature'`) |
28 |
| -6. Push to the branch (`git push origin my-new-feature`) |
29 |
| -7. Create a new Pull Request |
30 |
| -8. Update [CHANGELOG.md](https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md) |
31 |
| -with a brief description of any breaking changes, fixes, features, or |
32 |
| -miscellaneous changes under the proper version section. |
33 |
| -9. Iterate on feedback given by the community (fix syntax, modify bits of code, add |
| 100 | +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). |
| 101 | + |
| 102 | +## Submitting a pull request (PR) |
| 103 | + |
| 104 | +1. The vast majority of development is happening under the `master` branch. |
| 105 | + This is where we would suggest you start. |
| 106 | +1. Fixing bugs is extraordinarily helpful and requires the least familiarity with ActiveModelSerializers. |
| 107 | + 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). |
| 108 | +1. Adding or fixing documentation is also fantastic! |
| 109 | + |
| 110 | +To fetch & test the library for development, do: |
| 111 | + |
| 112 | +1. Fork the repository ( https://github.com/rails-api/active_model_serializers/fork ) |
| 113 | +1. `git clone https://github.com/{whoami}/active_model_serializers.git` |
| 114 | +1. `cd active_model_serializers` |
| 115 | +1. `bundle` |
| 116 | + - To test against a particular rails version, 4.0 is usually the most buggy, set then |
| 117 | + RAILS_VERSION environment variable as described in the [.travis.yml](.travis.yml). |
| 118 | + e.g. `export RAILS_VERSION=4.0`. |
| 119 | +1. Create your PR branch (`git checkout -b my-helpful-pr`) |
| 120 | +1. Write tests for your feature, or regression tests highlighting a bug. |
| 121 | + This is important so ActiveModelSerializers doesn't break it in a future version unintentionally. |
| 122 | +1. Write the feature itself, or fix your bug |
| 123 | +1. `bundle exec rake` |
| 124 | +1. Commit your changes (`git commit -am 'Add some feature'`) |
| 125 | + - Use well-described, small (atomic) commits. |
| 126 | +1. Push to the branch (`git push origin my-helpful-pr`) |
| 127 | +1. Create a new Pull Request |
| 128 | + - Include links to any relevant github issues. |
| 129 | + - *Don't* change the VERSION file. |
| 130 | + - Update `/docs` to include, whenever possible, a new, suitable recommendation about how to use |
| 131 | + the feature. |
| 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 |
34 | 139 | tests), pushing the new commits to the PR each time
|
35 | 140 |
|
36 |
| -Remember to squash your commits and rebase off `master`. |
| 141 | +Remember to [squash your commits](CONTRIBUTING.md#about-pull-requests-prs) 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/) |
37 | 165 |
|
38 | 166 | ### Running tests
|
39 | 167 |
|
|
0 commit comments