memcached 0.15 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,5 +1,7 @@
1
1
 
2
- v0.15. Update to libmemcached 0.32. UDP support. Domain socket support (hellvinz). Bugfixes. Bundle libmemcached itself with the gem (antifuchs).
2
+ v0.15.1. Fix build problem.
3
+
4
+ v0.15. Update to libmemcached 0.31.1. UDP support. Domain socket support (hellvinz). Bugfixes. Bundle libmemcached itself with the gem (antifuchs).
3
5
 
4
6
  v0.14.4. Re-SWIG.
5
7
 
data/README CHANGED
@@ -27,9 +27,6 @@ You need Ruby 1.8.6. Other versions are not guaranteed to work. You also need {m
27
27
  Install the gem:
28
28
  sudo gem install memcached --no-rdoc --no-ri
29
29
 
30
- Note that on OS X 10.5 you may need to set the architecture explicitly:
31
- sudo env ARCHFLAGS="-arch i386" gem install memcached --no-rdoc --no-ri
32
-
33
30
  == Usage
34
31
 
35
32
  Start a local networked memcached server:
@@ -5,51 +5,60 @@ HERE = File.expand_path(File.dirname(__FILE__))
5
5
  BUNDLE = Dir.glob("libmemcached-*.tar.gz").first
6
6
  BUNDLE_PATH = BUNDLE.sub(".tar.gz", "")
7
7
 
8
- $includes = ENV['INCLUDE_PATH'].to_s.split(':').map{|s| " -I#{s}"}.uniq.join
8
+ DARWIN = `uname -sp` == "Darwin i386\n"
9
9
 
10
10
  if !ENV["EXTERNAL_LIB"]
11
- $includes = " -I#{HERE}/include" + $includes
11
+ $includes = " -I#{HERE}/include"
12
12
  $libraries = " -L#{HERE}/lib"
13
13
 
14
14
  $CFLAGS = "#{$includes} #{$libraries} #{$CFLAGS}"
15
15
  $LDFLAGS = "#{$libraries} #{$LDFLAGS}"
16
- $CPPFLAGS = ""
16
+ $CPPFLAGS = $ARCH_FLAG = $DLDFLAGS = ""
17
+
17
18
  $LIBPATH = ["#{HERE}/lib"]
18
19
  $DEFLIBPATH = []
19
20
 
20
21
  Dir.chdir(HERE) do
21
22
  if File.exist?("lib")
22
23
  puts "Libmemcached already built; run 'rake clean' first if you need to rebuild."
23
- else
24
+ else
24
25
  puts "Building libmemcached."
25
26
  puts(cmd = "tar xzf #{BUNDLE} 2>&1")
26
- raise "'#{cmd}' failed" unless system(cmd)
27
+ raise "'#{cmd}' failed" unless system(cmd)
28
+
27
29
  Dir.chdir(BUNDLE_PATH) do
28
- puts(cmd = "./configure --prefix=#{HERE} 2>&1")
29
- raise "'#{cmd}' failed" unless system(cmd)
30
- puts(cmd = "make 2>&1")
30
+ puts(cmd = "env CFLAGS=-fPIC LDFLAGS=-fPIC ./configure --prefix=#{HERE} --disable-shared --disable-utils 2>&1")
31
+ raise "'#{cmd}' failed" unless system(cmd)
32
+ puts(cmd = "make || true 2>&1")
31
33
  raise "'#{cmd}' failed" unless system(cmd)
32
- puts(cmd = "make install 2>&1")
34
+ puts(cmd = "make install || true 2>&1")
33
35
  raise "'#{cmd}' failed" unless system(cmd)
34
- end
36
+ end
35
37
  system("rm -rf #{BUNDLE_PATH}")
36
- end
38
+ end
37
39
  end
40
+
41
+ # Absolutely prevent the linker from picking up any other libmemcached
42
+ Dir.chdir("#{HERE}/lib") do
43
+ system("cp libmemcached.a libmemcached_gem.a")
44
+ system("cp libmemcached.la libmemcached_gem.la")
45
+ end
46
+ $LIBS << " -lmemcached_gem"
38
47
  end
39
48
 
40
- if ENV['SWIG']
41
- puts "Running SWIG."
42
- puts(cmd = "swig #{$includes} -ruby -autorename rlibmemcached.i")
43
- raise "'#{cmd}' failed" unless system(cmd)
44
- end
45
-
46
- if `uname -sp` == "Darwin i386\n"
49
+ if DARWIN
47
50
  $CFLAGS.gsub! /-arch \S+/, ''
48
51
  $CFLAGS << " -arch i386"
49
52
  $LDFLAGS.gsub! /-arch \S+/, ''
50
53
  $LDFLAGS << " -arch i386"
51
54
  end
52
55
 
56
+ if ENV['SWIG']
57
+ puts "Running SWIG."
58
+ puts(cmd = "swig #{$includes} -ruby -autorename rlibmemcached.i")
59
+ raise "'#{cmd}' failed" unless system(cmd)
60
+ end
61
+
53
62
  $CFLAGS.gsub! /-O\d/, ''
54
63
 
55
64
  if ENV['DEBUG']
@@ -22,7 +22,7 @@ class Memcached
22
22
  Lib = Rlibmemcached
23
23
  REQUIRED_VERSION = File.read("#{File.dirname(__FILE__)}/../COMPATIBILITY")[/:: ([\d\.]+)/, 1]
24
24
  RECEIVED_VERSION = Lib.memcached_lib_version
25
- STDERR.puts "Warning: libmemcached #{REQUIRED_VERSION} suggested; you have #{RECEIVED_VERSION}." unless REQUIRED_VERSION == RECEIVED_VERSION
25
+ raise "libmemcached #{REQUIRED_VERSION} required; you somehow linked to #{RECEIVED_VERSION}." unless REQUIRED_VERSION == RECEIVED_VERSION
26
26
  end
27
27
 
28
28
  require 'memcached/integer'
@@ -2,29 +2,30 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{memcached}
5
- s.version = "0.15"
5
+ s.version = "0.15.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver"]
9
9
  s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
- s.date = %q{2009-08-03}
10
+ s.date = %q{2009-08-04}
11
11
  s.description = %q{An interface to the libmemcached C client.}
12
12
  s.email = %q{}
13
13
  s.extensions = ["ext/extconf.rb"]
14
14
  s.extra_rdoc_files = ["BENCHMARKS", "CHANGELOG", "COMPATIBILITY", "lib/memcached/behaviors.rb", "lib/memcached/exceptions.rb", "lib/memcached/memcached.rb", "lib/memcached/rails.rb", "lib/memcached.rb", "LICENSE", "README", "TODO"]
15
15
  s.files = ["BENCHMARKS", "CHANGELOG", "COMPATIBILITY", "ext/extconf.rb", "ext/libmemcached-0.31.tar.gz", "ext/rlibmemcached.i", "ext/rlibmemcached_wrap.c", "lib/memcached/behaviors.rb", "lib/memcached/exceptions.rb", "lib/memcached/integer.rb", "lib/memcached/memcached.rb", "lib/memcached/rails.rb", "lib/memcached.rb", "LICENSE", "Manifest", "memcached.gemspec", "Rakefile", "README", "test/profile/benchmark.rb", "test/profile/profile.rb", "test/profile/valgrind.rb", "test/setup.rb", "test/teardown.rb", "test/test_helper.rb", "test/unit/binding_test.rb", "test/unit/memcached_test.rb", "test/unit/rails_test.rb", "TODO"]
16
+ s.has_rdoc = true
16
17
  s.homepage = %q{http://blog.evanweaver.com/files/doc/fauna/memcached/}
17
18
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Memcached", "--main", "README"]
18
19
  s.require_paths = ["lib", "ext"]
19
20
  s.rubyforge_project = %q{fauna}
20
- s.rubygems_version = %q{1.3.4}
21
+ s.rubygems_version = %q{1.3.1}
21
22
  s.signing_key = %q{/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-private_key.pem}
22
23
  s.summary = %q{An interface to the libmemcached C client.}
23
24
  s.test_files = ["test/test_helper.rb", "test/unit/binding_test.rb", "test/unit/memcached_test.rb", "test/unit/rails_test.rb"]
24
25
 
25
26
  if s.respond_to? :specification_version then
26
27
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
27
- s.specification_version = 3
28
+ s.specification_version = 2
28
29
 
29
30
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
30
31
  else
@@ -867,9 +867,13 @@ class MemcachedTest < Test::Unit::TestCase
867
867
  cache.set(key2, @value)
868
868
  end
869
869
  end
870
+
871
+ def test_missing_server_with_random_distribution
872
+ cache = Memcached.new(@servers, :distribution => :random)
873
+ # FIXME Needs to exercise the ejection code
874
+ end
870
875
 
871
876
  def test_consistent_hashing
872
-
873
877
  keys = %w(EN6qtgMW n6Oz2W4I ss4A8Brr QShqFLZt Y3hgP9bs CokDD4OD Nd3iTSE1 24vBV4AU H9XBUQs5 E5j8vUq1 AzSh8fva PYBlK2Pi Ke3TgZ4I AyAIYanO oxj8Xhyd eBFnE6Bt yZyTikWQ pwGoU7Pw 2UNDkKRN qMJzkgo2 keFXbQXq pBl2QnIg ApRl3mWY wmalTJW1 TLueug8M wPQL4Qfg uACwus23 nmOk9R6w lwgZJrzJ v1UJtKdG RK629Cra U2UXFRqr d9OQLNl8 KAm1K3m5 Z13gKZ1v tNVai1nT LhpVXuVx pRib1Itj I1oLUob7 Z1nUsd5Q ZOwHehUa aXpFX29U ZsnqxlGz ivQRjOdb mB3iBEAj)
874
878
 
875
879
  # Five servers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memcached
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.15"
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver
@@ -30,7 +30,7 @@ cert_chain:
30
30
  yZ0=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-08-03 00:00:00 -07:00
33
+ date: 2009-08-04 00:00:00 -07:00
34
34
  default_executable:
35
35
  dependencies: []
36
36
 
@@ -83,8 +83,6 @@ files:
83
83
  - TODO
84
84
  has_rdoc: true
85
85
  homepage: http://blog.evanweaver.com/files/doc/fauna/memcached/
86
- licenses: []
87
-
88
86
  post_install_message:
89
87
  rdoc_options:
90
88
  - --line-numbers
@@ -111,9 +109,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
109
  requirements: []
112
110
 
113
111
  rubyforge_project: fauna
114
- rubygems_version: 1.3.4
112
+ rubygems_version: 1.3.1
115
113
  signing_key:
116
- specification_version: 3
114
+ specification_version: 2
117
115
  summary: An interface to the libmemcached C client.
118
116
  test_files:
119
117
  - test/test_helper.rb
metadata.gz.sig CHANGED
Binary file