memcache-client 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +5 -0
- data/Rakefile +2 -0
- data/lib/memcache.rb +8 -16
- data/lib/memcache/version.rb +6 -0
- data/test/test_benchmark.rb +1 -0
- data/test/test_mem_cache.rb +1 -1
- metadata +4 -4
- data/VERSION.yml +0 -5
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -3,10 +3,12 @@ require 'rubygems'
|
|
3
3
|
require 'rake/rdoctask'
|
4
4
|
require 'rake/testtask'
|
5
5
|
|
6
|
+
require File.dirname(__FILE__) + "/lib/memcache/version.rb"
|
6
7
|
begin
|
7
8
|
require 'jeweler'
|
8
9
|
Jeweler::Tasks.new do |s|
|
9
10
|
s.name = "memcache-client"
|
11
|
+
s.version = MemCache::VERSION
|
10
12
|
s.summary = s.description = "A Ruby library for accessing memcached."
|
11
13
|
s.email = "mperham@gmail.com"
|
12
14
|
s.homepage = "http://github.com/mperham/memcache-client"
|
data/lib/memcache.rb
CHANGED
@@ -4,22 +4,22 @@ $TESTING = defined?($TESTING) && $TESTING
|
|
4
4
|
require 'socket'
|
5
5
|
require 'thread'
|
6
6
|
require 'zlib'
|
7
|
-
require 'yaml'
|
8
7
|
require 'digest/sha1'
|
9
8
|
require 'net/protocol'
|
9
|
+
require 'memcache/version'
|
10
10
|
|
11
11
|
begin
|
12
12
|
# Try to use the SystemTimer gem instead of Ruby's timeout library
|
13
|
-
# when running on
|
13
|
+
# when running on Ruby 1.8.x. See:
|
14
14
|
# http://ph7spot.com/articles/system_timer
|
15
|
-
# We don't want to bother trying to load SystemTimer on jruby
|
16
|
-
# ruby 1.9+
|
17
|
-
if defined?(
|
18
|
-
require 'timeout'
|
19
|
-
MemCacheTimer = Timeout
|
20
|
-
else
|
15
|
+
# We don't want to bother trying to load SystemTimer on jruby,
|
16
|
+
# ruby 1.9+ and rbx.
|
17
|
+
if !defined?(RUBY_ENGINE) || (RUBY_ENGINE == 'ruby' && RUBY_VERSION < '1.9.0')
|
21
18
|
require 'system_timer'
|
22
19
|
MemCacheTimer = SystemTimer
|
20
|
+
else
|
21
|
+
require 'timeout'
|
22
|
+
MemCacheTimer = Timeout
|
23
23
|
end
|
24
24
|
rescue LoadError => e
|
25
25
|
puts "[memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: #{e.message}"
|
@@ -34,14 +34,6 @@ end
|
|
34
34
|
|
35
35
|
class MemCache
|
36
36
|
|
37
|
-
##
|
38
|
-
# The version of MemCache you are using.
|
39
|
-
|
40
|
-
VERSION = begin
|
41
|
-
config = YAML.load(File.read(File.dirname(__FILE__) + '/../VERSION.yml'))
|
42
|
-
"#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
43
|
-
end
|
44
|
-
|
45
37
|
##
|
46
38
|
# Default options for the cache object.
|
47
39
|
|
data/test/test_benchmark.rb
CHANGED
data/test/test_mem_cache.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 8
|
8
|
-
-
|
9
|
-
version: 1.8.
|
8
|
+
- 1
|
9
|
+
version: 1.8.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Eric Hodel
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-03-
|
19
|
+
date: 2010-03-20 00:00:00 -05:00
|
20
20
|
default_executable: memcached_top
|
21
21
|
dependencies: []
|
22
22
|
|
@@ -35,10 +35,10 @@ files:
|
|
35
35
|
- LICENSE.txt
|
36
36
|
- README.rdoc
|
37
37
|
- Rakefile
|
38
|
-
- VERSION.yml
|
39
38
|
- lib/continuum_native.rb
|
40
39
|
- lib/memcache.rb
|
41
40
|
- lib/memcache/event_machine.rb
|
41
|
+
- lib/memcache/version.rb
|
42
42
|
- lib/memcache_util.rb
|
43
43
|
- performance.txt
|
44
44
|
- test/test_benchmark.rb
|