From aabc9279f8d7f7056614124bd7161ee4d5ced322 Mon Sep 17 00:00:00 2001 From: Takayuki Hamada Date: Fri, 18 Oct 2019 22:16:31 +0900 Subject: [PATCH 1/7] ruby 2.6.5 in test matrix --- .travis.yml | 2 ++ gemfiles/2.6.0.gemfile | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 gemfiles/2.6.0.gemfile diff --git a/.travis.yml b/.travis.yml index 38e4d3c..7896a21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ rvm: - 2.2.6 - 2.3.3 - 2.4.0 + - 2.6.5 jdk: - oraclejdk7 @@ -22,6 +23,7 @@ gemfile: - gemfiles/1.8.7.gemfile - gemfiles/1.9.3.gemfile - gemfiles/2.0.0.gemfile + - gemfiles/2.6.0.gemfile env: - NO_CUCUMBER=true diff --git a/gemfiles/2.6.0.gemfile b/gemfiles/2.6.0.gemfile new file mode 100644 index 0000000..52e3704 --- /dev/null +++ b/gemfiles/2.6.0.gemfile @@ -0,0 +1,4 @@ +source 'http://rubygems.org' +gemspec path: '..' + +gem 'nokogiri', '= 1.10.4' From 91a153127225b6cdedc618c7cbff26e4bd7754fe Mon Sep 17 00:00:00 2001 From: Takayuki Hamada Date: Fri, 18 Oct 2019 22:32:27 +0900 Subject: [PATCH 2/7] update oraclejdk version update matrix exclusion for 2.6.5 --- .travis.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7896a21..3fd6cf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,14 +16,13 @@ rvm: - 2.6.5 jdk: - - oraclejdk7 + - oraclejdk9 gemfile: - Gemfile - gemfiles/1.8.7.gemfile - gemfiles/1.9.3.gemfile - gemfiles/2.0.0.gemfile - - gemfiles/2.6.0.gemfile env: - NO_CUCUMBER=true @@ -95,6 +94,15 @@ matrix: - rvm: 2.4.0 env: NO_CUCUMBER=true + - rvm: 2.6.5 + gemfile: gemfiles/1.8.7.gemfile + - rvm: 2.6.5 + gemfile: gemfiles/1.9.3.gemfile + - rvm: 2.6.5 + gemfile: gemfiles/2.0.0.gemfile + - rvm: 2.6.5 + env: NO_CUCUMBER=true + branches: only: - master From 97db779e137fe33243373d4301e42f7a793e3093 Mon Sep 17 00:00:00 2001 From: Takayuki Hamada Date: Fri, 18 Oct 2019 22:34:08 +0900 Subject: [PATCH 3/7] remove gemfile/2.6.0 --- gemfiles/2.6.0.gemfile | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 gemfiles/2.6.0.gemfile diff --git a/gemfiles/2.6.0.gemfile b/gemfiles/2.6.0.gemfile deleted file mode 100644 index 52e3704..0000000 --- a/gemfiles/2.6.0.gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source 'http://rubygems.org' -gemspec path: '..' - -gem 'nokogiri', '= 1.10.4' From c915c9c5f131c96aaaed7385f7972dd59228922f Mon Sep 17 00:00:00 2001 From: Takayuki Hamada Date: Fri, 18 Oct 2019 22:55:06 +0900 Subject: [PATCH 4/7] 1.8.7-head --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3fd6cf4..1750cdf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ before_script: - "sh -e /etc/init.d/xvfb start" rvm: - - 1.8.7 + - 1.8.7-head - 1.9.3 - 2.0.0 - 2.1.10 From 66467a79ab7ca20c7e77be57e30201f9b17b4a92 Mon Sep 17 00:00:00 2001 From: Takayuki Hamada Date: Fri, 18 Oct 2019 23:02:05 +0900 Subject: [PATCH 5/7] move xvfb to services --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1750cdf..8478f31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ sudo: false language: ruby before_script: - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - + - export DISPLAY=:99.0 +services: + - xvfb rvm: - 1.8.7-head - 1.9.3 From 6531d2a04c7aada4c978bba2dfe88ced47c2b0c5 Mon Sep 17 00:00:00 2001 From: Takayuki Hamada Date: Fri, 18 Oct 2019 23:51:52 +0900 Subject: [PATCH 6/7] use webdrivers and headless chrome --- features/support/env.rb | 16 +++++++++++++++- rspec-html-matchers.gemspec | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/features/support/env.rb b/features/support/env.rb index 932c7be..3792158 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -4,6 +4,7 @@ require 'sinatra/base' require 'capybara/cucumber' require 'rspec-html-matchers' +require 'webdrivers' World RSpecHtmlMatchers @@ -14,7 +15,20 @@ class SimpleApp < Sinatra::Base set :public_folder, $ASSETS_DIR end -Capybara.default_driver = :selenium +Capybara.register_driver :headless_chrome do |app| + options = Selenium::WebDriver::Chrome::Options.new + options.add_argument('--headless') + options.add_argument('--disable-gpu') + options.add_argument('--window-size=800,600') + + Capybara::Selenium::Driver.new(app, browser: :chrome, options: options) +end + +Capybara.configure do |config| + config.default_max_wait_time = 15 + config.default_driver = :headless_chrome +end +# Capybara.default_driver = :selenium Capybara.app = SimpleApp Before do diff --git a/rspec-html-matchers.gemspec b/rspec-html-matchers.gemspec index 946cc2a..fb26442 100644 --- a/rspec-html-matchers.gemspec +++ b/rspec-html-matchers.gemspec @@ -30,9 +30,10 @@ DESC s.add_development_dependency 'simplecov', '~> 0' s.add_development_dependency 'cucumber', '~> 1' s.add_development_dependency 'capybara', '~> 2' - s.add_development_dependency 'selenium-webdriver', '~> 2' + s.add_development_dependency 'selenium-webdriver', '~> 3' s.add_development_dependency 'sinatra', '~> 1' s.add_development_dependency 'rake', '~> 10' s.add_development_dependency 'travis-lint', '~> 1' s.add_development_dependency 'yard' + s.add_development_dependency 'webdrivers' end From 3206252f13bbc0fb3aea92b57956c1ba4fbe130f Mon Sep 17 00:00:00 2001 From: Takayuki Hamada Date: Fri, 18 Oct 2019 23:54:11 +0900 Subject: [PATCH 7/7] 2.4 or above is supported --- .travis.yml | 75 ----------------------------------------------------- 1 file changed, 75 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8478f31..7911167 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,12 +6,6 @@ before_script: services: - xvfb rvm: - - 1.8.7-head - - 1.9.3 - - 2.0.0 - - 2.1.10 - - 2.2.6 - - 2.3.3 - 2.4.0 - 2.6.5 @@ -20,9 +14,6 @@ jdk: gemfile: - Gemfile - - gemfiles/1.8.7.gemfile - - gemfiles/1.9.3.gemfile - - gemfiles/2.0.0.gemfile env: - NO_CUCUMBER=true @@ -31,75 +22,9 @@ env: matrix: exclude: - - rvm: 1.8.7 - gemfile: Gemfile - - rvm: 1.8.7 - gemfile: gemfiles/1.9.3.gemfile - - rvm: 1.8.7 - gemfile: gemfiles/2.0.0.gemfile - - rvm: 1.8.7 - env: NO_CUCUMBER=false - - - rvm: 1.9.3 - gemfile: Gemfile - - rvm: 1.9.3 - gemfile: gemfiles/1.8.7.gemfile - - rvm: 1.9.3 - gemfile: gemfiles/2.0.0.gemfile - - rvm: 1.9.3 - env: NO_CUCUMBER=true - - - rvm: 2.0.0 - gemfile: Gemfile - - rvm: 2.0.0 - gemfile: gemfiles/1.8.7.gemfile - - rvm: 2.0.0 - gemfile: gemfiles/1.9.3.gemfile - - rvm: 2.0.0 - env: NO_CUCUMBER=true - - - rvm: 2.1.10 - gemfile: gemfiles/1.8.7.gemfile - - rvm: 2.1.10 - gemfile: gemfiles/1.9.3.gemfile - - rvm: 2.1.10 - gemfile: gemfiles/2.0.0.gemfile - - rvm: 2.1.10 - env: NO_CUCUMBER=true - - - rvm: 2.2.6 - gemfile: gemfiles/1.8.7.gemfile - - rvm: 2.2.6 - gemfile: gemfiles/1.9.3.gemfile - - rvm: 2.2.6 - gemfile: gemfiles/2.0.0.gemfile - - rvm: 2.2.6 - env: NO_CUCUMBER=true - - - rvm: 2.3.3 - gemfile: gemfiles/1.8.7.gemfile - - rvm: 2.3.3 - gemfile: gemfiles/1.9.3.gemfile - - rvm: 2.3.3 - gemfile: gemfiles/2.0.0.gemfile - - rvm: 2.3.3 - env: NO_CUCUMBER=true - - - rvm: 2.4.0 - gemfile: gemfiles/1.8.7.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/1.9.3.gemfile - - rvm: 2.4.0 - gemfile: gemfiles/2.0.0.gemfile - rvm: 2.4.0 env: NO_CUCUMBER=true - - rvm: 2.6.5 - gemfile: gemfiles/1.8.7.gemfile - - rvm: 2.6.5 - gemfile: gemfiles/1.9.3.gemfile - - rvm: 2.6.5 - gemfile: gemfiles/2.0.0.gemfile - rvm: 2.6.5 env: NO_CUCUMBER=true