jruby-memcached 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/memcached/version.rb +1 -1
- data/spec/rails_spec.rb +7 -0
- data/src/main/java/com/openfeint/memcached/Memcached.java +2 -2
- data/src/main/java/com/openfeint/memcached/Rails.java +4 -2
- data/target/spymemcached-ext-0.0.1.jar +0 -0
- metadata +88 -96
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/memcached/version.rb
CHANGED
data/spec/rails_spec.rb
CHANGED
@@ -86,6 +86,13 @@ describe Memcached::Rails do
|
|
86
86
|
@memcached.write("key", "value").should be_true
|
87
87
|
@memcached.read("key").should == "value"
|
88
88
|
end
|
89
|
+
|
90
|
+
it "should expire" do
|
91
|
+
@memcached.write("key", "value", :expires_in => 1)
|
92
|
+
@memcached.read("key").should == "value"
|
93
|
+
sleep 1
|
94
|
+
@memcached.read("key").should be_nil
|
95
|
+
end
|
89
96
|
end
|
90
97
|
|
91
98
|
context "fetch" do
|
@@ -307,9 +307,9 @@ public class Memcached extends RubyObject {
|
|
307
307
|
client = new MemcachedClient(builder.build(), addresses);
|
308
308
|
|
309
309
|
if ("marshal_zlib".equals(transcoderValue)) {
|
310
|
-
|
310
|
+
transcoder = new MarshalZlibTranscoder(ruby);
|
311
311
|
} else {
|
312
|
-
|
312
|
+
transcoder = new MarshalTranscoder(ruby);
|
313
313
|
}
|
314
314
|
} catch (IOException ioe) {
|
315
315
|
throw ruby.newIOErrorFromException(ioe);
|
@@ -214,9 +214,11 @@ public class Rails extends Memcached {
|
|
214
214
|
} else if (args[index] instanceof RubyHash) {
|
215
215
|
RubyHash options = (RubyHash) args[index];
|
216
216
|
if (options.containsKey(ruby.newSymbol("ttl"))) {
|
217
|
-
|
217
|
+
Long ttl = (Long) options.get(ruby.newSymbol("ttl"));
|
218
|
+
return ruby.newFixnum(ttl);
|
218
219
|
} else if (options.containsKey(ruby.newSymbol("expires_in"))) {
|
219
|
-
|
220
|
+
Long expiresIn = (Long) options.get(ruby.newSymbol("expires_in"));
|
221
|
+
return ruby.newFixnum(expiresIn);
|
220
222
|
}
|
221
223
|
}
|
222
224
|
}
|
Binary file
|
metadata
CHANGED
@@ -1,113 +1,105 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-memcached
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 0.4.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.4.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- Richard Huang
|
9
|
-
autorequire:
|
7
|
+
authors:
|
8
|
+
- Richard Huang
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
version: !binary |-
|
39
|
-
MA==
|
40
|
-
none: false
|
41
|
-
requirement: !ruby/object:Gem::Requirement
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: !binary |-
|
46
|
-
MA==
|
47
|
-
none: false
|
48
|
-
prerelease: false
|
49
|
-
type: :development
|
12
|
+
|
13
|
+
date: 2012-08-17 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :development
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: mocha
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id002
|
50
37
|
description: jruby memcacached client which is compatible with memcached gem
|
51
|
-
email:
|
52
|
-
- flyerhzm@gmail.com
|
38
|
+
email:
|
39
|
+
- flyerhzm@gmail.com
|
53
40
|
executables: []
|
41
|
+
|
54
42
|
extensions: []
|
43
|
+
|
55
44
|
extra_rdoc_files: []
|
56
|
-
|
57
|
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
- spec/
|
72
|
-
-
|
73
|
-
-
|
74
|
-
- src/main/java/com/openfeint/memcached/
|
75
|
-
- src/main/java/com/openfeint/memcached/
|
76
|
-
- src/main/java/com/openfeint/memcached/
|
77
|
-
- src/main/java/com/openfeint/memcached/error/
|
78
|
-
- src/main/java/com/openfeint/memcached/error/
|
79
|
-
- src/main/java/com/openfeint/memcached/
|
80
|
-
- src/main/java/com/openfeint/memcached/
|
81
|
-
- src/main/java/
|
82
|
-
- src/main/java/
|
83
|
-
-
|
45
|
+
|
46
|
+
files:
|
47
|
+
- .gitignore
|
48
|
+
- .travis.yml
|
49
|
+
- CHANGELOG.md
|
50
|
+
- Gemfile
|
51
|
+
- Gemfile.lock
|
52
|
+
- MIT-LICENSE
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- benchmark.rb
|
56
|
+
- jruby_memcached.gemspec
|
57
|
+
- lib/memcached.rb
|
58
|
+
- lib/memcached/version.rb
|
59
|
+
- pom.xml
|
60
|
+
- spec/memcached_spec.rb
|
61
|
+
- spec/rails_spec.rb
|
62
|
+
- spec/spec_helper.rb
|
63
|
+
- src/main/java/com/openfeint/memcached/Memcached.java
|
64
|
+
- src/main/java/com/openfeint/memcached/MemcachedService.java
|
65
|
+
- src/main/java/com/openfeint/memcached/Rails.java
|
66
|
+
- src/main/java/com/openfeint/memcached/error/Error.java
|
67
|
+
- src/main/java/com/openfeint/memcached/error/NotFound.java
|
68
|
+
- src/main/java/com/openfeint/memcached/error/NotStored.java
|
69
|
+
- src/main/java/com/openfeint/memcached/error/NotSupport.java
|
70
|
+
- src/main/java/com/openfeint/memcached/transcoder/MarshalTranscoder.java
|
71
|
+
- src/main/java/com/openfeint/memcached/transcoder/MarshalZlibTranscoder.java
|
72
|
+
- src/main/java/net/spy/memcached/KetamaNodeLocator.java
|
73
|
+
- src/main/java/net/spy/memcached/util/DefaultKetamaNodeLocatorConfiguration.java
|
74
|
+
- target/spymemcached-ext-0.0.1.jar
|
84
75
|
homepage: https://github.com/aurorafeint/jruby-memcached
|
85
76
|
licenses: []
|
86
|
-
|
77
|
+
|
78
|
+
post_install_message:
|
87
79
|
rdoc_options: []
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
- - ! '>='
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: !binary |-
|
95
|
-
MA==
|
80
|
+
|
81
|
+
require_paths:
|
82
|
+
- lib
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
84
|
none: false
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
MA==
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: "0"
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
90
|
none: false
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: "0"
|
104
95
|
requirements: []
|
105
|
-
|
96
|
+
|
97
|
+
rubyforge_project:
|
106
98
|
rubygems_version: 1.8.24
|
107
|
-
signing_key:
|
99
|
+
signing_key:
|
108
100
|
specification_version: 3
|
109
101
|
summary: jruby compatible memcached client
|
110
|
-
test_files:
|
111
|
-
- spec/memcached_spec.rb
|
112
|
-
- spec/rails_spec.rb
|
113
|
-
- spec/spec_helper.rb
|
102
|
+
test_files:
|
103
|
+
- spec/memcached_spec.rb
|
104
|
+
- spec/rails_spec.rb
|
105
|
+
- spec/spec_helper.rb
|