Skip to content

Commit eef6227

Browse files
committed
adjust retry stuff, fix linting
Webpack files need this, as they error if there's a trailing comma for function calls! /* eslint comma-dangle: ["error", {"functions": "never", "arrays": "only-multiline", "objects": "only-multiline"} ] */
1 parent 326c47a commit eef6227

7 files changed

+35
-15
lines changed

client/webpack.client.base.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
// Common client-side webpack configuration used by webpack.hot.config and webpack.rails.config.
1+
/* eslint comma-dangle: ["error",
2+
{"functions": "never", "arrays": "only-multiline", "objects": "only-multiline"} ] */
23

4+
// Common client-side webpack configuration used by webpack.hot.config and webpack.rails.config.
35
const webpack = require('webpack');
46
const path = require('path');
57
const autoprefixer = require('autoprefixer');

client/webpack.client.express.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint comma-dangle: ["error",
2+
{"functions": "never", "arrays": "only-multiline", "objects": "only-multiline"} ] */
3+
14
// Run like this:
25
// cd client && node server-express.js
36

@@ -16,7 +19,7 @@ config.entry.app.push(
1619

1720
// Webpack dev server
1821
`webpack-dev-server/client?http://localhost:${hotPort}`,
19-
'webpack/hot/dev-server',
22+
'webpack/hot/dev-server'
2023
);
2124

2225
config.output = {
@@ -27,7 +30,7 @@ config.output = {
2730
};
2831
config.plugins.unshift(
2932
new webpack.HotModuleReplacementPlugin(),
30-
new webpack.NoErrorsPlugin(),
33+
new webpack.NoErrorsPlugin()
3134
);
3235
config.devtool = 'eval-source-map';
3336

@@ -71,7 +74,7 @@ config.module.loaders.push(
7174
'sass',
7275
'sass-resources',
7376
],
74-
},
77+
}
7578
);
7679

7780
module.exports = config;

client/webpack.client.rails.build.config.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint comma-dangle: ["error",
2+
{"functions": "never", "arrays": "only-multiline", "objects": "only-multiline"} ] */
3+
14
// Run like this:
25
// cd client && npm run build:client
36
// Note that Foreman (Procfile.dev) has also been configured to take care of this.
@@ -21,7 +24,7 @@ config.entry.vendor.unshift(
2124
'jquery-ujs',
2225

2326
// Configures extractStyles to be true if NODE_ENV is production
24-
'bootstrap-loader/extractStyles',
27+
'bootstrap-loader/extractStyles'
2528
);
2629

2730
// See webpack.common.config for adding modules common to both the webpack dev server and rails
@@ -37,7 +40,7 @@ config.module.loaders.push(
3740
loader: ExtractTextPlugin.extract(
3841
'style',
3942
'css?minimize&modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]' +
40-
'!postcss',
43+
'!postcss'
4144
),
4245
},
4346
{
@@ -47,7 +50,7 @@ config.module.loaders.push(
4750
'css?minimize&modules&importLoaders=3&localIdentName=[name]__[local]__[hash:base64:5]' +
4851
'!postcss' +
4952
'!sass' +
50-
'!sass-resources',
53+
'!sass-resources'
5154
),
5255
},
5356
{
@@ -57,12 +60,12 @@ config.module.loaders.push(
5760
{
5861
test: require.resolve('jquery-ujs'),
5962
loader: 'imports?jQuery=jquery',
60-
},
63+
}
6164
);
6265

6366
config.plugins.push(
6467
new ExtractTextPlugin('[name]-bundle.css', { allChunks: true }),
65-
new webpack.optimize.DedupePlugin(),
68+
new webpack.optimize.DedupePlugin()
6669
);
6770

6871
if (devBuild) {

client/webpack.client.rails.hot.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint comma-dangle: ["error",
2+
{"functions": "never", "arrays": "only-multiline", "objects": "only-multiline"} ] */
3+
14
// Run with Rails server like this:
25
// rails s
36
// cd client && babel-node server-rails-hot.js
@@ -12,13 +15,13 @@ const hotRailsPort = process.env.HOT_RAILS_PORT || 3500;
1215

1316
config.entry.app.push(
1417
`webpack-dev-server/client?http://localhost:${hotRailsPort}`,
15-
'webpack/hot/only-dev-server',
18+
'webpack/hot/only-dev-server'
1619
);
1720

1821
// These are Rails specific
1922
config.entry.vendor.push(
2023
'jquery-ujs',
21-
'bootstrap-loader',
24+
'bootstrap-loader'
2225
);
2326

2427
config.output = {
@@ -71,12 +74,12 @@ config.module.loaders.push(
7174
{
7275
test: require.resolve('jquery-ujs'),
7376
loader: 'imports?jQuery=jquery',
74-
},
77+
}
7578
);
7679

7780
config.plugins.push(
7881
new webpack.HotModuleReplacementPlugin(),
79-
new webpack.NoErrorsPlugin(),
82+
new webpack.NoErrorsPlugin()
8083
);
8184

8285
config.devtool = 'eval-source-map';

client/webpack.server.rails.build.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint comma-dangle: ["error",
2+
{"functions": "never", "arrays": "only-multiline", "objects": "only-multiline"} ] */
3+
14
// Common webpack configuration for server bundle
25

36
const webpack = require('webpack');

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# Show retry status in spec process
4141
config.verbose_retry = true
4242
# Try twice (retry once)
43-
config.default_retry_count = 3
43+
config.default_retry_count = 6
4444
# Only retry when Selenium raises Net::ReadTimeout
4545
# config.exceptions_to_retry = [Net::ReadTimeout]
4646
end

spec/support/poltergeist.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CAPYBARA_TIMEOUT_RETRIES = 3
1+
CAPYBARA_TIMEOUT_RETRIES = 4
22

33
# HACK: workaround for Capybara Poltergeist StatusFailErrors, simply retries
44
# from https://gist.github.com/afn/c04ccfe71d648763b306
@@ -9,6 +9,12 @@
99
example.instance_variable_set("@exception", nil)
1010
__init_memoized
1111
ex.run
12+
13+
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
14+
puts "poltergeist.rb: #{__LINE__}, method: #{__method__}"
15+
puts "example.exception = #{example.exception.ai}"
16+
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
17+
1218
break unless example.exception.is_a?(Capybara::Poltergeist::StatusFailError)
1319
puts("\nCapybara::Poltergeist::StatusFailError at #{example.location}\n Restarting phantomjs and retrying...")
1420
PhantomJSRestart.call

0 commit comments

Comments
 (0)