Improved documentation for `Rack::Builder`.
[rack.git] / CONTRIBUTING.md
blobb0bf9ab69043ec91ba284fbaf13b116b4f470777
1 Contributing to Rack
2 =====================
4 Rack is work of [hundreds of contributors](https://github.com/rack/rack/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rack/rack/pulls), [propose features and discuss issues](https://github.com/rack/rack/issues). When in doubt, post to the [rack-devel](http://groups.google.com/group/rack-devel) mailing list.
6 #### Fork the Project
8 Fork the [project on GitHub](https://github.com/rack/rack) and check out your copy.
10 ```
11 git clone https://github.com/contributor/rack.git
12 cd rack
13 git remote add upstream https://github.com/rack/rack.git
14 ```
16 #### Create a Topic Branch
18 Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
20 ```
21 git checkout master
22 git pull upstream master
23 git checkout -b my-feature-branch
24 ```
26 #### Bundle Install and Quick Test
28 Ensure that you can build the project and run quick tests.
30 ```
31 bundle install --without extra
32 bundle exec rake test
33 ```
35 #### Running All Tests
37 Install all dependencies.
39 ```
40 bundle install
41 ```
43 Run all tests.
45 ```
46 rake test
47 ```
49 The test suite has no dependencies outside of the core Ruby installation and bacon.
51 Some tests will be skipped if a dependency is not found.
53 To run the test suite completely, you need:
55   * fcgi
56   * dalli
57   * thin
59 To test Memcache sessions, you need memcached (will be run on port 11211) and dalli installed.
61 #### Write Tests
63 Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
65 We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
67 #### Write Code
69 Implement your feature or bug fix.
71 Make sure that all tests pass:
73 ```
74 bundle exec rake test
75 ```
77 #### Write Documentation
79 Document any external behavior in the [README](README.rdoc).
81 #### Update Changelog
83 Add a line to [CHANGELOG](CHANGELOG.md).
85 #### Commit Changes
87 Make sure git knows your name and email address:
89 ```
90 git config --global user.name "Your Name"
91 git config --global user.email "contributor@example.com"
92 ```
94 Writing good commit logs is important. A commit log should describe what changed and why.
96 ```
97 git add ...
98 git commit
99 ```
101 #### Push
104 git push origin my-feature-branch
107 #### Make a Pull Request
109 Go to https://github.com/contributor/rack and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
111 #### Rebase
113 If you've been working on a change for a while, rebase with upstream/master.
116 git fetch upstream
117 git rebase upstream/master
118 git push origin my-feature-branch -f
121 #### Make Required Changes
123 Amend your previous commit and force push the changes.
126 git commit --amend
127 git push origin my-feature-branch -f
130 #### Check on Your Pull Request
132 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.
134 #### Be Patient
136 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!
138 #### Thank You
140 Please do know that we really appreciate and value your time and work. We love you, really.