spymemcached.jruby 1.0.11-java → 1.0.12-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: 06b5837f82e9d9ac407c2c5fe0bb5ee5daf8a3b0
4
- data.tar.gz: 3edb71d0e84508cb9447ea68a4cf1a8f9bb44f27
3
+ metadata.gz: 1fef73d46866215d32cbe93c671d25b89b9661d2
4
+ data.tar.gz: 9012c67d747885258945133db1477507119c03bf
5
5
  SHA512:
6
- metadata.gz: e48238823c00d32dd5ba47ed7efc66b9c101a202f26132a9c2d5fa8eb4f0cf0376b8333d49a4b64ae03aab85189511583c9ab01ca4b74dc977567a894e598d86
7
- data.tar.gz: be02cf6b0e7c8959424e73b777d5b0bfabf867feea3640fcf6dd7980143d67891e67187c337a2de0bab78148efac7fcedb8fe16b375665012e91d632aee58cfd
6
+ metadata.gz: 5b079ee7292b105ad2b60a48b15c161b724861c04debeb2097ffcc5ac06979317a57394283c92faa43485d82527ecadb9bf0e7ffe0c3a50de69f8bbce199c255
7
+ data.tar.gz: 48c557725e890b1c677d25229a1b4904c576a9afdb3ec05a4635b34665c6ce5dffa39c9118b3cb7fac7f582b298832a082b53852ae18d6b75bc45ad7e1c2fd97
@@ -84,7 +84,7 @@ class Spymemcached
84
84
  @client.delete(encode(key))
85
85
  end
86
86
 
87
- def incr(key, by=1, ttl=0, default=0)
87
+ def incr(key, by=1, ttl=0, default=1)
88
88
  @client.incr(encode(key), by, ttl, default)
89
89
  end
90
90
 
@@ -39,6 +39,11 @@ class SpymemcachedBinaryProtocolTest < Test::Unit::TestCase
39
39
  end
40
40
 
41
41
  def test_incr_and_decr
42
+ assert_equal 1, @client.incr('incr-key', 1)
43
+ assert_equal '1', @client.get('incr-key')
44
+ assert_equal 0, @client.decr('decr-key', 1)
45
+ assert_equal '0', @client.get('decr-key')
46
+
42
47
  @client.add('key', '0', 0, :raw => true)
43
48
  assert_equal 0, @client.incr('key', 0)
44
49
  @client.incr('key')
@@ -39,6 +39,11 @@ class SpymemcachedPlainProtocolTest < Test::Unit::TestCase
39
39
  end
40
40
 
41
41
  def test_incr_and_decr
42
+ assert_equal 1, @client.incr('incr-key', 1)
43
+ assert_equal '1', @client.get('incr-key')
44
+ assert_equal 0, @client.decr('decr-key', 1)
45
+ assert_equal '0', @client.get('decr-key')
46
+
42
47
  @client.add('key', '0', 0, :raw => true)
43
48
  assert_equal 0, @client.incr('key', 0)
44
49
  @client.incr('key')
@@ -29,7 +29,7 @@ class SpymemcachedTest < Test::Unit::TestCase
29
29
 
30
30
  @client.add('touch_key1', 'v1', 2)
31
31
 
32
- assert_equal 0, @client.incr('incr_key', 1, 1)
32
+ assert_equal 1, @client.incr('incr_key', 1, 1)
33
33
  assert_equal 0, @client.decr('decr_key', 1, 1)
34
34
 
35
35
  sleep 0.1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spymemcached.jruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: java
6
6
  authors:
7
7
  - Xiao Li
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-05 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake