Skip to content

Commit fce856f

Browse files
committed
Merge pull request #1371 from bf4/documentation_updates
[DOCS] Refactor, update, create documentation
2 parents 30fd9d9 + 13c9a90 commit fce856f

26 files changed

+727
-464
lines changed

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Breaking changes:
77
- [#1131](https://github.com/rails-api/active_model_serializers/pull/1131) Remove Serializer#root_name (@beauby)
88
- [#1138](https://github.com/rails-api/active_model_serializers/pull/1138) Introduce Adapter::Base (@bf4)
99
* Adapters now inherit Adapter::Base. 'Adapter' is now a module, no longer a class.
10-
* using a class as a namespace that you also inherit from is complicated and circular at time i.e.
10+
* using a class as a namespace that you also inherit from is complicated and circular at times i.e.
1111
buggy (see https://github.com/rails-api/active_model_serializers/pull/1177)
1212
* The class methods on Adapter aren't necessarily related to the instance methods, they're more
13-
Adapter functions
14-
* named `Base` because it's a Rails-ism
15-
* It helps to isolate and highlight what the Adapter interface actually is
13+
Adapter functions.
14+
* named `Base` because it's a Rails-ism.
15+
* It helps to isolate and highlight what the Adapter interface actually is.
1616

1717
Features:
1818

@@ -48,6 +48,7 @@ Misc:
4848
- [#1168](https://github.com/rails-api/active_model_serializers/pull/1168) Fix appveyor failure cache not being expired (@bf4)
4949
- [#1161](https://github.com/rails-api/active_model_serializers/pull/1161) Remove duplicate test helper (@bf4)
5050
- [#1360](https://github.com/rails-api/active_model_serializers/pull/1360) Update CI to test 2.2.2 -> 2.2.3 (@karaAJC)
51+
- [#1371](https://github.com/rails-api/active_model_serializers/pull/1371) Refactor, update, create documentation (@bf4)
5152

5253
### v0.10.0.rc3 (2015/09/16 15:19 +00:00)
5354
- [#1129](https://github.com/rails-api/active_model_serializers/pull/1129) Remove SerializableResource.serialize in favor of `.new` (@bf4)

CONTRIBUTING.md

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ http://www.commitstrip.com/en/2014/05/07/the-truth-behind-open-source-apps/](doc
88

99
## How can I help?
1010

11+
- [Filing an issue](CONTRIBUTING.md#filing-an-issue)
12+
- [Writing code and comments](CONTRIBUTING#writing-code-and-comments)
13+
1114
### Filing an issue
1215

1316
Everyone is encouraged to open issues that are affecting them:
@@ -20,7 +23,6 @@ bugs, ideas, documentation (`/docs`), performance problems – everything helps!
2023
- Check if your issue has already been reported.
2124
- If you find an existing issue report, feel free to add further information to that report.
2225

23-
2426
#### Writing
2527

2628
If possible, please include the following information when [reporting an
@@ -82,22 +84,27 @@ And please don't forget to stay involved in the issue until it is closed! Thanks
8284

8385
- We are actively working to identify tasks under the label [**Good for New
8486
Contributors**](https://github.com/rails-api/active_model_serializers/labels/Good%20for%20New%20Contributors).
85-
Some bugs are expressly not good for new contributors, so don't expect 100% overlap between the two.
8687
- [Changelog
8788
Missing](https://github.com/rails-api/active_model_serializers/issues?q=label%3A%22Changelog+Missing%22+is%3Aclosed) is
8889
an easy way to help out.
8990

90-
- If you want to work on new feature development, look for the label [**Feature**](https://github.com/rails-api/active_model_serializers/labels/Feature).
91+
- [Fix a bug](https://github.com/rails-api/active_model_serializers/labels/Ready%20for%20PR).
92+
- Ready for PR - A well defined bug, needs someone to PR a fix.
93+
- Bug - Anything that is broken.
94+
- Regression - A bug that did not exist in previous versions and isn't a new feature (applied in tandem with Bug).
95+
- Performance - A performance related issue. We could track this as a bug, but usually these would have slightly lower priority than standard bugs.
96+
97+
- [Develop new features](https://github.com/rails-api/active_model_serializers/labels/Feature).
98+
99+
- [Improve code quality](https://codeclimate.com/github/rails-api/active_model_serializers/code?sort=smell_count&sort_direction=desc).
100+
101+
- [Improve amount of code exercised by tests](https://codeclimate.com/github/rails-api/active_model_serializers/coverage?sort=covered_percent&sort_direction=asc).
91102

92103
- We are also encouraging comments to substantial changes (larger than bugfixes and simple features) under an
93104
"RFC" (Request for Comments) process before we start active development.
94105
Look for the [**RFC**](https://github.com/rails-api/active_model_serializers/labels/RFC) label.
95106

96-
## Issue Labeling
97-
98-
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).
99-
100-
## Submitting a pull request (PR)
107+
#### Submitting a pull request (PR)
101108

102109
1. The vast majority of development is happening under the `master` branch.
103110
This is where we would suggest you start.
@@ -147,23 +154,48 @@ Remember to [squash your commits](CONTRIBUTING.md#about-pull-requests-prs) and r
147154
- by force pushing to it
148155
- A maintainer can make any changes themselves and manually merge the code in.
149156

150-
### Commit Messages
157+
#### Commit Messages
151158

152159
- [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
153160
- [http://stopwritingramblingcommitmessages.com/](http://stopwritingramblingcommitmessages.com/)
154161
- [ThoughtBot style guide](https://github.com/thoughtbot/guides/tree/master/style#git)
155162

156-
### About Pull Requests (PR's)
163+
#### About Pull Requests (PR's)
157164

158165
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
159166
- [Github pull requests made easy](http://www.element84.com/github-pull-requests-made-easy.html)
160167
- [Exercism Git Workflow](http://help.exercism.io/git-workflow.html).
161168
- [Level up your Git](http://rakeroutes.com/blog/deliberate-git/)
162169
- [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/)
163170

164-
### Running tests
171+
## Issue Labeling
172+
173+
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).
165174

166-
#### Running with Rake
175+
## Running tests
176+
177+
Run tests against different Rails versions by setting the RAILS_VERSION variable
178+
and bundling gems. To test against all versions, you can do something like:
179+
180+
```bash
181+
for version in 4.0 4.1 4.2 master; do
182+
export RAILS_VERSION="$version"
183+
rm -f Gemfile.lock
184+
bundle check || bundle --local || bundle
185+
bundle exec rake test
186+
if [ "$?" -eq 0 ]; then
187+
# green in ANSI
188+
echo -e "\033[32m **** Tests passed against Rails ${RAILS_VERSION} **** \033[0m"
189+
else
190+
# red in ANSI
191+
echo -e "\033[31m **** Tests failed against Rails ${RAILS_VERSION} **** \033[0m"
192+
fi
193+
unset RAILS_VERSION
194+
done
195+
```
196+
197+
198+
### Running with Rake
167199

168200
The easiest way to run the unit tests is through Rake. The default task runs
169201
the entire test suite for all classes. For more information, checkout the

0 commit comments

Comments
 (0)