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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +2 -1
- data/lib/ruboty/brains/redis.rb +9 -2
- data/lib/ruboty/redis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bebf7d8bad9f6ae6250d06cc02a4412d92e639f
|
4
|
+
data.tar.gz: 6171eac82d8fbf9b2570d183473da60198f1b2f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b880f22d418cae86fed94956c7a56118156cf02077ba779958b4f0e86b56cad7a362a9795fbf52756c626887ad9a6896233f6eded08ad6142793d8fa58f52d
|
7
|
+
data.tar.gz: 31c5723b5d0b64e3a410116a457b02670959853716bf29682be8314de40a55737dad258629aaa538ee15e4e748b1e155c8faad76b21fe927577519d47f5d1bfe
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/ruboty/brains/redis.rb
CHANGED
@@ -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
|
data/lib/ruboty/redis/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|