Skip to content
This repository was archived by the owner on Feb 7, 2020. It is now read-only.

Hacking on Kochiku

Lamian edited this page Mar 24, 2016 · 9 revisions

Thank you for your interest in improving Kochiku. Here are some instructions to get you up and running quickly.

Contribution Agreement

Kochiku is developed and maintained by engineers at Square, Inc. Square requests that any developers who wish to make open source contributions to Kochiku first sign Square's (super simple) Individual Contributor License Agreement (CLA).

Developers only have to sign the CLA once ever.

Running Kochiku in development

Dependencies

  • Ruby 2.3
  • MySQL >= 5.0
  • Redis >= 2.2

Running the server and the partitioning worker

After you have the above databases installed and running, the second step is to clone the Kochiku repo to anywhere on your machine and cd into it.

# install Kochiku's gems
gem install bundler
bundle install

# create the database and seed it with dummy data
rake db:setup

# start the web server
rails server

# optionally spin up a partition worker
QUEUES=high,partition rake resque:work

Running a Kochiku Worker

Start by cloning the kochiku worker repo to anywhere on your machine and cd into it.

# run a worker
QUEUE=ci,developer rake resque:work

Running the tests

# from the top level of the kochiku repository
bundle exec rspec

Tips

Integrate with external services

Normally it's not easy to develop and test such functionality in your development environment since localhost cannot receive callbacks from external world. Thanks to UltraHook, now we can easily set up a proxy and enjoy hacking Kochiku!