Find file
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (40 sloc) 2.54 KB
== Guide to Hacking Gitorious
=== Dependencies
Ruby libraries/bindings/gems
* BlueCloth (
* mime-types (
* oniguruma (
* textpow (
* chronic (
* rmagick (
* Git (
* Oniguruma C library (
* Sphinx (
(App is deployed on mysql, allthough source should be free of mysql-isms/quirks)
=== The Hackers digest guide:
1. Do the normal rails app stuff (database.yml etc.)
2. Rename the config/gitorious.sample.yml file to gitorious.yml, and update it with your changes.
3a. If you want real project data, find a project, set the 'ready' status to true, create a bare git repository (git --bare init) in the directory GitoriousConfig['repository_base_path']/#{project.slug}/#{}.git, and push something to that repository (cd to a git repository with commits and do "git push path/to/the/bare/repository/you/just/created master").
3b. OR run the script/task_performer and let it create the repository for you (remember to do step 2 first)
4. Get your git on!
Consult the mailinglist ( or drop in
by #gitorious on if you have questions.
=== Tasks and other scripts
* rake db:migrate creates the initial database tables
* script/task_performer runs any tasks in the queue (creating repositories etc)
* script/graph_generator generates graph.
* rake ultrasphinx:configure configures sphinx
* rake ultrasphinx:index runs the search indexer
* rake ultrasphinx:daemon:start and ultrasphinx:daemon:stop manage the sphinx daemon
=== PostgreSQL
* Install the functions in vendor/plugins/ultrasphinx/lib/ultrasphinx/postgresql/
* After running "rake ultrasphinx:configure" you'll have to replace all instances of user with "user" in ultrasphinx's config file (user is a keyword in PostgreSQL).
perl -p -i -e 's/ user([^s]{1})/ "user"$1/g' config/ultrasphinx/*.conf
=== Coding style
* Two spaces, no tabs, for indention
* Don't use and and or for boolean tests, instead always use && and ||
* MyClass.my_method(my_arg) -- not my_method( my_arg ) or my_method my_arg
* Unless presedence is an issue; do .. end for multi-line blocks, braces for single line blocks
* Follow the conventions you see used in the source already
(copied mostly verbatim from