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.
@@ -1,3 +1,8 @@
1
+ = 1.8.1 (2010-03-20)
2
+
3
+ * Only require SystemTimer if the Ruby VM looks like MRI.
4
+ * Remove VERSION.yml usage as we should avoid using files outside of lib at runtime. (josh)
5
+
1
6
  = 1.8.0 (2010-03-05)
2
7
 
3
8
  * Add support for EventMachine-based connections.
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"
@@ -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 something that looks like Ruby 1.8.x. See:
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 and
16
- # ruby 1.9+
17
- if defined?(JRUBY_VERSION) || (RUBY_VERSION >= '1.9')
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
 
@@ -0,0 +1,6 @@
1
+ class MemCache
2
+ ##
3
+ # The version of MemCache you are using.
4
+
5
+ VERSION = "1.8.1"
6
+ end
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'benchmark'
2
3
  require 'test/unit'
3
4
 
@@ -1,11 +1,11 @@
1
1
  # encoding: utf-8
2
+ require 'rubygems'
2
3
  require 'logger'
3
4
  require 'stringio'
4
5
  require 'test/unit'
5
6
  $TESTING = true
6
7
  require 'memcache'
7
8
 
8
- require 'rubygems'
9
9
  begin
10
10
  gem 'flexmock'
11
11
  require 'flexmock/test_unit'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 8
8
- - 0
9
- version: 1.8.0
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-05 00:00:00 -06:00
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
@@ -1,5 +0,0 @@
1
- ---
2
- :build:
3
- :major: 1
4
- :minor: 8
5
- :patch: 0