mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Move utility plugins into their own folder. They don't go into the support folder because they're not standalone units and require interaction with the main units. Further refactoring pending.
This commit is contained in:
22
lib/units/device/plugins/util/identity.js
Normal file
22
lib/units/device/plugins/util/identity.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var syrup = require('stf-syrup')
|
||||
|
||||
var devutil = require('../../../../util/devutil')
|
||||
var logger = require('../../../../util/logger')
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('../../support/properties'))
|
||||
.dependency(require('./display'))
|
||||
.dependency(require('./phone'))
|
||||
.define(function(options, properties, display, phone) {
|
||||
var log = logger.createLogger('device:plugins:identity')
|
||||
|
||||
function solve() {
|
||||
log.info('Solving identity')
|
||||
var identity = devutil.makeIdentity(options.serial, properties)
|
||||
identity.display = display.properties
|
||||
identity.phone = phone
|
||||
return identity
|
||||
}
|
||||
|
||||
return solve()
|
||||
})
|
||||
Reference in New Issue
Block a user