columbo 0.1.1 → 0.1.2
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 +2 -2
- data/lib/columbo/inspector.rb +1 -1
- data/lib/columbo/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -13,13 +13,13 @@ If your application includes a rackup file
|
|
13
13
|
or uses *Rack::Builder* to construct the application pipeline,
|
14
14
|
simply require and use as follows:
|
15
15
|
|
16
|
-
require 'columbo/capture'
|
16
|
+
require 'columbo/capture'
|
17
|
+
use Columbo::Capture, {
|
17
18
|
capture: true,
|
18
19
|
bench: false,
|
19
20
|
mongo_uri: 'mongodb://user:password@mongodb_host:port/database',
|
20
21
|
logger: 'log/columbo.log'
|
21
22
|
}
|
22
|
-
use Columbo::Capture
|
23
23
|
run app
|
24
24
|
|
25
25
|
## Using with Rails 3
|
data/lib/columbo/inspector.rb
CHANGED
@@ -61,7 +61,7 @@ module Columbo
|
|
61
61
|
html_doc.xpath('//style').each {|node| node.remove}
|
62
62
|
text = ''
|
63
63
|
html_doc.xpath('//body').each {|node| text += node.text.gsub(/\s{2,}/, ' ')}
|
64
|
-
title = html_doc.xpath('//title').first.text
|
64
|
+
title = html_doc.xpath('//title').first.try(:text)
|
65
65
|
[text, title]
|
66
66
|
end
|
67
67
|
|
data/lib/columbo/version.rb
CHANGED