redis-time-series 0.7.2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +4 -4
- data/Appraisals +4 -0
- data/CHANGELOG.md +12 -0
- data/README.md +7 -1
- data/bin/setup +1 -1
- data/lib/redis/time_series/client.rb +3 -3
- data/lib/redis/time_series/filters.rb +1 -1
- data/lib/redis/time_series/version.rb +1 -1
- data/lib/redis/time_series.rb +1 -1
- data/redis-time-series.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e5cca8991e5d6ae3ad22183b08949d3d2d537133d0ddea1c5a015731600544e
|
4
|
+
data.tar.gz: 5b8862380560758cb2955e06a947068c73478806f1dbe386c23714789594ded3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f02a7db5472550fc575b9d3dea62fce6d9718f76a95547f86e35d8986603cf99e83ec82c672333f862ad940bcc54d97e3e7eb8f5a108f75650b8d9731007b20
|
7
|
+
data.tar.gz: 3ebfbe989c54976ad6c715f958fa561ee04a56a549f980a6c29f13c4d849ec7bca1f7750c2f526b738ce20ee95a1e568a4ee35ad855237f0e2078eb209846bc4
|
data/.github/workflows/rspec.yml
CHANGED
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
fail-fast: false
|
16
16
|
matrix:
|
17
17
|
image_version: ['latest', 'edge']
|
18
|
-
ruby_version: ['2.
|
18
|
+
ruby_version: ['2.7', '3.0', '3.1', '3.2', '3.3']
|
19
19
|
services:
|
20
20
|
redis:
|
21
21
|
image: redislabs/redistimeseries:${{ matrix.image_version }}
|
@@ -26,7 +26,7 @@ jobs:
|
|
26
26
|
GIT_COMMIT_SHA: ${{ github.sha }}
|
27
27
|
GIT_BRANCH: ${{ github.head_ref }}
|
28
28
|
steps:
|
29
|
-
- uses: actions/checkout@
|
29
|
+
- uses: actions/checkout@v4
|
30
30
|
- name: Set up Ruby
|
31
31
|
uses: ruby/setup-ruby@v1
|
32
32
|
with:
|
@@ -44,7 +44,7 @@ jobs:
|
|
44
44
|
run: bundle exec appraisal rake spec
|
45
45
|
- name: Upload coverage report
|
46
46
|
run: ./cc-test-reporter after-build -t simplecov coverage/.resultset.json
|
47
|
-
- uses: actions/upload-artifact@
|
47
|
+
- uses: actions/upload-artifact@v4
|
48
48
|
with:
|
49
|
-
name: coverage
|
49
|
+
name: coverage-${{ matrix.ruby_version }}-${{ matrix.image_version }}
|
50
50
|
path: coverage/
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## 0.8.1
|
6
|
+
* Add Ruby 3.2 to build matrix (#82)
|
7
|
+
* Bump actions versions to v4 (#86)
|
8
|
+
* Add Ruby 3.3, drop Ruby 2.6 from build matrix (#87)
|
9
|
+
* Allow filters to use any filter type (#85) (@optijon)
|
10
|
+
|
11
|
+
## 0.8.0
|
12
|
+
* Remove usage of `Redis.current` (#78)
|
13
|
+
* Fix flaky aggregation spec (#80)
|
14
|
+
* Compatibility updates and spec fixes (#81)
|
15
|
+
* Add redis-rb 5.x to appraisals (#83)
|
16
|
+
|
5
17
|
## 0.7.2
|
6
18
|
* Fix sample building for TS.MADD with multiple series (#77)
|
7
19
|
|
data/README.md
CHANGED
@@ -50,6 +50,12 @@ Or install it yourself as:
|
|
50
50
|
|
51
51
|
Check out the Redis Time Series [command documentation](https://oss.redislabs.com/redistimeseries/master/commands/) first. Should be able to do most of that.
|
52
52
|
|
53
|
+
### Configuring
|
54
|
+
You can set the default Redis client for class-level calls operating on multiple series, as well as series created without specifying a client.
|
55
|
+
```ruby
|
56
|
+
Redis::TimeSeries.redis = Redis.new(url: ENV['REDIS_URL'], timeout: 1)
|
57
|
+
```
|
58
|
+
|
53
59
|
### Creating a Series
|
54
60
|
Create a series (issues `TS.CREATE` command) and return a Redis::TimeSeries object for further use. Key param is required, all other arguments are optional.
|
55
61
|
```ruby
|
@@ -58,7 +64,7 @@ ts = Redis::TimeSeries.create(
|
|
58
64
|
labels: { foo: 'bar' },
|
59
65
|
retention: 600,
|
60
66
|
uncompressed: false,
|
61
|
-
redis: Redis.new(url: ENV['REDIS_URL']) # defaults to Redis.
|
67
|
+
redis: Redis.new(url: ENV['REDIS_URL']) # defaults to Redis::TimeSeries.redis
|
62
68
|
)
|
63
69
|
```
|
64
70
|
You can also call `.new` instead of `.create` to skip the `TS.CREATE` command.
|
data/bin/setup
CHANGED
@@ -10,7 +10,7 @@ require 'active_support/core_ext/numeric/time'
|
|
10
10
|
require 'redis'
|
11
11
|
require 'redis-time-series'
|
12
12
|
|
13
|
-
Redis.
|
13
|
+
Redis.new.flushall
|
14
14
|
ts1 = Redis::TimeSeries.create('ts1')
|
15
15
|
ts2 = Redis::TimeSeries.create('ts2')
|
16
16
|
ts3 = Redis::TimeSeries.create('ts3')
|
@@ -42,9 +42,9 @@ class Redis
|
|
42
42
|
@debug = !!bool
|
43
43
|
end
|
44
44
|
|
45
|
-
# @return [Redis] the current Redis client. Defaults to +Redis.
|
45
|
+
# @return [Redis] the current Redis client. Defaults to +Redis.new+
|
46
46
|
def redis
|
47
|
-
@redis ||= Redis.
|
47
|
+
@redis ||= Redis.new
|
48
48
|
end
|
49
49
|
|
50
50
|
# Set the default Redis client for time series objects.
|
@@ -68,7 +68,7 @@ class Redis
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def cmd_with_redis(redis, name, *args)
|
71
|
-
args = args.flatten.compact.map { |arg| arg.is_a?(Time) ? arg.ts_msec : arg }
|
71
|
+
args = args.flatten.compact.map { |arg| arg.is_a?(Time) ? arg.ts_msec : arg.to_s }
|
72
72
|
puts "DEBUG: #{name} #{args.join(' ')}" if debug
|
73
73
|
redis.call name, args
|
74
74
|
end
|
data/lib/redis/time_series.rb
CHANGED
data/redis-time-series.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_dependency 'redis', '>= 3.3'
|
35
35
|
|
36
36
|
spec.add_development_dependency 'activesupport', '~> 6.0'
|
37
|
-
spec.add_development_dependency 'appraisal', '>= 2.
|
37
|
+
spec.add_development_dependency 'appraisal', '>= 2.5.0'
|
38
38
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
39
39
|
spec.add_development_dependency 'pry', '~> 0.13'
|
40
40
|
spec.add_development_dependency 'rake', '~> 13.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-time-series
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Duszynski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.5.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.5.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
rubygems_version: 3.
|
179
|
+
rubygems_version: 3.5.3
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: A Ruby adapter for the RedisTimeSeries module.
|