diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-11-23 12:09:56 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-11-23 12:09:56 -0800 |
commit | df91c57c312bee97a16bced1035bd704e518ac38 (patch) | |
tree | 0678c58830c09e9a8e0de92a33fa078f2445ee4e /lib/metropolis | |
parent | 51d43461adca99482154ddbd337658a70d5ffc3d (diff) | |
download | metropolis-df91c57c312bee97a16bced1035bd704e518ac38.tar.gz |
rename internal "TokyoCabinet" => "TC"
It's less typing and less likely to clash on both the eyes and the interpreter.
Diffstat (limited to 'lib/metropolis')
-rw-r--r-- | lib/metropolis/tc.rb | 6 | ||||
-rw-r--r-- | lib/metropolis/tc/hdb.rb (renamed from lib/metropolis/tokyocabinet/hdb.rb) | 6 | ||||
-rw-r--r-- | lib/metropolis/tc/hdb/ro.rb (renamed from lib/metropolis/tokyocabinet/hdb/ro.rb) | 4 | ||||
-rw-r--r-- | lib/metropolis/tokyocabinet.rb | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/metropolis/tc.rb b/lib/metropolis/tc.rb new file mode 100644 index 0000000..84dfaff --- /dev/null +++ b/lib/metropolis/tc.rb @@ -0,0 +1,6 @@ +# -*- encoding: binary -*- +require 'tokyocabinet' + +module Metropolis::TC + autoload :HDB, 'metropolis/tc/hdb' +end diff --git a/lib/metropolis/tokyocabinet/hdb.rb b/lib/metropolis/tc/hdb.rb index 513d215..ec387b4 100644 --- a/lib/metropolis/tokyocabinet/hdb.rb +++ b/lib/metropolis/tc/hdb.rb @@ -2,10 +2,10 @@ # this module is NOT thread-safe, all performance is dependent on the # local machine so there is never anything that needs yielding to threads. -module Metropolis::TokyoCabinet::HDB - autoload :RO, 'metropolis/tokyocabinet/hdb/ro' +module Metropolis::TC::HDB + autoload :RO, 'metropolis/tc/hdb/ro' - TCHDB = ::TokyoCabinet::HDB # :nodoc + TCHDB = TokyoCabinet::HDB # :nodoc include Rack::Utils # unescape def r(code) diff --git a/lib/metropolis/tokyocabinet/hdb/ro.rb b/lib/metropolis/tc/hdb/ro.rb index 89b4dd6..f348ee4 100644 --- a/lib/metropolis/tokyocabinet/hdb/ro.rb +++ b/lib/metropolis/tc/hdb/ro.rb @@ -1,10 +1,10 @@ # -*- encoding: binary -*- -module Metropolis::TokyoCabinet::HDB::RO +module Metropolis::TC::HDB::RO def self.extended(obj) obj.instance_eval do @wr_flags = nil - @rd_flags |= ::TokyoCabinet::HDB::ONOLCK + @rd_flags |= TokyoCabinet::HDB::ONOLCK @dbv.each { |(hdb, path)| hdb.open(path, @rd_flags) or ex!(:open, path) } diff --git a/lib/metropolis/tokyocabinet.rb b/lib/metropolis/tokyocabinet.rb deleted file mode 100644 index 86b8104..0000000 --- a/lib/metropolis/tokyocabinet.rb +++ /dev/null @@ -1,6 +0,0 @@ -# -*- encoding: binary -*- -require 'tokyocabinet' - -module Metropolis::TokyoCabinet - autoload :HDB, 'metropolis/tokyocabinet/hdb' -end |