Giter Site home page Giter Site logo

rails-base-api's Introduction

Skeleton for new Rails 4 application for REST API

Code Climate Semaphore

This simple application includes ruby/rails technology which we use at FlatStack for new REST API projects.

Application currently based on Rails 4 stable branch and Ruby 2.1

API

Status of the API could be checked at http://localhost:5000/docs

What's included

Application gems:

Development gems

  • Foreman for managing development stack with Procfile
  • Letter Opener for preview mail in the browser instead of sending
  • Mail Safe keep ActionMailer emails from escaping into the wild during development
  • Bullet gem to kill N+1 queries and unused eager loading
  • Rails Best Practices code metric tool
  • Brakeman static analysis security vulnerability scanner
  • Bundler Audit Patch-level verification for Gems

Testing gems

Initializes

  • 01_config.rb - shortcut for getting application config with app_config
  • mailer.rb - setup default hosts for mailer from configuration
  • requires.rb - automatically requires everything in lib/ & lib/extensions

Scripts

  • bin/bootstrap - setup required gems and migrate db if needed
  • bin/quality - runs rubocop, brakeman, rails_best_practices and bundle-audit for the app
  • bin/ci - should be used in the CI or locally
  • bin/server - to run server locally

Quick start

Clone application as new project with original repository named "rails-base-api"

git clone git://github.com/fs/rails-base-api.git --origin rails-base-api [MY-NEW-PROJECT]

Create your new repo on GitHub and push master into it. Make sure master branch is tracking origin repo.

git remote add origin [email protected]:[MY-GITHUB-ACCOUNT]/[MY-NEW-PROJECT].git
git push -u origin master

Run bootstrap script

bin/bootstrap

Make sure all test are green

bin/ci

Run app

bin/server

Do not forget to update this file!

mv doc/README_TEMPLATE.md README.md
# update README.md
git commit -am "Update README.md"

Examples

Please check how to build API endpoints and test them properly in the examples branch

rails-base-api's People

Contributors

timurvafin avatar vast avatar bulatsitdikov avatar maxprokopiev avatar dmitrytrager avatar askarzinurov avatar ildarusmanov avatar arkadiybutermanov avatar fs-admin avatar

Watchers

Ildar Kayumov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.