ruboty-redis 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51e1fea6967cb7f434750ed6effa3499ee9dd808
4
- data.tar.gz: 23d41bb2363317716008721d8a1f0417f2879483
3
+ metadata.gz: 1bebf7d8bad9f6ae6250d06cc02a4412d92e639f
4
+ data.tar.gz: 6171eac82d8fbf9b2570d183473da60198f1b2f4
5
5
  SHA512:
6
- metadata.gz: 3e033d88bb51c0f416db1bf68a3c0ade539c1cd003dd8dd8a2023604bc646d3563c509a79a8ab5d2800a78b32a12fd18e8948a82d14c7dd282f1aea79eff0036
7
- data.tar.gz: 39d10312618201ede035010007ffe72ffedcea209e1f2cb6d6d0333be3b59ab5cbb461b80567a372c87accb6334fcee689fcebbcbd5439ff1ab84a04004f4505
6
+ metadata.gz: 48b880f22d418cae86fed94956c7a56118156cf02077ba779958b4f0e86b56cad7a362a9795fbf52756c626887ad9a6896233f6eded08ad6142793d8fa58f52d
7
+ data.tar.gz: 31c5723b5d0b64e3a410116a457b02670959853716bf29682be8314de40a55737dad258629aaa538ee15e4e748b1e155c8faad76b21fe927577519d47f5d1bfe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.0.5
2
+ * Support REDISTOGO_URL
3
+
1
4
  ## 0.0.4
2
5
  * Rename: Ellen -> Ruboty
3
6
 
data/README.md CHANGED
@@ -9,8 +9,9 @@ gem "ruboty-redis"
9
9
 
10
10
  ## ENV
11
11
  ```
12
- REDIS_URL - Redis URL (e.g. redis://foo:bar@example.com:6379/)
13
12
  REDIS_SAVE_INTERVAL - Interval sec to push data to Redis (default: 5)
13
+ REDIS_URL - Redis URL (e.g. redis://foo:bar@example.com:6379/)
14
+ REDISTOGO_URL - Another Redis URL (At least one Redis URL is required)
14
15
  ```
15
16
 
16
17
  ## Screenshot
@@ -10,8 +10,9 @@ module Ruboty
10
10
 
11
11
  attr_reader :thread
12
12
 
13
- env :REDIS_URL, "Redis URL (e.g. redis://foo:bar@example.com:6379/)"
14
13
  env :REDIS_SAVE_INTERVAL, "Interval sec to push data to Redis (default: 5)", optional: true
14
+ env :REDIS_URL, "Redis URL (e.g. redis://foo:bar@example.com:6379/)", optional: true
15
+ env :REDISTOGO_URL, "Another Redis URL (At least one Redis URL is required)", optional: true
15
16
 
16
17
  def initialize
17
18
  super
@@ -23,6 +24,12 @@ module Ruboty
23
24
  @data ||= pull || {}
24
25
  end
25
26
 
27
+ # Override.
28
+ def validate!
29
+ super
30
+ Ruboty.die("#{self.class.usage}") unless url
31
+ end
32
+
26
33
  private
27
34
 
28
35
  def push
@@ -56,7 +63,7 @@ module Ruboty
56
63
  end
57
64
 
58
65
  def url
59
- ENV["REDIS_URL"]
66
+ ENV["REDIS_URL"] || ENV["REDISTOGO_URL"]
60
67
  end
61
68
 
62
69
  def interval
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Redis
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-31 00:00:00.000000000 Z
11
+ date: 2014-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruboty