saucelabs / sauce_whisk

ActiveRecord style client for the Sauce Labs RESTful API
https://opensource.saucelabs.com/sauce_whisk/
MIT License
20 stars 17 forks source link

Inconsistent ENV usage across languages is problematic #28

Open bootstraponline opened 10 years ago

bootstraponline commented 10 years ago

sauce_whisk

ENV['SAUCE_USERNAME'] ||= 'test_user' ENV['SAUCE_ACCESS_KEY'] ||= 'test_key'

sauce-java

private static final String SAUCE_USER_NAME = "SAUCE_USER_NAME"; private static final String SAUCE_API_KEY = "SAUCE_API_KEY";

I think Sauce should have a standard naming convention for the ENV vars instead of different values for each project.

bootstraponline commented 9 years ago

The sauce java client ended up supporting:

There's still a great deal of inconsistency depending on the clients (most use only two from the above list). The java client is the only one that supports all 4. It'd be good to know what ones are "official."

jlipps commented 9 years ago

i don't think Sauce can have any stance on 'official' names for env vars. but i agree that the various clients should endeavor to use the same thing to avoid surprise.

bootstraponline commented 9 years ago

Sauce could say here's what we're supporting consistently across the clients instead of using different names in the docs and each language. That's what I meant by 'official.' People run into the same issue with the appium clients. I've settled on SAUCE_USERNAME and SAUCE_ACCESS_KEY since that tends to be used more frequently. If people are using the other names then it's going to break. Ultimately I think the official sauce clients should support all 4 since it's not the users fault there's inconsistency in naming.

jlipps commented 9 years ago

fair enough. i think the sauce docs should always use 1 style as an example, and have all the clients support all 4 styles.

bootstraponline commented 9 years ago

sounds good to me :+1:

DylanLacey commented 9 years ago

I agree it'd be good to at least standardise on what we do it in docs; Personally I like API_KEY but the term ACCESS_KEY is more widely used.