chrome_debugger 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/README.md +38 -20
  2. metadata +2 -2
data/README.md CHANGED
@@ -17,34 +17,48 @@ Chrome 18 or higher must be installed and available on the path.
17
17
 
18
18
  ## Usage
19
19
 
20
- require 'chrome_debugger'
21
-
22
- ChromeDebugger::Client.open do |chrome|
23
- document = chrome.load_url("https://theconversation.edu.au/")
24
-
25
- puts "requests: #{document.request_count}"
26
- puts "onload_event: #{document.onload_event}"
27
- puts "dom_content_event: #{document.dom_content_event}"
28
- puts "document_payload: #{document.encoded_bytes("Document")}"
29
- puts "script_payload: #{document.encoded_bytes("Script")}"
30
- puts "image_payload: #{document.encoded_bytes("Image")}"
31
- end
32
-
33
- Refer to the ChromeDebugger::Client and ChromeDebugger::Document classes for
20
+ ```ruby
21
+ require 'chrome_debugger'
22
+
23
+ ChromeDebugger::Client.open do |chrome|
24
+ document = chrome.load_url("https://theconversation.edu.au/")
25
+
26
+ puts "request count: #{document.request_count}"
27
+ puts "onload event fired: #{document.onload_event}"
28
+ puts "dom content event fired: #{document.dom_content_event}"
29
+ puts "payload document encoded bytes: #{document.encoded_bytes("Document")}"
30
+ puts "payload script encoded bytes: #{document.encoded_bytes("Script")}"
31
+ puts "payload image encoded bytes: #{document.encoded_bytes("Image")}"
32
+ puts "payload stylesheet encoded bytes: #{document.encoded_bytes("Stylesheet")}"
33
+ puts "payload other encoded bytes: #{document.encoded_bytes("Other")}"
34
+ puts "payload document bytes: #{document.bytes("Document")}"
35
+ puts "payload script bytes: #{document.bytes("Script")}"
36
+ puts "payload image bytes: #{document.bytes("Image")}"
37
+ puts "payload stylesheet bytes: #{document.bytes("Stylesheet")}"
38
+ puts "payload other bytes: #{document.bytes("Other")}"
39
+ puts "script requests: #{document.request_count_by_resource("Script")}"
40
+ puts "image requests: #{document.request_count_by_resource("Image")}"
41
+ puts "stylesheet requests: #{document.request_count_by_resource("Stylesheet")}"
42
+ end
43
+ ```
44
+
45
+ Refer to the `ChromeDebugger::Client` and `ChromeDebugger::Document` classes for
34
46
  detailed docs.
35
47
 
36
- ChromeDebugger::Client starts and manages a new chrome session.
48
+ `ChromeDebugger::Client` starts and manages a new chrome session.
37
49
 
38
- ChromeDebugger::Document provides an entry point for querying the results of
50
+ `ChromeDebugger::Document` provides an entry point for querying the results of
39
51
  a page load.
40
52
 
41
53
  ## Authors
42
54
 
43
- Justin Morris
44
- justin.morris@theconversation.edu.au
55
+ ### Justin Morris
56
+ - justin.morris@theconversation.edu.au
57
+ - [@plasticine](http://twitter.com/plasticine)
45
58
 
46
- James Healy
47
- james.healy@theconversation.edu.au
59
+ ### James Healy
60
+ - james@yob.id.au
61
+ - [@jim_healy](http://twitter.com/jim_healy)
48
62
 
49
63
  ## Further Reading
50
64
 
@@ -57,3 +71,7 @@ Possible further work.
57
71
 
58
72
  * make the chrome path configurable
59
73
  * make headless mode configurable
74
+
75
+ ## License
76
+
77
+ chrome_debugger is Copyright (c) 2012 The Conversation Media Group and distributed under the MIT license.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrome_debugger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -95,7 +95,7 @@ dependencies:
95
95
  description: Starts a Google Chrome session. Load pages and examine the results.
96
96
  email:
97
97
  - justin.morris@theconversation.edu.au
98
- - james.healy@theconversation.edu.au
98
+ - james@yob.id.au
99
99
  executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []