Skip to content

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

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

jlipps
Copy link
Member

@jlipps jlipps commented Feb 8, 2017

@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

@KazuCocoa KazuCocoa mentioned this pull request Feb 8, 2017
@KazuCocoa
Copy link
Member

Looks good 👍
I'll merge and release later as v9.3.2.

@@ -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?)
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will do

@KazuCocoa KazuCocoa added this to the v9.3.2 milestone Feb 8, 2017
@@ -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
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @jlipps

Copy link
Member Author

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!

@KazuCocoa KazuCocoa merged commit 5731059 into master Feb 9, 2017
@KazuCocoa KazuCocoa deleted the jlipps-endpoint branch February 9, 2017 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants