Skip to content

Contributing to Restfulie Rails

guilhermesilveira edited this page Feb 6, 2011 · 1 revision

Making Your Changes

The first thing you need to do is obtain a clone of the rails repository

$ git clone git://github.com/caelum/restfulie.git
$ cd restfulie
Then you need to create your new branch:
$ git checkout -b my-contribution
Switched to a new branch "my-contribution"

Now you’re ready to get hacking. Be sure to include tests which demonstrate the bug you’re fixing, and fully exercise any new features you’re adding. You should also take care to make sure the documentation is updated if you’re changing the API. This includes updating API docs and guides. Once you’ve finished making your changes, open a ticket in the "Restfulie Lighthouse:http://restfulie.lighthouseapp.com describing the changes you’ve made.

Next, commit your changes, making sure to add the proper ticket update keyword so that when your patch is merged, the lighthouse ticket is updated.

Let’s pretend our ticket number for doing “my-contribution” is #1337. We’ll commit to the local branch like this:

$ git commit -a -m "I did my-contribution by supporting a new media type, opensearch [#1337 state:resolved]"
Created commit 29f8baa: I did my-contribution by supporting a new media type, opensearch
 1 files changed, 0 insertions(+), 1 deletions(-)

Send an email to restfulie-dev mailing list or send us a pull request through github.

Congratulations and Thank You!

Once your changes have been applied, you’ve officially become part of the large community of independent contributors working to improve ruby on rails.

(this description was partially taken from rails default process)

Applying patches

(for commiters)

Create a remote branch and pull the requested branch into it. Remember to do no fast forward when merging to master:

git config branch.master.mergeoptions  "--no-ff"

git checkout -b CODE-description
git remote add contributor_name uri_to_new_remote_origin
git pull contributor_name master
# check if his branch is working as expected
rake

Pushing content

Prior to pushing an update to the master branch, run it against all tests and check the project is running against our full examples.
If you are commiting a new feature which is not small, remember to add a full test case on those full examples.

Remember to enroll to the restfulie-ruby-ci mailing list prior to pushing. Any build failure will be sent to this list.

  1. push remote branch
    git push origin CODE-description

git checkout master
git merge CODE-description

  1. check if its working as expected
    rake
  1. push the merge
    git push origin master

Do not remove the remote branch until a new Restfulie release is done.