mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:53:27 +02:00
Separate device functionality into plugins.
This commit is contained in:
16
lib/roles/device/plugins/display.js
Normal file
16
lib/roles/device/plugins/display.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var syrup = require('syrup')
|
||||
|
||||
var logger = require('../../../util/logger')
|
||||
|
||||
module.exports = syrup()
|
||||
.dependency(require('./http'))
|
||||
.define(function(options, http) {
|
||||
var log = logger.createLogger('device:plugins:display')
|
||||
|
||||
function fetch() {
|
||||
log.info('Fetching display info')
|
||||
return http.getDisplay(0)
|
||||
}
|
||||
|
||||
return fetch()
|
||||
})
|
||||
Reference in New Issue
Block a user