spymemcached.jruby 1.0.8-java → 1.0.9-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spymemcached.rb +1 -1
- data/test/spymemcached_test.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8b5fb13cea1a40760e3c5238f88f4cf6dee3926
|
4
|
+
data.tar.gz: 45cde2c049dad6c2a43b41de8995a97cf60e3706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ff7964126978eee87bd847e1d7e7cfd60ba609f02728b5fbd28dc1c59bf874ac116a752ba9de4ffb072624b153ea058870f9a97ae0bec9111a8e4234c5a2225
|
7
|
+
data.tar.gz: 4120645054ffc7d2d5615a4498321df32f5ce04d868d91569359f480bf809c52fc5b6cf72dffa59bfd4b1c5b04c17e616fe46f9eb76413d5a178f1b003b9064b
|
data/lib/spymemcached.rb
CHANGED
@@ -34,7 +34,7 @@ class Spymemcached
|
|
34
34
|
#
|
35
35
|
def initialize(servers=nil, options={})
|
36
36
|
@servers, @options = Array(servers).join(','), DEFAULT_OPTIONS.merge(options)
|
37
|
-
@servers =
|
37
|
+
@servers = 'localhost:11211' if @servers.empty?
|
38
38
|
@client = SpymemcachedAdapter.new(@servers, @options)
|
39
39
|
@namespace = if @options[:namespace]
|
40
40
|
@options[:namespace].is_a?(Proc) ? @options[:namespace] : lambda { @options[:namespace] }
|
data/test/spymemcached_test.rb
CHANGED
@@ -195,4 +195,10 @@ class SpymemcachedTest < Test::Unit::TestCase
|
|
195
195
|
@client.set(k, 'v2')
|
196
196
|
assert_equal({k => 'v2'}, @client.get_multi(k))
|
197
197
|
end
|
198
|
+
|
199
|
+
def test_default_servers
|
200
|
+
client = Spymemcached.new(nil)
|
201
|
+
assert client.set('key', 'value')
|
202
|
+
assert_equal 'value', client.get('key')
|
203
|
+
end
|
198
204
|
end
|