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.
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - jruby-18mode
4
+ - jruby-19mode
5
+ - jruby-head
@@ -1,3 +1,9 @@
1
+ ## 0.4.1 (Aug 17, 2012)
2
+
3
+ Bugfixes:
4
+
5
+ - fix ClassCastException from Long to RubyFixnum
6
+
1
7
  ## 0.4.0 (Aug 16, 2012)
2
8
 
3
9
  Bugfixes:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jruby-memcached (0.4.0)
4
+ jruby-memcached (0.4.1)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  class Memcached
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -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
- transcoder = new MarshalZlibTranscoder(ruby);
310
+ transcoder = new MarshalZlibTranscoder(ruby);
311
311
  } else {
312
- transcoder = new MarshalTranscoder(ruby);
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
- return (RubyFixnum) options.get(ruby.newSymbol("ttl"));
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
- return (RubyFixnum) options.get(ruby.newSymbol("expires_in"));
220
+ Long expiresIn = (Long) options.get(ruby.newSymbol("expires_in"));
221
+ return ruby.newFixnum(expiresIn);
220
222
  }
221
223
  }
222
224
  }
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.0
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
- date: 2012-08-16 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rspec
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ! '>='
19
- - !ruby/object:Gem::Version
20
- version: !binary |-
21
- MA==
22
- none: false
23
- requirement: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ! '>='
26
- - !ruby/object:Gem::Version
27
- version: !binary |-
28
- MA==
29
- none: false
30
- prerelease: false
31
- type: :development
32
- - !ruby/object:Gem::Dependency
33
- name: mocha
34
- version_requirements: !ruby/object:Gem::Requirement
35
- requirements:
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
- files:
57
- - .gitignore
58
- - CHANGELOG.md
59
- - Gemfile
60
- - Gemfile.lock
61
- - MIT-LICENSE
62
- - README.md
63
- - Rakefile
64
- - benchmark.rb
65
- - jruby_memcached.gemspec
66
- - lib/memcached.rb
67
- - lib/memcached/version.rb
68
- - pom.xml
69
- - spec/memcached_spec.rb
70
- - spec/rails_spec.rb
71
- - spec/spec_helper.rb
72
- - src/main/java/com/openfeint/memcached/Memcached.java
73
- - src/main/java/com/openfeint/memcached/MemcachedService.java
74
- - src/main/java/com/openfeint/memcached/Rails.java
75
- - src/main/java/com/openfeint/memcached/error/Error.java
76
- - src/main/java/com/openfeint/memcached/error/NotFound.java
77
- - src/main/java/com/openfeint/memcached/error/NotStored.java
78
- - src/main/java/com/openfeint/memcached/error/NotSupport.java
79
- - src/main/java/com/openfeint/memcached/transcoder/MarshalTranscoder.java
80
- - src/main/java/com/openfeint/memcached/transcoder/MarshalZlibTranscoder.java
81
- - src/main/java/net/spy/memcached/KetamaNodeLocator.java
82
- - src/main/java/net/spy/memcached/util/DefaultKetamaNodeLocatorConfiguration.java
83
- - target/spymemcached-ext-0.0.1.jar
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
- post_install_message:
77
+
78
+ post_install_message:
87
79
  rdoc_options: []
88
- require_paths:
89
- - lib
90
- required_ruby_version: !ruby/object:Gem::Requirement
91
- requirements:
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
- required_rubygems_version: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: !binary |-
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
- rubyforge_project:
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