From 609ba4ef71a3e03f8bca662a9b06d0fff13b0eda Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 16 Apr 2014 11:55:18 -0300 Subject: [PATCH] renaming files --- API.js | 2 +- copay.js | 6 +++--- js/models/storage/{Encrypted.js => LocalEncrypted.js} | 2 +- js/models/storage/{Plain.js => LocalPlain.js} | 0 test/{ => mocks}/FakeStorage.js | 0 test/{test.publickeyring.js => test.PublicKeyRing.js} | 0 test/{test.txproposal.js => test.TxProposals.js} | 0 test/{test.wallet.js => test.Wallet.js} | 2 +- test/{test.insight.js => test.blockchain.Insight.js} | 0 ...age-encrypted.js => test.storage.LocalEncrypted.js} | 10 +++++----- ...est.storage-plain.js => test.storage.LocalPlain.js} | 6 +++--- 11 files changed, 14 insertions(+), 14 deletions(-) rename js/models/storage/{Encrypted.js => LocalEncrypted.js} (94%) rename js/models/storage/{Plain.js => LocalPlain.js} (100%) rename test/{ => mocks}/FakeStorage.js (100%) rename test/{test.publickeyring.js => test.PublicKeyRing.js} (100%) rename test/{test.txproposal.js => test.TxProposals.js} (100%) rename test/{test.wallet.js => test.Wallet.js} (99%) rename test/{test.insight.js => test.blockchain.Insight.js} (100%) rename test/{test.storage-encrypted.js => test.storage.LocalEncrypted.js} (86%) rename test/{test.storage-plain.js => test.storage.LocalPlain.js} (69%) diff --git a/API.js b/API.js index 32bcbd8b9..dd6d2fe19 100644 --- a/API.js +++ b/API.js @@ -11,7 +11,7 @@ API.prototype._init = function(opts) { self.opts = opts; var Wallet = require('soop').load('./js/models/core/Wallet', { - Storage: opts.Storage || require('./test/FakeStorage'), + Storage: opts.Storage || require('./test/mocks/FakeStorage'), Network: opts.Network || require('./js/models/network/WebRTC'), Blockchain: opts.Blockchain || require('./js/models/blockchain/Insight') }); diff --git a/copay.js b/copay.js index c8504ac36..9cbb8c551 100644 --- a/copay.js +++ b/copay.js @@ -7,12 +7,12 @@ module.exports.PrivateKey = require('./js/models/core/PrivateKey'); // components var WebRTC = module.exports.WebRTC = require('./js/models/network/WebRTC'); var Insight = module.exports.Insight = require('./js/models/blockchain/Insight'); -var StoragePlain = module.exports.StoragePlain = require('./js/models/storage/Plain'); -var StorageEncrypted = module.exports.StorageEncrypted = require('./js/models/storage/Encrypted'); +var StorageLocalPlain = module.exports.StorageLocalPlain = require('./js/models/storage/LocalPlain'); +var StorageLocalEncrypted = module.exports.StorageLocalEncrypted = require('./js/models/storage/LocalEncrypted'); module.exports.Wallet = require('soop').load('./js/models/core/Wallet',{ Network: WebRTC, Blockchain: Insight, - Storage: StoragePlain, + Storage: StorageLocalPlain, }); diff --git a/js/models/storage/Encrypted.js b/js/models/storage/LocalEncrypted.js similarity index 94% rename from js/models/storage/Encrypted.js rename to js/models/storage/LocalEncrypted.js index 35b6bcb4a..0ce45a915 100644 --- a/js/models/storage/Encrypted.js +++ b/js/models/storage/LocalEncrypted.js @@ -2,7 +2,7 @@ var imports = require('soop').imports(); //var buffertools = imports.buffertools || require('buffertools'); -var parent = imports.parent || require('./Plain'); +var parent = imports.parent || require('./LocalPlain'); var id = 0; function Storage() { diff --git a/js/models/storage/Plain.js b/js/models/storage/LocalPlain.js similarity index 100% rename from js/models/storage/Plain.js rename to js/models/storage/LocalPlain.js diff --git a/test/FakeStorage.js b/test/mocks/FakeStorage.js similarity index 100% rename from test/FakeStorage.js rename to test/mocks/FakeStorage.js diff --git a/test/test.publickeyring.js b/test/test.PublicKeyRing.js similarity index 100% rename from test/test.publickeyring.js rename to test/test.PublicKeyRing.js diff --git a/test/test.txproposal.js b/test/test.TxProposals.js similarity index 100% rename from test/test.txproposal.js rename to test/test.TxProposals.js diff --git a/test/test.wallet.js b/test/test.Wallet.js similarity index 99% rename from test/test.wallet.js rename to test/test.Wallet.js index 98f069e32..e4f36e522 100644 --- a/test/test.wallet.js +++ b/test/test.Wallet.js @@ -4,7 +4,7 @@ var chai = chai || require('chai'); var should = chai.should(); var copay = copay || require('../copay'); var Wallet = require('soop').load('../js/models/core/Wallet', { - Storage: require('./FakeStorage'), + Storage: require('./mocks/FakeStorage'), Network: copay.WebRTC, Blockchain: copay.Insight }); diff --git a/test/test.insight.js b/test/test.blockchain.Insight.js similarity index 100% rename from test/test.insight.js rename to test/test.blockchain.Insight.js diff --git a/test/test.storage-encrypted.js b/test/test.storage.LocalEncrypted.js similarity index 86% rename from test/test.storage-encrypted.js rename to test/test.storage.LocalEncrypted.js index c751d6cac..47e0b3858 100644 --- a/test/test.storage-encrypted.js +++ b/test/test.storage.LocalEncrypted.js @@ -5,19 +5,19 @@ if (typeof process === 'undefined' || !process.version) { var chai = chai || require('chai'); var should = chai.should(); var copay = copay || require('../copay'); - var Encrypted = copay.StorageEncrypted; + var LocalEncrypted = copay.StorageLocalEncrypted; - describe('Storage/Encrypted model', function() { + describe('Storage/LocalEncrypted model', function() { var wid = 'fake-wallet-id'; - var s = new Encrypted(); + var s = new LocalEncrypted(); s._setPassphrase('mysupercoolpassword'); it('should create an instance', function() { - var s = new Encrypted(); + var s = new LocalEncrypted(); should.exist(s); }); it('should fail when encrypting without a password', function() { - var s = new Encrypted(); + var s = new LocalEncrypted(); (function(){s.set(wid, 'x', 1);}).should.throw(); }); it('should be able to encrypt and decrypt', function() { diff --git a/test/test.storage-plain.js b/test/test.storage.LocalPlain.js similarity index 69% rename from test/test.storage-plain.js rename to test/test.storage.LocalPlain.js index 4878b675d..f600aa0e3 100644 --- a/test/test.storage-plain.js +++ b/test/test.storage.LocalPlain.js @@ -5,12 +5,12 @@ if (typeof process === 'undefined' || !process.version) { var chai = chai || require('chai'); var should = chai.should(); var copay = copay || require('../copay'); - var Plain = copay.StoragePlain; + var LocalPlain = copay.StorageLocalPlain; - describe('Storage/Plain model', function() { + describe('Storage/LocalPlain model', function() { it('should create an instance', function () { - var s = new Plain(); + var s = new LocalPlain(); should.exist(s); }); });