Skip to content

cpetersen223/sw-api

Repository files navigation

SW API

Ruby version

ruby 2.4.4

Rails version

rails 2.5.2

Database version tested

Mysql ver 14.14 Dist 5.7.24 for Linux (x86_64) using EditLine wrapper

Elasticsearch Requirements

For development
$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
$ sudo apt-get install apt-transport-https
$ echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
$ sudo apt-get update && sudo apt-get install elasticsearch

Search for the initialization file of elasticsearch

 $ sudo nano /etc/elasticsearch/elasticsearch.yml

Change the line # network.host: 192.168.x.x to the uncommented network.host: 0.0.0.0, then uncomment # http.port: 9200

Restart the elasticsearch service

 $ sudo systemctl restart elasticsearch

Requires Java JDK-8 (min)

Important Dependencies

  • Mysql2
  • For dev: Annotate, SearchKick
  • For test: RSpec, Factory Bot, Faker, DatabaseCleaner, Shoulda Matchers, Rails Controllers Testing, Simple Coverage

Development

First create an environment_variables.yml file

mv environment_variables.example.yml environment_variables.yml

Then, substitute all the values of the variables

Install dependencies

bundle install

Setup the database

bundle exec rails db:create db:migrate db:seed

Init the server

bundle exec rails s

Running tests

bundle exec rspec

Deployment instructions

Set environment variables on environment_variables.yml under the deployment key (watch environment_variables.example.yml)

Docs

bundle exec rails s and visit the Api Documentation page

About

Ruby on Rails API implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors