redlics 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: e209a0d28a8c6801d74bebb90f5c312ffba4c0fa
4
- data.tar.gz: 08731d68e6011753ec19e6b442c88817e396489d
3
+ metadata.gz: 724a34a6d432d7dced851a903f0af979f157c7cd
4
+ data.tar.gz: 94ec00b7a62ee7a1d6a87d934fb604b84388b93b
5
5
  SHA512:
6
- metadata.gz: 5826f1386d60337a73e7ae43a4395be4e4d598936f8dfcd9f9215d63a1f288d67549d99e0861818c6cc0addce14877f28e9aeeb77a4f12a2a060b6660c5be2cb
7
- data.tar.gz: 3ad74bb843d68743debd2052610c3bf9ed0b80af4789b5167ba5a17e1f7394f8d65673e413c77c10a3adac0213b7a4251532d22e902157d1f3398d31d8d4b742
6
+ metadata.gz: e67674ebcd341d698a475a3a04730f1d00a0f911a7108e6e268074927676ec2d869b8f9ec5998204f3e060e07c510afb7e876d8a81f4018f2adeaf9d629330cf
7
+ data.tar.gz: b105b0e91e2459388d1c21ace343f95b34ac61e15712d32fae33455733029b29bf60496994a13827a812045379b11f97c10ab3ee12922c13427ee22cfa80605c
@@ -55,10 +55,7 @@ module Redlics
55
55
  # @return [Array] list of counted granularities
56
56
  def count_with_args(*args)
57
57
  options = args.last.instance_of?(Hash) ? args.pop : {}
58
- options.merge!({
59
- event: args[0],
60
- id: args[1]
61
- })
58
+ options.merge!(event: args[0])
62
59
  count_with_hash(options)
63
60
  end
64
61
 
@@ -72,7 +69,7 @@ module Redlics
72
69
  key = Key.name(CONTEXT, options[:event], granularity, options[:past], { id: options[:id], bucketized: true })
73
70
  Redlics.redis.pipelined do |redis|
74
71
  redis.hincrby(key[0], key[1], 1)
75
- redis.expire(key[0], options[:expiration_for] && options[:expiration_for][granularity] || Redlics.config.counter_expirations[granularity])
72
+ redis.expire(key[0], (options[:expiration_for] && options[:expiration_for][granularity] || Redlics.config.counter_expirations[granularity]).to_i)
76
73
  end
77
74
  end
78
75
 
@@ -86,7 +83,7 @@ module Redlics
86
83
  key = Key.name(CONTEXT, options[:event], granularity, options[:past], { id: options[:id], bucketized: false })
87
84
  Redlics.redis.pipelined do |redis|
88
85
  redis.incr(key)
89
- redis.expire(key, options[:expiration_for] && options[:expiration_for][granularity] || Redlics.config.counter_expirations[granularity])
86
+ redis.expire(key, (options[:expiration_for] && options[:expiration_for][granularity] || Redlics.config.counter_expirations[granularity]).to_i)
90
87
  end
91
88
  end
92
89
 
@@ -31,7 +31,7 @@ module Redlics
31
31
  key = Key.name(CONTEXT, options[:event], granularity, options[:past])
32
32
  Redlics.redis.pipelined do |redis|
33
33
  redis.setbit(key, options[:id].to_i, 1)
34
- redis.expire(key, options[:expiration_for] && options[:expiration_for][granularity] || Redlics.config.tracker_expirations[granularity])
34
+ redis.expire(key, (options[:expiration_for] && options[:expiration_for][granularity] || Redlics.config.tracker_expirations[granularity]).to_i)
35
35
  end
36
36
  end
37
37
  end
@@ -1,4 +1,4 @@
1
1
  # Redlics version.
2
2
  module Redlics
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  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.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Egon Zemmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2016-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool