Permalink
Browse files

correct tyrant default port 1978

  • Loading branch information...
1 parent 18d492d commit 683510092514a50677a3e20d47a4a41668ff440c @nofxx committed Jul 2, 2009
Showing with 6 additions and 6 deletions.
  1. +2 −2 benchmark/tokyo_store.rb
  2. +2 −2 lib/tokyo_store.rb
  3. +2 −2 spec/tokyo_store_rufus_spec.rb
View
4 benchmark/tokyo_store.rb
@@ -15,9 +15,9 @@
G = M * 10
OBJ = { :small => P, :medium => M, :big => G}
-@tokyo = ActiveSupport::Cache.lookup_store :tokyo_store, "localhost:45001"
+@tokyo = ActiveSupport::Cache.lookup_store :tokyo_store, "localhost:1978"
@memca = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost:11211"
-@memto = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost:45001"
+@memto = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost:1978"
# # # Read & Write
Benchmark.bmbm do |b|
View
4 lib/tokyo_store.rb
@@ -16,7 +16,7 @@ def self.build_tokyo(*store)
store = store.flatten
options = store.extract_options!
#TODO: multiple instances
- store = store.empty? ? ["localhost", 45001] : store[0].split(":")
+ store = store.empty? ? ["localhost", 1978] : store[0].split(":")
#TODO: Auto choice between tyrant ffi x tyrant pure ruby x cabinet C
# Tyrant FFI
@@ -38,7 +38,7 @@ def self.build_tokyo(*store)
# ActiveSupport::Cache::TokyoStore.new("localhost", "server-downstairs.localnetwork:8229")
#
# If no addresses are specified, then TokyoStore will connect to
- # localhost port 45001 (the default memcached port).
+ # localhost port 1978 (the default tyrant port).
def initialize(*store)
if store.first.respond_to?(:get)
@data = store.first
View
4 spec/tokyo_store_rufus_spec.rb
@@ -8,7 +8,7 @@
end
it "should fail" do
- tokyo = Rufus::Tokyo::Tyrant.new('localhost', 45001)
+ tokyo = Rufus::Tokyo::Tyrant.new('localhost', 1978)
Rufus::Tokyo::Tyrant.should_not_receive(:new)
store = ActiveSupport::Cache.lookup_store :tokyo_store, tokyo
store.should be_kind_of ActiveSupport::Cache::TokyoStore
@@ -17,7 +17,7 @@
describe "Similar" do
before(:each) do
- @cache = ActiveSupport::Cache::TokyoStore.new 'localhost:45001'
+ @cache = ActiveSupport::Cache::TokyoStore.new 'localhost:1978'
@cache.clear
end

0 comments on commit 6835100

Please sign in to comment.