README.rdoc in stockpile-1.0 vs README.rdoc in stockpile-1.1
- old
+ new
@@ -12,10 +12,16 @@
(stockpile-redis).
Stockpile also provides an adapter so that its functionality can be accessed
from within a module.
+Release 1.1 fixes an issue with early initialization of an injected Stockpile
+instance during adaptation
+({stockpile#2}[https://githbub.com/halostatue/stockpile/issues/2]). Several
+small improvements to Stockpile.new, Stockpile#connect, and
+Stockpile#connection_for have been documented.
+
== Features
* Stockpile manages key-value store connections. There are two variants:
* *wide* (<tt>Stockpile.new</tt>, the default), where additional client
@@ -33,11 +39,11 @@
The desired key-value store must already be installed and/or specified in
your Gemfile.
== Synopsis
- wide = Stockpile.new # A Stockpile to Redis.
+ wide = Stockpile.new # A Stockpile instance.
wide.connection.set('hello', 'world') # => 'OK'
wide.connection.get('hello') # => 'world'
# Connections are independent from one another.
wide.connection_for(:other) != wide.connection # => true
@@ -49,10 +55,16 @@
# Special Redis::Namespace handling for Resque. Assumes that redis-namespace
# has been installed, as well.
narrow.connection_for(:resque) != narrow.connection # => true
narrow.connection_for(:resque).redis == narrow.connection # => true
+ # Standard namespace handling.
+ narrow.connection_for(:other, namespace: 'other') !=
+ narrow.connection # => true
+ narrow.connection_for(:other, namespace: 'other').redis !=
+ narrow.connection # => true
+
# Show a Stockpile with no adapter capabilities, but name the method
# stockpile, not cache. This will still usefully manage connections.
module Cacher
Stockpile.inject!(self, method: :stockpile, adaptable: false)
end
@@ -130,13 +142,13 @@
be used in Rails. A link to it will be provided here when it is complete.
== Install
Stockpile is not intended to be installed by itself, as it does not implement a
-key-value store specific connection manager. Instead, install an
-store-specific gem which depends on Stockpile.
+key-value store specific connection manager. Instead, install a store-specific
+gem which depends on Stockpile.
- gem 'stockpile-redis', '~> 1.0'
+ gem 'stockpile-redis', '~> 1.1'
Or manually install:
% gem install stockpile-redis