Giter Site home page Giter Site logo

fs / rails-base Goto Github PK

View Code? Open in Web Editor NEW
197.0 35.0 58.0 4.68 MB

Skeleton for new Rails based projects.

Home Page: http://www.flatstack.com/open-source/

Ruby 59.92% HTML 2.33% Shell 2.05% JavaScript 2.58% SCSS 25.77% Slim 7.34%
rails ruby skeleton

rails-base's Introduction

Rails Base

Build Status

Rails Base is the base Rails application template used at Flatstack. It's based on Rails 6 and Ruby 2.7

Application Gems

Development Gems

  • Puma as Rails web server
  • Letter Opener for opening mail in the browser instead of sending it
  • Bullet for detecting N+1 queries and unused eager loading
  • Rubocop and Rubocop-Rspec for reporting violations of the Ruby style guide
  • Brakeman for checking application for common security vulnerabilities
  • ByeBug as debugger
  • Bundler Audit for scanning the Gemfile for insecure dependencies based on published CVEs
  • Spring for fast Rails actions via pre-loading
  • Web Console for better debugging via in-browser IRB consoles
  • SCSS-Lint for reporting violations of SCSS coding conventions
  • Slim-Lint for reporting violations of Ruby style guide in .slim templates
  • Rails ERD for generating a diagram based on application's AR models

Testing Gems

Initializers

  • mailer.rb - setup default hosts for mailer from configuration
  • requires.rb - automatically requires everything in lib/ & lib/extensions

Scripts

  • bin/setup - setup required gems and migrate db if needed
  • bin/quality - runs rubocop, brakeman, rails_best_practices and bundle-audit for the app
  • bin/test - runs all tests and quality checks
  • bin/server - to run server locally

Getting Started

Prepare dependencies

Some gems have native extensions. You should have GCC installed on your development machine. Dependencies will be automatically installed via setup script.

  • phantomjs - to run Javascript unit tests
  • graphviz - to generate Entity-Relationship Diagram
  • node - JavaScript runtime

Bootstrap application

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

    git clone git://github.com/fs/rails-base.git --origin rails-base [MY-NEW-PROJECT]
  2. 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
  1. Run setup script
bin/setup
  1. Run test and quality suits to make sure all dependencies are satisfied and applications works correctly before making changes.
bin/test
  1. Run app
bin/server
  1. Update README

Do not forget to update application README.md file with detailed information based on the existing template.

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

Deployment

Heroku

Out of the box Rails Base ready to be deployed to Heroku.com.

  • Heroku Postgres add-on will be used for database.
  • SendGrid add-on required to be able to send emails.
  • NewRelic add-on could be used to monitor application performance.
  • Rollbar add-on could be used to application errors.
heroku create --addons=heroku-postgresql,sendgrid,newrelic,rollbar --remote staging rails-base-example
heroku config:add HOST="rails-base-example.herokuapp.com" MAILER_SENDER_ADDRESS="[email protected]" NEW_RELIC_APP_NAME="Rails Base"
git push staging master
heroku run rake db:schema:load
heroku open

Custom Server

To be able to deploy to your custom server Cloud66.com recommended as a provisioning and deployment service. Make sure to review and configure cloud66/manifest.yml before deployment.

Credits

Rails Base is maintained by Timur Vafin. It was written by Flatstack with the help of our contributors.

rails-base's People

Contributors

antonfefilov avatar artembiserov avatar arthurzaharov avatar arturminnullin avatar damirmakhmutov avatar damirnurgaliev avatar dependabot-preview[bot] avatar dependabot[bot] avatar dinershtein avatar dmitrybarskov avatar dmitrytrager avatar fs-admin avatar ildarusmanov avatar ilkhamgaysin avatar iskanderhaziev avatar marselmustafin avatar maxprokopiev avatar nailaliev avatar pierrerambaud avatar preciselyalyss avatar ramilyanigmatullina avatar ruslankhaertdinov avatar rustemginiyatullin avatar slavakisel avatar timurkhafizov avatar timurvafin avatar vast avatar wowonrails avatar yeremeyev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rails-base's Issues

Navigation deprications

DEPRECATION WARNING: Setting the active navigation in the controllers has been deprecated. Please use the new :highlights_on option in the config file for explicit highlighting. (called from /Users/timurv/Develop/projects/flatsoft/rails3-base/app/controllers/dashboard_controller.rb:2)

DEPRECATION WARNING: Setting the active navigation in the controllers has been deprecated. Please use the new :highlights_on option in the config file for explicit highlighting.

Fixup heroku deploy

Please install the postgresql adapter: gem install activerecord-postgresql-adapter (pg is not part of the bundle. Add it to Gemfile.)

Do not require password in signup only if additional params in the query present.

Scenario: User signs up with Twitter account
  Given the Twitter OAuth request is successful
  When I go to the sign up page
  And I follow "Twitter"
  Then I should be on the sign up page
  And should have "identity=true" in the query string
  And I should not see "Password" field
  When I follow "Sign up"
  Then I should be on the sign up page
  And I should see "Password" field

Group asset gems in the Gemfile

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.5'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

Update time formats

  :short_date => "%x", 
  :long_date  => "%a, %b %d, %Y",
  :us         => "%m/%d/%Y %I:%M %p",
  :us_date    => "%m/%d/%Y",
  :us_time    => "%I:%M %p"

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.