rediska 0.0.10 → 0.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d99bbf132cfad70e1ef799c197afc9017613ea4
4
- data.tar.gz: eabb66ff059f336bfa134bf56eddd9cb55aee205
3
+ metadata.gz: 8f8e37b9ab4297926f687d271ce9155ea1680a31
4
+ data.tar.gz: 36bf08ab258f141e165c23ee13b7b3a326b90b06
5
5
  SHA512:
6
- metadata.gz: 597a9fe6a0368312924a1e366f653c215f2bda9534701e0961557230b8d884ec23744b7dd9969043bf9e8a97f792a746922e4605d73230ebef41380891aa18fc
7
- data.tar.gz: 6f9defadb0d09a0fb19cf8dfb2cde86828b26d65456af394a88956f1cf292c3faa0be0d04fec475c2f4a67391f0c9487281efec83d914520a43ce6684b95e028
6
+ metadata.gz: effd83624ed9df79f4d456b9942abfe4a11bae414472dd251db10661fb4e1118368ecfcae6d6f5f3a323df2c10f2b48a950151cd0fec2b9253e0031877a14476
7
+ data.tar.gz: 25f44ac315938e63414e5cf70b814eabd2ff82bc74a7f5701b68a9f312bc12037bec43a3dc3a7c871c64edb8abf93d86d155a1074507f186cea347e916e3b3ee
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rediska (0.0.10)
4
+ rediska (0.0.11)
5
5
  redis (~> 3.0.0)
6
6
 
7
7
  GEM
@@ -189,6 +189,11 @@ module Rediska
189
189
  Time.now.to_i
190
190
  end
191
191
 
192
+ def time
193
+ microseconds = (Time.now.to_f * 1000000).to_i
194
+ [microseconds / 1000000, microseconds % 1000000]
195
+ end
196
+
192
197
  def dbsize
193
198
  data.keys.count
194
199
  end
@@ -1,3 +1,3 @@
1
1
  module Rediska
2
- VERSION = '0.0.10'.freeze
2
+ VERSION = '0.0.11'.freeze
3
3
  end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe Rediska::Driver do
4
+ subject { Redis.new }
5
+
6
+ describe '#time' do
7
+ before(:each) do
8
+ Time.stub_chain(:now, :to_f).and_return(1397845595.5139461)
9
+ end
10
+
11
+ it 'is an array' do
12
+ subject.time.should be_an_instance_of(Array)
13
+ end
14
+
15
+ it 'has two elements' do
16
+ subject.time.count.should eq(2)
17
+ end
18
+
19
+ it 'has the current time in seconds' do
20
+ subject.time.first.should eq(1397845595)
21
+ end
22
+
23
+ it 'has the current leftover microseconds' do
24
+ subject.time.last.should eq(513946)
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rediska
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonid Beder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-06 00:00:00.000000000 Z
11
+ date: 2014-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -95,6 +95,7 @@ files:
95
95
  - lib/rediska/version.rb
96
96
  - lib/rediska/zset.rb
97
97
  - rediska.gemspec
98
+ - spec/lib/rediska/driver_spec.rb
98
99
  - spec/redis_spec.rb
99
100
  - spec/spec_helper.rb
100
101
  - spec/support/compatibility.rb
@@ -133,6 +134,7 @@ signing_key:
133
134
  specification_version: 4
134
135
  summary: A light-weighted redis driver for testing, development, and minimal environments
135
136
  test_files:
137
+ - spec/lib/rediska/driver_spec.rb
136
138
  - spec/redis_spec.rb
137
139
  - spec/spec_helper.rb
138
140
  - spec/support/compatibility.rb