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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7516e95ed940d5b1ef0c3b5057877fee5513df08184748e5cbe89a6433b4cf81
4
- data.tar.gz: 3f21b371b547d3b3b12ae69435793f3172d7e93e30cbcd862dd3443bee33b062
3
+ metadata.gz: de2252ead55289509a44e456b8fddc74529dac061dd45dd2d54d31e85ff22c2a
4
+ data.tar.gz: fb369388e14e55b37ed07014fa686192c350e6b58e34f8e6dc680ffc3e67b825
5
5
  SHA512:
6
- metadata.gz: f22958454df88403c508ebe652d885036b4db7044535fd4e44ec9c2970ead853969949fcbf6f3e196e6919c7903559fa9c8decc3067304e705f6dd0a77985d8b
7
- data.tar.gz: 8c1485dd295b7fa33c397947390633b53f52ada35205b6ca2e30a352fe42c87950fc7c467ed605c10c243f2a9129f31d00d2b98b2c102c0e4b4bee16b650fcb4
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
@@ -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
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Redlics version.
4
4
  module Redlics
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
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.0
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-06-29 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport