columbo 0.1.4 → 0.1.5

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.
data/README.md CHANGED
@@ -45,7 +45,7 @@ Check the Rack configuration:
45
45
 
46
46
  ## Disclaimer
47
47
 
48
- This is an alpha release, it is untested with Sinatra and Rails 3 only.
48
+ This is an alpha release, it is tested with Sinatra and Rails 3 only.
49
49
  UI to explore sessions will be completed later (ETA: 2013'Q2).
50
50
 
51
51
  ## Author
@@ -14,7 +14,7 @@ module Columbo
14
14
  @capture = opts[:capture]
15
15
  @bench = opts[:capture] && opts[:bench]
16
16
  @capture_crawlers = opts[:capture_crawlers]
17
- @crawlers = opts[:crawlers] || "(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg|bot|crawler|spider|robot|crawling|facebook|w3c|coccoc)"
17
+ @crawlers = opts[:crawlers] || "(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg|bot|crawler|spider|robot|crawling|facebook|w3c|coccoc|Daumoa)"
18
18
  @mongo_uri = opts[:mongo_uri]
19
19
 
20
20
  Columbo.logger = opts[:logger] if opts[:logger]
@@ -56,7 +56,7 @@ module Columbo
56
56
 
57
57
  if @bench
58
58
  stop = Time.now
59
- duration = ((stop-start).seconds * 1000).round(3)
59
+ duration = ((stop-start) * 1000).round(3)
60
60
  log(env, "Time: #{duration}ms")
61
61
  headers['Columbo'] = "version #{Columbo::VERSION}, time #{duration}ms"
62
62
  end
@@ -17,7 +17,7 @@ module Columbo
17
17
  end
18
18
 
19
19
  def save(*args)
20
- coll.findOne *args
20
+ coll.save *args
21
21
  end
22
22
 
23
23
  def find(*args)
@@ -15,6 +15,7 @@ module Columbo
15
15
  client = Columbo::DbClient.new @mongo_uri
16
16
  # Normalise request from env
17
17
  request = Rack::Request.new(env)
18
+ # Don't capture bots traffic by default
18
19
  rg = Regexp.new(crawlers, Regexp::IGNORECASE)
19
20
  return if request.user_agent.match(rg) && !capture_crawlers
20
21
  html = ''
@@ -1,3 +1,3 @@
1
1
  module Columbo
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: columbo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-08 00:00:00.000000000 Z
12
+ date: 2013-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -91,6 +91,22 @@ dependencies:
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
93
  version: 1.6.1
94
+ - !ruby/object:Gem::Dependency
95
+ name: sinatra
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: 1.3.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 1.3.0
94
110
  description: ! 'A Ruby client library for Columbo: a Customer Experience Management
95
111
  tool'
96
112
  email: jtblin@gmail.com