-
-
Notifications
You must be signed in to change notification settings - Fork 159
allow SAUCE_ENDPOINT env var to override sauce server url/path #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks good 👍 |
lib/appium_lib/driver.rb
Outdated
@@ -376,6 +378,8 @@ def initialize(opts = {}) | |||
@sauce_username = nil if !@sauce_username || (@sauce_username.is_a?(String) && @sauce_username.empty?) | |||
@sauce_access_key = appium_lib_opts.fetch :sauce_access_key, ENV['SAUCE_ACCESS_KEY'] | |||
@sauce_access_key = nil if !@sauce_access_key || (@sauce_access_key.is_a?(String) && @sauce_access_key.empty?) | |||
@sauce_endpoint = appium_lib_opts.fetch :sauce_endpoint, ENV['SAUCE_ENDPOINT'] | |||
@sauce_endpoint = "ondemand.saucelabs.com:443/wd/hub" if !@sauce_endpoint || (@sauce_endpoint.is_a?(String) && @sauce_endpoint.empty?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/appium_lib/driver.rb:382:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@sauce_endpoint = "ondemand.saucelabs.com:443/wd/hub" if !@sauce_endpoint || (@sauce_endpoint.is_a?(String) && @sauce_endpoint.empty?)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/appium_lib/driver.rb:382:126: C: Metrics/LineLength: Line is too long. [142/125]
@sauce_endpoint = "ondemand.saucelabs.com:443/wd/hub" if !@sauce_endpoint || (@sauce_endpoint.is_a?(String) && @sauce_endpoint.empty?)
^^^^^^^^^^^^^^^^^
Could you fix rubocop error? @jlipps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, will do
89c7c89
to
b93cc7d
Compare
lib/appium_lib/driver.rb
Outdated
@@ -376,6 +378,9 @@ def initialize(opts = {}) | |||
@sauce_username = nil if !@sauce_username || (@sauce_username.is_a?(String) && @sauce_username.empty?) | |||
@sauce_access_key = appium_lib_opts.fetch :sauce_access_key, ENV['SAUCE_ACCESS_KEY'] | |||
@sauce_access_key = nil if !@sauce_access_key || (@sauce_access_key.is_a?(String) && @sauce_access_key.empty?) | |||
@sauce_endpoint = appium_lib_opts.fetch :sauce_endpoint, ENV['SAUCE_ENDPOINT'] | |||
@sauce_endpoint = 'ondemand.saucelabs.com:443/wd/hub' if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offenses:
lib/appium_lib/driver.rb:382:65: C: Style/TrailingWhitespace: Trailing whitespace detected.
@sauce_endpoint = 'ondemand.saucelabs.com:443/wd/hub' if
^
79 files inspected, 1 offense detected
RuboCop failed!
oops, last one error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @jlipps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed now; i'm confused since my editor is set to remove trailing whitespace, so not sure how this got in here!
b93cc7d
to
65f9546
Compare
@KazuCocoa mind taking a look? The purpose here is to allow folks the ability to run on for example a TestObject server which has a different value. So we want to allow overriding the hardcoded sauce value.
cc @chiarnglin