Skip to content

Commit

Permalink
Merge pull request #44 from barriosnahuel/develop
Browse files Browse the repository at this point in the history
v0.1.0
  • Loading branch information
barriosnahuel committed Jun 29, 2015
2 parents d2add60 + 1ed2585 commit 0f666e6
Show file tree
Hide file tree
Showing 52 changed files with 853 additions and 190 deletions.
Binary file modified .gitignore
Binary file not shown.
6 changes: 6 additions & 0 deletions .idea/copyright/piSeis.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/Files_under_Copyright.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#𝜋seis [![Build Status](https://travis-ci.org/barriosnahuel/piseis.png)](https://travis-ci.org/barriosnahuel/piseis)
#𝜋seis

𝜋Seis: People Says, *what people around the world is saying about something... you've got it.*

##Status
[![Build Status](https://travis-ci.org/barriosnahuel/piseis.png)](https://travis-ci.org/barriosnahuel/piseis) [![Codacy Badge](https://www.codacy.com/project/badge/11a82020ea5f4afabe12dad4ec51bd6a)](https://www.codacy.com/app/app38278410/piseis)

##Issues

[![Stories ready to be worked on](https://badge.waffle.io/barriosnahuel/piseis.png?label=ready&title=Ready)](https://waffle.io/barriosnahuel/piseis) [![Stories in progress](https://badge.waffle.io/barriosnahuel/piseis.png?label=in progress&title=In Progress)](https://waffle.io/barriosnahuel/piseis)
Expand Down Expand Up @@ -55,17 +58,17 @@ There is a demo where you can see both the jQuery plugin and the server in actio
##License

PiSeis - What people around the world is saying, you've got it.
Copyright (C) 2013 Nahuel Barrios <[email protected]>.
Copyright (C) 2013 Nahuel Barrios <[email protected]>.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
18 changes: 18 additions & 0 deletions demo/css/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* PiSeis - What people around the world is saying, you've got it.
* Copyright (C) 2013 Nahuel Barrios <[email protected]>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

.container {
background-color: #AEBDCC;
border-radius: 10px;
Expand Down
8 changes: 4 additions & 4 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>&#120587;Seis demo</title>

<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="lib/bootstrap-3.3.5/css/bootstrap.min.css">

<link rel="stylesheet" type="text/css" href="css/index.css"/>

Expand Down Expand Up @@ -73,10 +73,10 @@ <h2>Results</h2>
<!-- Libraries -->

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/lib/jquery-2.1.4.min.js"></script>
<script src="lib/jquery-2.1.4.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/lib/bootstrap.min.js"></script>
<script src="js/lib/jsrender.min.js"></script>
<script src="lib/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="lib/jsrender.min.js"></script>

<!-- My libraries -->
<script src="../jquery-plugin/js/library/piseis.js"></script>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 19 additions & 1 deletion doc/request.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* PiSeis - What people around the world is saying, you've got it.
* Copyright (C) 2013 Nahuel Barrios <[email protected]>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* Created by Nahuel Barrios <[email protected]>.
* Created on 11/5/13, at 12:49 AM.
Expand All @@ -11,4 +29,4 @@ org.nbempire.js.piseis.find({
$.piseis({
query: "something cool",
excludeNetworks: ['Facebook', 'Vimeo']
});
});
2 changes: 1 addition & 1 deletion jquery-plugin/js/library/news/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ org.nbempire.js.piseis.news = (function () {

return {
findByQuery: findByQuery
}
};
}());

4 changes: 2 additions & 2 deletions jquery-plugin/js/library/piseis.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ org.nbempire.js = org.nbempire.js || {};

org.nbempire.js.piseis = (function () {

var API_ENDPOINT = 'http://localhost:3000';
var API_ENDPOINT = 'http://piseis.herokuapp.com';

var get = function (onError, onSuccess, path, data) {
$.ajax({
dataType: "jsonp",
dataType: 'jsonp',
url: API_ENDPOINT + path,
data: data
}).fail(onError).done(onSuccess);
Expand Down
18 changes: 18 additions & 0 deletions server/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* PiSeis - What people around the world is saying, you've got it.
* Copyright (C) 2013 Nahuel Barrios <[email protected]>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

module.exports = function (grunt) {

// Project configuration.
Expand Down
75 changes: 56 additions & 19 deletions server/app.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,100 @@
/*
* PiSeis - What people around the world is saying, you've got it.
* Copyright (C) 2013 Nahuel Barrios <[email protected]>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
//var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var defaultConfig = require('./development.json');

var routes = require('./routes/index');
var networks = require('./routes/networks');
var news = require('./routes/news');

var app = express();

var environment = app.get('env');
console.log('Running server in "%s" mode', environment);

// View engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

// Uncomment after placing your favicon in /public
// TODO: Uncomment after placing your favicon in /public
//app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));
app.use(logger(process.env.REQUEST_LOG_MODE || defaultConfig.requestLogMode || 'dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/static', express.static(path.join(__dirname, 'public')));
app.use('/demo', express.static(path.resolve('../demo')));
app.use('/jquery-plugin', express.static(path.resolve('../jquery-plugin')));

//===============
// Main resources mappings.
app.use('/', routes);
app.use('/networks', networks);
app.use('/news', news);

// Catch 404 and forward to error handler
//===============
// Error handlers

/**
* Catch 404 and forward to error handler
*/
app.use(function (req, res, next) {
var err = new Error('Wow! Check the URL because we currently does NOT support that resource.');
err.status = 404;
next(err);
});

//===============
// Error handlers

// Development error handler, it will print stacktrace
if (app.get('env') === 'development') {
if ('development' === environment) {
app.use(function (err, req, res, next) {
// Development error handler, it will print stacktrace

res.status(err.status || 500);
res.render('error', {
message: err.message,
error: err
});
});
}

// Production error handler, no stacktraces leaked to user
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {}
} else {
// 'production' environment
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {}
});
});
});

if (process.env.ROLLBAR_ACCESS_TOKEN) {
var rollbar = require('rollbar');
rollbar.handleUncaughtExceptions(process.env.ROLLBAR_ACCESS_TOKEN);
app.use(rollbar.errorHandler());
console.log('Rollbar configured successfully');
} else {
console.error('Running %s mode without ROLLBAR_ACCESS_TOKEN environment variable', environment);
}
}

module.exports = app;
18 changes: 18 additions & 0 deletions server/development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"apiEndpoint": "http://piseis.herokuapp.com",
"requestLogMode": "dev",
"networks": {
"instagram": {
"clientId": "cb1d643d638842518c90b63c6c3ea7a0"
},
"googleplus": {
"apiKey": "AIzaSyCNQ1slAxWLz8pg6MCPXJDVdeozgQBYxz8"
},
"twitter": {
"consumerKey": "oy1KRFv0w7vnJgYV9MnzQ",
"consumerSecret": "p5DOWK5W8PfPSGEjufFR0MI2U2896aDM5mbiYFGLQ",
"accessToken": "167430903-S92M9ardfhRFAM4pdAUrNA3TC1mlA91QtzyLgBET",
"accessTokenSecret": "9FUA6zwicRQjK2fjvHMaRHVKiBUzEm7vNU5dAa97cQ9st"
}
}
}
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"moment": "^2.10.3",
"morgan": "~1.5.3",
"request": "^2.55.0",
"rollbar": "^0.5.4",
"serve-favicon": "~2.2.1",
"twit": "^1.1.20"
},
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions server/public/libraries/bootstrap-3.3.5/css/bootstrap.min.css

Large diffs are not rendered by default.

Binary file not shown.
Loading

0 comments on commit 0f666e6

Please sign in to comment.