Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Weaver committed Sep 30, 2009
1 parent 189c749 commit 39a1aeb
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/scribe.rb
@@ -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']
4 changes: 4 additions & 0 deletions lib/scribe/scribe.rb
@@ -0,0 +1,4 @@

class Scribe

end
5 changes: 5 additions & 0 deletions test/scribe_test.rb
@@ -0,0 +1,5 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper')

class ScribeTest < Test::Unit::TestCase

end
14 changes: 14 additions & 0 deletions test/test_helper.rb
@@ -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

0 comments on commit 39a1aeb

Please sign in to comment.