Move FsUtils inside resin/data

This commit is contained in:
Juan Cruz Viotti 2014-11-26 14:22:01 -04:00
parent 5b470f1a0a
commit cf4778f889
6 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
mkdirp = require('mkdirp')
fsUtils = require('../../fs-utils/fs-utils')
fsUtils = require('./fs-utils/fs-utils')
prefix = null

View File

@ -2,7 +2,7 @@ expect = require('chai').expect
_ = require('lodash')
async = require('async')
fs = require('fs')
fsUtils = require('../../fs-utils/fs-utils')
fsUtils = require('./fs-utils/fs-utils')
rimraf = require('rimraf')
dataPrefix = require('./data-prefix')
config = require('../config')

View File

@ -1,7 +1,7 @@
fs = require('fs')
path = require('path')
rimraf = require('rimraf')
fsUtils = require('../../fs-utils/fs-utils')
fsUtils = require('./fs-utils/fs-utils')
exports.prefix = require('./data-prefix')
haltIfNoPrefix = (callback) ->

View File

@ -1,6 +1,6 @@
expect = require('chai').expect
_ = require('lodash')
fsUtils = require('../../fs-utils/fs-utils')
fsUtils = require('./fs-utils/fs-utils')
mock = require('../../../tests/utils/mock')
async = require('async')
config = require('../config')

View File

@ -1,7 +1,8 @@
expect = require('chai').expect
mock = require('../../tests/utils/mock')
mock = require('../../../../tests/utils/mock')
fsUtils = require('./fs-utils')
resin = require('../resin')
config = require('../../config')
data = require('../../data/data')
FILESYSTEM =
text:
@ -29,7 +30,7 @@ describe 'FsUtils:', ->
it 'should return true for valid paths', ->
for validPath in [
resin.config.dataPrefix
config.dataPrefix
'/Users/johndoe'
'../parent'
'./file/../file2'
@ -40,7 +41,7 @@ describe 'FsUtils:', ->
beforeEach (done) ->
mock.fs.init(FILESYSTEM)
resin.data.prefix.set(resin.config.dataPrefix, done)
data.prefix.set(config.dataPrefix, done)
afterEach ->
mock.fs.restore()