diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-01 10:34:32 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-01 10:47:53 +0000 |
commit | f7387cd8d1af627e5919da371cac923bbc59ef6a (patch) | |
tree | f18212e18ce20cedbc734bbac05c0c40825bd02c /lib/metropolis.rb | |
parent | 27eb2d7ebd29239a5043a528c97c6dd218d03217 (diff) | |
download | metropolis-f7387cd8d1af627e5919da371cac923bbc59ef6a.tar.gz |
add basic support for the Trivial Database (TDB)
TDB supports multiple simultaneous readers and writer *processes*, not just threads.
Diffstat (limited to 'lib/metropolis.rb')
-rw-r--r-- | lib/metropolis.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/metropolis.rb b/lib/metropolis.rb index 3afc3ec..e9810d7 100644 --- a/lib/metropolis.rb +++ b/lib/metropolis.rb @@ -8,6 +8,7 @@ module Metropolis autoload :Gzip, 'metropolis/gzip' autoload :TC, 'metropolis/tc' autoload :Hash, 'metropolis/hash' + autoload :TDB, 'metropolis/tdb' def self.new(opts = {}) opts = opts.dup @@ -17,6 +18,10 @@ module Metropolis when 'hash' opts[:path] = uri.path if uri.path != '/' rv.extend Metropolis::Hash + when 'tdb' + opts[:path_pattern] = uri.path + opts[:query] = Rack::Utils.parse_query(uri.query) if uri.query + rv.extend Metropolis::TDB when 'tc' opts[:path_pattern] = uri.path opts[:query] = Rack::Utils.parse_query(uri.query) if uri.query |