Support for specifying an https url for staging upload
Use a proper domain name regex

This allows all possible domain names based on RFC 1035.

[delivers #69232044]
Checks that the file size is within limits before adding to the blobstore
When the blobstore is local, detect missing droplets

Fail to start if the droplet is missing
Extract StartAppMessage
Enable space developer to see and map private domain

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Refactor who can add domain to org logic.

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Check md5 in droplet & buildpack cache uploads

If the Content-MD5 header is provided and its value
does not match the md5 of the upload, return a 400

Signed-off-by: David Varvel <dvarvel@pivotallabs.com>
When start/scale fail, undo any changes made
Ensure that there is at least one org manager per org

* The only exception is right after creation, in which there may be no
  organization managers.
* Rescue from Sequel::HookFailed exceptions in RestController::Base#dispatch

[#66448526]

Signed-off-by: James Myers <jmyers@pivotallabs.com>
Minor test refactoring

[#69544442]
Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Refactor stagings_controller.

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Finish StagingsController refactoring

[#69544442]

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Make Blobstore::Client#file a public method

* used by the buildpack bits controller, hopefully will be refactored to use
  the new blob pattern.

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Refactor buildpack_bits_controller to use Blob instead of file

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Fix typo in buildpack_bits_controller

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
cc <-> diego stager is now publish/subscribe

previously it was nats request-response, meaning if the particular CC that
started staging went away, the staging result would not be recorded.

Signed-off-by: Alex Suraci <asuraci@pivotallabs.com>
Merge remote-tracking branch 'origin/pr/211'

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>

Conflicts:
	app/models/runtime/domain.rb
Merge remote-tracking branch 'origin/pr/214'

Signed-off-by: Kai Zhang <kaizhang@cn.ibm.com>
Merge remote-tracking branch 'origin/pr/215'

Signed-off-by: James Myers <jmyers@pivotallabs.com>
Merge remote-tracking branch 'origin/pr/205'

Conflicts:
	spec/config_spec.rb