dalli-elasticache 0.1.0 → 0.1.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.
- checksums.yaml +15 -0
- data/README.md +64 -17
- data/Rakefile +7 -0
- data/lib/dalli/elasticache.rb +28 -41
- data/lib/dalli/elasticache/auto_discovery/config_response.rb +49 -0
- data/lib/dalli/elasticache/auto_discovery/endpoint.rb +78 -0
- data/lib/dalli/elasticache/auto_discovery/stats_response.rb +31 -0
- data/lib/dalli/elasticache/version.rb +1 -1
- data/spec/config_response_spec.rb +32 -0
- data/spec/elasticache_spec.rb +45 -0
- data/spec/endpoint_spec.rb +16 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/stats_response_spec.rb +14 -0
- metadata +40 -16
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OGZlZjgwNzQyNTU3MTMzOWZkYjI4M2RiZGJlMmYwZTQ3ODBkMmMxZg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzM4Y2E3ZjlhMzA3M2NjYTc0NjZjZTU1MzA4Y2UwODM1YmZjMjNmYw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZjA5MmNmZjRjYTE2ZDY2NWE3ZGVkNGE0ZDYzOGY0YzI1Nzg2ODlmY2I5ZWM5
|
10
|
+
N2E5ZWJhZmRkYTBmYTg1Zjg3NmQ2N2Q1YjUyZTBlN2E1ZWYxMDFmMmI4MTM1
|
11
|
+
ZWM5ZmY0OTkzMDU2MmI4NGZiODFmY2QzNmZhMWEzY2MxZWIzZjk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZjVlMmMyMzI3ODhlMDFiMTc4NTQzMjc5ZDkyYjFlMGRmOGIwNGYxYTc5OTUw
|
14
|
+
YTk2YWE1MmFmMmViODZkM2UwMTliMTdhYWM2ZDRhMjljOGJkZmQ5OTc3NzAy
|
15
|
+
NzIyMzI5NWY1YWFmY2M5ODMwYzIzN2UzNmFhMjRiMTkwYjUwMDQ=
|
data/README.md
CHANGED
@@ -1,32 +1,79 @@
|
|
1
|
-
|
1
|
+
Dalli ElastiCache [](http://badge.fury.io/rb/dalli-elasticache) [](https://travis-ci.org/zmillman/dalli-elasticache) [](https://codeclimate.com/github/ktheory/dalli-elasticache)
|
2
|
+
=================
|
2
3
|
|
3
|
-
|
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.
|
4
5
|
|
5
|
-
|
6
|
+
Installation
|
7
|
+
------------
|
6
8
|
|
7
9
|
Install the [rubygem](https://rubygems.org/gems/dalli-elasticache):
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
+
```ruby
|
12
|
+
# in your Gemfile
|
13
|
+
gem 'dalli-elasticache'
|
14
|
+
```
|
11
15
|
|
12
|
-
|
16
|
+
Setup for Rails 3.x and Newer
|
17
|
+
-----------------------------
|
13
18
|
|
14
|
-
|
15
|
-
elasticache = Dalli::ElastiCache.new(config_endpoint, dalli_options={})
|
16
|
-
# For example:
|
17
|
-
elasticache = Dalli::ElastiCache.new("aaron-scratch.vfdnac.cfg.use1.cache.amazonaws.com:11211", :ttl => 3600, :namespace => "my_app")
|
19
|
+
Configure your environment-specific application settings:
|
18
20
|
|
19
|
-
|
21
|
+
```ruby
|
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)
|
20
25
|
|
21
|
-
|
26
|
+
config.cache_store = :dalli_store, elasticache.servers, {:expires_in => 1.day, :compress => true}
|
27
|
+
```
|
22
28
|
|
23
|
-
|
24
|
-
elasticache.refresh.version
|
25
|
-
# If so, update your dalli client:
|
26
|
-
client = elasticache.client
|
29
|
+
Note that the ElastiCache server list will be refreshed each time an app server process starts.
|
27
30
|
|
31
|
+
Client Usage
|
32
|
+
------------
|
28
33
|
|
29
|
-
|
34
|
+
Create an ElastiCache instance:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
config_endpoint = "aaron-scratch.vfdnac.cfg.use1.cache.amazonaws.com:11211"
|
38
|
+
|
39
|
+
# Options for configuring the Dalli::Client
|
40
|
+
dalli_options = {
|
41
|
+
:expires_in => 24 * 60 * 60,
|
42
|
+
:namespace => "my_app",
|
43
|
+
:compress => true
|
44
|
+
}
|
45
|
+
|
46
|
+
elasticache = Dalli::ElastiCache.new(config_endpoint, dalli_options)
|
47
|
+
```
|
48
|
+
|
49
|
+
Fetch information about the Memcached nodes:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
# Dalli::Client with configuration from the AutoDiscovery endpoint
|
53
|
+
elasticache.client
|
54
|
+
# => #<Dalli::Client ... @servers=["10.84.227.155:11211", ...]>
|
55
|
+
|
56
|
+
# Node IP addresses and hostnames
|
57
|
+
elasticache.servers
|
58
|
+
# => ["10.84.227.115:11211", "10.77.71.127:11211"]
|
59
|
+
|
60
|
+
# Number of times the cluster configuration has changed
|
61
|
+
elasticache.version
|
62
|
+
# => 12
|
63
|
+
|
64
|
+
# Memcached version of the cluster
|
65
|
+
elasticache.engine_version
|
66
|
+
# => "1.4.14"
|
67
|
+
|
68
|
+
# Refresh data from the endpoint
|
69
|
+
elasticache.refresh
|
70
|
+
|
71
|
+
# Refresh and get client with new configuration
|
72
|
+
elasticache.refresh.client
|
73
|
+
```
|
74
|
+
|
75
|
+
License
|
76
|
+
-------
|
30
77
|
|
31
78
|
Copyright 2013 Aaron Suggs
|
32
79
|
|
data/Rakefile
CHANGED
data/lib/dalli/elasticache.rb
CHANGED
@@ -1,59 +1,46 @@
|
|
1
1
|
require 'dalli'
|
2
2
|
require 'socket'
|
3
3
|
require 'dalli/elasticache/version'
|
4
|
+
require 'dalli/elasticache/auto_discovery/endpoint'
|
5
|
+
require 'dalli/elasticache/auto_discovery/config_response'
|
6
|
+
require 'dalli/elasticache/auto_discovery/stats_response'
|
4
7
|
|
5
8
|
module Dalli
|
6
9
|
class ElastiCache
|
7
|
-
|
8
|
-
|
10
|
+
attr_reader :endpoint, :options
|
11
|
+
|
9
12
|
def initialize(config_endpoint, options={})
|
10
|
-
@
|
11
|
-
@config_port ||= 11211
|
13
|
+
@endpoint = Dalli::Elasticache::AutoDiscovery::Endpoint.new(config_endpoint)
|
12
14
|
@options = options
|
13
|
-
|
14
15
|
end
|
15
|
-
|
16
|
+
|
17
|
+
# Dalli::Client configured to connect to the cluster's nodes
|
16
18
|
def client
|
17
19
|
Dalli::Client.new(servers, options)
|
18
20
|
end
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
data
|
24
|
-
|
25
|
-
self
|
26
|
-
end
|
27
|
-
|
28
|
-
def config_get_cluster
|
29
|
-
# TODO: handle timeouts
|
30
|
-
s = TCPSocket.new(config_host, config_port)
|
31
|
-
s.puts "config get cluster\r\n"
|
32
|
-
data = []
|
33
|
-
while (line = s.gets) != "END\r\n"
|
34
|
-
data << line
|
35
|
-
end
|
36
|
-
|
37
|
-
s.close
|
38
|
-
data
|
39
|
-
end
|
40
|
-
|
41
|
-
def data
|
42
|
-
return @data if @data
|
43
|
-
raw_data = config_get_cluster
|
44
|
-
version = raw_data[1].to_i
|
45
|
-
instance_data = raw_data[2].split(/\s+/)
|
46
|
-
instances = instance_data.map{ |raw| host, ip, port = raw.split('|'); {:host => host, :ip => ip, :port => port} }
|
47
|
-
@data = { :version => version, :instances => instances }
|
48
|
-
end
|
49
|
-
|
21
|
+
|
22
|
+
# The number of times the cluster configuration has been changed
|
23
|
+
#
|
24
|
+
# Returns an integer
|
50
25
|
def version
|
51
|
-
|
26
|
+
endpoint.config.version
|
52
27
|
end
|
53
|
-
|
28
|
+
|
29
|
+
# The cache engine version of the cluster
|
30
|
+
def engine_version
|
31
|
+
endpoint.engine_version
|
32
|
+
end
|
33
|
+
|
34
|
+
# List of cluster server nodes with ip addresses and ports
|
54
35
|
def servers
|
55
|
-
|
36
|
+
endpoint.config.nodes.map{ |h| "#{h[:ip]}:#{h[:port]}" }
|
37
|
+
end
|
38
|
+
|
39
|
+
# Clear all cached data from the cluster endpoint
|
40
|
+
def refresh
|
41
|
+
@endpoint = Dalli::Elasticache::AutoDiscovery::Endpoint.new(config_endpoint)
|
42
|
+
|
43
|
+
self
|
56
44
|
end
|
57
|
-
|
58
45
|
end
|
59
46
|
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Dalli
|
2
|
+
module Elasticache
|
3
|
+
module AutoDiscovery
|
4
|
+
|
5
|
+
# This class wraps the raw ASCII response from an Auto Discovery endpoint
|
6
|
+
# and provides methods for extracting data from that response.
|
7
|
+
#
|
8
|
+
# http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.AddingToYourClientLibrary.html
|
9
|
+
|
10
|
+
class ConfigResponse
|
11
|
+
|
12
|
+
# The raw response text
|
13
|
+
attr_reader :text
|
14
|
+
|
15
|
+
# Matches the version line of the response
|
16
|
+
VERSION_REGEX = /^(\d+)$/
|
17
|
+
|
18
|
+
# Matches strings like "my-cluster.001.cache.aws.com|10.154.182.29|11211"
|
19
|
+
NODE_REGEX = /(([-.a-zA-Z0-9]+)\|(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)\|(\d+))/
|
20
|
+
NODE_LIST_REGEX = /^(#{NODE_REGEX}\s*)+$/
|
21
|
+
|
22
|
+
def initialize(response_text)
|
23
|
+
@text = response_text.to_s
|
24
|
+
end
|
25
|
+
|
26
|
+
# The number of times the configuration has been changed
|
27
|
+
#
|
28
|
+
# Returns an integer
|
29
|
+
def version
|
30
|
+
VERSION_REGEX.match(@text)[1].to_i
|
31
|
+
end
|
32
|
+
|
33
|
+
# Node hosts, ip addresses, and ports
|
34
|
+
#
|
35
|
+
# Returns an Array of Hashes with values for :host, :ip and :port
|
36
|
+
def nodes
|
37
|
+
NODE_LIST_REGEX.match(@text).to_s.scan(NODE_REGEX).map do |match|
|
38
|
+
{
|
39
|
+
:host => match[1],
|
40
|
+
:ip => match[2],
|
41
|
+
:port => match[3].to_i
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module Dalli
|
2
|
+
module Elasticache
|
3
|
+
module AutoDiscovery
|
4
|
+
class Endpoint
|
5
|
+
|
6
|
+
# Endpoint configuration
|
7
|
+
attr_reader :host
|
8
|
+
attr_reader :port
|
9
|
+
|
10
|
+
# Matches Strings like "my-host.cache.aws.com:11211"
|
11
|
+
ENDPOINT_REGEX = /([-.a-zA-Z0-9]+):(\d+)/
|
12
|
+
|
13
|
+
STATS_COMMAND = "stats\r\n"
|
14
|
+
CONFIG_COMMAND = "config get cluster\r\n"
|
15
|
+
# Legacy command for version < 1.4.14
|
16
|
+
OLD_CONFIG_COMMAND = "get AmazonElastiCache:cluster\r\n"
|
17
|
+
|
18
|
+
def initialize(endpoint)
|
19
|
+
ENDPOINT_REGEX.match(endpoint) do |m|
|
20
|
+
@host = m[1]
|
21
|
+
@port = m[2].to_i
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# A cached ElastiCache::StatsResponse
|
26
|
+
def stats
|
27
|
+
@stats ||= get_stats_from_remote
|
28
|
+
end
|
29
|
+
|
30
|
+
# A cached ElastiCache::ConfigResponse
|
31
|
+
def config
|
32
|
+
@config ||= get_config_from_remote
|
33
|
+
end
|
34
|
+
|
35
|
+
# The memcached engine version
|
36
|
+
def engine_version
|
37
|
+
stats.version
|
38
|
+
end
|
39
|
+
|
40
|
+
protected
|
41
|
+
|
42
|
+
def with_socket(&block)
|
43
|
+
TCPSocket.new(config_host, config_port)
|
44
|
+
end
|
45
|
+
|
46
|
+
def get_stats_from_remote
|
47
|
+
data = remote_command(STATS_COMMAND)
|
48
|
+
StatsResponse.new(data)
|
49
|
+
end
|
50
|
+
|
51
|
+
def get_config_from_remote
|
52
|
+
if engine_version < Gem::Version.new("1.4.14")
|
53
|
+
data = remote_command(OLD_CONFIG_COMMAND)
|
54
|
+
else
|
55
|
+
data = remote_command(CONFIG_COMMAND)
|
56
|
+
end
|
57
|
+
ConfigResponse.new(data)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Send an ASCII command to the endpoint
|
61
|
+
#
|
62
|
+
# Returns the raw response as a String
|
63
|
+
def remote_command(command)
|
64
|
+
socket = TCPSocket.new(@host, @port)
|
65
|
+
socket.puts command
|
66
|
+
|
67
|
+
data = ""
|
68
|
+
until (line = socket.readline) =~ /END/
|
69
|
+
data << line
|
70
|
+
end
|
71
|
+
|
72
|
+
socket.close
|
73
|
+
data
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Dalli
|
2
|
+
module Elasticache
|
3
|
+
module AutoDiscovery
|
4
|
+
|
5
|
+
# This class wraps the raw ASCII response from an Auto Discovery endpoint
|
6
|
+
# and provides methods for extracting data from that response.
|
7
|
+
#
|
8
|
+
# http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.AddingToYourClientLibrary.html
|
9
|
+
|
10
|
+
class StatsResponse
|
11
|
+
|
12
|
+
# The raw response text
|
13
|
+
attr_reader :text
|
14
|
+
|
15
|
+
# Matches the version line of the response
|
16
|
+
VERSION_REGEX = /^STAT version ([0-9.]+)\s*$/
|
17
|
+
|
18
|
+
def initialize(response_text)
|
19
|
+
@text = response_text.to_s
|
20
|
+
end
|
21
|
+
|
22
|
+
# Extract the engine version stat
|
23
|
+
#
|
24
|
+
# Returns a Gem::Version
|
25
|
+
def version
|
26
|
+
Gem::Version.new(VERSION_REGEX.match(@text)[1])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Dalli::Elasticache::AutoDiscovery::ConfigResponse' do
|
4
|
+
let :response do
|
5
|
+
text = "CONFIG cluster 0 141\r\n12\nmycluster.0001.cache.amazonaws.com|10.112.21.1|11211 mycluster.0002.cache.amazonaws.com|10.112.21.2|11211 mycluster.0003.cache.amazonaws.com|10.112.21.3|11211\n\r\n"
|
6
|
+
Dalli::Elasticache::AutoDiscovery::ConfigResponse.new(text)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '#version' do
|
10
|
+
it 'parses version' do
|
11
|
+
response.version.should == 12
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#nodes' do
|
16
|
+
it 'parses hosts' do
|
17
|
+
response.nodes.map{|s| s[:host]}.should == [
|
18
|
+
"mycluster.0001.cache.amazonaws.com",
|
19
|
+
"mycluster.0002.cache.amazonaws.com",
|
20
|
+
"mycluster.0003.cache.amazonaws.com"
|
21
|
+
]
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'parses ip addresses' do
|
25
|
+
response.nodes.map{|s| s[:ip]}.should == ["10.112.21.1", "10.112.21.2", "10.112.21.3"]
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'parses ports' do
|
29
|
+
response.nodes.map{|s| s[:port]}.should == [11211, 11211, 11211]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Dalli::ElastiCache::Endpoint' do
|
4
|
+
let(:cache) do
|
5
|
+
options = {
|
6
|
+
:expires_in => 24*60*60,
|
7
|
+
:namespace => "my_app",
|
8
|
+
:compress => true
|
9
|
+
}
|
10
|
+
Dalli::ElastiCache.new("my-cluster.cfg.use1.cache.amazonaws.com:11211", options)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '.new' do
|
14
|
+
it 'builds endpoint' do
|
15
|
+
cache.endpoint.host.should == "my-cluster.cfg.use1.cache.amazonaws.com"
|
16
|
+
cache.endpoint.port.should == 11211
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'stores Dalli options' do
|
20
|
+
cache.options[:expires_in].should == 24*60*60
|
21
|
+
cache.options[:namespace].should == "my_app"
|
22
|
+
cache.options[:compress].should == true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe '#client' do
|
27
|
+
it 'builds with node list'
|
28
|
+
it 'builds with options'
|
29
|
+
end
|
30
|
+
|
31
|
+
describe '#servers' do
|
32
|
+
it 'lists addresses and ports'
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#version' do
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '#engine_version' do
|
39
|
+
end
|
40
|
+
|
41
|
+
describe '#refresh' do
|
42
|
+
it 'clears endpoint configuration'
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Dalli::Elasticache::AutoDiscovery::Endpoint' do
|
4
|
+
let(:endpoint) do
|
5
|
+
Dalli::Elasticache::AutoDiscovery::Endpoint.new("my-cluster.cfg.use1.cache.amazonaws.com:11211")
|
6
|
+
end
|
7
|
+
|
8
|
+
describe '.new' do
|
9
|
+
it 'parses host' do
|
10
|
+
endpoint.host.should == "my-cluster.cfg.use1.cache.amazonaws.com"
|
11
|
+
end
|
12
|
+
it 'parses port' do
|
13
|
+
endpoint.port.should == 11211
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Dalli::Elasticache::AutoDiscovery::StatsResponse' do
|
4
|
+
let :response do
|
5
|
+
text = "STAT pid 1\r\nSTAT uptime 68717\r\nSTAT time 1398885375\r\nSTAT version 1.4.14\r\nSTAT libevent 1.4.13-stable\r\nSTAT pointer_size 64\r\nSTAT rusage_user 0.136008\r\nSTAT rusage_system 0.424026\r\nSTAT curr_connections 5\r\nSTAT total_connections 1159\r\nSTAT connection_structures 6\r\nSTAT reserved_fds 5\r\nSTAT cmd_get 0\r\nSTAT cmd_set 0\r\nSTAT cmd_flush 0\r\nSTAT cmd_touch 0\r\nSTAT cmd_config_get 4582\r\nSTAT cmd_config_set 2\r\nSTAT get_hits 0\r\nSTAT get_misses 0\r\nSTAT delete_misses 0\r\nSTAT delete_hits 0\r\nSTAT incr_misses 0\r\nSTAT incr_hits 0\r\nSTAT decr_misses 0\r\nSTAT decr_hits 0\r\nSTAT cas_misses 0\r\nSTAT cas_hits 0\r\nSTAT cas_badval 0\r\nSTAT touch_hits 0\r\nSTAT touch_misses 0\r\nSTAT auth_cmds 0\r\nSTAT auth_errors 0\r\nSTAT bytes_read 189356\r\nSTAT bytes_written 2906615\r\nSTAT limit_maxbytes 209715200\r\nSTAT accepting_conns 1\r\nSTAT listen_disabled_num 0\r\nSTAT threads 1\r\nSTAT conn_yields 0\r\nSTAT curr_config 1\r\nSTAT hash_power_level 16\r\nSTAT hash_bytes 524288\r\nSTAT hash_is_expanding 0\r\nSTAT expired_unfetched 0\r\nSTAT evicted_unfetched 0\r\nSTAT bytes 0\r\nSTAT curr_items 0\r\nSTAT total_items 0\r\nSTAT evictions 0\r\nSTAT reclaimed 0\r\n"
|
6
|
+
Dalli::Elasticache::AutoDiscovery::StatsResponse.new(text)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '#version' do
|
10
|
+
it 'parses version' do
|
11
|
+
response.version.should == Gem::Version.new("1.4.14")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dalli-elasticache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Aaron Suggs
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,20 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
37
|
requirements:
|
27
38
|
- - ! '>='
|
28
39
|
- !ruby/object:Gem::Version
|
@@ -30,7 +41,6 @@ dependencies:
|
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: dalli
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
44
|
requirements:
|
35
45
|
- - ! '>='
|
36
46
|
- !ruby/object:Gem::Version
|
@@ -38,45 +48,59 @@ dependencies:
|
|
38
48
|
type: :runtime
|
39
49
|
prerelease: false
|
40
50
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
51
|
requirements:
|
43
52
|
- - ! '>='
|
44
53
|
- !ruby/object:Gem::Version
|
45
54
|
version: 1.0.0
|
46
|
-
description:
|
55
|
+
description: ! " This gem provides an interface for fetching cluster information
|
56
|
+
from an AWS\n ElastiCache AutoDiscovery server and configuring a Dalli client
|
57
|
+
to connect\n to all nodes in the cache cluster.\n"
|
47
58
|
email: aaron@ktheory.com
|
48
59
|
executables: []
|
49
60
|
extensions: []
|
50
61
|
extra_rdoc_files: []
|
51
62
|
files:
|
63
|
+
- lib/dalli/elasticache/auto_discovery/config_response.rb
|
64
|
+
- lib/dalli/elasticache/auto_discovery/endpoint.rb
|
65
|
+
- lib/dalli/elasticache/auto_discovery/stats_response.rb
|
52
66
|
- lib/dalli/elasticache/version.rb
|
53
67
|
- lib/dalli/elasticache.rb
|
54
68
|
- lib/dalli-elasticache.rb
|
55
69
|
- README.md
|
56
70
|
- Rakefile
|
71
|
+
- spec/config_response_spec.rb
|
72
|
+
- spec/elasticache_spec.rb
|
73
|
+
- spec/endpoint_spec.rb
|
74
|
+
- spec/spec_helper.rb
|
75
|
+
- spec/stats_response_spec.rb
|
57
76
|
homepage: http://github.com/ktheory/dalli-elasticache
|
58
|
-
licenses:
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
59
80
|
post_install_message:
|
60
81
|
rdoc_options:
|
61
82
|
- --charset=UTF-8
|
62
83
|
require_paths:
|
63
84
|
- lib
|
64
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
86
|
requirements:
|
67
87
|
- - ! '>='
|
68
88
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
89
|
+
version: 1.9.2
|
70
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
91
|
requirements:
|
73
92
|
- - ! '>='
|
74
93
|
- !ruby/object:Gem::Version
|
75
94
|
version: 1.3.5
|
76
95
|
requirements: []
|
77
96
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.
|
97
|
+
rubygems_version: 2.1.11
|
79
98
|
signing_key:
|
80
|
-
specification_version:
|
81
|
-
summary:
|
82
|
-
test_files:
|
99
|
+
specification_version: 4
|
100
|
+
summary: Configure Dalli clients with ElastiCache's AutoDiscovery
|
101
|
+
test_files:
|
102
|
+
- spec/config_response_spec.rb
|
103
|
+
- spec/elasticache_spec.rb
|
104
|
+
- spec/endpoint_spec.rb
|
105
|
+
- spec/spec_helper.rb
|
106
|
+
- spec/stats_response_spec.rb
|