remix-stash 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -20,6 +20,8 @@ Right now remix-stash is designed to be run as a gem. I've published it to both
20
20
 
21
21
  The examples directory has some simple code snippets that introduce general features of the library. In general, everything should just work after `require 'remix/stash'`. This includes integration with Rails and automatic pick-up of Heroku style memcached environment variables. Of course, this library is completely independent of Rails and does not need environment variables to function or be used.
22
22
 
23
+ The API is exported onto the `Remix` module as the `stash` method. Direct calls as well as inclusion/extension of the module on specific objects should work fine. When in doubt try starting with `Remix.stash` as a style. NOTE: Prior to version 1.1 this was mixed in to `Object` as well. If your code depended on this, please just `include Remix` to retain compatibility.
24
+
23
25
  # Specifications
24
26
 
25
27
  This project is tested with shoulda (install via the thoughtbot-shoulda gem on github) and takes the philosophy that fewer moving parts is better. So to avoid complex runners just run `spec/spec.rb` or the spec you are interested in directly. In order for the specs to function, you should have memcached 1.4+ running locally on port 11211.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.1.2
@@ -11,7 +11,7 @@ class Remix::Stash::Cluster
11
11
  attr_reader :hosts
12
12
 
13
13
  def initialize(hosts)
14
- @hosts = hosts.map {|x|
14
+ @hosts = [hosts].flatten.map {|x|
15
15
  host, port = x.split(':')
16
16
  [x, host, (port || 11211).to_i]
17
17
  }.sort_by {|(_,h,p)| [h,p]}
data/remix-stash.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{remix-stash}
8
- s.version = "1.1.1"
8
+ s.version = "1.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Mitchell"]
12
- s.date = %q{2009-12-01}
12
+ s.date = %q{2009-12-02}
13
13
  s.email = %q{binary42@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -1,4 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/spec'
2
+ require 'active_support/cache/remix_stash_store'
2
3
 
3
4
  class ActiveSupportCacheSpec < Spec
4
5
 
data/spec/spec.rb CHANGED
@@ -12,7 +12,7 @@ else
12
12
  ENV['MEMCACHED_SERVERS'] = 'localhost:11211'
13
13
  ENV['MEMCACHED_NAMESPACE'] = 'spec'
14
14
 
15
- $LOAD_PATH << File.dirname(__FILE__) + '/../lib'
15
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
16
16
  require 'remix/stash'
17
17
 
18
18
  Spec = Test::Unit::TestCase
data/spec/stash_spec.rb CHANGED
@@ -99,11 +99,13 @@ class StashSpec < Spec
99
99
  context 'value serialization' do
100
100
 
101
101
  should 'trigger lazily loaded constants on loading' do
102
- class StashSpec::Foo; end
102
+ class ::StashSpec
103
+ class Foo; end
104
+ autoload :Bar, 'spec/support/bar.rb'
105
+ end
103
106
  bar = Marshal.dump(StashSpec::Foo.new).gsub(/Foo/, 'Bar')
104
- autoload :Bar, 'spec/support/bar.rb'
105
107
  stash.write(:x, bar)
106
- assert_kind_of Bar, stash[:x]
108
+ assert_kind_of StashSpec::Bar, stash[:x]
107
109
  end
108
110
 
109
111
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remix-stash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Mitchell
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-01 00:00:00 -05:00
12
+ date: 2009-12-02 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15