First, I'd like to apologize to the PHP devs for making you mess with Ruby. But it's for the best.
You'll need Ruby. Ruby 1.9.x would be best. After you've got Ruby, clone the repo and install dependencies:
git clone https://github.com/bobthecow/genghis cd genghis git submodule update --init gem install bundle bundle install
Genghis is... a bit weird.
- The two app files,
genghis.phpare built via Rake. To regenerate them, run
rake buildfrom the project directory.
- If you just want to build one or the other, you can run
- For development, it's usually best to use non-minified assets. Run
rake build NOCOMPRESS=1to skip minification.
- Be sure to commit the compiled
genghis.phpalong with your source changes.
Running the API test suite
If you're changing the API, you'll need to ensure that the API test suite passes. If you're adding a new feature or fixing a bug, you should add corresponding tests as well.
To run the test suite, you'll need PHP 5.4+ and a Mongo instance running on
If you don't have PHP 5.4+, you can test just the Ruby API by editing
spec/spec_helper.rb and removing
from the backend list:
--- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,7 @@ require_relative '../genghis.rb' RSpec.configure do |config| def genghis_backends - [:php, :ruby] + [:ruby] end def find_available_port
Opening a pull request
You can do some things to increase the chance that your pull request is accepted the first time:
- Open all pull requests against the
- Submit one pull request per fix or feature.
- To help with that, do your work in a feature branch (e.g.
- Write API tests that fail without your code, and pass with it.
- Don't bump version numbers. Those will be updated — per semver — once your change is merged into
- Update any documentation: docblocks, README, etc.
- ... Don't update the wiki until your change is merged and released, but make a note in your pull request so we don't forget.