Skip to content

Commit

Permalink
Switch to apparition capybara driver (activeadmin#5840)
Browse files Browse the repository at this point in the history
To remove the chromedriver requirement.
  • Loading branch information
deivid-rodriguez authored and javierjulio committed Sep 4, 2019
1 parent 3692d15 commit 199d4d3
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 68 deletions.
6 changes: 0 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ version: 2.1
name: Install dependencies
command: bundle install --path /home/circleci/project/vendor/bundle --retry 3 --jobs 3 --verbose

.install_chromedriver: &install_chromedriver
run:
name: Install chromedriver
command: bin/install_chromedriver.sh

.save_cache: &save_cache
save_cache:
key: bundler-dependencies-{{ checksum "current_gemfile.lock" }}-{{ .Environment.CIRCLE_JOB }}
Expand Down Expand Up @@ -136,7 +131,6 @@ version: 2.1
- *copy_current_gemfile
- *restore_cache
- *install_dependencies
- *install_chromedriver
- *save_cache
- *restore_test_app_from_workspace
- *restore_test_times
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ git checkout -b 325-add-japanese-translations
Make sure you're using a recent ruby and have the `bundler` gem installed, at
least version `1.14.3`.

You'll also need chrome and [chromedriver] installed in order to run cucumber
scenarios.
You'll also need chrome installed in order to run cucumber scenarios.

Now install the development dependencies:

Expand Down Expand Up @@ -204,7 +203,6 @@ Maintainers need to do the following to push out a release:
* `bin/rake release`

[chandler]: https://github.com/mattbrictson/chandler#2-configure-credentials
[chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/getting-started
[mailing list]: http://groups.google.com/group/activeadmin
[Stack Overflow]: http://stackoverflow.com/questions/tagged/activeadmin
[search the issue tracker]: https://github.com/activeadmin/activeadmin/issues?q=something
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem 'draper', '~> 3.1'
gem "devise", git: "https://github.com/plataformatec/devise"

group :test do
gem 'apparition'
gem 'capybara', '~> 3.14'

gem 'simplecov', require: false # Test coverage generator. Go to /coverage/ after running tests
Expand All @@ -25,5 +26,4 @@ group :test do
gem 'rails-i18n' # Provides default i18n for many languages
gem 'rspec-rails'
gem 'sqlite3', platform: :mri
gem 'selenium-webdriver'
end
11 changes: 4 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ GEM
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
apparition (0.4.0)
capybara (~> 3.13, < 4)
websocket-driver (>= 0.6.5)
arbre (1.2.1)
activesupport (>= 3.0.0)
arel (9.0.0)
Expand All @@ -105,8 +108,6 @@ GEM
chandler (0.9.0)
netrc
octokit (>= 2.2.0)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
coderay (1.1.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
Expand Down Expand Up @@ -340,7 +341,6 @@ GEM
rubocop-rspec (1.30.1)
rubocop (>= 0.60.0)
ruby-progressbar (1.10.0)
rubyzip (1.2.2)
sassc (2.0.1)
ffi (~> 1.9)
rake
Expand All @@ -353,9 +353,6 @@ GEM
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -403,6 +400,7 @@ PLATFORMS
DEPENDENCIES
activeadmin!
activerecord-jdbcsqlite3-adapter (~> 52.0)
apparition
cancancan
capybara (~> 3.14)
chandler (= 0.9.0)
Expand All @@ -429,7 +427,6 @@ DEPENDENCIES
rspec-rails
rubocop (= 0.63.1)
rubocop-rspec (~> 1.30)
selenium-webdriver
simplecov
sqlite3
yard
Expand Down
17 changes: 0 additions & 17 deletions bin/install_chromedriver.sh

This file was deleted.

15 changes: 2 additions & 13 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,8 @@
Capybara.current_driver = Capybara.javascript_driver
end

Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.load_selenium

options = Selenium::WebDriver::Chrome::Options.new
options.args << '--headless'

http_client = Selenium::WebDriver::Remote::Http::Default.new
http_client.read_timeout = 180

Capybara::Selenium::Driver.new(app, browser: :chrome, options: options, http_client: http_client)
end

Capybara.javascript_driver = :chrome
require "capybara/apparition"
Capybara.javascript_driver = :apparition

Capybara.server = :webrick

Expand Down
11 changes: 4 additions & 7 deletions gemfiles/rails_50.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ GEM
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
apparition (0.4.0)
capybara (~> 3.13, < 4)
websocket-driver (>= 0.6.5)
arbre (1.2.1)
activesupport (>= 3.0.0)
arel (7.1.4)
Expand All @@ -97,8 +100,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (~> 1.2)
xpath (~> 3.2)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
coderay (1.1.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
Expand Down Expand Up @@ -282,7 +283,6 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubyzip (1.2.2)
sassc (2.0.1)
ffi (~> 1.9)
rake
Expand All @@ -292,9 +292,6 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -337,6 +334,7 @@ PLATFORMS
DEPENDENCIES
activeadmin!
activerecord-jdbcsqlite3-adapter (~> 50.0)
apparition
cancancan
capybara (~> 3.14)
cucumber
Expand All @@ -356,7 +354,6 @@ DEPENDENCIES
rails-i18n
rake
rspec-rails
selenium-webdriver
simplecov
sqlite3

Expand Down
11 changes: 4 additions & 7 deletions gemfiles/rails_51.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ GEM
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
apparition (0.4.0)
capybara (~> 3.13, < 4)
websocket-driver (>= 0.6.5)
arbre (1.2.1)
activesupport (>= 3.0.0)
arel (8.0.0)
Expand All @@ -97,8 +100,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (~> 1.2)
xpath (~> 3.2)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
coderay (1.1.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
Expand Down Expand Up @@ -282,7 +283,6 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubyzip (1.2.2)
sassc (2.0.1)
ffi (~> 1.9)
rake
Expand All @@ -292,9 +292,6 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -337,6 +334,7 @@ PLATFORMS
DEPENDENCIES
activeadmin!
activerecord-jdbcsqlite3-adapter (~> 51.0)
apparition
cancancan
capybara (~> 3.14)
cucumber
Expand All @@ -356,7 +354,6 @@ DEPENDENCIES
rails-i18n
rake
rspec-rails
selenium-webdriver
simplecov
sqlite3

Expand Down
11 changes: 4 additions & 7 deletions gemfiles/rails_60.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ GEM
zeitwerk (~> 2.1, >= 2.1.8)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
apparition (0.4.0)
capybara (~> 3.13, < 4)
websocket-driver (>= 0.6.5)
arbre (1.2.1)
activesupport (>= 3.0.0)
babel-source (5.8.35)
Expand All @@ -114,8 +117,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (1.0.1)
rake (< 13.0)
coderay (1.1.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
Expand Down Expand Up @@ -305,7 +306,6 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.2)
rubyzip (1.2.3)
sassc (2.0.1)
ffi (~> 1.9)
rake
Expand All @@ -315,9 +315,6 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.3)
childprocess (>= 0.5, < 2.0)
rubyzip (~> 1.2, >= 1.2.2)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -361,6 +358,7 @@ PLATFORMS
DEPENDENCIES
activeadmin!
activerecord-jdbcsqlite3-adapter (~> 60.0.rc1)
apparition
cancancan
capybara (~> 3.14)
cucumber
Expand All @@ -380,7 +378,6 @@ DEPENDENCIES
rails-i18n
rake
rspec-rails
selenium-webdriver
simplecov
sqlite3

Expand Down

0 comments on commit 199d4d3

Please sign in to comment.