daikon 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{daikon}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Quaranto"]
@@ -26,5 +26,5 @@ require 'daikon/monitor'
26
26
  require 'daikon/redis_hacks'
27
27
 
28
28
  module Daikon
29
- VERSION = "0.5.2"
29
+ VERSION = "0.5.3"
30
30
  end
@@ -2,7 +2,7 @@ module Daikon
2
2
  class Monitor
3
3
  attr_accessor :queue
4
4
 
5
- NEW_FORMAT = /^(\d+\.\d+)( "[A-Z]+".*)/i
5
+ NEW_FORMAT = /^\+?(\d+\.\d+)( "[A-Z]+".*)/i
6
6
  OLD_SINGLE_FORMAT = /^(QUIT|RANDOMKEY|DBSIZE|EXPIRE|TTL|SAVE|BGSAVE|SHUTDOWN|BGREWRITEAOF|INFO|MONITOR|SLAVEOF)$/i
7
7
  OLD_MORE_FORMAT = /^[A-Z]+ .*$/i
8
8
 
@@ -23,6 +23,16 @@ describe Daikon::Monitor, "#parse with new format" do
23
23
  end
24
24
  end
25
25
 
26
+ describe Daikon::Monitor, "#parse with new format that has reply byte" do
27
+ subject { Daikon::Monitor.new }
28
+ let(:line) { '+1291699658.994073 "decrby" "fooz" "2000"' }
29
+
30
+ it "parses the log into json" do
31
+ subject.parse(line)
32
+ subject.queue.should include({:at => 1291699658.994073, :command => '"decrby" "fooz" "2000"'})
33
+ end
34
+ end
35
+
26
36
  describe Daikon::Monitor, "#parse with multiple inputs" do
27
37
  subject { Daikon::Monitor.new }
28
38
  before { Timecop.freeze }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daikon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nick Quaranto