Skip to content

Commit 9fc4a5e

Browse files
authored
Various updates incl node, gems (#461)
* Update versions * configure travis like react_on_rails * Removed capybara-webkit * Removed poltergeist * Updated Ruby version * Update React on Rails * Update node version
1 parent f0518b2 commit 9fc4a5e

13 files changed

+91
-88
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.8.0
1+
11

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-2.4.1
1+
ruby-2.5.3

.travis.yml

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,62 @@
1-
language:
2-
- ruby
1+
language: ruby
2+
33
rvm:
4-
- 2.4.1
5-
sudo: true
4+
- 2.5.3
5+
6+
services:
7+
- docker
8+
69
notifications:
710
slack: shakacode:YvfXbuFMcFAHt6ZjABIs0KET
8-
addons:
9-
apt:
10-
sources:
11-
- ubuntu-toolchain-r-test
12-
packages:
13-
- g++-4.9
14-
services:
15-
- postgresql
11+
12+
cache:
13+
bundler: true
14+
directories:
15+
- node_modules # NPM packages
16+
yarn: true
17+
18+
gemfile: Gemfile
19+
20+
#addons:
21+
# apt:
22+
# sources:
23+
# - ubuntu-toolchain-r-test
24+
# packages:
25+
# - g++-4.9
26+
# chrome: beta
27+
1628
env:
1729
global:
1830
- RAILS_ENV=test
19-
- CXX=g++-4.9
20-
install:
21-
- bundle install
22-
- chromedriver-update
23-
- wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
24-
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
31+
- DRIVER=selenium_chrome
32+
- CHROME_BIN=/usr/bin/google-chrome
33+
- USE_COVERALLS=TRUE
34+
35+
before_install:
2536
- sudo apt-get update
26-
- sudo apt-get install google-chrome-stable
27-
- nvm install stable && nvm alias default stable
28-
- npm install -g npm@5.6.x
29-
- npm install -g yarn
30-
- node --version
31-
- npm --version
37+
- sudo apt-get install -y xvfb libappindicator1 fonts-liberation
38+
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
39+
- sudo dpkg -i google-chrome*.deb
40+
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen scn 1600x1200x16"
41+
42+
install:
43+
- travis_retry gem install bundler -v '<2' # Ruby 2.2 and Rails 3.2 & 4.2 depend on bundler 1.x.
44+
- travis_retry nvm install 11.7.0
45+
- node -v
46+
- travis_retry npm i -g yarn
47+
- travis_retry bundle install
48+
- travis_retry yarn
49+
- bundle
50+
- yarn
3251
- google-chrome --version
33-
- chromedriver --version
34-
- yarn install
52+
53+
# Temp set chromediver to version matching chrome 73
54+
#- chromedriver-update 73.0.3683.68
55+
#- chromedriver --version
3556
- rake db:setup
3657

37-
# Tip: No need to run xvfb if running headless testing. However, we're going to start with
38-
# Poltergeist and switch to selenium if a test fails.
3958
before_script:
40-
- export DISPLAY=:99.0
41-
- sh -e /etc/init.d/xvfb start
59+
- "export DISPLAY=:99"
4260

4361
script:
4462
- bundle exec rake db:schema:load

Gemfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source "https://rubygems.org"
2-
ruby "2.4.1"
2+
ruby "2.5.3"
33

4-
gem "react_on_rails", "11.0.7"
4+
gem "react_on_rails", "11.2.2"
55
gem "webpacker"
66

77
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
@@ -94,13 +94,11 @@ end
9494
group :test do
9595
gem "capybara", "2.18.0"
9696
gem "capybara-screenshot"
97-
gem "capybara-webkit"
9897
gem "chromedriver-helper"
9998
gem "coveralls", require: false
10099
gem "database_cleaner"
101100
gem "generator_spec"
102101
gem "launchy"
103-
gem "poltergeist"
104102
gem "rails_best_practices"
105103
gem "rspec-rails", "3.7.2"
106104
gem "selenium-webdriver"

Gemfile.lock

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ GEM
4444
tzinfo (~> 1.1)
4545
addressable (2.5.2)
4646
public_suffix (>= 2.0.2, < 4.0)
47-
archive-zip (0.11.0)
47+
archive-zip (0.12.0)
4848
io-like (~> 0.3.0)
4949
arel (9.0.0)
5050
ast (2.4.0)
@@ -70,15 +70,11 @@ GEM
7070
capybara-screenshot (1.0.21)
7171
capybara (>= 1.0, < 4)
7272
launchy
73-
capybara-webkit (1.15.0)
74-
capybara (>= 2.3, < 4.0)
75-
json
7673
childprocess (0.9.0)
7774
ffi (~> 1.0, >= 1.0.11)
78-
chromedriver-helper (1.2.0)
75+
chromedriver-helper (2.1.0)
7976
archive-zip (~> 0.10)
8077
nokogiri (~> 1.8)
81-
cliver (0.3.2)
8278
code_analyzer (0.4.8)
8379
sexp_processor
8480
coderay (1.1.2)
@@ -90,7 +86,7 @@ GEM
9086
execjs
9187
coffee-script-source (1.12.2)
9288
concurrent-ruby (1.0.5)
93-
connection_pool (2.2.1)
89+
connection_pool (2.2.2)
9490
coveralls (0.8.21)
9591
json (>= 1.8, < 3)
9692
simplecov (~> 0.14.1)
@@ -128,7 +124,7 @@ GEM
128124
json (2.1.0)
129125
launchy (2.4.3)
130126
addressable (~> 2.3)
131-
libv8 (6.3.292.48.1)
127+
libv8 (6.7.288.46.1)
132128
listen (3.1.5)
133129
rb-fsevent (~> 0.9, >= 0.9.4)
134130
rb-inotify (~> 0.9, >= 0.9.7)
@@ -143,22 +139,18 @@ GEM
143139
method_source (0.9.0)
144140
mimemagic (0.3.2)
145141
mini_mime (1.0.0)
146-
mini_portile2 (2.3.0)
147-
mini_racer (0.1.15)
148-
libv8 (~> 6.3)
142+
mini_portile2 (2.4.0)
143+
mini_racer (0.2.4)
144+
libv8 (>= 6.3)
149145
minitest (5.11.3)
150146
multi_json (1.13.1)
151147
nio4r (2.3.1)
152-
nokogiri (1.8.2)
153-
mini_portile2 (~> 2.3.0)
148+
nokogiri (1.10.1)
149+
mini_portile2 (~> 2.4.0)
154150
parallel (1.12.1)
155151
parser (2.5.1.0)
156152
ast (~> 2.4.0)
157153
pg (1.0.0)
158-
poltergeist (1.18.0)
159-
capybara (>= 2.1, < 4)
160-
cliver (~> 0.3.1)
161-
websocket-driver (>= 0.2.0)
162154
powerpack (0.1.1)
163155
pry (0.11.3)
164156
coderay (~> 1.1.0)
@@ -222,7 +214,7 @@ GEM
222214
rb-inotify (0.9.10)
223215
ffi (>= 0.5.0, < 2)
224216
rdoc (6.0.4)
225-
react_on_rails (11.0.7)
217+
react_on_rails (11.2.2)
226218
addressable
227219
connection_pool
228220
execjs (~> 2.5)
@@ -334,7 +326,6 @@ DEPENDENCIES
334326
bundler-audit
335327
capybara (= 2.18.0)
336328
capybara-screenshot
337-
capybara-webkit
338329
chromedriver-helper
339330
coffee-rails
340331
coveralls
@@ -347,7 +338,6 @@ DEPENDENCIES
347338
listen
348339
mini_racer
349340
pg
350-
poltergeist
351341
pry
352342
pry-byebug
353343
pry-doc
@@ -359,7 +349,7 @@ DEPENDENCIES
359349
rails-html-sanitizer
360350
rails_best_practices
361351
rainbow
362-
react_on_rails (= 11.0.7)
352+
react_on_rails (= 11.2.2)
363353
redis (= 3.3.3)
364354
rspec-rails (= 3.7.2)
365355
rubocop
@@ -375,7 +365,7 @@ DEPENDENCIES
375365
webpacker
376366

377367
RUBY VERSION
378-
ruby 2.4.1p111
368+
ruby 2.5.3p105
379369

380370
BUNDLED WITH
381-
1.16.0
371+
1.16.6

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ See package.json and Gemfile for versions
140140
1. Check that you have Ruby 2.3.0 or greater
141141
1. Check that you're using the right version of node. Run `nvm list` to check. Use 5.5 or greater.
142142
1. Check that you have Postgres installed. Run `which postgres` to check. Use 9.4 or greater.
143-
1. Check that you have `qmake` installed. Run `which qmake` to check. If missing, follow these instructions: [Installing Qt and compiling capybara-webkit](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit)
144143
1. Check that you have Redis installed. Run `which redis-server` to check. If missing and on MacOS, install with Homebrew (`brew install redis`)
145144
1. `bundle install`
146145
1. `brew install yarn`

client/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "server-express.js",
66
"engines": {
77
"node": "^7.8.0 || ^8.0.0 || ^9.2.0 || ^10.0.0 || ^11.0.0",
8-
"npm": "^4.4.4 || ^5.0.0",
98
"yarn": "^1.0.0"
109
},
1110
"repository": {
@@ -82,7 +81,7 @@
8281
"react-bootstrap": "^0.31.5",
8382
"react-dom": "^16.1.1",
8483
"react-intl": "^2.4.0",
85-
"react-on-rails": "11.0.7",
84+
"react-on-rails": "11.2.2",
8685
"react-redux": "^5.0.6",
8786
"react-router": "^4.2.0",
8887
"react-router-dom": "^4.2.2",

client/yarn.lock

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
esutils "^2.0.2"
3939
js-tokens "^4.0.0"
4040

41+
"@babel/runtime-corejs2@^7.0.0":
42+
version "7.3.4"
43+
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.3.4.tgz#63f8bbc77622da202e9ea6f8f6e3bf28991832d9"
44+
integrity sha512-QwPuQE65kNxjsNKk34Rfgen2R5fk0J2So99SD45uXBp34QOfyz11SqVgJ4xvyCpnCIieSQ0X0hSSc9z/ymlJJw==
45+
dependencies:
46+
core-js "^2.5.7"
47+
regenerator-runtime "^0.12.0"
48+
4149
"@babel/template@7.0.0-beta.32":
4250
version "7.0.0-beta.32"
4351
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.32.tgz#e1d9fdbd2a7bcf128f2f920744a67dab18072495"
@@ -1941,6 +1949,11 @@ core-js@^2.4.0, core-js@^2.5.0:
19411949
version "2.5.1"
19421950
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
19431951

1952+
core-js@^2.5.7:
1953+
version "2.6.5"
1954+
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895"
1955+
integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==
1956+
19441957
core-util-is@1.0.2, core-util-is@~1.0.0:
19451958
version "1.0.2"
19461959
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -6402,9 +6415,12 @@ react-intl@^2.4.0:
64026415
intl-relativeformat "^2.0.0"
64036416
invariant "^2.1.1"
64046417

6405-
react-on-rails@11.0.7:
6406-
version "11.0.7"
6407-
resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-11.0.7.tgz#6a938d4928f594f65aac1cb386b6142f44c313bf"
6418+
react-on-rails@11.2.2:
6419+
version "11.2.2"
6420+
resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-11.2.2.tgz#e5cc062e41832f548d9d40dfc2aebd586b932f95"
6421+
integrity sha512-ZTS69giZDxVxwnraFNKujHpzK9GO5be+ISyGw5v3rKs4VlLKJ7BTVDtT22Fn0iEMe6x817s/cwGwepkAEEwA9A==
6422+
dependencies:
6423+
"@babel/runtime-corejs2" "^7.0.0"
64086424

64096425
react-overlays@^0.7.4:
64106426
version "0.7.4"
@@ -6590,9 +6606,10 @@ regenerator-runtime@^0.11.0:
65906606
version "0.11.0"
65916607
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1"
65926608

6593-
regenerator-runtime@^0.12.1:
6609+
regenerator-runtime@^0.12.0, regenerator-runtime@^0.12.1:
65946610
version "0.12.1"
65956611
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de"
6612+
integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==
65966613

65976614
regenerator-transform@^0.10.0:
65986615
version "0.10.1"

docs/codeship-ci.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ Pick "I want to create my own custom commands" on the Project Settings, Test tab
66
## Setup Commands
77
```bash
88
#!/bin/bash
9-
# Install a custom version of PhantomJS, http://phantomjs.org/
10-
export PHANTOMJS_HOST="https://s3.amazonaws.com/codeship-packages"
11-
export PHANTOMJS_VERSION=2.1.1
12-
\curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/phantomjs.sh | bash -s
13-
rvm use 2.4.1
9+
rvm use 2.5.3
1410
gem update --system
1511
gem install bundler
1612
bundle config build.nokogiri --use-system-libraries

docs/integration-test-notes.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ See the .travis.yml file, at the bottom, to see what driver is used by Travis.
1010
Codeship is set to use the default driver.
1111

1212
## Driver Options
13-
The current default driver is poltergeist_errors_ok.
1413

1514
Support is included for the following drivers:
1615

1716
1. Selenium Chrome (`DRIVER=selenium_chrome rspec`)
1817
1. Selenium Firefox (`DRIVER=selenium_firefox rspec`)
19-
1. Poltergeist (`DRIVER=poltergeist rspec`)
20-
1. Poltergeist no animations (`DRIVER=poltergeist_no_animations rspec`)
21-
1. Poltergeist errors ok (`DRIVER=poltergeist_errors_ok rspec`)
22-
1. Webkit (`DRIVER=webkit rspec`). Note, webkit has more errors than the other drivers.
2318

2419
You may want to experiment with using the different drivers.
2520

@@ -32,12 +27,3 @@ You may want to experiment with using the different drivers.
3227

3328
You may want to see the [chromedriver-helper docs](https://github.com/flavorjones/chromedriver-helper) and run chromedriver-update to get the latest version of the Chrome driver.
3429

35-
36-
## Poltergeist
37-
38-
Poltergeist is awesome because it will crash on JS Errors. Poltergeist is not aswesome because phantomjs is currently having race conditions on crashing a lot.
39-
40-
### 2016-11-25
41-
Polteregeist is consistently crashing due to [issue 830](https://github.com/teampoltergeist/poltergeist/issues/830) and [issue 232](https://github.com/teampoltergeist/poltergeist/issues/232). Hopefully, this will be fixed in the future.
42-
43-
`support/poltergeist.rb:34` contains code to restart phantomjs with the hopes that this will cause a failing test to pass.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"description": "ShakaCode's example of React on Rails plus React Native",
55
"main": "server-express.js",
66
"engines": {
7-
"node": "^7.8.0 || ^8.0.0 || ^9.2.0 || ^10.0.0",
8-
"npm": "^4.4.4 || ^5.0.0",
7+
"node": "^7.8.0 || ^8.0.0 || ^9.2.0 || ^10.0.0 || ^11.0.0",
98
"yarn": "^1.0.0"
109
},
1110
"scripts": {

spec/rails_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898

9999
config.before(:each, type: :system, js: true) do
100100
driven_by driver
101+
driven_by :selenium, using: :chrome, options: { args: ["headless", "disable-gpu", "no-sandbox", "disable-dev-shm-usage"] }
101102
end
102103

103104
# Capybara.default_max_wait_time = 15

spec/support/driver_registration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def self.register_selenium_firefox
2424
def self.register_selenium_chrome_headless
2525
return if @selenium_headless_registered
2626
Capybara.register_driver :selenium_chrome_headless do |app|
27-
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: { args: %w[headless disable-gpu] })
27+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: { args: %w[headless disable-gpu no-sandbox disable-dev-shm-usage] })
2828
Capybara::Selenium::Driver.new app, browser: :chrome, desired_capabilities: capabilities
2929
end
3030
Capybara::Screenshot.register_driver(:selenium_chrome_headless) do |js_driver, path|

0 commit comments

Comments
 (0)