redlics 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/redlics/connection.rb +1 -1
- data/lib/redlics/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de2252ead55289509a44e456b8fddc74529dac061dd45dd2d54d31e85ff22c2a
|
4
|
+
data.tar.gz: fb369388e14e55b37ed07014fa686192c350e6b58e34f8e6dc680ffc3e67b825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33884e5e7039b031bab31a6c0aeb8ec7ab80acb99688f7bbb94124d94196094005b9b2c80521949a8508e40a2b2626b1d55e187144ba3957522435ab5f6a3536
|
7
|
+
data.tar.gz: f9cead836171308dacc2a2a14b53c684ed4232066244f056721889b891a5de28f96ca4c9f89ebb4dc0e735da340aa0ae88a76c749004b92d71fe66d1d4e86f00
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Record millions of tracks and counts consuming low memory! Redlics is a gem for
|
|
24
24
|
|
25
25
|
## Installation
|
26
26
|
|
27
|
-
**System Requirements:** Redis v3.x is recommended!
|
27
|
+
**System Requirements:** Redis >= v3.x is recommended!
|
28
28
|
|
29
29
|
Add this line to your application's Gemfile:
|
30
30
|
|
@@ -52,7 +52,7 @@ Redlics.configure do |config|
|
|
52
52
|
config.pool_size = 5 # Default connection pool size is 5
|
53
53
|
config.pool_timeout = 5 # Default connection pool timeout is 5
|
54
54
|
config.namespace = 'rl' # Default Redis namespace is 'rl', short name saves memory
|
55
|
-
config.redis = { url: 'redis://127.0.0.1:6379' } # Default Redis configuration, see: https://github.com/redis/redis-rb/blob/master/lib/redis.rb
|
55
|
+
config.redis = { url: 'redis://127.0.0.1:6379' } # Default Redis configuration or Redis object, see: https://github.com/redis/redis-rb/blob/master/lib/redis.rb
|
56
56
|
config.silent = false # Silent Redis errors, default is false
|
57
57
|
config.separator = ':' # Default Redis namespace separator, default is ':'
|
58
58
|
config.bucket = true # Bucketize counter object ids, default is true
|
data/lib/redlics/connection.rb
CHANGED
@@ -37,7 +37,7 @@ module Redlics
|
|
37
37
|
# @return [Redis::Namespace] Redis namespaced connection
|
38
38
|
def build_connection(options)
|
39
39
|
namespace = options[:namespace]
|
40
|
-
connection = Redis.new(redis_opts(options))
|
40
|
+
connection = options[:redis].is_a?(Redis) ? options[:redis] : Redis.new(redis_opts(options))
|
41
41
|
if namespace
|
42
42
|
Redis::Namespace.new(namespace, redis: connection)
|
43
43
|
else
|
data/lib/redlics/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redlics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Egon Zemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|