[DRE-commits] [ruby-capybara] 02/06: Refresh patches

Jérémy Bobbio lunar at moszumanska.debian.org
Thu Dec 1 00:54:45 UTC 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository ruby-capybara.

commit 927f40a4e61b77bb1288ee7ef9b41a394290a976
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Thu Dec 1 00:22:28 2016 +0100

    Refresh patches
---
 ...01-Remove-support-for-the-selenium-driver.patch |   8 +-
 ...002-Inhibit-tests-for-the-selenium-driver.patch | 118 ++++++++++++---------
 ...bit-tests-that-needs-more-than-one-driver.patch |   4 +-
 ...Remove-uneeded-dependency-on-pry-in-tests.patch |  35 +-----
 .../0005-Inhibit-tests-requiring-launchy.patch     |  50 ---------
 debian/patches/series                              |   1 -
 6 files changed, 81 insertions(+), 135 deletions(-)

diff --git a/debian/patches/0001-Remove-support-for-the-selenium-driver.patch b/debian/patches/0001-Remove-support-for-the-selenium-driver.patch
index 266f98b..21a8bec 100644
--- a/debian/patches/0001-Remove-support-for-the-selenium-driver.patch
+++ b/debian/patches/0001-Remove-support-for-the-selenium-driver.patch
@@ -9,14 +9,14 @@ Until ruby-selenium-webdriver lands in Debian, see
  1 file changed, 4 deletions(-)
 
 diff --git a/lib/capybara.rb b/lib/capybara.rb
-index bd46520..b3cdd93 100644
+index 3a809e6..086f068 100644
 --- a/lib/capybara.rb
 +++ b/lib/capybara.rb
-@@ -392,7 +392,3 @@ end
- Capybara.register_driver :rack_test do |app|
+@@ -509,7 +509,3 @@ Capybara.register_driver :rack_test do |app|
    Capybara::RackTest::Driver.new(app)
  end
--
+ 
 -Capybara.register_driver :selenium do |app|
 -  Capybara::Selenium::Driver.new(app)
 -end
+-
diff --git a/debian/patches/0002-Inhibit-tests-for-the-selenium-driver.patch b/debian/patches/0002-Inhibit-tests-for-the-selenium-driver.patch
index 9a35cf1..b6d5bed 100644
--- a/debian/patches/0002-Inhibit-tests-for-the-selenium-driver.patch
+++ b/debian/patches/0002-Inhibit-tests-for-the-selenium-driver.patch
@@ -5,16 +5,31 @@ Subject: Inhibit tests for the :selenium driver
 The :selenium driver is deactivated until ruby-selenium-webdriver lands in
 Debian (see #703492), so let's just skip its tests.
 ---
- spec/rspec/matchers_spec.rb  | 4 ++++
- spec/selenium_spec.rb        | 8 ++++++--
- spec/selenium_spec_chrome.rb | 3 ++-
- 3 files changed, 12 insertions(+), 3 deletions(-)
+ spec/capybara_spec.rb           | 2 +-
+ spec/rspec/matchers_spec.rb     | 4 ++++
+ spec/selenium_firefox_spec.rb   | 4 ++--
+ spec/selenium_spec_chrome.rb    | 3 ++-
+ spec/shared_selenium_session.rb | 3 ++-
+ 5 files changed, 11 insertions(+), 5 deletions(-)
 
+diff --git a/spec/capybara_spec.rb b/spec/capybara_spec.rb
+index 93ba535..2bb2421 100644
+--- a/spec/capybara_spec.rb
++++ b/spec/capybara_spec.rb
+@@ -50,7 +50,7 @@ RSpec.describe Capybara do
+         Rack::Handler::WEBrick.run(app, Host: host, Port: port, AccessLog: [], Logger: WEBrick::Log::new(nil, 0))
+       end
+       Capybara.server = :blob
+-      session = Capybara::Session.new(:selenium, TestApp.dup)
++      session = Capybara::Session.new(:rack_test, TestApp.dup)
+       session.visit('/')
+       expect(session.body).to include("Hello world!")
+     end
 diff --git a/spec/rspec/matchers_spec.rb b/spec/rspec/matchers_spec.rb
-index 3279256..b5151ad 100644
+index 3ba92a0..a50ae03 100644
 --- a/spec/rspec/matchers_spec.rb
 +++ b/spec/rspec/matchers_spec.rb
-@@ -539,6 +539,7 @@ RSpec.describe Capybara::RSpecMatchers do
+@@ -540,6 +540,7 @@ RSpec.describe Capybara::RSpecMatchers do
        end
  
        context 'with wait' do
@@ -22,7 +37,7 @@ index 3279256..b5151ad 100644
          before(:each) do
            @session = TestSessions::Selenium
            @session.visit('/with_js')
-@@ -558,6 +559,7 @@ RSpec.describe Capybara::RSpecMatchers do
+@@ -559,6 +560,7 @@ RSpec.describe Capybara::RSpecMatchers do
            end
          end
        end
@@ -30,7 +45,7 @@ index 3279256..b5151ad 100644
      end
  
      it "supports compounding" do
-@@ -584,6 +586,7 @@ RSpec.describe Capybara::RSpecMatchers do
+@@ -585,6 +587,7 @@ RSpec.describe Capybara::RSpecMatchers do
        end
  
        context 'with wait' do
@@ -38,7 +53,7 @@ index 3279256..b5151ad 100644
          before(:each) do
            @session = TestSessions::Selenium
            @session.visit('/with_js')
-@@ -603,6 +606,7 @@ RSpec.describe Capybara::RSpecMatchers do
+@@ -604,6 +607,7 @@ RSpec.describe Capybara::RSpecMatchers do
            end
          end
        end
@@ -46,63 +61,43 @@ index 3279256..b5151ad 100644
      end
  
      it "supports compounding" do
-diff --git a/spec/selenium_spec.rb b/spec/selenium_spec.rb
-index 90f58ec..7c35b2a 100644
---- a/spec/selenium_spec.rb
-+++ b/spec/selenium_spec.rb
-@@ -1,5 +1,4 @@
+diff --git a/spec/selenium_firefox_spec.rb b/spec/selenium_firefox_spec.rb
+index 94c332f..0918ccc 100644
+--- a/spec/selenium_firefox_spec.rb
++++ b/spec/selenium_firefox_spec.rb
+@@ -1,6 +1,5 @@
+ # frozen_string_literal: true
  require 'spec_helper'
 -require "selenium-webdriver"
+ require 'shared_selenium_session'
  
  Capybara.register_driver :selenium_focus do |app|
-   profile = Selenium::WebDriver::Firefox::Profile.new
-@@ -7,6 +6,7 @@ Capybara.register_driver :selenium_focus do |app|
-   Capybara::Selenium::Driver.new(app, browser: :firefox, profile: profile)
+@@ -10,6 +9,7 @@ Capybara.register_driver :selenium_focus do |app|
+   Capybara::Selenium::Driver.new(app, browser: :firefox)
  end
  
 +<<PENDING
  module TestSessions
    Selenium = Capybara::Session.new(:selenium_focus, TestApp)
  end
-@@ -16,9 +16,11 @@ Capybara::SpecHelper.run_specs TestSessions::Selenium, "selenium", :capybara_ski
-   :status_code,
-   :trigger
- ]
-+PENDING
- 
- RSpec.describe Capybara::Session do
-   context 'with selenium driver' do
-+  pending "waiting for a ruby-selenium-driver package in Debian" do
-     before do
-       @session = TestSessions::Selenium
-     end
-@@ -109,8 +111,10 @@ RSpec.describe Capybara::Session do
-       end
-     end
-   end
-+  end
- end
- 
-+<<PENDING
- RSpec.describe Capybara::Selenium::Driver do
-   before do
-     @driver = Capybara::Selenium::Driver.new(TestApp, browser: :firefox)
-@@ -125,4 +129,4 @@ RSpec.describe Capybara::Selenium::Driver do
+@@ -41,4 +41,4 @@ RSpec.describe Capybara::Selenium::Driver do
      end
    end
  end
 -
 +PENDING
 diff --git a/spec/selenium_spec_chrome.rb b/spec/selenium_spec_chrome.rb
-index 4ca0163..328da2b 100644
+index af41271..3eac2dd 100644
 --- a/spec/selenium_spec_chrome.rb
 +++ b/spec/selenium_spec_chrome.rb
-@@ -1,11 +1,11 @@
+@@ -1,6 +1,5 @@
+ # frozen_string_literal: true
  require 'spec_helper'
 -require 'selenium-webdriver'
+ require 'shared_selenium_session'
  
  Capybara.register_driver :selenium_chrome do |app|
-   args = ENV['TRAVIS'] ? ['no-sandbox' ] : []
+@@ -8,6 +7,7 @@ Capybara.register_driver :selenium_chrome do |app|
    Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
  end
  
@@ -110,8 +105,35 @@ index 4ca0163..328da2b 100644
  module TestSessions
    Chrome = Capybara::Session.new(:selenium_chrome, TestApp)
  end
-@@ -15,3 +15,4 @@ Capybara::SpecHelper.run_specs TestSessions::Chrome, "selenium_chrome", :capybar
-   :status_code,
-   :trigger
-   ] unless ENV['TRAVIS'] && (RUBY_PLATFORM == 'java')
+@@ -21,3 +21,4 @@ Capybara::SpecHelper.run_specs TestSessions::Chrome, "selenium_chrome", capybara
+ RSpec.describe "Capybara::Session with chrome" do
+   include_examples  "Capybara::Session", TestSessions::Chrome, :selenium_chrome
+ end
 +PENDING
+diff --git a/spec/shared_selenium_session.rb b/spec/shared_selenium_session.rb
+index 39507ac..c0a024b 100644
+--- a/spec/shared_selenium_session.rb
++++ b/spec/shared_selenium_session.rb
+@@ -1,6 +1,5 @@
+ # frozen_string_literal: true
+ require 'spec_helper'
+-require "selenium-webdriver"
+ 
+ RSpec.shared_examples "Capybara::Session" do |session, mode|
+   let(:session) {session}
+@@ -53,6 +52,7 @@ RSpec.shared_examples "Capybara::Session" do |session, mode|
+       end
+     end
+ 
++    pending 'waiting for a ruby-selenium-driver package in Debian' do
+     describe "#accept_alert" do
+       it "supports a blockless mode" do
+         @session.visit('/with_js')
+@@ -61,6 +61,7 @@ RSpec.shared_examples "Capybara::Session" do |session, mode|
+         expect{@session.driver.browser.switch_to.alert}.to raise_error(Selenium::WebDriver::Error::NoAlertPresentError)
+       end
+     end
++    end
+ 
+     context "#fill_in with { :clear => :backspace } fill_option", requires: [:js] do
+       it 'should fill in a field, replacing an existing value' do
diff --git a/debian/patches/0003-Inhibit-tests-that-needs-more-than-one-driver.patch b/debian/patches/0003-Inhibit-tests-that-needs-more-than-one-driver.patch
index 56f1661..2fc1cd3 100644
--- a/debian/patches/0003-Inhibit-tests-that-needs-more-than-one-driver.patch
+++ b/debian/patches/0003-Inhibit-tests-that-needs-more-than-one-driver.patch
@@ -9,10 +9,10 @@ As the :selenium driver is deactivated, there's only one driver left currently
  1 file changed, 2 insertions(+)
 
 diff --git a/spec/dsl_spec.rb b/spec/dsl_spec.rb
-index 88c60cc..3a87b64 100644
+index 260fc26..0a8ddf2 100644
 --- a/spec/dsl_spec.rb
 +++ b/spec/dsl_spec.rb
-@@ -160,12 +160,14 @@ RSpec.describe Capybara::DSL do
+@@ -161,12 +161,14 @@ RSpec.describe Capybara::DSL do
      end
  
      it "should change with the current driver" do
diff --git a/debian/patches/0004-Remove-uneeded-dependency-on-pry-in-tests.patch b/debian/patches/0004-Remove-uneeded-dependency-on-pry-in-tests.patch
index 6b06c91..63e4332 100644
--- a/debian/patches/0004-Remove-uneeded-dependency-on-pry-in-tests.patch
+++ b/debian/patches/0004-Remove-uneeded-dependency-on-pry-in-tests.patch
@@ -3,40 +3,15 @@ Date: Fri, 28 Jun 2013 15:36:37 +0200
 Subject: Remove uneeded dependency on pry in tests
 
 ---
- metadata.yml        | 14 --------------
- spec/spec_helper.rb |  1 -
- 2 files changed, 15 deletions(-)
+ spec/spec_helper.rb | 1 -
+ 1 file changed, 1 deletion(-)
 
-diff --git a/metadata.yml b/metadata.yml
-index 4b74b3f..bca9c65 100644
---- a/metadata.yml
-+++ b/metadata.yml
-@@ -193,20 +193,6 @@ dependencies:
-     - - ">="
-       - !ruby/object:Gem::Version
-         version: '0'
--- !ruby/object:Gem::Dependency
--  name: pry
--  requirement: !ruby/object:Gem::Requirement
--    requirements:
--    - - ">="
--      - !ruby/object:Gem::Version
--        version: '0'
--  type: :development
--  prerelease: false
--  version_requirements: !ruby/object:Gem::Requirement
--    requirements:
--    - - ">="
--      - !ruby/object:Gem::Version
--        version: '0'
- description: Capybara is an integration testing tool for rack based web applications.
-   It simulates how a user would interact with a website
- email:
 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
-index 345e1db..2c7d968 100644
+index 9a33cdb..580a2bb 100644
 --- a/spec/spec_helper.rb
 +++ b/spec/spec_helper.rb
-@@ -1,6 +1,5 @@
+@@ -1,7 +1,6 @@
+ # frozen_string_literal: true
  require 'rspec/expectations'
  require "capybara/spec/spec_helper"
 -require "pry"
diff --git a/debian/patches/0005-Inhibit-tests-requiring-launchy.patch b/debian/patches/0005-Inhibit-tests-requiring-launchy.patch
deleted file mode 100644
index d304704..0000000
--- a/debian/patches/0005-Inhibit-tests-requiring-launchy.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: =?utf-8?q?J=C3=A9r=C3=A9my_Bobbio?= <lunar at debian.org>
-Date: Wed, 9 Sep 2015 11:38:48 +0200
-Subject: Inhibit tests requiring launchy
-
-ruby-launchy is not yet in Debian (#725318) and it's an optional
-dependency of Capybara.
----
- lib/capybara/spec/session/save_and_open_page_spec.rb       | 3 +++
- lib/capybara/spec/session/save_and_open_screenshot_spec.rb | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/lib/capybara/spec/session/save_and_open_page_spec.rb b/lib/capybara/spec/session/save_and_open_page_spec.rb
-index 42e8634..788e61b 100644
---- a/lib/capybara/spec/session/save_and_open_page_spec.rb
-+++ b/lib/capybara/spec/session/save_and_open_page_spec.rb
-@@ -1,3 +1,5 @@
-+<<PENDING
-+# Waiting for ruby-launchy to be in Debian. ITP #725318
- require 'launchy'
- 
- Capybara::SpecHelper.spec '#save_and_open_page' do
-@@ -17,3 +19,4 @@ Capybara::SpecHelper.spec '#save_and_open_page' do
-     expect(Launchy).to have_received(:open).with(/capybara-\d+\.html/)
-   end
- end
-+PENDING
-diff --git a/lib/capybara/spec/session/save_and_open_screenshot_spec.rb b/lib/capybara/spec/session/save_and_open_screenshot_spec.rb
-index 2e9ddcf..84e2746 100644
---- a/lib/capybara/spec/session/save_and_open_screenshot_spec.rb
-+++ b/lib/capybara/spec/session/save_and_open_screenshot_spec.rb
-@@ -1,10 +1,9 @@
--require 'launchy'
--
- Capybara::SpecHelper.spec '#save_and_open_screenshot' do
-   before do
-     @session.visit '/'
-   end
- 
-+  pending "waiting for launchy to be in Debian" do
-   it 'opens file from the default directory', :requires => [:screenshot] do
-     expected_file_regex = %r{capybara-\d+\.png}
-     allow(@session.driver).to receive(:save_screenshot)
-@@ -28,6 +27,7 @@ Capybara::SpecHelper.spec '#save_and_open_screenshot' do
-       with(custom_path, {})
-     expect(Launchy).to have_received(:open).with(custom_path)
-   end
-+  end
- 
-   context 'when launchy cannot be required' do
-     it 'prints out a correct warning message', :requires => [:screenshot] do
diff --git a/debian/patches/series b/debian/patches/series
index 8116ab5..03a1295 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,4 +2,3 @@
 0002-Inhibit-tests-for-the-selenium-driver.patch
 0003-Inhibit-tests-that-needs-more-than-one-driver.patch
 0004-Remove-uneeded-dependency-on-pry-in-tests.patch
-0005-Inhibit-tests-requiring-launchy.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-capybara.git



More information about the Pkg-ruby-extras-commits mailing list