redlics 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +27 -0
- data/README.md +3 -4
- data/lib/redlics/connection.rb +1 -1
- data/lib/redlics/version.rb +1 -1
- data/redlics.gemspec +1 -1
- metadata +6 -6
- data/.travis.yml +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4452d5ca3b3e9f0b5c6b9edf8899e13800ae96091198cc9cbf9de974886f53fa
|
4
|
+
data.tar.gz: ba8d6b241184a380efa2f57e19a79b0d58fe186a12b9ce1f73a39ddfd71dcdd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990c1a82674e44c5b883161a940ab64c3eace4430943b9d01b4c083eaf2d8cc5007a37231ad4b7460551a64cca728f7485f866d0d4d746ca2d0cb056393404fc
|
7
|
+
data.tar.gz: 14f1adbfa53d512bbcd91efc6044677ce7af89a14606f38bf5cb7688ff8465d062cde8a09a3c8e7c6257f7c5a85e844829fe443f66ee18579f7ba24e85ae2cc4
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby-version:
|
13
|
+
- head
|
14
|
+
- '3.2'
|
15
|
+
- '3.1'
|
16
|
+
- '3.0'
|
17
|
+
- '2.7'
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v3
|
21
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby-version }}
|
25
|
+
bundler-cache: true # 'bundle install' and cache
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rake
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
[](https://rubygems.org/gems/redlics)
|
4
4
|
[](https://rubygems.org/gems/redlics)
|
5
|
-
[](https://travis-ci.org/phlegx/redlics)
|
6
5
|
[](https://codeclimate.com/github/phlegx/redlics)
|
7
6
|
[](https://inch-ci.org/github/phlegx/redlics)
|
8
7
|
[](https://opensource.org/licenses/MIT)
|
@@ -24,7 +23,7 @@ Record millions of tracks and counts consuming low memory! Redlics is a gem for
|
|
24
23
|
|
25
24
|
## Installation
|
26
25
|
|
27
|
-
**System Requirements:** Redis v3.x is recommended!
|
26
|
+
**System Requirements:** Redis >= v3.x is recommended!
|
28
27
|
|
29
28
|
Add this line to your application's Gemfile:
|
30
29
|
|
@@ -52,7 +51,7 @@ Redlics.configure do |config|
|
|
52
51
|
config.pool_size = 5 # Default connection pool size is 5
|
53
52
|
config.pool_timeout = 5 # Default connection pool timeout is 5
|
54
53
|
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
|
54
|
+
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
55
|
config.silent = false # Silent Redis errors, default is false
|
57
56
|
config.separator = ':' # Default Redis namespace separator, default is ':'
|
58
57
|
config.bucket = true # Bucketize counter object ids, default is true
|
@@ -402,4 +401,4 @@ Keys in Redis look like this:
|
|
402
401
|
|
403
402
|
The MIT License
|
404
403
|
|
405
|
-
Copyright (c)
|
404
|
+
Copyright (c) 2023 Phlegx Systems Technologies GmbH
|
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
data/redlics.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'activesupport', '>= 5.2.8'
|
26
26
|
spec.add_dependency 'connection_pool', '~> 2.2'
|
27
27
|
spec.add_dependency 'msgpack', '>= 0.7.2'
|
28
|
-
spec.add_dependency 'redis', '
|
28
|
+
spec.add_dependency 'redis', '>= 4.2'
|
29
29
|
spec.add_dependency 'redis-namespace', '~> 1.5'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'minitest', '~> 5.8'
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Egon Zemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
name: redis
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '4.2'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '4.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -116,8 +116,8 @@ executables: []
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".github/workflows/tests.yml"
|
119
120
|
- ".gitignore"
|
120
|
-
- ".travis.yml"
|
121
121
|
- Gemfile
|
122
122
|
- LICENSE.txt
|
123
123
|
- README.md
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
160
|
+
rubygems_version: 3.4.10
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Redis analytics with tracks and counts.
|
data/.travis.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
bundler_args: --jobs=3 --retry=3
|
3
|
-
language: ruby
|
4
|
-
cache: bundler
|
5
|
-
before_install:
|
6
|
-
- gem update --remote bundler
|
7
|
-
rvm:
|
8
|
-
- 2.3
|
9
|
-
- 2.4
|
10
|
-
- 2.5
|
11
|
-
- 2.6
|
12
|
-
- 2.7
|
13
|
-
- jruby-9.0.0.0
|
14
|
-
- ruby-head
|
15
|
-
- jruby-head
|
16
|
-
matrix:
|
17
|
-
allow_failures:
|
18
|
-
- rvm: ruby-head
|
19
|
-
- rvm: jruby-head
|
20
|
-
fast_finish: true
|
21
|
-
notifications:
|
22
|
-
email:
|
23
|
-
on_success: change
|
24
|
-
on_failure: always
|
25
|
-
script:
|
26
|
-
- bundle exec rake
|