From d148f3b9b180f43d63de84383938de0c9f51b583 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 29 Oct 2015 23:29:12 +0100 Subject: Replace PeopleTube/PeTube by the new name PeerTube --- README.md | 4 ++-- middlewares/index.js | 2 +- package.json | 4 ++-- scripts/clean_test.sh | 2 +- server.js | 2 +- src/database.js | 2 +- src/pods.js | 4 ++-- src/utils.js | 8 ++++---- views/footer.jade | 2 +- views/index.jade | 22 +++++++++++----------- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index dcd6ed17a..e07951953 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PeTube +# PeerTube Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with [webtorrent](https://github.com/feross/webtorrent). @@ -45,7 +45,7 @@ Prototype of a decentralized video streaming platform using P2P (bittorent) dire ### Test It! $ git clone https://github.com/Chocobozzz/PeerTube - $ cd PeopleTube + $ cd PeerTube # npm install -g electron-prebuilt $ npm install $ npm start diff --git a/middlewares/index.js b/middlewares/index.js index c8139075a..6368d791a 100644 --- a/middlewares/index.js +++ b/middlewares/index.js @@ -39,7 +39,7 @@ var signature_ok = crt.hashAndVerify('sha256', new Buffer(req.body.signature.url).toString('hex'), req.body.signature.signature, 'hex') if (signature_ok === true) { - var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) + var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem')) var decryptedKey = myKey.decrypt(req.body.key, 'hex', 'utf8') logger.debug(decryptedKey) req.body.data = JSON.parse(utils.symetricDecrypt(req.body.data, decryptedKey)) diff --git a/package.json b/package.json index b52838f37..e704e7c1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "petube", - "description": "none", + "name": "peertube", + "description": "Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with webtorrent.", "version": "0.0.1", "private": true, "engines": { diff --git a/scripts/clean_test.sh b/scripts/clean_test.sh index 8d71215f2..8868cbddf 100755 --- a/scripts/clean_test.sh +++ b/scripts/clean_test.sh @@ -1,5 +1,5 @@ #!/bin/bash -printf "use petube-test1;\ndb.dropDatabase();\nuse petube-test2;\ndb.dropDatabase();\nuse petube-test3;\ndb.dropDatabase();" | mongo +printf "use peertube-test1;\ndb.dropDatabase();\nuse peertube-test2;\ndb.dropDatabase();\nuse peertube-test3;\ndb.dropDatabase();" | mongo rm -rf ./test1 ./test2 ./test3 diff --git a/server.js b/server.js index bff7ddd57..fe0cb237a 100644 --- a/server.js +++ b/server.js @@ -24,7 +24,7 @@ checker.createDirectories() - // ----------- PeTube modules ----------- + // ----------- PeerTube modules ----------- var config = require('config') var logger = require('./src/logger') var routes = require('./routes') diff --git a/src/database.js b/src/database.js index 6fbd5dbc8..020bfd961 100644 --- a/src/database.js +++ b/src/database.js @@ -6,7 +6,7 @@ var logger = require('./logger') - var dbname = 'petube' + config.get('database.suffix') + var dbname = 'peertube' + config.get('database.suffix') var host = config.get('database.host') var port = config.get('database.port') diff --git a/src/pods.js b/src/pods.js index 9d6539685..30d465ee5 100644 --- a/src/pods.js +++ b/src/pods.js @@ -53,7 +53,7 @@ return callback(err) } - fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { + fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) { if (err) { logger.error('Cannot read cert file.', { error: err }) return callback(err) @@ -99,7 +99,7 @@ pods.makeFriends = function (callback) { logger.debug('Read public key...') - fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { + fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) { if (err) { logger.error('Cannot read public cert.', { error: err }) return callback(err) diff --git a/src/utils.js b/src/utils.js index 0b21565dd..82a62c43f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -63,7 +63,7 @@ // Signature ? if (all.method === 'POST' && all.data && all.sign === true) { - var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) + var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem')) signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex') } @@ -111,7 +111,7 @@ } utils.certsExist = function (callback) { - fs.exists(utils.certDir + 'petube.key.pem', function (exists) { + fs.exists(utils.certDir + 'peertube.key.pem', function (exists) { return callback(exists) }) } @@ -125,14 +125,14 @@ } logger.debug('Gen RSA keys...') - openssl.exec('genrsa', { 'out': utils.certDir + 'petube.key.pem' }, function (err) { + openssl.exec('genrsa', { 'out': utils.certDir + 'peertube.key.pem' }, function (err) { if (err) { logger.error('Cannot create private key on this pod.', { error: err }) return callback(err) } logger.debug('Manage public key...') - openssl.exec('rsa', { 'in': utils.certDir + 'petube.key.pem', 'pubout': true, 'out': utils.certDir + 'petube.pub' }, function (err) { + openssl.exec('rsa', { 'in': utils.certDir + 'peertube.key.pem', 'pubout': true, 'out': utils.certDir + 'peertube.pub' }, function (err) { if (err) { logger.error('Cannot create public key on this pod .', { error: err }) return callback(err) diff --git a/views/footer.jade b/views/footer.jade index 7fd9769b6..c7754f584 100644 --- a/views/footer.jade +++ b/views/footer.jade @@ -1,3 +1,3 @@ footer - | PeTube, CopyLeft 2015 \ No newline at end of file + | PeerTube, CopyLeft 2015 diff --git a/views/index.jade b/views/index.jade index 70f19e9fa..21cedb324 100644 --- a/views/index.jade +++ b/views/index.jade @@ -1,24 +1,24 @@ -extends layout +extends layout block content - + div(class='container') - + header(class='row') div(class='col-md-2') - h4 PeopleTube - + h4 PeerTube + div(class='col-md-8') input(type='text' id='search_video' name='search_video' class='form-control' placeholder='Search a video...') - + div(class='row') include panel - + div(id='ajax_load' class='col-md-9') - - + + include footer - // build:js /javascripts/global.min.js + // build:js /javascripts/global.min.js script(src='/javascripts/bundle.js') - // endbuild \ No newline at end of file + // endbuild -- cgit v1.2.3