Skip to content

Commit 5964ab3

Browse files
committed
Create project
0 parents  commit 5964ab3

217 files changed

Lines changed: 30256 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
version: 2
2+
jobs:
3+
test:
4+
docker:
5+
- image: circleci/node:10.7.0
6+
- image: circleci/postgres:9.6.2-alpine
7+
environment:
8+
POSTGRES_USER: marciovsena
9+
POSTGRES_DB: bibleapi_test
10+
11+
steps:
12+
- checkout
13+
- restore_cache:
14+
keys:
15+
- v1-dependencies-{{ checksum "package.json" }}
16+
17+
- run:
18+
name: Install Dependencies
19+
command: yarn install
20+
21+
- save_cache:
22+
paths:
23+
- node_modules
24+
key: v1-dependencies-{{ checksum "package.json" }}
25+
26+
- run:
27+
name: Run tests
28+
command: yarn test:circle
29+
30+
production:
31+
docker:
32+
- image: buildpack-deps:trusty
33+
34+
steps:
35+
- checkout
36+
- run: bash .circleci/setup-heroku.sh
37+
- add_ssh_keys:
38+
fingerprints:
39+
- $HEROKU_SSH_FINGERPRINT
40+
- deploy:
41+
name: Deploy to Heroku if tests pass and branch is master
42+
command: |
43+
if [ "${CIRCLE_BRANCH}" == "master" ]; then
44+
git push --force git@heroku.com:$HEROKU_APP_NAME.git HEAD:refs/heads/master
45+
fi
46+
47+
workflows:
48+
version: 2
49+
test_deploy:
50+
jobs:
51+
- test
52+
- production:
53+
requires:
54+
- test
55+
filters:
56+
branches:
57+
only:
58+
- master

.circleci/setup-heroku.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
ssh-keyscan -H heroku.com >> ~/.ssh/known_hosts
3+
# If you need access to the heroku CLI to run heroku commands in the deploy step add these lines:
4+
# mkdir -p /usr/local/lib /usr/local/bin
5+
# tar -xvzf heroku-linux-amd64.tar.gz -C /usr/local/lib
6+
# ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
7+
8+
cat > ~/.netrc << EOF
9+
machine api.heroku.com
10+
login $HEROKU_LOGIN
11+
password $HEROKU_API_KEY
12+
EOF
13+
14+
cat >> ~/.ssh/config << EOF
15+
VerifyHostKeyDNS yes
16+
StrictHostKeyChecking no
17+
EOF

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.env.example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
HOST=127.0.0.1
2+
PORT=3333
3+
NODE_ENV=development
4+
5+
APP_NAME=bibleAPI
6+
APP_URL=http://${HOST}:${PORT}
7+
8+
CACHE_VIEWS=false
9+
10+
APP_KEY=
11+
12+
DB_CONNECTION=pg
13+
DB_HOST=127.0.0.1
14+
DB_PORT=5432
15+
DB_USER=marciovsena
16+
DB_PASSWORD=
17+
DB_DATABASE=bibleapi
18+
19+
HASH_DRIVER=bcrypt

.env.testing

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
HOST=127.0.0.1
2+
PORT=3334
3+
NODE_ENV=testing
4+
APP_NAME=BibleApi
5+
APP_URL=http://${HOST}:${PORT}
6+
CACHE_VIEWS=false
7+
APP_KEY=JpPCmPCvA4UrFrmRJv8wZg2MDICMaV2S
8+
DB_CONNECTION=pg
9+
DB_HOST=localhost
10+
DB_PORT=5432
11+
DB_USER=marciovsena
12+
DB_PASSWORD=
13+
DB_DATABASE=bibleapi_test
14+
HASH_DRIVER=bcrypt

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Node modules
2+
node_modules
3+
4+
# Adonis directory for storing tmp files
5+
tmp
6+
7+
# Environment variables, never commit this file
8+
.env
9+
10+
# The development sqlite file
11+
database/development.sqlite
12+
13+
public/
14+
dist/
15+
16+
apidoc/.gitignore
17+
18+
.nyc_output/
19+
coverage/

.nycrc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"description": "These are just examples for demonstration, nothing prescriptive",
3+
"nyc": {
4+
"check-coverage": true,
5+
"per-file": true,
6+
"lines": 99,
7+
"statements": 99,
8+
"functions": 99,
9+
"branches": 99,
10+
"include": [
11+
"src/**/*.js"
12+
],
13+
"exclude": [
14+
"src/**/*.spec.js"
15+
],
16+
"ignore-class-method": "methodToIgnore",
17+
"reporter": [
18+
"lcov",
19+
"text-summary"
20+
],
21+
"extension": [
22+
".js"
23+
],
24+
"cache": true,
25+
"all": true,
26+
"temp-dir": "./alternative-tmp",
27+
"report-dir": "./test-repost"
28+
}
29+
}

.prettierrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"overrides": [
5+
{
6+
"files": "*.test.js",
7+
"options": {
8+
"semi": true
9+
}
10+
}
11+
]
12+
}

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# bibleApi Contributing Guide
2+
3+
Before submitting your contribution please read the guidelines.
4+
5+
- [Commit Guidelines](#commit-guidelines)
6+
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
7+
- [Pull Request Guidelines](#pull-request-guidelines)
8+
9+
## Commit Guidelines
10+
11+
Commit messages should follow the [commit message convention](https://www.conventionalcommits.org/en/v1.0.0-beta.2/).
12+
13+
## Issue Reporting Guidelines
14+
15+
- Do not create questions. The issue list is exclusively for reports, bugs and feature requests. Use the [Twitter](https://twitter.com/marciovsena) instead.
16+
17+
- Always search for your issue first. It may have already been answered, planned or fixed in some branch. New features will be planned on [Trello](https://trello.com/b/VPGRzM36).
18+
19+
- Only create issues for the newest version.
20+
21+
- Create a declarative title and describe clearly the steps necessary to reproduce the issue. If an issue labeled "need repro" receives no further input from the issue author for more than 3 days, it will be closed.
22+
23+
- If you want to show your code please use [Codepen](http://codepen.io/pen/) or [JSFiddle](https://jsfiddle.net/) or [Postman](https://www.getpostman.com/)
24+
25+
- In case you found a solution by yourself try to explain how you fixed it. It could be useful for somebody else. 😃
26+
27+
## Pull Request Guidelines
28+
29+
- The `master` branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.**
30+
31+
- Make small commits as you work on the PR. They will be automatically squashed before merging.
32+
33+
- Provide convincing reason to add a new feature. Ideally you should open a suggestion/request issue first and have it greenlighted before working on it.
34+
35+
- If fixing a bug:
36+
- If you are resolving a special issue, add the GitHub ID to your commit. E.g. `(fix something really ugly #xxx)`
37+
- Provide detailed description of the bug in the PR.
38+
39+
Contribution based on the [vue-material](https://github.com/vuematerial/vue-material/blob/master/.github/CONTRIBUTING.md) and [docz](https://github.com/pedronauck/docz/blob/master/CONTRIBUTING.md) contribution files

LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
BSD 2-Clause License
2+
3+
Copyright (c) 2018, Márcio Vinícius Sena
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)