Clone or download
Latest commit 422be7f Dec 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app re-annotated all models Dec 1, 2018
bin upgraded rails to 5.2.2 Dec 5, 2018
config upgraded rails to 5.2.2 Dec 5, 2018
db removed bundler options Dec 5, 2018
docker Move sitemap generation to docker run Dec 31, 2017
docs Remove oggs since they're now gone from the db (#73) Aug 17, 2016
lib updated rubocop version Dec 1, 2018
log initial push, database added Jun 15, 2014
public More edits to the new API (#37) Apr 21, 2016
spec re-annotated all models Dec 1, 2018
.dockerignore New lines at eof Oct 22, 2017
.git-credentials Adds! Jan 12, 2015
.gitattributes Faster search Mar 31, 2016
.gitignore Merge branch 'master' into master Oct 18, 2018
.gitmodules moved db submodule to dumps Jan 24, 2017
.rspec added spsec for association and db columns Apr 2, 2018
.rubocop.yml wip on mobile routes Dec 1, 2018
.travis.yml removed redis Oct 18, 2018
Capfile removed v2 sepc, and fixed rubocop quote rules Apr 10, 2018
Dockerfile removed bundler options Dec 5, 2018
Gemfile we'll need sitemap gem during build Dec 5, 2018
Gemfile.lock upgraded rails to 5.2.2 Dec 5, 2018
Guardfile removed v2 sepc, and fixed rubocop quote rules Apr 10, 2018
LICENSE.md Create LICENSE.md Sep 30, 2016
Procfile Cleaning Procfile, raven.rb and updating docker/README Oct 22, 2017
README.md removed redis Oct 18, 2018
Rakefile removed v2 sepc, and fixed rubocop quote rules Apr 10, 2018
Search.md Version-two of search and backend Oct 12, 2015
build.sh Merge remote-tracking branch 'upstream/master' Dec 31, 2017
config.ru removed v2 sepc, and fixed rubocop quote rules Apr 10, 2018
docker-compose.production.yml Merge remote-tracking branch 'upstream/master' Dec 31, 2017
docker-compose.test.yml Saving build artifacts in development env Oct 28, 2017
docker-compose.yml Move sitemap generation to docker run Dec 31, 2017
gen-sitemaps-and-run.sh Move sitemap generation to docker run Dec 31, 2017
save-artifacts.sh Saving build artifacts in development env Oct 28, 2017

README.md

Quran.com API SLACK

Code Climate

Requirements

  • Rails 5.0.1
  • Elasticsearch 5.0.1

Installations

Gems:

bundle install

Elasticsearch: See config/elasticsearch/README.md

Postgresql:

This is the best way if you're on mac: http://postgresapp.com/ But to install the pg gem, you will have to do:

gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config

If you decide to install postgres with homebrew (brew install postgresql) you should not have this problem.

Why should you use the app? You have quick commandline tools such as: The following tools come with Postgres.app:

PostgreSQL: clusterdb createdb createlang createuser dropdb droplang dropuser ecpg initdb oid2name pg_archivecleanup pg_basebackup pg_config pg_controldata pg_ctl pg_dump pg_dumpall pg_receivexlog pg_resetxlog pg_restore pg_standby pg_test_fsync pg_test_timing pg_upgrade pgbench postgres postmaster psql reindexdb vacuumdb vacuumlo

See: http://postgresapp.com/documentation/cli-tools.html

Database

Currently, not everyone has access to the database as it's not opensource and will require you to contact one of the project's collaborators for access. Once you have access, you can pull down the submodule in one of two ways:

git clone --recursive git@github.com:quran/quran-api-rails.git
cd quran-api-rails

For already cloned repo:

git clone git@github.com:quran/quran-api-rails.git
cd quran-api-rails
git submodule update --init --recursive

Usage

http://localhost:3000/api/v3/chapters/1/verses

Documentation

https://quran.api-docs.io/v3

Slack

Signup at https://quranslack.herokuapp.com to be added to the Slack group

Tests

We have put some time to test the api and the search. You may need to have elasticsearch running in order for the tests to go through search although we should be looking for an elasticsearch mock.

Simply run:

rspec