This repository has been archived by the owner on Sep 18, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Evan Weaver
committed
Sep 30, 2009
1 parent
189c749
commit 39a1aeb
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
require 'rubygems' | ||
require 'thrift' | ||
|
||
HERE = File.expand_path(File.dirname(__FILE__)) | ||
|
||
$LOAD_PATH << "#{HERE}/../vendor/gen-rb" | ||
require "#{HERE}/../vendor/gen-rb/scribe" | ||
|
||
Object.const_set("ScribeThrift", Scribe) | ||
Object.const_remove("Scribe") | ||
|
||
$LOAD_PATH << "#{HERE}" | ||
require 'scribe/scribe' | ||
require 'scribe/debug' if ENV['DEBUG'] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
class Scribe | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/test_helper') | ||
|
||
class ScribeTest < Test::Unit::TestCase | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
require 'test/unit' | ||
require "#{File.expand_path(File.dirname(__FILE__))}/../lib/scribe" | ||
begin; require 'ruby-debug'; rescue LoadError; end | ||
|
||
begin | ||
@test_client = Scribe.new('127.0.0.1') | ||
rescue Thrift::TransportException => e | ||
#FIXME Make server automatically start if not running | ||
if e.message =~ /Could not connect/ | ||
puts "*** Please start the Scribe server by running 'rake cassandra'. ***" | ||
exit 1 | ||
end | ||
end |