Skip to content

Commit 33c0c18

Browse files
author
Matthew Lynch
committed
remove validate_new_server_options in favor of validate_connection_options
1 parent 6dc0a55 commit 33c0c18

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

rsconnect/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,14 +385,14 @@ def setup_remote_server(
385385
secret: str = None,
386386
):
387387
validation.validate_connection_options(
388-
name=name,
389388
url=url,
390389
api_key=api_key,
391390
insecure=insecure,
392391
cacert=cacert,
393392
account_name=account_name,
394393
token=token,
395394
secret=secret,
395+
name=name,
396396
)
397397

398398
if cacert and not ca_data:

rsconnect/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ def add(name, server, api_key, insecure, cacert, account, token, secret, verbose
303303

304304
set_verbosity(verbose)
305305

306-
validation.validate_new_server_options(
306+
validation.validate_connection_options(
307307
url=server,
308308
api_key=api_key,
309309
insecure=insecure,
310310
cacert=cacert,
311-
account=account,
311+
account_name=account,
312312
token=token,
313313
secret=secret,
314314
)

rsconnect/validation.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ def _get_present_options(options: typing.Dict[str, typing.Optional[str]]) -> typ
77
return [k for k, v in options.items() if v]
88

99

10-
def validate_new_server_options(url, api_key, insecure, cacert, account, token, secret):
11-
validate_connection_options(None, url, api_key, insecure, cacert, account, token, secret)
12-
13-
14-
def validate_connection_options(name, url, api_key, insecure, cacert, account_name, token, secret):
10+
def validate_connection_options(url, api_key, insecure, cacert, account_name, token, secret, name=None):
1511
"""
1612
Validates provided Connect or shinyapps.io connection options and returns which target to use given the provided
1713
options.

0 commit comments

Comments
 (0)