Skip to content

Commit 1923f64

Browse files
committed
Rubocop - Metrics/LineLength
1 parent 0ab729a commit 1923f64

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

lib/appium_lib/android/helper.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def _fix_android_native_source(source)
105105

106106
# <android.app.ActionBar$Tab => <android.app.ActionBar.Tab
107107
# </android.app.ActionBar$Tab> => </android.app.ActionBar.Tab>
108-
source = source.gsub(/<#{before}\s*\$\s*#{after}/, "<#{fixed}").gsub(/<\/#{before}\s*\$\s*#{after}>/, "</#{fixed}>")
108+
source = source.gsub(/<#{before}\s*\$\s*#{after}/,
109+
"<#{fixed}").gsub(/<\/#{before}\s*\$\s*#{after}>/, "</#{fixed}>")
109110
end
110111

111112
source

lib/appium_lib/common/helper.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ def characters(chars)
221221
end
222222

223223
def _no_such_element
224-
raise Selenium::WebDriver::Error::NoSuchElementError, 'An element could not be located on the page using the given search parameters.'
224+
raise Selenium::WebDriver::Error::NoSuchElementError,
225+
'An element could not be located on the page using the given search parameters.'
225226
end
226227
end # module Common
227228
end # module Appium

lib/appium_lib/common/patch.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ def patch_webdriver_bridge
6767
Selenium::WebDriver::Remote::Bridge.class_eval do
6868
# Code from lib/selenium/webdriver/remote/bridge.rb
6969
def raw_execute(command, opts = {}, command_hash = nil)
70-
verb, path = Selenium::WebDriver::Remote::COMMANDS[command] || raise(ArgumentError, "unknown command: #{command.inspect}")
71-
path = path.dup
70+
verb, path = Selenium::WebDriver::Remote::COMMANDS[command] ||
71+
raise(ArgumentError, "unknown command: #{command.inspect}")
72+
path = path.dup
7273

7374
path[':session_id'] = @session_id if path.include?(':session_id')
7475

lib/appium_lib/device/device.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ def background_app(duration)
162162
# @param [String] The activity to start before the target activity [optional]
163163
#
164164
# ```ruby
165-
# start_activity app_package: 'io.appium.android.apis', app_activity: '.accessibility.AccessibilityNodeProviderActivity'
165+
# start_activity app_package: 'io.appium.android.apis',
166+
# app_activity: '.accessibility.AccessibilityNodeProviderActivity'
166167
# ```
167168
add_endpoint_method(:start_activity, 'session/:session_id/appium/device/start_activity') do
168169
def start_activity(opts)

lib/appium_lib/driver.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ def initialize(opts = {})
296296

297297
# https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile
298298
@appium_device = @caps[:platformName]
299-
@appium_device = @appium_device.is_a?(Symbol) ? @appium_device : @appium_device.downcase.strip.intern if @appium_device
299+
@appium_device = @appium_device.is_a?(Symbol) ?
300+
@appium_device : @appium_device.downcase.strip.intern if @appium_device
300301
raise "platformName must be set. Not found in options: #{opts}" unless @appium_device
301302
raise 'platformName must be Android or iOS' unless [:android, :ios].include?(@appium_device)
302303

0 commit comments

Comments
 (0)