rstudio/rsconnect — pull request #7 by jjallaire (2014-12-13 16:57:30+00:00)
Title: feature/migrate shinyapps

This PR implements migration of the deployment records in the `shinyapps` directory to the `rsconnect` directory.

Prior to enumerating existing application deployments we check for the presence of a `shinyapps` directory. If it's there then we move it's contents into the `rsconnect/shinyapps.io` directory by reading in all of the DCF files, adding `server: shinyapps.io` to each record, then writing them into the appropriate spot within the `rsconnect` directory.

Note that this is a *move* rather than *copy* operation. This is because if we left the files in the shinyapps directory then:

1. We'd have to somehow *know* which deployment record was current (i.e. whether we needed to migrate again, which one to actually use when there are two, etc.);

2. Users would be confused by the presence of two directories and might delete one of them incorrectly.

At the end of the migration if the `shinyapps` directory is completely empty (i.e. nothing other than deployment records were in there) we also remove it from the filesystem.