Skip to content

Commit a22ca7c

Browse files
committed
Added contributing and releasing, updated changelog.
1 parent 28a026b commit a22ca7c

File tree

3 files changed

+206
-1
lines changed

3 files changed

+206
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Next Release
22
============
3+
4+
* Your contribution here.
5+
6+
0.4.0 (2014-01-27)
7+
==================
8+
39
* Ruby 1.8.x is no longer supported - [@dblock](https://github.com/dblock).
410
* [#36](https://github.com/intridea/grape-entity/pull/36): Enforcing Ruby style guidelines via Rubocop - [@dblock](https://github.com/dblock).
511
* [#7](https://github.com/intridea/grape-entity/issues/7): Added `serializable` option to `represent` - [@mbleigh](https://github.com/mbleigh).
@@ -14,7 +20,6 @@ Next Release
1420
* [#46](https://github.com/intridea/grape-entity/issues/46), [#50](https://github.com/intridea/grape-entity/pull/50): Added support for specifying the presenter class in `using` in string format - [@larryzhao](https://github.com/larryzhao).
1521
* [#51](https://github.com/intridea/grape-entity/pull/51): Raise `ArgumentError` if an unknown option is used with `expose` - [@aj0strow](https://github.com/aj0strow).
1622
* [#51](https://github.com/intridea/grape-entity/pull/51): Alias `:with` to `:using`, consistently with the Grape api endpoints - [@aj0strow](https://github.com/aj0strow).
17-
* Your contribution here.
1823

1924
0.3.0 (2013-03-29)
2025
==================

CONTRIBUTING.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
Contributing to Grape-Entity
2+
============================
3+
4+
Grape-Entity is work of [many of contributors](https://github.com/intridea/grape-entity/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/intridea/grape-entity/pulls), [propose features and discuss issues](https://github.com/intridea/grape-entity/issues). When in doubt, ask a question in the [Grape Google Group](http://groups.google.com/group/ruby-grape).
5+
6+
#### Fork the Project
7+
8+
Fork the [project on Github](https://github.com/intridea/grape-entity) and check out your copy.
9+
10+
```
11+
git clone https://github.com/contributor/grape-entity.git
12+
cd grape-entity
13+
git remote add upstream https://github.com/intridea/grape-entity.git
14+
```
15+
16+
#### Create a Topic Branch
17+
18+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
19+
20+
```
21+
git checkout master
22+
git pull upstream master
23+
git checkout -b my-feature-branch
24+
```
25+
26+
#### Bundle Install and Test
27+
28+
Ensure that you can build the project and run tests.
29+
30+
```
31+
bundle install
32+
bundle exec rake
33+
```
34+
35+
#### Write Tests
36+
37+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [spec/grape-entity](spec/grape-entity).
38+
39+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
40+
41+
#### Write Code
42+
43+
Implement your feature or bug fix.
44+
45+
Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop), run `bundle exec rubocop` and fix any style issues highlighted.
46+
47+
Make sure that `bundle exec rake` completes without errors.
48+
49+
#### Write Documentation
50+
51+
Document any external behavior in the [README](README.md).
52+
53+
#### Update Changelog
54+
55+
Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*. Make it look like every other line, including your name and link to your Github account.
56+
57+
#### Commit Changes
58+
59+
Make sure git knows your name and email address:
60+
61+
```
62+
git config --global user.name "Your Name"
63+
git config --global user.email "[email protected]"
64+
```
65+
66+
Writing good commit logs is important. A commit log should describe what changed and why.
67+
68+
```
69+
git add ...
70+
git commit
71+
```
72+
73+
#### Push
74+
75+
```
76+
git push origin my-feature-branch
77+
```
78+
79+
#### Make a Pull Request
80+
81+
Go to https://github.com/contributor/grape-entity and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
82+
83+
#### Rebase
84+
85+
If you've been working on a change for a while, rebase with upstream/master.
86+
87+
```
88+
git fetch upstream
89+
git rebase upstream/master
90+
git push origin my-feature-branch -f
91+
```
92+
93+
#### Update CHANGELOG Again
94+
95+
Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
96+
97+
```
98+
* [#123](https://github.com/intridea/grape-entity/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
99+
```
100+
101+
Amend your previous commit and force push the changes.
102+
103+
```
104+
git commit --amend
105+
git push origin my-feature-branch -f
106+
```
107+
108+
#### Check on Your Pull Request
109+
110+
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
111+
112+
#### Be Patient
113+
114+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
115+
116+
#### Thank You
117+
118+
Please do know that we really appreciate and value your time and work. We love you, really.

RELEASING.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Releasing Grape-Entity
2+
======================
3+
4+
There're no particular rules about when to release grape-entity. Release bug fixes frequenty, features not so frequently and breaking API changes rarely.
5+
6+
### Release
7+
8+
Run tests, check that all tests succeed locally.
9+
10+
```
11+
bundle install
12+
rake
13+
```
14+
15+
Check that the last build succeeded in [Travis CI](https://travis-ci.org/intridea/grape-entity) for all supported platforms.
16+
17+
Increment the version, modify [lib/grape-entity/version.rb](lib/grape-entity/version.rb).
18+
19+
* Increment the third number if the release has bug fixes and/or very minor features, only (eg. change `0.5.1` to `0.5.2`).
20+
* Increment the second number if the release contains major features or breaking API changes (eg. change `0.5.1` to `0.4.0`).
21+
22+
Change "Next Release" in [CHANGELOG.md](CHANGELOG.md) to the new version.
23+
24+
```
25+
0.4.0 (2014-01-27)
26+
==================
27+
```
28+
29+
Remove the line with "Your contribution here.", since there will be no more contributions to this release.
30+
31+
Commit your changes.
32+
33+
```
34+
git add README.md CHANGELOG.md lib/grape-entity/version.rb
35+
git commit -m "Preparing for release, 0.4.0."
36+
git push origin master
37+
```
38+
39+
Release.
40+
41+
```
42+
$ rake release
43+
44+
grape-entity 0.4.0 built to pkg/grape-entity-0.4.0.gem.
45+
Tagged v0.4.0.
46+
Pushed git commits and tags.
47+
Pushed grape-entity 0.4.0 to rubygems.org.
48+
```
49+
50+
### Prepare for the Next Version
51+
52+
Add the next release to [CHANGELOG.md](CHANGELOG.md).
53+
54+
```
55+
Next Release
56+
============
57+
58+
* Your contribution here.
59+
```
60+
61+
Comit your changes.
62+
63+
```
64+
git add CHANGELOG.md README.md
65+
git commit -m "Preparing for next release."
66+
git push origin master
67+
```
68+
69+
### Make an Announcement
70+
71+
Make an announcement on the [[email protected]](mailto:[email protected]) mailing list. The general format is as follows.
72+
73+
```
74+
Grape-entity 0.4.0 has been released.
75+
76+
There were 8 contributors to this release, not counting documentation.
77+
78+
Please note the breaking API change in ...
79+
80+
[copy/paste CHANGELOG here]
81+
82+
```

0 commit comments

Comments
 (0)