Skip to content

Commit 44eb53b

Browse files
Add comments to end
1 parent a4d2c55 commit 44eb53b

20 files changed

+63
-64
lines changed

lib/appium_lib/android/element/alert.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ def alert_dismiss
3535
def alert_dismiss_text
3636
first_button.text
3737
end
38-
end
39-
end
38+
end # module Android
39+
end # module Appium

lib/appium_lib/android/element/generic.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,5 @@ def scroll_to_exact text
151151

152152
mobile :find, args
153153
end
154-
end
155-
end
154+
end # module Android
155+
end # module Appium

lib/appium_lib/android/element/textfield.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ def textfield text
4646
def textfield_exact text
4747
find_ele_by_text :textfield, text
4848
end
49-
end
50-
end
49+
end # module Android
50+
end # module Appium

lib/appium_lib/android/helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -447,5 +447,5 @@ def id id
447447
raise "Invalid id `#{id}`" unless @strings_xml[id] || id.include?(':')
448448
find_element :id, id
449449
end
450-
end
451-
end
450+
end # module Android
451+
end # module Appium

lib/appium_lib/android/mobile_methods.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ def extended(mod)
1212
Selenium::WebDriver::SearchContext::FINDERS[:uiautomator] = '-android uiautomator'
1313
end
1414
end
15-
end
16-
end
17-
end
15+
end # class << self
16+
end # module Android
17+
end # module Appium

lib/appium_lib/android/patch.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ def type text
1313
end
1414
end
1515
end
16-
end
17-
end
16+
end # Android
17+
end # Appium

lib/appium_lib/awesome_print/ostruct.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def cast_with_ostruct(object, type)
2626
def awesome_open_struct_instance(object)
2727
"#{object.class} #{awesome_hash(object.marshal_dump)}"
2828
end
29-
end
30-
end
29+
end # module OpenStruct
30+
end # module AwesomePrint
3131

3232
AwesomePrint::Formatter.send(:include, AwesomePrint::OpenStruct)
3333
end

lib/appium_lib/common/element/button.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ def button_num text, number=1
8181

8282
result
8383
end
84-
end
85-
end
84+
end # module Common
85+
end # module Appium

lib/appium_lib/common/element/text.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ def s_text_exact text
5959
def s_texts_exact text
6060
find_eles_by_text :text, text
6161
end
62-
end
63-
end
62+
end # module Common
63+
end # module Appium

lib/appium_lib/common/element/window.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ def window_size
77
return nil if @driver.nil?
88
@driver.manage.window.size
99
end
10-
end
11-
end
10+
end # module Common
11+
end # module Appium

lib/appium_lib/common/helper.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,5 @@ def resolve_id id
277277
def raise_no_element_error
278278
raise Selenium::WebDriver::Error::NoSuchElementError, 'An element could not be located on the page using the given search parameters.'
279279
end
280-
281-
end
282-
end
280+
end # module Common
281+
end # module Appium

lib/appium_lib/device/device.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def switch_to_default_context
245245
# @return [String] The context currently being used.
246246

247247
# @!method available_contexts
248-
# @return [Array<String>] All usable contexts, as an array of strings
248+
# @return [Array<String>] All usable contexts, as an array of strings
249249
end # class << self
250250
end # module Device
251251
end # module Appium

lib/appium_lib/driver.rb

+20-20
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,23 @@ class Spec < Test
4646
end
4747

4848
module Appium
49-
# Load appium.txt (toml format)
50-
# the basedir of this file + appium.txt is what's used
51-
#
52-
# ```
53-
# [caps]
54-
# app = "path/to/app"
55-
#
56-
# [appium_lib]
57-
# port = 8080
58-
# ```
59-
#
60-
# :app is expanded
61-
# :requires are expanded
62-
# all keys are converted to symbols
63-
#
64-
# @param opts [Hash] file: '/path/to/appium.txt', verbose: true
65-
# @return [hash] the symbolized hash with updated :app and :require keys
49+
# Load appium.txt (toml format)
50+
# the basedir of this file + appium.txt is what's used
51+
#
52+
# ```
53+
# [caps]
54+
# app = "path/to/app"
55+
#
56+
# [appium_lib]
57+
# port = 8080
58+
# ```
59+
#
60+
# :app is expanded
61+
# :requires are expanded
62+
# all keys are converted to symbols
63+
#
64+
# @param opts [Hash] file: '/path/to/appium.txt', verbose: true
65+
# @return [hash] the symbolized hash with updated :app and :require keys
6666
def self.load_appium_txt opts={}
6767
raise 'opts must be a hash' unless opts.kind_of? Hash
6868
raise 'opts must not be empty' if opts.empty?
@@ -169,7 +169,6 @@ def self.promote_singleton_appium_methods main_module
169169
# ```ruby
170170
# Appium.promote_appium_methods Object
171171
# ```
172-
173172
def self.promote_appium_methods class_array
174173
raise 'Driver is nil' if $driver.nil?
175174
# Wrap single class into an array
@@ -204,6 +203,7 @@ class Driver
204203

205204
# The amount to sleep in seconds before every webdriver http call.
206205
attr_accessor :global_webdriver_http_sleep
206+
207207
# Creates a new driver.
208208
# :device is :android, :ios, or :selendroid
209209
#
@@ -563,8 +563,8 @@ def x
563563
driver_quit
564564
exit # exit pry
565565
end
566-
end # end class Driver
567-
end # end module Appium
566+
end # class Driver
567+
end # module Appium
568568

569569
# Paging in Pry is annoying :q required to exit.
570570
# With pager disabled, the output is similar to IRB

lib/appium_lib/ios/element/alert.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ def alert_dismiss_text
9393
return target_text
9494
end
9595
end
96-
end
97-
end
96+
end # module Ios
97+
end # module Appium

lib/appium_lib/ios/element/generic.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,5 @@ def names name
163163
def escape_single_quote text_to_escape
164164
text_to_escape.gsub("'", '\\' * 4 + "'")
165165
end
166-
end
167-
end
166+
end # module Ios
167+
end # module Appium

lib/appium_lib/ios/element/textfield.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ def textfield_named target_name
7575
target
7676
end
7777
end
78-
end
79-
end
78+
end # module Ios
79+
end # module Appium

lib/appium_lib/ios/helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,5 +207,5 @@ def ios_version
207207
ios_version = execute_script 'UIATarget.localTarget().systemVersion()'
208208
ios_version.split('.').map { |e| e.to_i }
209209
end
210-
end
211-
end
210+
end # module Ios
211+
end # module Appium

lib/appium_lib/ios/mobile_methods.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ def extended(mod)
1212
Selenium::WebDriver::SearchContext::FINDERS[:uiautomation] = '-ios uiautomation'
1313
end
1414
end
15-
end
16-
end
17-
end
15+
end # class << self
16+
end # module Ios
17+
end # module Appium

lib/appium_lib/ios/patch.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def type text
4545

4646
$driver.execute_script js
4747
}
48-
end
49-
end
50-
end
51-
end
52-
end
48+
end # def type
49+
end # Selenium::WebDriver::Element.class_eval
50+
end # def patch_webdriver_element
51+
end # module Ios
52+
end # module Appium

lib/appium_lib/logger.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class << self
88
def logger
99
@logger ||= Logger.new
1010
end
11-
end
12-
end
13-
end
11+
end # class << self
12+
end # module Logger
13+
end # module Appium

0 commit comments

Comments
 (0)