Skip to content

Commit

Permalink
deploy -> deployApp etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Oct 3, 2013
1 parent 55144e3 commit d21a2ae
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 47 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Imports:
License: GPL-2
Collate:
'http.R'
'deploy.R'
'bundle.R'
'dependencies.R'
'accounts.R'
Expand All @@ -23,5 +22,6 @@ Collate:
'lucid.R'
'deployments.R'
'applications.R'
'terminate.R'
'setInstances.R'
'deployApp.R'
'scaleApp.R'
'terminateApp.R'
6 changes: 3 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export(accountInfo)
export(accounts)
export(applications)
export(deploy)
export(deployApp)
export(removeAccount)
export(scaleApp)
export(setAccountInfo)
export(setInstances)
export(terminate)
export(terminateApp)
26 changes: 13 additions & 13 deletions R/deploy.R → R/deployApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' \code{account} parameters of the initial deployment (unless overriden
#' explicitly).
#'
#' For details on options that affect the behavior of \code{deploy} see the
#' For details on options that affect the behavior of \code{deployApp} see the
#' article on \link[shinyapps:shinyapps-options]{package options}.
#' @param appDir Directory containing application source code. Defaults to
#' current working directory.
Expand All @@ -30,30 +30,30 @@
#' \dontrun{
#'
#' # deploy the application in the current working dir
#' deploy()
#' deployApp()
#'
#' # deploy an application in another directory
#' deploy("~/projects/shiny/app1")
#' deployApp("~/projects/shiny/app1")
#'
#' # deploy using an alternative application name
#' deploy("~/projects/shiny/app1", appName = "myapp")
#' deployApp("~/projects/shiny/app1", appName = "myapp")
#'
#' # deploy specifying an explicit account name, then
#' # redeploy with no arguments (will automatically use
#' # the previously specified account)
#' deploy(account = "jsmith")
#' deploy()
#' deployApp(account = "jsmith")
#' deployApp()
#'
#' # deploy but don't launch a browser when completed
#' deploy(launch.browser = FALSE)
#' deployApp(launch.browser = FALSE)
#' }
#' @export
deploy <- function(appDir = getwd(),
appName = NULL,
account = NULL,
launch.browser = getOption("shinyapps.launch.browser",
interactive()),
quiet = FALSE) {
deployApp <- function(appDir = getwd(),
appName = NULL,
account = NULL,
launch.browser = getOption("shinyapps.launch.browser",
interactive()),
quiet = FALSE) {

if (!isStringParam(appDir))
stop(stringParamErrorMessage("appDir"))
Expand Down
12 changes: 6 additions & 6 deletions R/setInstances.R → R/scaleApp.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Set Application Instances
#' Scale Application Instances
#'
#' Set the number of parallel instances used for an application deployed to
#' Scale the number of parallel instances used for an application deployed to
#' ShinyApps.
#' @param appName Name of application
#' @param instances Number of parallel instances to be used for the application
Expand All @@ -11,15 +11,15 @@
#' \dontrun{
#'
#' # specify that an application use 3 instances
#' setInstances("myapp" instances = 3)
#' scaleApp("myapp" instances = 3)
#' }
#' @export
setInstances <- function(appName, instances, account = NULL, quiet = FALSE) {
scaleApp <- function(appName, instances, account = NULL, quiet = FALSE) {

# define task
taskDef <- list()
taskDef$beginStatus <- "Setting application instances"
taskDef$endStatus <- "Application instances deployed"
taskDef$beginStatus <- "Scaling application instances"
taskDef$endStatus <- "Application instances successfully scaled"
taskDef$action <- function(lucid, application) {
lucid$scaleApplication(application$id, instances)
}
Expand Down
4 changes: 2 additions & 2 deletions R/terminate.R → R/terminateApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#' \dontrun{
#'
#' # terminate an application
#' terminate("myapp")
#' terminateApp("myapp")
#' }
#' @export
terminate <- function(appName, account = NULL, quiet = FALSE) {
terminateApp <- function(appName, account = NULL, quiet = FALSE) {

# define terminate task
taskDef <- list()
Expand Down
21 changes: 11 additions & 10 deletions man/deploy.Rd → man/deployApp.Rd
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
\name{deploy}
\alias{deploy}
\name{deployApp}
\alias{deployApp}
\title{Deploy Applications to ShinyApps}
\usage{
deploy(appDir = getwd(), appName = NULL, account = NULL,
deployApp(appDir = getwd(), appName = NULL,
account = NULL,
launch.browser = getOption("shinyapps.launch.browser", interactive()),
quiet = FALSE)
}
Expand Down Expand Up @@ -43,29 +44,29 @@
explicitly).
For details on options that affect the behavior of
\code{deploy} see the article on
\code{deployApp} see the article on
\link[shinyapps:shinyapps-options]{package options}.
}
\examples{
\dontrun{
# deploy the application in the current working dir
deploy()
deployApp()
# deploy an application in another directory
deploy("~/projects/shiny/app1")
deployApp("~/projects/shiny/app1")
# deploy using an alternative application name
deploy("~/projects/shiny/app1", appName = "myapp")
deployApp("~/projects/shiny/app1", appName = "myapp")
# deploy specifying an explicit account name, then
# redeploy with no arguments (will automatically use
# the previously specified account)
deploy(account = "jsmith")
deploy()
deployApp(account = "jsmith")
deployApp()
# deploy but don't launch a browser when completed
deploy(launch.browser = FALSE)
deployApp(launch.browser = FALSE)
}
}

12 changes: 6 additions & 6 deletions man/setInstances.Rd → man/scaleApp.Rd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
\name{setInstances}
\alias{setInstances}
\title{Set Application Instances}
\name{scaleApp}
\alias{scaleApp}
\title{Scale Application Instances}
\usage{
setInstances(appName, instances, account = NULL,
scaleApp(appName, instances, account = NULL,
quiet = FALSE)
}
\arguments{
Expand All @@ -19,14 +19,14 @@
printed to the console}
}
\description{
Set the number of parallel instances used for an
Scale the number of parallel instances used for an
application deployed to ShinyApps.
}
\examples{
\dontrun{

# specify that an application use 3 instances
setInstances("myapp" instances = 3)
scaleApp("myapp" instances = 3)
}
}

8 changes: 4 additions & 4 deletions man/terminate.Rd → man/terminateApp.Rd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
\name{terminate}
\alias{terminate}
\name{terminateApp}
\alias{terminateApp}
\title{Terminate an Application}
\usage{
terminate(appName, account = NULL, quiet = FALSE)
terminateApp(appName, account = NULL, quiet = FALSE)
}
\arguments{
\item{appName}{Name of application to terminate}
Expand All @@ -21,7 +21,7 @@
\dontrun{

# terminate an application
terminate("myapp")
terminateApp("myapp")
}
}

0 comments on commit d21a2ae

Please sign in to comment.