Skip to content

Instantly share code, notes, and snippets.

@queso
Created February 6, 2011 03:30
Show Gist options
  • Save queso/813087 to your computer and use it in GitHub Desktop.
Save queso/813087 to your computer and use it in GitHub Desktop.
An example config.ru file for dynamically adding CIJoe projects, just place this at the root of your folder structure
# Required so that we can set path correctly for Config, which
# is loaded statically due to a bug in cijoe
require 'cijoe'
# setup middleware
use Rack::CommonLogger
# Assume all subfolders under config.ru are git repos and collect them to spin up multiple joes
projects = Dir.glob("*/")
# configure joe per project
projects.each do |project|
project_path = Dir.pwd + "/" + project
map "/#{project}" do
run CIJoe::Server.rack_start(project_path)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment