rails3_libmemcached_store 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .DS_Store
2
2
  *.swp
3
+ Gemfile.lock
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.1
4
+ * Remove warning from latest version of mocha
5
+ * Make #clear compatible with Rails.cache#clear (grosser)
6
+
3
7
  ## 0.5.0
4
8
  * Use Memcached#exist if available (performance improvement ~25%)
5
9
  * Correctly escape bad characters and too long keys
@@ -9,4 +13,4 @@
9
13
  ## 0.4.0
10
14
  * Optimize read_multi to only make one call to memecached server
11
15
  * Update test suite to reflect Rails' one
12
- * Add session store tests
16
+ * Add session store tests
data/README.md CHANGED
@@ -51,13 +51,13 @@ config.cache_store = :libmemcached_store, %w(cache-01 cache-02 127.0.0.1:11212)
51
51
  Standard Rails cache store options can be used
52
52
 
53
53
  ```ruby
54
- config.cache_store = :libmemcached_store, '127.0.0.1:11211', :compress => true, :expires_in => 3600
54
+ config.cache_store = :libmemcached_store, '127.0.0.1:11211', {:compress => true, :expires_in => 3600}
55
55
  ```
56
56
 
57
57
  More advanced options can be passed directly to the client
58
58
 
59
59
  ```ruby
60
- config.cache_store = :libmemcached_store, '127.0.0.1:11211', :client => { :binary_protocol => true, :no_block => true }
60
+ config.cache_store = :libmemcached_store, '127.0.0.1:11211', {:client => { :binary_protocol => true, :no_block => true }}
61
61
  ```
62
62
 
63
63
  You can also use `:libmemcached_store` to store your application sessions
@@ -75,4 +75,4 @@ for details
75
75
  ## Props
76
76
 
77
77
  Thanks to Brian Aker ([http://tangent.org](http://tangent.org)) for creating libmemcached, and Evan
78
- Weaver ([http://blog.evanweaver.com](http://blog.evanweaver.com)) for the Ruby wrapper.
78
+ Weaver ([http://blog.evanweaver.com](http://blog.evanweaver.com)) for the Ruby wrapper.
@@ -168,7 +168,7 @@ module ActiveSupport
168
168
  values
169
169
  end
170
170
 
171
- def clear
171
+ def clear(options = nil)
172
172
  @cache.flush
173
173
  end
174
174
 
@@ -1,3 +1,3 @@
1
1
  module LibmemcachedStore
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.5.1".freeze
3
3
  end
@@ -227,6 +227,18 @@ module CacheStoreBehavior
227
227
  @cache.silence!
228
228
  test_really_long_keys
229
229
  end
230
+
231
+ def test_clear
232
+ @cache.write("foo", "bar")
233
+ @cache.clear
234
+ assert_nil @cache.read("foo")
235
+ end
236
+
237
+ def test_clear_with_options
238
+ @cache.write("foo", "bar")
239
+ @cache.clear(:some_option => true)
240
+ assert_nil @cache.read("foo")
241
+ end
230
242
  end
231
243
 
232
244
  module CacheIncrementDecrementBehavior
@@ -2,4 +2,4 @@ ENV["RAILS_ENV"] = "test"
2
2
  $:.unshift File.expand_path('../../lib', __FILE__)
3
3
 
4
4
  require 'minitest/autorun'
5
- require 'mocha'
5
+ require 'mocha/setup'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails3_libmemcached_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-09-11 00:00:00.000000000 Z
14
+ date: 2012-11-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: memcached