Created
December 2, 2010 20:45
-
-
Save duff/726023 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
port: 8091 | |
host: localhost | |
test: | |
port: 8098 | |
host: localhost | |
bin_dir: /Users/duff/code/riak/rel/riak/bin | |
js_source_dir: <%= Rails.root + "lib/riak_js" %> | |
production: | |
port: 8091 | |
host: localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'riak/test_server' | |
def test_server_config | |
{ :app_config => { :riak_kv => { :js_source_dir => Ripple.config.delete(:js_source_dir) }, | |
:riak_core => { :web_port => Ripple.config.delete(:port) } }, | |
:bin_dir => Ripple.config.delete(:bin_dir), | |
:temp_dir => Rails.root + "tmp/riak_test_server" | |
} | |
end | |
unless $test_server | |
begin | |
require 'yaml' | |
$test_server = Riak::TestServer.new(test_server_config) | |
$test_server.prepare! | |
$test_server.start | |
at_exit { $test_server.cleanup } | |
rescue => e | |
warn "Can't run the specs. Specify the location of your Riak installation in config/ripple.yml." | |
warn e.inspect | |
$test_server = nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment