Skip to content

Commit ccc5674

Browse files
committed
rb - make all the spacing consistent
1 parent a586d3c commit ccc5674

File tree

150 files changed

+157
-670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+157
-670
lines changed

rb/.rubocop_todo.yml

Lines changed: 1 addition & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 2
10-
Lint/AmbiguousRegexpLiteral:
11-
Exclude:
12-
- 'spec/integration/selenium/webdriver/firefox/marionette_spec.rb'
13-
149
# Offense count: 2
1510
# Cop supports --auto-correct.
1611
Lint/DeprecatedClassMethods:
@@ -69,7 +64,7 @@ Metrics/CyclomaticComplexity:
6964
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
7065
# URISchemes: http, https
7166
Metrics/LineLength:
72-
Max: 318
67+
Max: 319
7368

7469
# Offense count: 61
7570
# Configuration parameters: CountComments.
@@ -103,17 +98,6 @@ Style/Alias:
10398
- 'lib/selenium/webdriver/support/color.rb'
10499
- 'spec/integration/selenium/webdriver/spec_support/guards.rb'
105100

106-
# Offense count: 6
107-
# Cop supports --auto-correct.
108-
# Configuration parameters: EnforcedStyle, SupportedStyles.
109-
# SupportedStyles: with_first_parameter, with_fixed_indentation
110-
Style/AlignParameters:
111-
Exclude:
112-
- 'lib/selenium/webdriver/remote/bridge.rb'
113-
- 'spec/integration/selenium/webdriver/element_spec.rb'
114-
- 'spec/integration/selenium/webdriver/spec_support/test_environment.rb'
115-
- 'spec/unit/selenium/webdriver/remote/http/common_spec.rb'
116-
117101
# Offense count: 3
118102
Style/AsciiComments:
119103
Exclude:
@@ -145,13 +129,6 @@ Style/ClassAndModuleChildren:
145129
Style/ClassCheck:
146130
Enabled: false
147131

148-
# Offense count: 3
149-
# Cop supports --auto-correct.
150-
Style/ClosingParenthesisIndentation:
151-
Exclude:
152-
- 'spec/integration/selenium/webdriver/spec_support/test_environment.rb'
153-
- 'spec/integration/selenium/webdriver/storage_spec.rb'
154-
155132
# Offense count: 3
156133
# Cop supports --auto-correct.
157134
# Configuration parameters: Keywords.
@@ -161,14 +138,6 @@ Style/CommentAnnotation:
161138
- 'lib/selenium/webdriver/remote/w3c_bridge.rb'
162139
- 'spec/integration/selenium/webdriver/window_spec.rb'
163140

164-
# Offense count: 3
165-
# Cop supports --auto-correct.
166-
Style/CommentIndentation:
167-
Exclude:
168-
- 'lib/selenium/webdriver/edge/legacy_support.rb'
169-
- 'spec/integration/selenium/webdriver/spec_support/test_environment.rb'
170-
- 'spec/integration/selenium/webdriver/target_locator_spec.rb'
171-
172141
# Offense count: 1
173142
Style/ConstantName:
174143
Exclude:
@@ -198,67 +167,6 @@ Style/Documentation:
198167
Style/DotPosition:
199168
Enabled: false
200169

201-
# Offense count: 17
202-
# Cop supports --auto-correct.
203-
# Configuration parameters: AllowAdjacentOneLineDefs.
204-
Style/EmptyLineBetweenDefs:
205-
Exclude:
206-
- 'lib/selenium/webdriver/support/abstract_event_listener.rb'
207-
208-
# Offense count: 19
209-
# Cop supports --auto-correct.
210-
Style/EmptyLines:
211-
Enabled: false
212-
213-
# Offense count: 43
214-
# Cop supports --auto-correct.
215-
# Configuration parameters: EnforcedStyle, SupportedStyles.
216-
# SupportedStyles: empty_lines, no_empty_lines
217-
Style/EmptyLinesAroundBlockBody:
218-
Enabled: false
219-
220-
# Offense count: 102
221-
# Cop supports --auto-correct.
222-
# Configuration parameters: EnforcedStyle, SupportedStyles.
223-
# SupportedStyles: empty_lines, no_empty_lines
224-
Style/EmptyLinesAroundClassBody:
225-
Enabled: false
226-
227-
# Offense count: 3
228-
# Cop supports --auto-correct.
229-
Style/EmptyLinesAroundMethodBody:
230-
Exclude:
231-
- 'lib/selenium/webdriver/common/touch_screen.rb'
232-
- 'lib/selenium/webdriver/remote/bridge.rb'
233-
- 'lib/selenium/webdriver/remote/w3c_bridge.rb'
234-
235-
# Offense count: 151
236-
# Cop supports --auto-correct.
237-
# Configuration parameters: EnforcedStyle, SupportedStyles.
238-
# SupportedStyles: empty_lines, no_empty_lines
239-
Style/EmptyLinesAroundModuleBody:
240-
Enabled: false
241-
242-
# Offense count: 29
243-
# Cop supports --auto-correct.
244-
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
245-
Style/ExtraSpacing:
246-
Exclude:
247-
- 'lib/selenium/webdriver/chrome/profile.rb'
248-
- 'lib/selenium/webdriver/common/action_builder.rb'
249-
- 'lib/selenium/webdriver/common/error.rb'
250-
- 'lib/selenium/webdriver/common/log_entry.rb'
251-
- 'lib/selenium/webdriver/common/mouse.rb'
252-
- 'lib/selenium/webdriver/common/target_locator.rb'
253-
- 'lib/selenium/webdriver/firefox/profile.rb'
254-
- 'spec/integration/selenium/webdriver/firefox/marionette_spec.rb'
255-
- 'spec/unit/selenium/webdriver/action_builder_spec.rb'
256-
- 'spec/unit/selenium/webdriver/chrome/bridge_spec.rb'
257-
- 'spec/unit/selenium/webdriver/firefox/bridge_spec.rb'
258-
- 'spec/unit/selenium/webdriver/ie/bridge_spec.rb'
259-
- 'spec/unit/selenium/webdriver/search_context_spec.rb'
260-
- 'spec/unit/selenium/webdriver/socket_poller_spec.rb'
261-
262170
# Offense count: 1
263171
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
264172
Style/FileName:
@@ -283,13 +191,6 @@ Style/FormatString:
283191
- 'lib/selenium/webdriver/safari/server.rb'
284192
- 'lib/selenium/webdriver/support/color.rb'
285193

286-
# Offense count: 1
287-
# Cop supports --auto-correct.
288-
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
289-
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
290-
Style/IndentArray:
291-
Enabled: false
292-
293194
# Offense count: 1
294195
# Cop supports --auto-correct.
295196
# Configuration parameters: EnforcedStyle, SupportedStyles.
@@ -298,21 +199,6 @@ Style/IndentationConsistency:
298199
Exclude:
299200
- 'spec/unit/selenium/webdriver/remote/http/default_spec.rb'
300201

301-
# Offense count: 8
302-
# Cop supports --auto-correct.
303-
# Configuration parameters: Width.
304-
Style/IndentationWidth:
305-
Exclude:
306-
- 'lib/selenium/webdriver/remote/w3c_bridge.rb'
307-
- 'lib/selenium/webdriver/support/color.rb'
308-
- 'spec/integration/selenium/webdriver/spec_support/guards.rb'
309-
310-
# Offense count: 1
311-
# Cop supports --auto-correct.
312-
Style/LeadingCommentSpace:
313-
Exclude:
314-
- 'lib/selenium/webdriver/common/driver_extensions/has_location.rb'
315-
316202
# Offense count: 6
317203
# Cop supports --auto-correct.
318204
Style/LineEndConcatenation:
@@ -334,13 +220,6 @@ Style/MethodCallParentheses:
334220
Style/MethodName:
335221
Enabled: false
336222

337-
# Offense count: 52
338-
# Cop supports --auto-correct.
339-
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
340-
# SupportedStyles: aligned, indented
341-
Style/MultilineMethodCallIndentation:
342-
Enabled: false
343-
344223
# Offense count: 3
345224
# Cop supports --auto-correct.
346225
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
@@ -468,49 +347,6 @@ Style/SingleLineMethods:
468347
- 'spec/unit/selenium/webdriver/firefox/extension_spec.rb'
469348
- 'spec/unit/selenium/webdriver/wait_spec.rb'
470349

471-
# Offense count: 5
472-
# Cop supports --auto-correct.
473-
Style/SpaceAfterComma:
474-
Exclude:
475-
- 'lib/selenium/webdriver/common/error.rb'
476-
- 'lib/selenium/webdriver/common/platform.rb'
477-
- 'lib/selenium/webdriver/common/touch_action_builder.rb'
478-
- 'spec/unit/selenium/webdriver/spec_helper.rb'
479-
480-
# Offense count: 9
481-
# Cop supports --auto-correct.
482-
# Configuration parameters: AllowForAlignment.
483-
Style/SpaceAroundOperators:
484-
Exclude:
485-
- 'lib/selenium/webdriver/common/action_builder.rb'
486-
- 'lib/selenium/webdriver/common/driver.rb'
487-
- 'lib/selenium/webdriver/common/element.rb'
488-
- 'lib/selenium/webdriver/common/log_entry.rb'
489-
- 'lib/selenium/webdriver/firefox/profile.rb'
490-
- 'lib/selenium/webdriver/remote/http/curb.rb'
491-
- 'spec/unit/selenium/server_spec.rb'
492-
493-
# Offense count: 5
494-
# Cop supports --auto-correct.
495-
Style/SpaceBeforeComma:
496-
Exclude:
497-
- 'lib/selenium/webdriver/remote/capabilities.rb'
498-
- 'spec/unit/selenium/webdriver/safari/bridge_spec.rb'
499-
500-
# Offense count: 1
501-
# Cop supports --auto-correct.
502-
Style/SpaceInsideParens:
503-
Exclude:
504-
- 'spec/unit/selenium/webdriver/action_builder_spec.rb'
505-
506-
# Offense count: 1
507-
# Cop supports --auto-correct.
508-
# Configuration parameters: EnforcedStyle, SupportedStyles.
509-
# SupportedStyles: space, no_space
510-
Style/SpaceInsideStringInterpolation:
511-
Exclude:
512-
- 'lib/selenium/webdriver/remote/response.rb'
513-
514350
# Offense count: 2
515351
# Cop supports --auto-correct.
516352
# Configuration parameters: SupportedStyles.
@@ -532,13 +368,6 @@ Style/StringLiterals:
532368
Style/StringLiteralsInInterpolation:
533369
Enabled: false
534370

535-
# Offense count: 22
536-
# Cop supports --auto-correct.
537-
# Configuration parameters: EnforcedStyle, SupportedStyles.
538-
# SupportedStyles: final_newline, final_blank_line
539-
Style/TrailingBlankLines:
540-
Enabled: false
541-
542371
# Offense count: 9
543372
# Cop supports --auto-correct.
544373
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
@@ -554,15 +383,6 @@ Style/TrailingCommaInLiteral:
554383
- 'spec/unit/selenium/webdriver/proxy_spec.rb'
555384
- 'spec/unit/selenium/webdriver/safari/bridge_spec.rb'
556385

557-
# Offense count: 5
558-
# Cop supports --auto-correct.
559-
Style/TrailingWhitespace:
560-
Exclude:
561-
- 'lib/selenium/webdriver/common/alert.rb'
562-
- 'lib/selenium/webdriver/remote/bridge.rb'
563-
- 'lib/selenium/webdriver/remote/commands.rb'
564-
- 'spec/unit/selenium/webdriver/support/select_spec.rb'
565-
566386
# Offense count: 5
567387
# Cop supports --auto-correct.
568388
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.

rb/lib/selenium/server.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
require 'net/http'
2323

2424
module Selenium
25-
2625
#
2726
# Wraps the remote server jar
2827
#
@@ -262,6 +261,5 @@ def poll_for_shutdown
262261
def socket
263262
@socket ||= WebDriver::SocketPoller.new(@host, @port, @timeout)
264263
end
265-
266264
end # Server
267265
end # Selenium

rb/lib/selenium/webdriver.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,5 @@ def self.root
8383
def self.for(*args)
8484
WebDriver::Driver.for(*args)
8585
end
86-
8786
end # WebDriver
8887
end # Selenium

rb/lib/selenium/webdriver/android.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
module Selenium
2121
module WebDriver
2222
module Android
23-
2423
end # Android
2524
end # WebDriver
2625
end # Selenium
2726

28-
require 'selenium/webdriver/android/bridge'
27+
require 'selenium/webdriver/android/bridge'

rb/lib/selenium/webdriver/android/bridge.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
module Selenium
2121
module WebDriver
2222
module Android
23-
2423
#
2524
# @api private
2625
#
2726

2827
class Bridge < Remote::Bridge
29-
3028
DEFAULT_URL = "http://#{Platform.localhost}:8080/wd/hub/"
3129

3230
def initialize(opts = {})
@@ -61,7 +59,6 @@ def driver_extensions
6159
def capabilities
6260
@capabilities ||= Remote::Capabilities.android
6361
end
64-
6562
end # Bridge
6663
end # Android
6764
end # WebDriver

rb/lib/selenium/webdriver/chrome.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def self.path=(path)
5151
def self.path
5252
@path ||= nil
5353
end
54-
5554
end # Chrome
5655
end # WebDriver
5756
end # Selenium

rb/lib/selenium/webdriver/chrome/bridge.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
module Selenium
2121
module WebDriver
2222
module Chrome
23-
2423
# @api private
2524
class Bridge < Remote::Bridge
26-
2725
def initialize(opts = {})
2826
http_client = opts.delete(:http_client)
2927

@@ -132,7 +130,6 @@ def extract_service_args(opts)
132130

133131
args
134132
end
135-
136133
end # Bridge
137134
end # Chrome
138135
end # WebDriver

rb/lib/selenium/webdriver/chrome/profile.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
module Selenium
2121
module WebDriver
2222
module Chrome
23-
2423
#
2524
# @private
2625
#
@@ -87,7 +86,7 @@ def write_prefs_to(dir)
8786
prefs_file = prefs_file_for(dir)
8887

8988
FileUtils.mkdir_p File.dirname(prefs_file)
90-
File.open(prefs_file, "w") { |file| file << JSON.generate(prefs) }
89+
File.open(prefs_file, "w") { |file| file << JSON.generate(prefs) }
9190
end
9291

9392
def prefs
@@ -103,7 +102,6 @@ def prefs_file_for(dir)
103102
File.join dir, 'Default', 'Preferences'
104103
end
105104
end # Profile
106-
107105
end # Chrome
108106
end # WebDriver
109107
end # Selenium

rb/lib/selenium/webdriver/chrome/service.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
module Selenium
2121
module WebDriver
2222
module Chrome
23-
2423
#
2524
# @api private
2625
#
@@ -45,7 +44,6 @@ def stop_server
4544
def cannot_connect_error_text
4645
"unable to connect to chromedriver #{@host}:#{@port}"
4746
end
48-
4947
end # Service
5048
end # Chrome
5149
end # WebDriver

0 commit comments

Comments
 (0)