redisent 0.1.0.alpha → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +5 -5
  2. data/.gems +1 -1
  3. data/README.md +9 -11
  4. data/lib/redisent.rb +1 -0
  5. data/redisent.gemspec +1 -1
  6. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a94d9eca24c1582cf8ed550514a0a4d4e9b5d3fa
4
- data.tar.gz: 8901e7d03da59f40b9e377ac87fd456819fd3120
2
+ SHA256:
3
+ metadata.gz: c684696c9381c53f0a45a311a2c26d8965a2601af394c18c7c1d27f82f95cda5
4
+ data.tar.gz: 54469e4983b0076c9e81925cfe92ee0bb973bdd7762b386b86bf7d6568151175
5
5
  SHA512:
6
- metadata.gz: 3621af7ae4f480b177a0f3c4c221f754fef2cb574939ed308f2655a1ad725475f7bcba0e69b46ce284a3d4424808d35fa754eae5047cb55c1d3a982f69900d19
7
- data.tar.gz: 8a2478cbbd51e01196eae3c22d78d73fc90ff3e1774977f6b5ddd5a6bf63388551496e8dacb4a5c02ff0cb23a08342cef422d6894018e2cc1014ed4726881d22
6
+ metadata.gz: eeb577f4c7a6c4fcd9e90a6205e75df6da15867d50f8254f6521ec1d8201faf79c614582ad9a7b9d23589f1f8ac1d47d6d6783d824fb02e9402bb0e56cb1578a
7
+ data.tar.gz: 210093c6702c0ac272bff316d3322282c12fdbeffa0f83af0a2238c861ecf7a4f319037a04ac531e422d27841317b4f397922665a020e3e0a57c84be5b53e6df
data/.gems CHANGED
@@ -1,2 +1,2 @@
1
- redic -v 1.5.0
2
1
  cutest -v 1.2.3
2
+ redic -v 1.5.0
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- redisent
2
- ====
1
+ Redisent
2
+ ========
3
3
 
4
4
  Sentinel aware Redis client.
5
5
 
@@ -19,21 +19,19 @@ connecting to the master.
19
19
 
20
20
  ```ruby
21
21
  # List of sentinels.
22
- sentinels = ["redis://localhost:27379/",
23
- "redis://localhost:27380/",
24
- "redis://localhost:27381/"]
22
+ sentinels = ["localhost:27379",
23
+ "localhost:27380",
24
+ "localhost:27381"]
25
25
 
26
26
  # Master server name as defined in sentinel.conf.
27
27
  master = "server-1"
28
28
 
29
- # Additional options for the master server.
30
- options = { :timeout => 5, :password => "abcd" }
31
-
32
- redis = Redisent.new(sentinels, master, options)
29
+ redis = Redisent.new(hosts: sentinels, name: master)
33
30
  ```
34
31
 
35
- If the sentinels can't be reached, or if there is no master available,
36
- you will get the exception `Redis::CannotConnectError`.
32
+ If the sentinels can't be reached you will get the exception
33
+ `Redisent::UnreachableHosts`. If the master name is unknown, you
34
+ will get the exception `Redisent::UnknownMaster`.
37
35
 
38
36
  ## Failover
39
37
 
@@ -75,6 +75,7 @@ class Redisent
75
75
  end
76
76
 
77
77
  if healthy.any?
78
+ healthy.uniq!
78
79
  @hosts.replace(healthy)
79
80
  @prime.configure(master)
80
81
  return true
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "redisent"
3
- s.version = "0.1.0.alpha"
3
+ s.version = "0.1.0"
4
4
  s.summary = "Sentinel aware Redis client."
5
5
  s.description = "Redisent is a wrapper for the Redis client that fetches configuration details from sentinels."
6
6
  s.authors = ["Michel Martens"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redisent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.alpha
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Martens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-23 00:00:00.000000000 Z
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redic
@@ -69,12 +69,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
69
  version: '0'
70
70
  required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">"
72
+ - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 1.3.1
74
+ version: '0'
75
75
  requirements: []
76
76
  rubyforge_project:
77
- rubygems_version: 2.4.5.1
77
+ rubygems_version: 2.7.6
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Sentinel aware Redis client.