-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from PhantomJS to headless Chrome #101
base: master
Are you sure you want to change the base?
Changes from all commits
d184440
3e5e59c
de2efe3
6dd6787
badd05d
d30ebdf
f086685
edbce84
b1463d6
b5a5c5e
557a98d
d3f7a7e
c665940
ef1a817
5d4280f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
AllCops: | ||
Exclude: | ||
- db/schema.rb | ||
FrozenStringLiteralComment: | ||
Enabled: false | ||
LineLength: | ||
Enabled: true | ||
Max: 160 | ||
Rails: | ||
Enabled: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,22 @@ rvm: | |
- 2.4.1 | ||
bundler_args: --without development | ||
cache: bundler | ||
sudo: required | ||
addons: | ||
apt_packages: | ||
- pandoc | ||
code_climate: | ||
repo_token: 243e5ab59244b7a1d3fb97d56bfe9961307ad558cb4a7cbeec3c85104e9ee11b | ||
chrome: stable | ||
before_install: | ||
- export TZ=Europe/Zurich | ||
- mysql -e 'CREATE DATABASE base_test' | ||
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting stuff. Could you explain a bit more (or give a link)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By the way, Chromedriver isn't found on Travis. Any idea how to fix? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope I had not the time atm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/flavorjones/chromedriver-helper seems to install it properly. Hint came from http://quyetbui.info/chrome-headless-capybara-on-travis-ci/. But i am not sure if i.e |
||
|
||
before_script: | ||
- cp config/secrets.travis.yml config/secrets.yml | ||
- export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start && sleep 3 | ||
|
||
script: | ||
- RAILS_ENV=test bundle exec rails db:create | ||
- RAILS_ENV=test bundle exec rails db:migrate | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used Rubocop some time ago, but didn't remember I'm still using it.
It's good to have it, I think. But line length and stuff sometimes seems a pain in the ass, especially in specs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True but for some blocks as
it
,scenario
and so on you can disable the line length. Feel free to change it as soon as it disturbs you (not tested):