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 +8 -8
- data/README.md +3 -3
- data/lib/dalli/elasticache.rb +1 -0
- data/lib/dalli/elasticache/version.rb +1 -1
- data/spec/elasticache_spec.rb +11 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzQzNDVlOWIxZjJjMzhlMGE1ODU2OWI1NjA0OTc2YmQwYmM5MmJmMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjY5MTAyMTY5NzVjMTQwMGVlMjE2ZWY3ODI2ODdmMDQ0ZWUyOGZkMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODRmOGIwMjU0OGFkOGUzZjcyMjY2OWEyMDA1MTMyYTVjZGNhYzEwODE2M2Y5
|
10
|
+
YmU1ZTIwOWU3YjkyNGY1YzViZTY5Mzc1Y2M3YWI2OTRlOGJjZmViOTdkMGY4
|
11
|
+
NTczZTQ3MjA3YzRmZDA4NDFlYzliYTAzMjJjNGNhNDI2YjNkM2M=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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/
|
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
|
-
|
24
|
-
elasticache
|
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
|
```
|
data/lib/dalli/elasticache.rb
CHANGED
data/spec/elasticache_spec.rb
CHANGED
@@ -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.
|
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-
|
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:
|
59
|
+
email:
|
60
|
+
- aaron@ktheory.com
|
61
|
+
- zach@magoosh.com
|
59
62
|
executables: []
|
60
63
|
extensions: []
|
61
64
|
extra_rdoc_files: []
|