mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Rename "roles" to "units". Put units in their own folders.
This commit is contained in:
20
lib/units/device/plugins/data.js
Normal file
20
lib/units/device/plugins/data.js
Normal file
@@ -0,0 +1,20 @@
|
||||
var syrup = require('syrup')
|
||||
var deviceData = require('stf-device-db')
|
||||
|
||||
var logger = require('../../../util/logger')
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('./identity'))
|
||||
.define(function(options, identity) {
|
||||
var log = logger.createLogger('device:plugins:data')
|
||||
|
||||
function find() {
|
||||
var data = deviceData.find(identity)
|
||||
if (!data) {
|
||||
log.warn('Unable to find device data')
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
return find()
|
||||
})
|
||||
Reference in New Issue
Block a user