diff --git a/lib/resin/data/data-prefix.coffee b/lib/resin/data/data-prefix.coffee index cbdf107c..641917d1 100644 --- a/lib/resin/data/data-prefix.coffee +++ b/lib/resin/data/data-prefix.coffee @@ -1,5 +1,5 @@ mkdirp = require('mkdirp') -fsUtils = require('../../fs-utils/fs-utils') +fsUtils = require('./fs-utils/fs-utils') prefix = null diff --git a/lib/resin/data/data-prefix.spec.coffee b/lib/resin/data/data-prefix.spec.coffee index ef2a9037..51aced9d 100644 --- a/lib/resin/data/data-prefix.spec.coffee +++ b/lib/resin/data/data-prefix.spec.coffee @@ -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') diff --git a/lib/resin/data/data.coffee b/lib/resin/data/data.coffee index e498fcc7..a45102a5 100644 --- a/lib/resin/data/data.coffee +++ b/lib/resin/data/data.coffee @@ -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) -> diff --git a/lib/resin/data/data.spec.coffee b/lib/resin/data/data.spec.coffee index 566120cd..4a8c08fc 100644 --- a/lib/resin/data/data.spec.coffee +++ b/lib/resin/data/data.spec.coffee @@ -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') diff --git a/lib/fs-utils/fs-utils.coffee b/lib/resin/data/fs-utils/fs-utils.coffee similarity index 100% rename from lib/fs-utils/fs-utils.coffee rename to lib/resin/data/fs-utils/fs-utils.coffee diff --git a/lib/fs-utils/fs-utils.spec.coffee b/lib/resin/data/fs-utils/fs-utils.spec.coffee similarity index 88% rename from lib/fs-utils/fs-utils.spec.coffee rename to lib/resin/data/fs-utils/fs-utils.spec.coffee index 1b4276f4..bc66ea46 100644 --- a/lib/fs-utils/fs-utils.spec.coffee +++ b/lib/resin/data/fs-utils/fs-utils.spec.coffee @@ -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()