lita-timing 0.1.0 → 0.2.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
  SHA1:
3
- metadata.gz: 96f734b887a989426e7d3bfda449f1e050b164eb
4
- data.tar.gz: 60797820ff5fb0aa13053a4da02a3bfdca2ef182
3
+ metadata.gz: 0d2e91447e7269858bf093d62e62d73afc1ae09a
4
+ data.tar.gz: cb8aa371af84923e55f20e10447e7fccd02ed731
5
5
  SHA512:
6
- metadata.gz: 70952579da7d3d7ed7a09e90c495d8bf873517800269876894e92bfff7ada11ab3dc28e0115fc0d2c23905bd868e38db6567d882992e8e918abcc9181f0f5026
7
- data.tar.gz: f054f0913f9cb4b957bc90801a8b2d30de070a11160d5e035ec5d0b52a2be4c8f91808448f4bda6d64601700d57519e51228b66e19bb5e6c12a8126f8d809b63
6
+ metadata.gz: 330c5b008e3b22ad996837ca7dc624d93caa48fe15c9033f5f30753a036b426497812f251127fbc853d609dcbb8d2568839766ec834fd31c9e86f073456bf763
7
+ data.tar.gz: 74cb5eb59284c284be1659d5b58d44f3cd811f7d4143acb03bcbd0a697441332e302905ede9e035c0a724cbd08f8c69acd0dcaf2b7a97a02807560f421d00ade
@@ -8,7 +8,7 @@ module Lita
8
8
  def once_every(seconds, &block)
9
9
  if last_time.nil? || last_time + seconds < Time.now
10
10
  yield
11
- @redis.set(@name, Time.now.to_i)
11
+ @redis.set(@name, Time.now.to_i, ex: seconds * 2)
12
12
  end
13
13
  end
14
14
 
@@ -13,7 +13,7 @@ module Lita
13
13
 
14
14
  return unless start_time > last_time
15
15
 
16
- yield last_time, advance_to
16
+ yield last_time + 1, advance_to
17
17
 
18
18
  @redis.set(@name, advance_to.to_i)
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-timing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-12 00:00:00.000000000 Z
11
+ date: 2016-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake