Skip to content

Commit

Permalink
Merge pull request #102 from andela/develop
Browse files Browse the repository at this point in the history
Push to prod
  • Loading branch information
e-liyai committed Aug 8, 2019
2 parents cfb7be1 + 01b9217 commit 554007e
Show file tree
Hide file tree
Showing 494 changed files with 33,385 additions and 1,176 deletions.
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
["@babel/preset-env", {
"targets": {
"node": "current"
}
}]
]
}
20 changes: 20 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '2'
plugins:
rubocop:
enabled: true
eslint:
enabled: true
exclude_patterns:
- "src/config/"
- "src/models/"
- "src/migrations/"
- "src/seeders/"
- "src/helpers/factory"
- "**/node_modules/"
- "templates/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "**/vendor/"
- "**/*.d.ts"
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-ci
repo_token: 4RaaumwJ4Nj5xob1VFKxIFozVkinsSyVw
38 changes: 38 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
APP_URL_BACKEND = http://localhost:3000
APP_URL_FRONTEND = http://localhost:3000/api/v1
SECRET_KEY = 12345

DATABASE_URL_DEV = postgres://postgres:12345@localhost:5432/authorhavens_dev
DATABASE_URL_TEST = postgres://postgres:12345@localhost:5432/authorhavens_test

DB_NAME_DEV=authorhavens_dev
DB_HOST_DEV=localhost
DB_USER_DEV=postgres
DB_PASSWORD_DEV=123456
DB_PORT_DEV=5432

DB_NAME_TEST=authorhavens_test
DB_HOST_TEST=localhost
DB_USER_TEST=postgres
DB_PASSWORD_TEST=123456
DB_PORT_TEST=5432

FACEBOOK_APP_ID = FACEBOOK_APP_ID
FACEBOOK_APP_SECRET = FACEBOOK_APP_SECRET

TWITTER_CONSUMER_KEY = TWITTER_CONSUMER_KEY
TWITTER_CONSUMER_SECRET = TWITTER_CONSUMER_SECRET

GOOGLE_CONSUMER_KEY = GOOGLE_CONSUMER_KEY
GOOGLE_CONSUMER_SECRET = GOOGLE_CONSUMER_SECRET

EMAIL_SENDER = EMAIL_SENDER
SENDGRID_API_KEY = SENDGRID_API_KEY

AWS_ACCESS_KEY_ID = AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY = AWS_SECRET_ACCESS_KEY

CLOUDINARY_CLOUD_NAME = CLOUDINARY_CLOUD_NAME
CLOUDINARY_API_KEY = CLOUDINARY_API_KEY
CLOUDINARY_API_SECRET = CLOUDINARY_API_SECRET
IMAGE_BASE_URL = IMAGE_BASE_URL
56 changes: 56 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"root": true,
"extends": "airbnb-base",
"env": {
"node": true,
"es6": true,
"mocha": true
},
"rules": {
"one-var": 0,
"one-var-declaration-per-line": 0,
"new-cap": 0,
"consistent-return": 0,
"no-param-reassign": 0,
"comma-dangle": 0,
"curly": [
"error",
"multi-line"
],
"import/no-unresolved": [
2,
{
"commonjs": true
}
],
"no-shadow": [
"error",
{
"allow": [
"req",
"res",
"err"
]
}
],
"valid-jsdoc": [
"error",
{
"requireReturn": true,
"requireReturnType": true,
"requireParamDescription": false,
"requireReturnDescription": true
}
],
"require-jsdoc": [
"error",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true
}
}
]
}
}
36 changes: 31 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,62 @@
# Logs
logs
*.log
.DS_Store

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules
# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
.DS_Store
10 changes: 10 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"reporter": [
"lcov",
"text"
],
"exclude": [
"src/tests",
"swagger.json"
]
}
10 changes: 10 additions & 0 deletions .sequelizerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require("@babel/register");

const path = require('path');

module.exports = {
"config": path.resolve('./src/config', 'dbConfig.js'),
"models-path": path.resolve('./src/models'),
"migrations-path": path.resolve('./src/migrations'),
"seeders-path": path.resolve('./src/seeders')
};
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
env:
global:
- CI=true
- SECRET_KEY=12345
- NODE_ENV=test
- CC_TEST_REPORTER_ID=d570e2625aaffa20e7828eaddfbec748c525e866b6d413472bc26e188cb2bc6a
- DATABASE_URL_TEST=postgres://postgres@localhost:5432/authorhavens_test
- APP_URL_BACKEND=http://localhost:3000
- APP_URL_FRONTEND=http://localhost:5000
- FACEBOOK_APP_ID=FacebookId
- FACEBOOK_APP_SECRET=FacebookSecret
- TWITTER_CONSUMER_KEY=TwitterKey
- TWITTER_CONSUMER_SECRET=TwitterKey
- GOOGLE_CONSUMER_KEY=ToogleKey
- GOOGLE_CONSUMER_SECRET=GoogleSecret
language: node_js
node_js:
- 'stable'
cache:
directories:
- 'node_modules'
services:
- postgresql
before_script:
- psql -c 'CREATE DATABASE authorhavens_test;' -U postgres
- npm i sequelize-cli -g
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- npm run cover
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
after_success:
- npm run coveralls
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Andela

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 554007e

Please sign in to comment.