From 20b9766742a198b268db3e85e3e3a227b915ca44 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 11 Jul 2017 12:34:49 -0700 Subject: [PATCH] rename to 'send' --- README.md | 8 ++++---- docs/docker.md | 2 +- package-lock.json | 2 +- package.json | 10 +++++----- public/contribute.json | 10 +++++----- server/log.js | 2 +- server/{portal_server.js => server.js} | 8 ++++---- server/storage.js | 2 +- test/server/server.test.js | 6 +++--- views/index.handlebars | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) rename server/{portal_server.js => server.js} (97%) diff --git a/README.md b/README.md index 0f66beeb..00a4112d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Firefox Fileshare +# Firefox Send -[![CircleCI](https://circleci.com/gh/mozilla/something-awesome.svg?style=svg)](https://circleci.com/gh/mozilla/something-awesome) +[![CircleCI](https://circleci.com/gh/mozilla/send.svg?style=svg)](https://circleci.com/gh/mozilla/send) ## What it does @@ -29,11 +29,11 @@ $ redis-server /usr/local/etc/redis.conf ## Localization -_Coming soon_ (see [#57](https://github.com/mozilla/something-awesome/issues/57)) +_Coming soon_ (see [#57](https://github.com/mozilla/send/issues/57)) ## Contributing -Pull requests are always welcome! Feel free to check out the list of ["good first bugs"](https://github.com/mozilla/something-awesome/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+bug%22). +Pull requests are always welcome! Feel free to check out the list of ["good first bugs"](https://github.com/mozilla/send/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+bug%22). ## Testing diff --git a/docs/docker.md b/docs/docker.md index cc9d4bd7..f45b770f 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -10,5 +10,5 @@ ## Example: ```sh -$ docker run --net=host -e 'NODE_ENV=production' -e 'P2P_S3_BUCKET=testpilot-p2p-dev' -e 'P2P_REDIS_HOST=dyf9s2r4vo3.bolxr4.0001.usw2.cache.amazonaws.com' mozilla/portal:latest +$ docker run --net=host -e 'NODE_ENV=production' -e 'P2P_S3_BUCKET=testpilot-p2p-dev' -e 'P2P_REDIS_HOST=dyf9s2r4vo3.bolxr4.0001.usw2.cache.amazonaws.com' mozilla/send:latest ``` diff --git a/package-lock.json b/package-lock.json index a7b4c926..fbf213c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "portal-alpha", + "name": "firefox-send", "version": "0.1.2", "lockfileVersion": 1, "dependencies": { diff --git a/package.json b/package.json index 2b419e71..44d5e4c1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "portal-alpha", + "name": "firefox-send", "description": "File Sharing Experiment", "version": "0.1.2", "author": "Mozilla (https://mozilla.org)", @@ -40,17 +40,17 @@ "engines": { "node": ">=8.0.0" }, - "homepage": "https://github.com/mozilla/something-awesome/", + "homepage": "https://github.com/mozilla/send/", "license": "MPL-2.0", - "repository": "mozilla/something-awesome", + "repository": "mozilla/send", "scripts": { "predocker": "browserify frontend/src/main.js | uglifyjs > public/bundle.js && npm run version", - "dev": "npm run version && watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server", + "dev": "npm run version && watchify frontend/src/main.js -o public/bundle.js -d | node server/server", "format": "prettier '{frontend/src/,scripts/,server/,test/}*.js' 'public/*.css' --single-quote --write", "lint": "npm-run-all lint:*", "lint:css": "stylelint 'public/*.css'", "lint:js": "eslint .", - "start": "node server/portal_server", + "start": "node server/server", "test": "mocha test/unit && mocha test/server", "version": "node scripts/version" } diff --git a/public/contribute.json b/public/contribute.json index 52cbd2b0..b7b1ab26 100644 --- a/public/contribute.json +++ b/public/contribute.json @@ -2,16 +2,16 @@ "name": "firefox-send", "description": "File Sharing Experiment", "repository": { - "url": "https://github.com/mozilla/something-awesome/", + "url": "https://github.com/mozilla/send/", "license": "MPL-2.0" }, "participate": { - "home": "https://github.com/mozilla/something-awesome/blob/master/README.md", - "docs": "https://github.com/mozilla/something-awesome/blob/master/README.md" + "home": "https://github.com/mozilla/send/blob/master/README.md", + "docs": "https://github.com/mozilla/send/blob/master/README.md" }, "bugs": { - "list": "https://github.com/mozilla/something-awesome/issues", - "report": "https://github.com/mozilla/something-awesome/issues/new" + "list": "https://github.com/mozilla/send/issues", + "report": "https://github.com/mozilla/send/issues/new" }, "urls": { "prod": "https://send.firefox.com/", diff --git a/server/log.js b/server/log.js index 27919e8d..2164412b 100644 --- a/server/log.js +++ b/server/log.js @@ -3,7 +3,7 @@ const conf = require('./config.js'); const isProduction = conf.env === 'production'; const mozlog = require('mozlog')({ - app: 'FirefoxFileshare', + app: 'FirefoxSend', level: isProduction ? 'INFO' : 'verbose', fmt: isProduction ? 'heka' : 'pretty', debug: !isProduction diff --git a/server/portal_server.js b/server/server.js similarity index 97% rename from server/portal_server.js rename to server/server.js index f92cbe22..50696275 100644 --- a/server/portal_server.js +++ b/server/server.js @@ -16,7 +16,7 @@ if (conf.sentry_dsn) { const mozlog = require('./log.js'); -const log = mozlog('portal.server'); +const log = mozlog('send.server'); const STATIC_PATH = path.join(__dirname, '../public'); @@ -154,7 +154,7 @@ app.post('/delete/:id', (req, res) => { app.post('/upload', (req, res, next) => { const newId = crypto.randomBytes(5).toString('hex'); let meta; - + try { meta = JSON.parse(req.header('X-File-Metadata')); } catch(err) { @@ -202,7 +202,7 @@ app.get('/__version__', (req, res) => { }); const server = app.listen(conf.listen_port, () => { - log.info('startServer:', `Portal app listening on port ${conf.listen_port}!`); + log.info('startServer:', `Send app listening on port ${conf.listen_port}!`); }); const validateID = route_id => { @@ -216,4 +216,4 @@ const validateIV = route_id => { module.exports = { server: server, storage: storage -} \ No newline at end of file +} diff --git a/server/storage.js b/server/storage.js index b805133a..b03cbbaf 100644 --- a/server/storage.js +++ b/server/storage.js @@ -7,7 +7,7 @@ const path = require('path'); const mozlog = require('./log.js'); -const log = mozlog('portal.storage'); +const log = mozlog('send.storage'); const redis = require('redis'); const redis_client = redis.createClient({ diff --git a/test/server/server.test.js b/test/server/server.test.js index 3e7108b1..8e2dc191 100644 --- a/test/server/server.test.js +++ b/test/server/server.test.js @@ -24,11 +24,11 @@ describe('Server integration tests', function() { let fileId; before(function() { - const app = proxyquire('../../server/portal_server', { + const app = proxyquire('../../server/server', { './log.js': function() { return logStub; } - }); + }); server = app.server; storage = app.storage; @@ -167,4 +167,4 @@ describe('Server integration tests', function() { .then(() => assert.fail()) .catch(err => assert(1)) }) -}); \ No newline at end of file +}); diff --git a/views/index.handlebars b/views/index.handlebars index 70742855..8be8f2d5 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -1,7 +1,7 @@ - Firefox Fileshare + Firefox Send {{#if dsn}} {{> sentry dsn=dsn}} {{/if}}