|
Revision 326, 0.9 kB
(checked in by gethema..@gmail.com, 2 months ago)
|
check in new backgroundrb code
|
| Line | |
|---|
| 1 |
require "rubygems" |
|---|
| 2 |
require "mocha" |
|---|
| 3 |
require "test/spec" |
|---|
| 4 |
require "active_record" |
|---|
| 5 |
require "active_support" |
|---|
| 6 |
require "yaml" |
|---|
| 7 |
require "erb" |
|---|
| 8 |
|
|---|
| 9 |
class BDRB_CONFIG |
|---|
| 10 |
@config_value = {} |
|---|
| 11 |
def self.fuck |
|---|
| 12 |
@config_value |
|---|
| 13 |
end |
|---|
| 14 |
def self.set hash |
|---|
| 15 |
@config_value = hash |
|---|
| 16 |
end |
|---|
| 17 |
def self.[] key |
|---|
| 18 |
@config_value[key] |
|---|
| 19 |
end |
|---|
| 20 |
end |
|---|
| 21 |
|
|---|
| 22 |
RAILS_HOME = File.expand_path(File.join(File.dirname(__FILE__) + "/../../../..")) unless defined?(RAILS_HOME) |
|---|
| 23 |
PACKET_APP = RAILS_HOME + "/vendor/plugins/backgroundrb" unless defined?(PACKET_APP) |
|---|
| 24 |
WORKER_ROOT = RAILS_HOME + "/vendor/plugins/backgroundrb/test/workers" unless defined?(WORKER_ROOT) |
|---|
| 25 |
SERVER_LOGGER = RAILS_HOME + "/log/backgroundrb_debug.log" unless defined?(SERVER_LOGGER) |
|---|
| 26 |
|
|---|
| 27 |
["server","server/lib","lib","lib/backgroundrb"].each { |x| $LOAD_PATH.unshift(PACKET_APP + "/#{x}")} |
|---|
| 28 |
$LOAD_PATH.unshift(WORKER_ROOT) |
|---|
| 29 |
|
|---|
| 30 |
require "packet" |
|---|
| 31 |
require "bdrb_config" |
|---|
| 32 |
|
|---|
| 33 |
require "backgroundrb_server" |
|---|
| 34 |
|
|---|
| 35 |
|
|---|