Allow adb connect URL to be customized.

This commit is contained in:
Simo Kinnunen
2015-07-24 13:43:12 +09:00
parent 7eb6f8f871
commit caf8d35eb7
4 changed files with 47 additions and 2 deletions

View File

@@ -15,13 +15,14 @@ module.exports = syrup.serial()
.dependency(require('../support/push'))
.dependency(require('./group'))
.dependency(require('./solo'))
.define(function(options, adb, router, push, group, solo) {
.dependency(require('./util/urlformat'))
.define(function(options, adb, router, push, group, solo, urlformat) {
var log = logger.createLogger('device:plugins:connect')
, plugin = Object.create(null)
, activeServer = null
plugin.port = options.connectPort
plugin.url = util.format('%s:%s', options.publicIp, plugin.port)
plugin.url = urlformat(options.connectUrlPattern, plugin.port)
plugin.start = function() {
return new Promise(function(resolve, reject) {