get_hub_config treats a nil hub as a request to use the current repo hub, or the default hub if there is no current repo hub.

So, if the hub is nil, it won't necessarily return a nil value.
If no parameter is returned, and the default flag is set to true, then we return the default value for the parameter (DEFAULT_API_BASE_URL in this case).

Otherwise we just return whatever was in git config (nil if there's nothing there).

I can give the first method a shot...though it might also help to pull the select_hub method up to this method, rather than have it buried in get_hub_config.

I can change the name from select_hub to resolve_hub as well if that seems clearer.