dalli-elasticache 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGZlZjgwNzQyNTU3MTMzOWZkYjI4M2RiZGJlMmYwZTQ3ODBkMmMxZg==
4
+ YzQzNDVlOWIxZjJjMzhlMGE1ODU2OWI1NjA0OTc2YmQwYmM5MmJmMw==
5
5
  data.tar.gz: !binary |-
6
- YzM4Y2E3ZjlhMzA3M2NjYTc0NjZjZTU1MzA4Y2UwODM1YmZjMjNmYw==
6
+ NjY5MTAyMTY5NzVjMTQwMGVlMjE2ZWY3ODI2ODdmMDQ0ZWUyOGZkMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjA5MmNmZjRjYTE2ZDY2NWE3ZGVkNGE0ZDYzOGY0YzI1Nzg2ODlmY2I5ZWM5
10
- N2E5ZWJhZmRkYTBmYTg1Zjg3NmQ2N2Q1YjUyZTBlN2E1ZWYxMDFmMmI4MTM1
11
- ZWM5ZmY0OTkzMDU2MmI4NGZiODFmY2QzNmZhMWEzY2MxZWIzZjk=
9
+ ODRmOGIwMjU0OGFkOGUzZjcyMjY2OWEyMDA1MTMyYTVjZGNhYzEwODE2M2Y5
10
+ YmU1ZTIwOWU3YjkyNGY1YzViZTY5Mzc1Y2M3YWI2OTRlOGJjZmViOTdkMGY4
11
+ NTczZTQ3MjA3YzRmZDA4NDFlYzliYTAzMjJjNGNhNDI2YjNkM2M=
12
12
  data.tar.gz: !binary |-
13
- ZjVlMmMyMzI3ODhlMDFiMTc4NTQzMjc5ZDkyYjFlMGRmOGIwNGYxYTc5OTUw
14
- YTk2YWE1MmFmMmViODZkM2UwMTliMTdhYWM2ZDRhMjljOGJkZmQ5OTc3NzAy
15
- NzIyMzI5NWY1YWFmY2M5ODMwYzIzN2UzNmFhMjRiMTkwYjUwMDQ=
13
+ NGI3NTU1MGE2NDAxM2RjYjQyNGViMjRhNGQzYTRkMDBjZDAxYjU4MDM3ODVl
14
+ NTg0YTI0ZmJjNDIwYjIyN2M2ODZkMGJlYTk2YzNmM2RmYTE4NzdhNGMyMTI3
15
+ YjEyY2U1YmQyNmYwMDhjYjhkYWFjYWQ5NWUxMjA3NDc4NDI2OGQ=
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Dalli ElastiCache [![Gem Version](https://badge.fury.io/rb/dalli-elasticache.svg)](http://badge.fury.io/rb/dalli-elasticache) [![Build Status](https://travis-ci.org/zmillman/dalli-elasticache.svg?branch=request-refactor)](https://travis-ci.org/zmillman/dalli-elasticache) [![Code Climate](https://codeclimate.com/github/ktheory/dalli-elasticache.png)](https://codeclimate.com/github/ktheory/dalli-elasticache)
1
+ Dalli ElastiCache [![Gem Version](https://badge.fury.io/rb/dalli-elasticache.svg)](http://badge.fury.io/rb/dalli-elasticache) [![Build Status](https://travis-ci.org/ktheory/dalli-elasticache.svg)](https://travis-ci.org/ktheory/dalli-elasticache) [![Code Climate](https://codeclimate.com/github/ktheory/dalli-elasticache.png)](https://codeclimate.com/github/ktheory/dalli-elasticache)
2
2
  =================
3
3
 
4
4
  Use [AWS ElastiCache AutoDiscovery](http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.html) to automatically configure your [Dalli memcached client](https://github.com/mperham/dalli) with all the nodes in your cluster.
@@ -20,8 +20,8 @@ Configure your environment-specific application settings:
20
20
 
21
21
  ```ruby
22
22
  # in config/environments/production.rb
23
- config_endpoint = "my-cluster-name.abc123.cfg.use1.cache.amazonaws.com:1211"
24
- elasticache = Dalli::ElastiCache.new(endpoint)
23
+ endpoint = "my-cluster-name.abc123.cfg.use1.cache.amazonaws.com:11211"
24
+ elasticache = Dalli::ElastiCache.new(endpoint)
25
25
 
26
26
  config.cache_store = :dalli_store, elasticache.servers, {:expires_in => 1.day, :compress => true}
27
27
  ```
@@ -38,6 +38,7 @@ module Dalli
38
38
 
39
39
  # Clear all cached data from the cluster endpoint
40
40
  def refresh
41
+ config_endpoint = "#{endpoint.host}:#{endpoint.port}"
41
42
  @endpoint = Dalli::Elasticache::AutoDiscovery::Endpoint.new(config_endpoint)
42
43
 
43
44
  self
@@ -1,5 +1,5 @@
1
1
  module Dalli
2
2
  class ElastiCache
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -39,7 +39,17 @@ describe 'Dalli::ElastiCache::Endpoint' do
39
39
  end
40
40
 
41
41
  describe '#refresh' do
42
- it 'clears endpoint configuration'
42
+ it 'clears endpoint configuration' do
43
+ stale_endpoint = cache.endpoint
44
+ cache.refresh.endpoint.should_not === stale_endpoint
45
+ end
46
+
47
+ it 'builds endpoint with same configuration' do
48
+ stale_endpoint = cache.endpoint
49
+ cache.refresh
50
+ cache.endpoint.host.should == stale_endpoint.host
51
+ cache.endpoint.port.should == stale_endpoint.port
52
+ end
43
53
  end
44
54
 
45
55
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dalli-elasticache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Suggs
8
+ - Zach Millman
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-05-02 00:00:00.000000000 Z
12
+ date: 2014-07-08 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
@@ -55,7 +56,9 @@ dependencies:
55
56
  description: ! " This gem provides an interface for fetching cluster information
56
57
  from an AWS\n ElastiCache AutoDiscovery server and configuring a Dalli client
57
58
  to connect\n to all nodes in the cache cluster.\n"
58
- email: aaron@ktheory.com
59
+ email:
60
+ - aaron@ktheory.com
61
+ - zach@magoosh.com
59
62
  executables: []
60
63
  extensions: []
61
64
  extra_rdoc_files: []