active_redis_db 1.0.2 → 1.1.0

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: 3b9f9c2ba0c386515f993df1e0ba6bffee8b7e10edc8757c954f7e80b905e8d4
4
- data.tar.gz: 70b6ce61021d627f10a7bcc452de24c0ec86963cc9199cdf166a654f8862a381
3
+ metadata.gz: b614087f4ecbc4c4fae0539be1708aae3b024020dff992800b27422dbddb655a
4
+ data.tar.gz: ab625306cdb81e1c1d0c2cebb8de74d5122881aa9813e2f783664356d4d959bc
5
5
  SHA512:
6
- metadata.gz: af534f07e2de2a534ed307c0544d20eb7f8554465e54a04bd71807664e72f90df35917c71b5c376d9ddfa5ad36996b5d4e1ac9e1448ac83ceeaae6652fe72338
7
- data.tar.gz: 4c525b83c77ac4460dfa235f884992435e4f9b3748c1bc079b402f7e22b09b4a9b8764ed9588dc26f3c3843ad8f0470ab9fc739ddae09c2845e04ab9bc43ffee
6
+ metadata.gz: 686715fde5e04bafcf8e53ebb02ba0651873763df5dbeccc9aad886743da488a85c43864b79f54a5ac559d38e0835282a838a388f37e4c2e3bccb9610294744c
7
+ data.tar.gz: 7a2b488d2f582f4cf7eef4130928e9d7d266416428e3e07d71966ef6b1cbf69eb7775f43521f83647456746ef0cc3ac43aaf2bb1ccc4db3be87cd88a88fe35fd
@@ -51,6 +51,8 @@ class ActiveRedisDB::Key < ActiveRedisDB::Base
51
51
  end
52
52
  end
53
53
 
54
+ alias_method :expire_in, :expire
55
+
54
56
  def expire_at(key, seconds, format = :seconds)
55
57
  normalized_key = normalize_key(key)
56
58
 
@@ -135,6 +135,10 @@ class ActiveRedisDB::SortedSet < ActiveRedisDB::Base
135
135
  client.zincrby(normalize_key(key), count, value)
136
136
  end
137
137
 
138
+ def decrement(key, value, count)
139
+ client.zincrby(normalize_key(key), -(count.abs), value)
140
+ end
141
+
138
142
  def destroy(key, at)
139
143
  client.zrem(normalize_key(key), at)
140
144
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRedisDB
4
- VERSION ||= '1.0.2'
4
+ VERSION ||= '1.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_redis_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez