capybara-firebug 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "capybara-firebug"
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["John Firebaugh"]
8
8
  s.email = ["john.firebaugh@gmail.com"]
@@ -1,23 +1,28 @@
1
1
  require 'selenium/webdriver'
2
2
 
3
- Capybara.register_driver :selenium_with_firebug do |app|
4
- profile = Selenium::WebDriver::Firefox::Profile.new
5
- profile.add_extension(File.expand_path("../firebug-1.6.2.xpi", __FILE__))
3
+ class Selenium::WebDriver::Firefox::Profile
4
+ def enable_firebug
5
+ add_extension(File.expand_path("../firebug-1.6.2.xpi", __FILE__))
6
6
 
7
- # Prevent "Welcome!" tab
8
- profile["extensions.firebug.currentVersion"] = "999"
7
+ # Prevent "Welcome!" tab
8
+ self["extensions.firebug.currentVersion"] = "999"
9
9
 
10
- # Enable for all sites.
11
- profile["extensions.firebug.allPagesActivation"] = "on"
10
+ # Enable for all sites.
11
+ self["extensions.firebug.allPagesActivation"] = "on"
12
12
 
13
- # Enable all features.
14
- ['console', 'net', 'script'].each do |feature|
15
- profile["extensions.firebug.#{feature}.enableSites"] = true
16
- end
13
+ # Enable all features.
14
+ ['console', 'net', 'script'].each do |feature|
15
+ self["extensions.firebug.#{feature}.enableSites"] = true
16
+ end
17
17
 
18
- # Closed by default.
19
- profile["extensions.firebug.previousPlacement"] = 3
18
+ # Closed by default.
19
+ self["extensions.firebug.previousPlacement"] = 3
20
+ end
21
+ end
20
22
 
23
+ Capybara.register_driver :selenium_with_firebug do |app|
24
+ profile = Selenium::WebDriver::Firefox::Profile.new
25
+ profile.enable_firebug
21
26
  Capybara::Driver::Selenium.new(app, :browser => :firefox, :profile => profile)
22
27
  end
23
28
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Firebaugh
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-06 00:00:00 -08:00
17
+ date: 2011-03-07 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency