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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97c21cdf9e531c371b41c16888058ad998488d11
4
- data.tar.gz: 684c7b1e9355b9d1b7d8f3e29149f683a9a1cce7
3
+ metadata.gz: e8b5fb13cea1a40760e3c5238f88f4cf6dee3926
4
+ data.tar.gz: 45cde2c049dad6c2a43b41de8995a97cf60e3706
5
5
  SHA512:
6
- metadata.gz: 330f2cef0eb215742935976c931dc0dc69dce1b5072431aba0c4e43bdfd16b92c2b7bed21b5b038c0abdd50850dee983b816cde5c78a3c3106f980cb0e894ee5
7
- data.tar.gz: 25060f90b2d4cb0529acd0fcada6ec1069dd04fd78acd890e5b6c670b35cd09021b0ae15151c353790a645f37864ff1aeaab2cdf58a871c1f08c347031f8a061
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 = ['localhost:11211'] if @servers.empty?
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] }
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spymemcached.jruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: java
6
6
  authors:
7
7
  - Xiao Li