memcached 0.10 → 0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,8 +20,12 @@ require 'rlibmemcached'
20
20
 
21
21
  class Memcached
22
22
  Lib = Rlibmemcached
23
+ REQUIRED_VERSION = File.read("#{File.dirname(__FILE__)}/../COMPATIBILITY")[/:: ([\d\.]+)/, 1]
24
+ RECEIVED_VERSION = Lib.memcached_lib_version
25
+ raise LoadError, "Requires libmemcached #{REQUIRED_VERSION}; you have #{RECEIVED_VERSION}" unless REQUIRED_VERSION == RECEIVED_VERSION
23
26
  end
24
27
 
28
+
25
29
  require 'memcached/integer'
26
30
  require 'memcached/exceptions'
27
31
  require 'memcached/behaviors'
@@ -3,9 +3,9 @@ class Memcached
3
3
 
4
4
  #:stopdoc:
5
5
 
6
- def self.load_constants(prefix, hash = {}, offset = 0)
6
+ def self.load_constants(prefix, hash = {})
7
7
  Lib.constants.grep(/^#{prefix}/).each do |const_name|
8
- hash[const_name[prefix.length..-1].downcase.to_sym] = Lib.const_get(const_name) + offset
8
+ hash[const_name[prefix.length..-1].downcase.to_sym] = Lib.const_get(const_name)
9
9
  end
10
10
  hash
11
11
  end
@@ -18,10 +18,10 @@ class Memcached
18
18
  }
19
19
 
20
20
  HASH_VALUES = {}
21
- BEHAVIOR_VALUES.merge!(load_constants("MEMCACHED_HASH_", HASH_VALUES, 2))
21
+ BEHAVIOR_VALUES.merge!(load_constants("MEMCACHED_HASH_", HASH_VALUES))
22
22
 
23
23
  DISTRIBUTION_VALUES = {}
24
- BEHAVIOR_VALUES.merge!(load_constants("MEMCACHED_DISTRIBUTION_", DISTRIBUTION_VALUES, 2))
24
+ BEHAVIOR_VALUES.merge!(load_constants("MEMCACHED_DISTRIBUTION_", DISTRIBUTION_VALUES))
25
25
 
26
26
  DIRECT_VALUE_BEHAVIORS = [:retry_timeout, :connect_timeout, :socket_recv_size, :poll_timeout, :socket_send_size]
27
27
 
@@ -43,9 +43,10 @@ class Memcached
43
43
  raise(ArgumentError, msg) unless BEHAVIOR_VALUES[value]
44
44
  end
45
45
 
46
- value = BEHAVIOR_VALUES[value] || value
47
- # STDERR.puts "Setting #{behavior}:#{b_id} => #{value}:#{value}"
48
- Lib.memcached_behavior_set(@struct, b_id, value)
46
+ lib_value = BEHAVIOR_VALUES[value] || value
47
+ #STDERR.puts "Setting #{behavior}:#{b_id} => #{value} (#{lib_value})"
48
+ Lib.memcached_behavior_set(@struct, b_id, lib_value)
49
+ #STDERR.puts " -> set to #{get_behavior(behavior).inspect}"
49
50
  end
50
51
 
51
52
  # Get a behavior value for this Memcached instance. Accepts a Symbol.
@@ -18,12 +18,11 @@ class Memcached
18
18
  :retry_timeout => 60,
19
19
  # :poll_timeout => 5,
20
20
  :connect_timeout => 5,
21
- :namespace => nil,
21
+ :prefix_key => nil,
22
22
  :sort_hosts => false,
23
- :failover => false
23
+ :failover => false,
24
+ :verify_key => true
24
25
  }
25
-
26
- # :verify_key => false # XXX We do this ourselves already in Rlibmemcached.ns()
27
26
 
28
27
  #:stopdoc:
29
28
  IGNORED = 0
@@ -36,22 +35,22 @@ class Memcached
36
35
  ###### Configuration
37
36
 
38
37
  =begin rdoc
39
- Create a new Memcached instance. Accepts a single server string such as '127.0.0.1:11211', or an array of such strings, as well an an optional configuration hash.
40
-
41
- Hostname lookups are not currently supported; you need to use the IP address.
38
+ Create a new Memcached instance. Accepts a single server string such as 'localhost:11211', or an array of such strings, as well an an optional configuration hash.
42
39
 
43
40
  Valid option parameters are:
44
41
 
45
- <tt>:namespace</tt>:: A namespace string to prepend to every key.
42
+ <tt>:prefix_key</tt>:: A string to prepend to every key, for namespacing. Max length is 11.
46
43
  <tt>:hash</tt>:: The name of a hash function to use. Possible values are: <tt>:crc</tt>, <tt>:default</tt>, <tt>:fnv1_32</tt>, <tt>:fnv1_64</tt>, <tt>:fnv1a_32</tt>, <tt>:fnv1a_64</tt>, <tt>:hsieh</tt>, <tt>:md5</tt>, and <tt>:murmur</tt>. <tt>:default</tt> is the fastest. Use <tt>:md5</tt> for compatibility with other ketama clients.
47
44
  <tt>:distribution</tt>:: Either <tt>:modula</tt>, <tt>:consistent</tt>, or <tt>:consistent_wheel</tt>. Defaults to <tt>:consistent</tt>, which is ketama-compatible.
48
45
  <tt>:failover</tt>:: Whether to permanently eject failed hosts from the pool. Defaults to <tt>false</tt>. Note that in the event of a server failure, <tt>:failover</tt> will remap the entire pool unless <tt>:distribution</tt> is set to <tt>:consistent</tt>.
46
+ <tt>:cache_lookups</tt>:: Whether to cache hostname lookups for the life of the instance. Defaults to <tt>true</tt>.
49
47
  <tt>:support_cas</tt>:: Flag CAS support in the client. Accepts <tt>true</tt> or <tt>false</tt>. Defaults to <tt>false</tt> because it imposes a slight performance penalty. Note that your server must also support CAS or you will trigger <b>Memcached::ProtocolError</b> exceptions.
50
48
  <tt>:tcp_nodelay</tt>:: Turns on the no-delay feature for connecting sockets. Accepts <tt>true</tt> or <tt>false</tt>. Performance may or may not change, depending on your system.
51
49
  <tt>:no_block</tt>:: Whether to use non-blocking, asynchronous IO for writes. Accepts <tt>true</tt> or <tt>false</tt>.
52
50
  <tt>:buffer_requests</tt>:: Whether to use an internal write buffer. Accepts <tt>true</tt> or <tt>false</tt>. Calling <tt>get</tt> or closing the connection will force the buffer to flush. Note that <tt>:buffer_requests</tt> might not work well without <tt>:no_block</tt> also enabled.
53
51
  <tt>:show_not_found_backtraces</tt>:: Whether <b>Memcached::NotFound</b> exceptions should include backtraces. Generating backtraces is slow, so this is off by default. Turn it on to ease debugging.
54
52
  <tt>:sort_hosts</tt>:: Whether to force the server list to stay sorted. This defeats consistent hashing and is rarely useful.
53
+ <tt>:verify_key</tt>:: Validate keys before accepting them. Never disable this.
55
54
 
56
55
  Please note that when non-blocking IO is enabled, setter and deleter methods do not raise on errors. For example, if you try to set an invalid key with <tt>:no_block => true</tt>, it will appear to succeed. The actual setting of the key occurs after libmemcached has returned control to your program, so there is no way to backtrack and raise the exception.
57
56
 
@@ -61,9 +60,6 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
61
60
  @struct = Lib::MemcachedSt.new
62
61
  Lib.memcached_create(@struct)
63
62
 
64
- # Set the servers on the struct
65
- set_servers(servers)
66
-
67
63
  # Merge option defaults
68
64
  @options = DEFAULTS.merge(opts)
69
65
 
@@ -72,6 +68,9 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
72
68
  # consistently
73
69
  options[:no_block] = true if options[:buffer_requests]
74
70
 
71
+ # Legacy accessor
72
+ options[:prefix_key] = options.delete(:namespace) if options[:namespace]
73
+
75
74
  # Disallow :sort_hosts with consistent hashing
76
75
  if options[:sort_hosts] and options[:distribution] == :consistent
77
76
  raise ArgumentError, ":sort_hosts defeats :consistent hashing"
@@ -79,20 +78,14 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
79
78
 
80
79
  # Set the behaviors on the struct
81
80
  set_behaviors
82
-
83
- # Merge the actual behaviors back in
84
- BEHAVIORS.keys.each do |behavior|
85
- options[behavior] = get_behavior(behavior)
86
- end
81
+ set_callbacks
87
82
 
88
83
  # Freeze the hash
89
84
  options.freeze
85
+
86
+ # Set the servers on the struct
87
+ set_servers(servers)
90
88
 
91
- # Namespace
92
- raise ArgumentError, "Invalid namespace" if options[:namespace].to_s =~ / /
93
- @namespace = options[:namespace].to_s
94
- @namespace_size = @namespace.size
95
-
96
89
  # Not found exceptions
97
90
  # Note that these have global effects since the NotFound class itself is modified. You should only
98
91
  # be enabling the backtrace for debugging purposes, so it's not really a big deal.
@@ -100,8 +93,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
100
93
  NotFound.restore_backtraces
101
94
  else
102
95
  NotFound.remove_backtraces
103
- end
104
-
96
+ end
105
97
  end
106
98
 
107
99
  # Return the array of server strings used to configure this instance.
@@ -114,43 +106,22 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
114
106
  # Safely copy this instance. Returns a Memcached instance.
115
107
  #
116
108
  # <tt>clone</tt> is useful for threading, since each thread must have its own unshared Memcached
117
- # object. However, you must call destroy before each thread returns or you will leak significant memory.
109
+ # object.
118
110
  #
119
111
  def clone
120
112
  memcached = super
121
113
  memcached.instance_variable_set('@struct', Lib.memcached_clone(nil, @struct))
122
114
  memcached
123
115
  end
124
-
125
- # Destroy this instance. Frees memory associated with the C implementation.
126
- #
127
- # Accepts an optional parameter <tt>disable_methods</tt>. When <tt>false</tt>, destroy
128
- # runs much faster, but your instance will segfault if you try to call any other methods on it
129
- # after destroy. Defaults to <tt>true</tt>, which safely overwrites all instance methods.
130
- def destroy(disable_methods = true)
131
- # XXX Should be implemented with rb_wrap_struct
132
- Lib.memcached_free(@struct)
133
- @struct = nil
134
116
 
135
- if disable_methods
136
- class << self
137
- Memcached.instance_methods.each do |method_name|
138
- define_method method_name do |*args|
139
- raise Memcached::ClientError, "Instance has been explicitly destroyed"
140
- end
141
- end
142
- end
143
- end
144
- end
145
-
146
117
  # Reset the state of the libmemcached struct. This is useful for changing the server list at runtime.
147
118
  def reset(current_servers = nil)
148
119
  current_servers ||= servers
149
- Lib.memcached_free(@struct)
150
120
  @struct = Lib::MemcachedSt.new
151
121
  Lib.memcached_create(@struct)
152
- set_servers(current_servers)
153
122
  set_behaviors
123
+ set_callbacks
124
+ set_servers(current_servers)
154
125
  end
155
126
 
156
127
  #:stopdoc:
@@ -185,7 +156,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
185
156
  def set(key, value, timeout=0, marshal=true)
186
157
  value = marshal ? Marshal.dump(value) : value.to_s
187
158
  check_return_code(
188
- Lib.memcached_set(@struct, Lib.ns(@namespace, key), value, timeout, FLAGS)
159
+ Lib.memcached_set(@struct, key, value, timeout, FLAGS)
189
160
  )
190
161
  end
191
162
 
@@ -193,7 +164,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
193
164
  def add(key, value, timeout=0, marshal=true)
194
165
  value = marshal ? Marshal.dump(value) : value.to_s
195
166
  check_return_code(
196
- Lib.memcached_add(@struct, Lib.ns(@namespace, key), value, timeout, FLAGS)
167
+ Lib.memcached_add(@struct, key, value, timeout, FLAGS)
197
168
  )
198
169
  end
199
170
 
@@ -203,14 +174,14 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
203
174
  #
204
175
  # Note that the key must be initialized to an unmarshalled integer first, via <tt>set</tt>, <tt>add</tt>, or <tt>replace</tt> with <tt>marshal</tt> set to <tt>false</tt>.
205
176
  def increment(key, offset=1)
206
- ret, value = Lib.memcached_increment(@struct, Lib.ns(@namespace, key), offset)
177
+ ret, value = Lib.memcached_increment(@struct, key, offset)
207
178
  check_return_code(ret)
208
179
  value
209
180
  end
210
181
 
211
182
  # Decrement a key's value. The parameters and exception behavior are the same as <tt>increment</tt>.
212
183
  def decrement(key, offset=1)
213
- ret, value = Lib.memcached_decrement(@struct, Lib.ns(@namespace, key), offset)
184
+ ret, value = Lib.memcached_decrement(@struct, key, offset)
214
185
  check_return_code(ret)
215
186
  value
216
187
  end
@@ -224,7 +195,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
224
195
  def replace(key, value, timeout=0, marshal=true)
225
196
  value = marshal ? Marshal.dump(value) : value.to_s
226
197
  check_return_code(
227
- Lib.memcached_replace(@struct, Lib.ns(@namespace, key), value, timeout, FLAGS)
198
+ Lib.memcached_replace(@struct, key, value, timeout, FLAGS)
228
199
  )
229
200
  end
230
201
 
@@ -234,7 +205,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
234
205
  def append(key, value)
235
206
  # Requires memcached 1.2.4
236
207
  check_return_code(
237
- Lib.memcached_append(@struct, Lib.ns(@namespace, key), value.to_s, IGNORED, FLAGS)
208
+ Lib.memcached_append(@struct, key, value.to_s, IGNORED, FLAGS)
238
209
  )
239
210
  end
240
211
 
@@ -242,7 +213,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
242
213
  def prepend(key, value)
243
214
  # Requires memcached 1.2.4
244
215
  check_return_code(
245
- Lib.memcached_prepend(@struct, Lib.ns(@namespace, key), value.to_s, IGNORED, FLAGS)
216
+ Lib.memcached_prepend(@struct, key, value.to_s, IGNORED, FLAGS)
246
217
  )
247
218
  end
248
219
 
@@ -260,7 +231,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
260
231
  value = marshal ? Marshal.dump(value) : value.to_s
261
232
 
262
233
  check_return_code(
263
- Lib.memcached_cas(@struct, Lib.ns(@namespace, key), value, timeout, FLAGS, @struct.result.cas)
234
+ Lib.memcached_cas(@struct, key, value, timeout, FLAGS, @struct.result.cas)
264
235
  )
265
236
  end
266
237
 
@@ -269,7 +240,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
269
240
  # Deletes a key/value pair from the server. Accepts a String <tt>key</tt>. Raises <b>Memcached::NotFound</b> if the key does not exist.
270
241
  def delete(key)
271
242
  check_return_code(
272
- Lib.memcached_delete(@struct, Lib.ns(@namespace, key), IGNORED)
243
+ Lib.memcached_delete(@struct, key, IGNORED)
273
244
  )
274
245
  end
275
246
 
@@ -295,23 +266,24 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
295
266
  def get(keys, marshal=true)
296
267
  if keys.is_a? Array
297
268
  # Multi get
298
- keys.map! { |key| Lib.ns(@namespace, key) }
269
+ keys.map! { |key| key }
299
270
  hash = {}
300
271
 
301
- Lib.memcached_mget(@struct, keys);
272
+ ret = Lib.memcached_mget(@struct, keys);
273
+ check_return_code(ret)
302
274
 
303
275
  keys.size.times do
304
276
  value, key, flags, ret = Lib.memcached_fetch_rvalue(@struct)
305
277
  break if ret == Lib::MEMCACHED_END
306
278
  check_return_code(ret)
307
279
  value = Marshal.load(value) if marshal
308
- # Assign the value, removing the namespace, if present
309
- hash[key[@namespace_size..-1]] = value
280
+ # Assign the value
281
+ hash[key] = value
310
282
  end
311
283
  hash
312
284
  else
313
285
  # Single get
314
- value, flags, ret = Lib.memcached_get_rvalue(@struct, Lib.ns(@namespace, keys))
286
+ value, flags, ret = Lib.memcached_get_rvalue(@struct, keys)
315
287
  check_return_code(ret)
316
288
  value = Marshal.load(value) if marshal
317
289
  value
@@ -356,12 +328,7 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
356
328
  ### Operations helpers
357
329
 
358
330
  private
359
-
360
- # Returns the hash value for a master key
361
- def hash(key)
362
- Lib.memcached_generate_hash(@struct, Lib.ns(@namespace, key))
363
- end
364
-
331
+
365
332
  # Checks the return code from Rlibmemcached against the exception list. Raises the corresponding exception if the return code is not Memcached::Success or Memcached::ActionQueued. Accepts an integer return code.
366
333
  def check_return_code(ret) #:doc:
367
334
  # 0.16 --enable-debug returns 0 for an ActionQueued result but --disable-debug does not
@@ -394,8 +361,8 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
394
361
  # Set the servers on the struct
395
362
  def set_servers(servers)
396
363
  Array(servers).each_with_index do |server, index|
397
- unless server.is_a? String and server =~ /^(\d{1,3}\.){3}\d{1,3}:\d{1,5}$/
398
- raise ArgumentError, "Servers must be in the format ip:port (e.g., '127.0.0.1:11211')"
364
+ unless server.is_a? String and server =~ /^[\w\d\.]+(:\d{1,5})?$/
365
+ raise ArgumentError, "Servers must be in the format host:port (e.g., 'localhost:11211')"
399
366
  end
400
367
  host, port = server.split(":")
401
368
  Lib.memcached_server_add(@struct, host, port.to_i)
@@ -404,11 +371,21 @@ Please note that when non-blocking IO is enabled, setter and deleter methods do
404
371
 
405
372
  # Set the behaviors on the struct from the current options
406
373
  def set_behaviors
407
- options.each do |option, value|
408
- unless [:namespace, :show_not_found_backtraces, :failover].include? option
409
- set_behavior(option, value)
410
- end
411
- end
412
- end
413
-
374
+ BEHAVIORS.keys.each do |behavior|
375
+ set_behavior(behavior, options[behavior]) if options.key?(behavior)
376
+ end
377
+ end
378
+
379
+ # Set the callbacks on the struct from the current options
380
+ def set_callbacks
381
+ # Only support prefix_key for now
382
+ if options[:prefix_key]
383
+ # XXX Libmemcached doesn't validate the key length properly
384
+ if options[:prefix_key].size > Lib::MEMCACHED_PREFIX_KEY_MAX_SIZE - 1
385
+ raise ArgumentError, "Max prefix_key size is #{Lib::MEMCACHED_PREFIX_KEY_MAX_SIZE - 1}"
386
+ end
387
+ Lib.memcached_callback_set(@struct, Lib::MEMCACHED_CALLBACK_PREFIX_KEY, options[:prefix_key])
388
+ end
389
+ end
390
+
414
391
  end
@@ -38,7 +38,7 @@ class Memcached
38
38
 
39
39
  # Namespace accessor.
40
40
  def namespace
41
- @namespace
41
+ options[:prefix_key]
42
42
  end
43
43
 
44
44
  # Alias for get.
@@ -1,61 +1,108 @@
1
1
 
2
- # Gem::Specification for Memcached-0.10
2
+ # Gem::Specification for Memcached-0.11
3
3
  # Originally generated by Echoe
4
4
 
5
- Gem::Specification.new do |s|
6
- s.name = %q{memcached}
7
- s.version = "0.10"
5
+ --- !ruby/object:Gem::Specification
6
+ name: memcached
7
+ version: !ruby/object:Gem::Version
8
+ version: "0.11"
9
+ platform: ruby
10
+ authors:
11
+ - Evan Weaver
12
+ autorequire:
13
+ bindir: bin
14
+ date: 2008-07-14 00:00:00 -04:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: echoe
19
+ type: :development
20
+ version_requirement:
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: "0"
26
+ version:
27
+ description: An interface to the libmemcached C client.
28
+ email: ""
29
+ executables: []
8
30
 
9
- s.specification_version = 2 if s.respond_to? :specification_version=
31
+ extensions:
32
+ - ext/extconf.rb
33
+ extra_rdoc_files:
34
+ - BENCHMARKS
35
+ - CHANGELOG
36
+ - COMPATIBILITY
37
+ - lib/memcached/behaviors.rb
38
+ - lib/memcached/exceptions.rb
39
+ - lib/memcached/memcached.rb
40
+ - lib/memcached/rails.rb
41
+ - lib/memcached.rb
42
+ - LICENSE
43
+ - README
44
+ - TODO
45
+ files:
46
+ - BENCHMARKS
47
+ - CHANGELOG
48
+ - COMPATIBILITY
49
+ - ext/extconf.rb
50
+ - ext/rlibmemcached.i
51
+ - ext/rlibmemcached_wrap.c
52
+ - lib/memcached/behaviors.rb
53
+ - lib/memcached/exceptions.rb
54
+ - lib/memcached/integer.rb
55
+ - lib/memcached/memcached.rb
56
+ - lib/memcached/rails.rb
57
+ - lib/memcached.rb
58
+ - LICENSE
59
+ - Manifest
60
+ - Rakefile
61
+ - README
62
+ - test/profile/benchmark.rb
63
+ - test/profile/profile.rb
64
+ - test/profile/valgrind.rb
65
+ - test/setup.rb
66
+ - test/teardown.rb
67
+ - test/test_helper.rb
68
+ - test/unit/binding_test.rb
69
+ - test/unit/memcached_test.rb
70
+ - test/unit/rails_test.rb
71
+ - TODO
72
+ - memcached.gemspec
73
+ has_rdoc: true
74
+ homepage: http://blog.evanweaver.com/files/doc/fauna/memcached/
75
+ post_install_message:
76
+ rdoc_options:
77
+ - --line-numbers
78
+ - --inline-source
79
+ - --title
80
+ - Memcached
81
+ - --main
82
+ - README
83
+ require_paths:
84
+ - lib
85
+ - ext
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
91
+ version:
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "="
95
+ - !ruby/object:Gem::Version
96
+ version: "1.2"
97
+ version:
98
+ requirements: []
10
99
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.authors = ["Evan Weaver"]
13
- s.date = %q{2008-05-06}
14
- s.description = %q{An interface to the libmemcached C client.}
15
- s.email = %q{}
16
- s.extensions = ["ext/extconf.rb"]
17
- 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"]
18
- s.files = ["BENCHMARKS", "CHANGELOG", "COMPATIBILITY", "ext/extconf.rb", "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", "README", "test/profile/benchmark.rb", "test/profile/key.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", "memcached.gemspec"]
19
- s.has_rdoc = true
20
- s.homepage = %q{http://blog.evanweaver.com/files/doc/fauna/memcached/}
21
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Memcached", "--main", "README"]
22
- s.require_paths = ["lib", "ext"]
23
- s.rubyforge_project = %q{fauna}
24
- s.rubygems_version = %q{1.1.0}
25
- s.summary = %q{An interface to the libmemcached C client.}
26
- s.test_files = ["test/test_helper.rb", "test/unit/binding_test.rb", "test/unit/memcached_test.rb", "test/unit/rails_test.rb"]
27
- end
28
-
29
-
30
- # # Original Rakefile source (requires the Echoe gem):
31
- #
32
- # require 'echoe'
33
- #
34
- # Echoe.new("memcached") do |p|
35
- # p.author = "Evan Weaver"
36
- # p.project = "fauna"
37
- # p.summary = "An interface to the libmemcached C client."
38
- # p.url = "http://blog.evanweaver.com/files/doc/fauna/memcached/"
39
- # p.docs_host = "blog.evanweaver.com:~/www/bax/public/files/doc/"
40
- # p.rdoc_pattern = /README|TODO|LICENSE|CHANGELOG|BENCH|COMPAT|exceptions|behaviors|rails.rb|memcached.rb/
41
- # end
42
- #
43
- # task :exceptions do
44
- # $LOAD_PATH << "lib"
45
- # require 'memcached'
46
- # Memcached.constants.sort.each do |const_name|
47
- # const = Memcached.send(:const_get, const_name)
48
- # next if const == Memcached::Success or const == Memcached::Stored
49
- # if const.is_a? Class and const < Memcached::Error
50
- # puts "* Memcached::#{const_name}"
51
- # end
52
- # end
53
- # end
54
- #
55
- # task :valgrind do
56
- # exec("valgrind --tool=memcheck --leak-check=yes --show-reachable=no --num-callers=15 --track-fds=yes ruby #{File.dirname(__FILE__)}/test/profile/valgrind.rb")
57
- # end
58
- #
59
- # task :profile do
60
- # exec("ruby #{File.dirname(__FILE__)}/test/profile/profile.rb")
61
- # end
100
+ rubyforge_project: fauna
101
+ rubygems_version: 1.2.0
102
+ specification_version: 2
103
+ summary: An interface to the libmemcached C client.
104
+ test_files:
105
+ - test/test_helper.rb
106
+ - test/unit/binding_test.rb
107
+ - test/unit/memcached_test.rb
108
+ - test/unit/rails_test.rb