Skip to content

Commit e701dd2

Browse files
committed
Add es5-shim, remove Seleniuum and add capybara-webkit
1 parent 2be6151 commit e701dd2

File tree

7 files changed

+9
-33
lines changed

7 files changed

+9
-33
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ end
6363
group :test do
6464
gem 'capybara'
6565
gem 'capybara-screenshot'
66+
gem 'capybara-webkit'
6667
gem 'database_cleaner'
6768
gem 'launchy'
68-
gem 'selenium-webdriver'
6969
end

Gemfile.lock

+4-11
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ GEM
6060
capybara-screenshot (1.0.7)
6161
capybara (>= 1.0, < 3)
6262
launchy
63-
childprocess (0.5.5)
64-
ffi (~> 1.0, >= 1.0.11)
63+
capybara-webkit (1.4.1)
64+
capybara (>= 2.3.0, < 2.5.0)
65+
json
6566
coffee-rails (4.1.0)
6667
coffee-script (>= 2.2.0)
6768
railties (>= 4.0.0, < 5.0)
@@ -82,7 +83,6 @@ GEM
8283
factory_girl_rails (4.5.0)
8384
factory_girl (~> 4.5.0)
8485
railties (>= 3.0.0)
85-
ffi (1.9.8)
8686
foreman (0.77.0)
8787
dotenv (~> 1.0.2)
8888
thor (~> 0.19.1)
@@ -165,7 +165,6 @@ GEM
165165
rspec-mocks (~> 3.2.0)
166166
rspec-support (~> 3.2.0)
167167
rspec-support (3.2.2)
168-
rubyzip (1.1.7)
169168
sass (3.4.11)
170169
sass-rails (5.0.1)
171170
railties (>= 4.0.0, < 5.0)
@@ -176,11 +175,6 @@ GEM
176175
sdoc (0.4.1)
177176
json (~> 1.7, >= 1.7.7)
178177
rdoc (~> 4.0)
179-
selenium-webdriver (2.45.0)
180-
childprocess (~> 0.5)
181-
multi_json (~> 1.0)
182-
rubyzip (~> 1.0)
183-
websocket (~> 1.0)
184178
slop (3.6.0)
185179
spring (1.2.0)
186180
sprockets (2.12.3)
@@ -212,7 +206,6 @@ GEM
212206
binding_of_caller (>= 0.7.2)
213207
railties (~> 4.0)
214208
sprockets-rails (>= 2.0, < 4.0)
215-
websocket (1.2.1)
216209
xpath (2.0.0)
217210
nokogiri (~> 1.3)
218211

@@ -225,6 +218,7 @@ DEPENDENCIES
225218
byebug
226219
capybara
227220
capybara-screenshot
221+
capybara-webkit
228222
coffee-rails
229223
database_cleaner
230224
factory_girl_rails
@@ -239,7 +233,6 @@ DEPENDENCIES
239233
rspec-rails
240234
sass-rails
241235
sdoc
242-
selenium-webdriver
243236
spring
244237
sqlite3
245238
turbolinks

client/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"babel-core": "^4.7.16",
2727
"babel-loader": "^4.2.0",
2828
"body-parser": "^1.12.2",
29+
"es5-shim": "^4.1.0",
2930
"imports-loader": "^0.6.3",
3031
"jquery": "^2.1.3",
3132
"loader-utils": "^0.2.6",

client/scripts/rails_only.jsx

-6
This file was deleted.

client/webpack.rails.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
var config = require("./webpack.common.config");
88

9-
config.entry.push("./scripts/rails_only"); // rails specific assets
109
config.output = { filename: "client-bundle.js",
1110
path: "../app/assets/javascripts" };
1211
config.externals = { jquery: "var jQuery" }; // load jQuery from cdn or rails asset pipeline
@@ -23,6 +22,7 @@ module.exports = config;
2322
var devBuild = (typeof process.env["BUILDPACK_URL"]) === "undefined";
2423
if (devBuild) {
2524
console.log("Webpack dev build for Rails");
25+
config.entry.push('es5-shim'); // rails specific assets
2626
module.exports.devtool = "eval-source-map";
2727
} else {
2828
console.log("Webpack production build for Rails");

spec/rails_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
DatabaseCleaner.clean
4949
end
5050

51+
Capybara.javascript_driver = :webkit
52+
5153
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
5254
config.fixture_path = "#{::Rails.root}/spec/fixtures"
5355

spec/support/capybara.rb

-14
This file was deleted.

0 commit comments

Comments
 (0)