Class: BrowserMob::CLI::Main
- Inherits:
-
Thor
- Object
- Thor
- BrowserMob::CLI::Main
- Includes:
- Thor::Actions
- Defined in:
- lib/browsermob/cli/main.rb
Instance Method Summary collapse
- #port_clearance ⇒ Object
- #setup ⇒ Object
- #show_har(url) ⇒ Object
- #show_har_click(url) ⇒ Object
- #version ⇒ Object
- #view_har_in_browser ⇒ Object
- #view_har_in_YAML ⇒ Object
Instance Method Details
#port_clearance ⇒ Object
50 51 52 |
# File 'lib/browsermob/cli/main.rb', line 50 def port_clearance system('kill -9 $(lsof -i tcp:7676 -t)') end |
#setup ⇒ Object
13 14 15 16 |
# File 'lib/browsermob/cli/main.rb', line 13 def setup bm = BrowserMobSetup.new bm.download_browsermob_proxy end |
#show_har(url) ⇒ Object
33 34 35 36 |
# File 'lib/browsermob/cli/main.rb', line 33 def show_har(url) bm = BrowserMobSetup.new bm.capture_traffic(url) end |
#show_har_click(url) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/browsermob/cli/main.rb', line 25 def show_har_click(url) bm = BrowserMobSetup.new if [:locator] bm.capture_traffic_with_click(url, "#{[:locator]}") end end |
#version ⇒ Object
19 20 21 |
# File 'lib/browsermob/cli/main.rb', line 19 def version say BrowserMob::CLI::VERSION end |
#view_har_in_browser ⇒ Object
39 40 41 42 |
# File 'lib/browsermob/cli/main.rb', line 39 def view_har_in_browser bm = BrowserMobSetup.new bm.show_har_data_browser end |
#view_har_in_YAML ⇒ Object
45 46 47 |
# File 'lib/browsermob/cli/main.rb', line 45 def view_har_in_YAML system("open /tmp/traffic.yml") end |