capybara-firebug 1.3.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8c9452ed26b2cfb110e16f4a99938f4dd0459737
4
+ data.tar.gz: b996a234c0116384baebc563b55246aa54afec80
5
+ SHA512:
6
+ metadata.gz: 3069ae51b273b8521e4bbf2c891d80afcaeef52cfeb735e7ad5195506e528aac649e392b75869f03dc7ab5bdc6dbdcec947704899bb69a744e6bd22ced6f01bf
7
+ data.tar.gz: d7c04e70c8173c509a142fcec398be18ccb10aa9b8e3de8b4a06f4cce403cd77ca8dd95a11c4e568cbb2617c33f521320065a4d7af867158749bd59c2cac3cf9
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
data/Gemfile CHANGED
@@ -3,5 +3,3 @@ source "http://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  gem 'rake'
6
- gem 'ruby-debug', :platforms => :mri_18
7
- gem 'ruby-debug19', :platforms => :mri_19
data/README.md CHANGED
@@ -1,27 +1,18 @@
1
1
  capybara-firebug provides a dead-simple way to run Capybara-based Cucumber
2
2
  scenarios or RSpec request specs with Firebug enabled under the selenium driver.
3
3
 
4
- 1. Install the gem
5
- 2. `require 'capybara/firebug'` in env.rb or spec_helper.rb
6
- 3. Tag the tests you need to debug:
7
- - Tag Cucumber scenarios with `@firebug`
8
- - Tag RSpec examples with `:firebug => true`
9
- 4. Run 'em
4
+ To use it in RSpec examples, `require 'capybara/firebug/rspec'` in spec_helper.rb,
5
+ and tag the examples you need to debug with `:firebug => true`.
10
6
 
11
- Firebug will be set up so that all features are fully enabled on every page.
12
-
13
- You'll want to be able to pause the scenario at some point to inspect things
14
- in Firebug. A step definition for `Then stop and let me debug` is provided
15
- for this purpose. When executed, it breaks in the Ruby debugger. (If you are
16
- using bundler, you will also need to specify the correct debugging gem in your
17
- Gemfile: `gem 'ruby-debug'` for 1.8, `gem 'ruby-debug19'` for 1.9.)
7
+ To use it in Cucumber scenarios, `require 'capybara/firebug/cucumber'` in env.rb,
8
+ and tag the scenarios you need to debug with `@firebug`.
18
9
 
19
10
  ## Firebug Versions
20
11
 
21
- By default, this gem uses Firebug 1.11.0, which is compatible with Firefox 17-20.
12
+ By default, this gem uses Firebug 1.12.4, which is compatible with Firefox 23-25.
22
13
 
23
14
  If you want to use Firebug 1.7.3 (compatible with Firefox 3.6, 4, and 5), 1.9.2
24
- (compatible with Firefox 6-13), or 1.10.6 (compatible with Firefox 13-18), you
15
+ (compatible with Firefox 6-13), 1.10.6 (compatible with Firefox 13-18), or 1.11.0 (compatible with Firefox 17-22), you
25
16
  need to explicitly specify the firebug_version setting in your `capybara.rb`
26
17
  support file:
27
18
 
@@ -43,3 +34,19 @@ This can also be used to enable Firebug on a remote browser:
43
34
  :browser => :remote,
44
35
  :url => "http://my.ip.add.ress:4444/wd/hub",
45
36
  :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile))
37
+
38
+ ## Upgrading from 1.x
39
+
40
+ Cucumber and RSpec support has been split into separate files. You'll need to change
41
+ spec_helper.rb to `require 'capybara/firebug/rspec'` or env.rb to `require 'capybara/firebug/cucumber'`.
42
+
43
+ A "stop and let me debug" step definition is no longer provided. You can add it
44
+ yourself if needed:
45
+
46
+ ```
47
+ Then /^stop and let me debug$/ do
48
+ debugger
49
+ end
50
+ ```
51
+
52
+ Ruby 1.8.x is no longer supported. Please upgrade to 2.0 or later.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "capybara-firebug"
5
- s.version = "1.3.0"
5
+ s.version = "2.0.0"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["John Firebaugh"]
8
8
  s.email = ["john.firebaugh@gmail.com"]
@@ -19,6 +19,7 @@ enabled under the selenium driver.}
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  s.add_dependency "capybara", ">= 1.0", "< 3.0"
22
+ s.add_dependency "selenium-webdriver"
22
23
 
23
24
  s.add_development_dependency "rspec", "~> 2.0"
24
25
  s.add_development_dependency "cucumber", "~> 1.0"
@@ -8,4 +8,3 @@ Feature: @firebug tag
8
8
  When I visit "http://rubygems.org/"
9
9
  Then I should be on "http://rubygems.org/"
10
10
  And Firebug should be active
11
- Then stop and let me debug
@@ -2,4 +2,4 @@ require 'bundler'
2
2
  Bundler.require
3
3
 
4
4
  require 'capybara/cucumber'
5
- require 'capybara/firebug'
5
+ require 'capybara/firebug/cucumber'
@@ -1,6 +1 @@
1
- # Nothing is required by default, so you can specify `gem 'capybara-firebug'` in
2
- # your Gemfile without actually loading any code (which requires the cucumber
3
- # environment established by the 'cucumber' command).
4
-
5
- # To load the firebug, require 'capybara/firebug' within a file in
6
- # features/support/ or features/step_definitions/.
1
+ require 'capybara/firebug'
@@ -2,7 +2,7 @@ require 'selenium/webdriver'
2
2
 
3
3
  class Selenium::WebDriver::Firefox::Profile
4
4
  def self.firebug_version
5
- @firebug_version ||= '1.11.0'
5
+ @firebug_version ||= '1.12.4'
6
6
  end
7
7
 
8
8
  def self.firebug_version=(version)
@@ -38,27 +38,10 @@ class Selenium::WebDriver::Firefox::Profile
38
38
  end
39
39
  end
40
40
 
41
+ require 'capybara'
42
+
41
43
  Capybara.register_driver :selenium_with_firebug do |app|
42
44
  profile = Selenium::WebDriver::Firefox::Profile.new
43
45
  profile.enable_firebug
44
46
  Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile)
45
47
  end
46
-
47
- if defined?(Cucumber::RbSupport)
48
- Before '@firebug' do
49
- Capybara.current_driver = :selenium_with_firebug
50
- end
51
-
52
- Then /^stop and let me debug$/ do
53
- require 'ruby-debug'
54
- debugger
55
- end
56
- end
57
-
58
- if defined?(RSpec::configure)
59
- RSpec.configure do |config|
60
- config.before(:each, :firebug => true) do
61
- Capybara.current_driver = :selenium_with_firebug
62
- end
63
- end
64
- end
@@ -0,0 +1,5 @@
1
+ require 'capybara/firebug'
2
+
3
+ Before '@firebug' do
4
+ Capybara.current_driver = :selenium_with_firebug
5
+ end
@@ -0,0 +1,7 @@
1
+ require 'capybara/firebug'
2
+
3
+ RSpec.configure do |config|
4
+ config.before(:each, :firebug => true) do
5
+ Capybara.current_driver = :selenium_with_firebug
6
+ end
7
+ end
@@ -4,8 +4,8 @@ describe Selenium::WebDriver::Firefox::Profile do
4
4
  before { described_class.firebug_version = nil } # Reset
5
5
 
6
6
  describe ".firebug_version" do
7
- it "defaults to 1.11.0" do
8
- described_class.firebug_version.should == "1.11.0"
7
+ it "defaults to 1.12.4" do
8
+ described_class.firebug_version.should == "1.12.4"
9
9
  end
10
10
 
11
11
  it "can be explicitly set" do
@@ -16,7 +16,7 @@ describe Selenium::WebDriver::Firefox::Profile do
16
16
 
17
17
  describe "#enable_firebug" do
18
18
  it "adds the Firebug extension" do
19
- subject.should_receive(:add_extension).with(/firebug-1\.11\.0\.xpi$/)
19
+ subject.should_receive(:add_extension).with(/firebug-1\.12\.4\.xpi$/)
20
20
  subject.enable_firebug
21
21
  end
22
22
 
@@ -3,4 +3,4 @@ Bundler.require(:development)
3
3
 
4
4
  require 'capybara'
5
5
  require 'capybara/rspec'
6
- require 'capybara/firebug'
6
+ require 'capybara/firebug/rspec'
metadata CHANGED
@@ -1,22 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-firebug
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - John Firebaugh
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-10 00:00:00.000000000 Z
11
+ date: 2013-10-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: capybara
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.0'
22
20
  - - <
@@ -25,18 +23,30 @@ dependencies:
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
- - - ! '>='
27
+ - - '>='
31
28
  - !ruby/object:Gem::Version
32
29
  version: '1.0'
33
30
  - - <
34
31
  - !ruby/object:Gem::Version
35
32
  version: '3.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: selenium-webdriver
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: rspec
38
49
  requirement: !ruby/object:Gem::Requirement
39
- none: false
40
50
  requirements:
41
51
  - - ~>
42
52
  - !ruby/object:Gem::Version
@@ -44,7 +54,6 @@ dependencies:
44
54
  type: :development
45
55
  prerelease: false
46
56
  version_requirements: !ruby/object:Gem::Requirement
47
- none: false
48
57
  requirements:
49
58
  - - ~>
50
59
  - !ruby/object:Gem::Version
@@ -52,7 +61,6 @@ dependencies:
52
61
  - !ruby/object:Gem::Dependency
53
62
  name: cucumber
54
63
  requirement: !ruby/object:Gem::Requirement
55
- none: false
56
64
  requirements:
57
65
  - - ~>
58
66
  - !ruby/object:Gem::Version
@@ -60,14 +68,13 @@ dependencies:
60
68
  type: :development
61
69
  prerelease: false
62
70
  version_requirements: !ruby/object:Gem::Requirement
63
- none: false
64
71
  requirements:
65
72
  - - ~>
66
73
  - !ruby/object:Gem::Version
67
74
  version: '1.0'
68
- description: ! 'Provides a dead-simple way to run scenarios with Firebug
69
-
70
- enabled under the selenium driver.'
75
+ description: |-
76
+ Provides a dead-simple way to run scenarios with Firebug
77
+ enabled under the selenium driver.
71
78
  email:
72
79
  - john.firebaugh@gmail.com
73
80
  executables: []
@@ -75,6 +82,7 @@ extensions: []
75
82
  extra_rdoc_files: []
76
83
  files:
77
84
  - .gitignore
85
+ - .travis.yml
78
86
  - Gemfile
79
87
  - LICENSE
80
88
  - README.md
@@ -86,36 +94,38 @@ files:
86
94
  - lib/capybara-firebug.rb
87
95
  - lib/capybara/firebug-1.10.6.xpi
88
96
  - lib/capybara/firebug-1.11.0.xpi
97
+ - lib/capybara/firebug-1.12.4.xpi
89
98
  - lib/capybara/firebug-1.7.3.xpi
90
99
  - lib/capybara/firebug-1.9.2.xpi
91
100
  - lib/capybara/firebug-license.txt
92
101
  - lib/capybara/firebug.rb
102
+ - lib/capybara/firebug/cucumber.rb
103
+ - lib/capybara/firebug/rspec.rb
93
104
  - spec/enable_firebug_spec.rb
94
105
  - spec/rspec_configuration_spec.rb
95
106
  - spec/spec_helper.rb
96
107
  homepage: https://github.com/jfirebaugh/capybara-firebug
97
108
  licenses: []
109
+ metadata: {}
98
110
  post_install_message:
99
111
  rdoc_options: []
100
112
  require_paths:
101
113
  - lib
102
114
  required_ruby_version: !ruby/object:Gem::Requirement
103
- none: false
104
115
  requirements:
105
- - - ! '>='
116
+ - - '>='
106
117
  - !ruby/object:Gem::Version
107
118
  version: '0'
108
119
  required_rubygems_version: !ruby/object:Gem::Requirement
109
- none: false
110
120
  requirements:
111
- - - ! '>='
121
+ - - '>='
112
122
  - !ruby/object:Gem::Version
113
123
  version: '0'
114
124
  requirements: []
115
125
  rubyforge_project: capybara-firebug
116
- rubygems_version: 1.8.24
126
+ rubygems_version: 2.0.3
117
127
  signing_key:
118
- specification_version: 3
128
+ specification_version: 4
119
129
  summary: Run selenium with Firebug enabled
120
130
  test_files:
121
131
  - features/firebug.feature