ruboty-redis 0.0.5 → 0.0.6
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 +1 -0
- data/lib/ruboty/brains/redis.rb +6 -3
- data/lib/ruboty/redis/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bb9ed5d1f9bb24d7cb997a620c3e9b4a2ff03a9
|
4
|
+
data.tar.gz: d54ddedbb6e65824b86ac98d60a321b09e422119
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0ec7f2b4f69d91db94c61125f5a81947d799b87a0e00ea94cfbc808071091e59f5ca83a2cb33d3c5dd1232b3eb34db16f70e46c463b0dfbc74165792c0b51d2
|
7
|
+
data.tar.gz: effb82c79e626f973d19a65620b8d1e52cf71f07bc9f337fbd55e72fd54e2a4d7620f8e35d166d6afcc9c8da75e8e0842b63fabe7384f1d8b0cf7010d1f09b24
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,6 +12,7 @@ gem "ruboty-redis"
|
|
12
12
|
REDIS_SAVE_INTERVAL - Interval sec to push data to Redis (default: 5)
|
13
13
|
REDIS_URL - Redis URL (e.g. redis://foo:bar@example.com:6379/)
|
14
14
|
REDISTOGO_URL - Another Redis URL (At least one Redis URL is required)
|
15
|
+
REDIS_NAMESPACE - Redis name space (default: ruboty)
|
15
16
|
```
|
16
17
|
|
17
18
|
## Screenshot
|
data/lib/ruboty/brains/redis.rb
CHANGED
@@ -4,8 +4,6 @@ require "redis/namespace"
|
|
4
4
|
module Ruboty
|
5
5
|
module Brains
|
6
6
|
class Redis < Base
|
7
|
-
NAMESPACE = "ruboty"
|
8
|
-
|
9
7
|
KEY = "brain"
|
10
8
|
|
11
9
|
attr_reader :thread
|
@@ -13,6 +11,7 @@ module Ruboty
|
|
13
11
|
env :REDIS_SAVE_INTERVAL, "Interval sec to push data to Redis (default: 5)", optional: true
|
14
12
|
env :REDIS_URL, "Redis URL (e.g. redis://foo:bar@example.com:6379/)", optional: true
|
15
13
|
env :REDISTOGO_URL, "Another Redis URL (At least one Redis URL is required)", optional: true
|
14
|
+
env :REDIS_NAMESPACE, "Redis name space (default: ruboty)", optional: true
|
16
15
|
|
17
16
|
def initialize
|
18
17
|
super
|
@@ -55,7 +54,11 @@ module Ruboty
|
|
55
54
|
end
|
56
55
|
|
57
56
|
def client
|
58
|
-
@client ||= ::Redis::Namespace.new(
|
57
|
+
@client ||= ::Redis::Namespace.new(namespace, redis: redis)
|
58
|
+
end
|
59
|
+
|
60
|
+
def namespace
|
61
|
+
ENV["REDIS_NAMESPACE"] || "ruboty"
|
59
62
|
end
|
60
63
|
|
61
64
|
def redis
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.4.5
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Store Ruboty's memory in Redis.
|