GithubHelp home page GithubHelp logo

kevin-j-m / gnarails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thegnarco/gnarails

0.0 1.0 0.0 201 KB

A template file for generating a new rails app

License: MIT License

Ruby 93.17% Shell 0.95% HTML 3.04% Dockerfile 1.50% Procfile 0.08% JavaScript 1.26%

gnarails's Introduction

Gnarails

Create a gnarly rails app, ready to go with all the base functionality you can expect from any rails application developed by The Gnar Company.

Usage

This template relies on pronto, which needs cmake installed.

Using the CLI

$ gem install gnarails
$ gnarails new <APP_NAME>

Using the template

If you want to reference the template directly and don't want to use the gnarails CLI command, you may clone the project (or reference the template from its HTTP location on github):

$ git clone https://github.com/TheGnarCo/gnarails.git
$ cd where/app/will/go
$ rails new <APP_NAME> -m path/to/gnarly.rb --skip-test-unit --database=postgresql

A.railsrc is provided. If you'd like to symlink it to your home directory, it'll run rails new with the options to run with postgres and not including test-unit. This .railsrc can be personalized to include the --template=path/to/gnarly.rb option depending on where you locally store this repo if you'd like to use this template every time.

Post-Install

$ cd <APP_NAME>
$ bin/bundle
$ bin/rails db:create
$ bin/rails db:migrate

Setting up pronto on CI

Pronto can be used to comment on pull requests for various automated checks of changes made in a particular diff. To complete the setup of this tool for your repository, you must identify a github account that pronto will comment as on every PR, and update the following:

  • Generate a Personal Access Token from the github account.

    • Settings > Developer settings > Personal access tokens > Generate new token.
    • Use the repo name for the token description.
    • Provide the repo scope.
    • Generate the token.
    • Store/copy the token temporarily.
  • Store the token value in circle.

    • Find the repo settings.
    • Build Settings > Environment Variables.
    • Add Variable.
    • Name the variable PRONTO_GITHUB_ACCESS_TOKEN with the value from the previous Personal Access Token.

Usage with Docker

A Dockerfile and docker-compose.yml file are created by default.

To use Docker, run:

docker-compose build

then set up the database:

docker-compose run web rails db:create
docker-compose run web rails db:migrate

finally, start the server and visit localhost:3000:

docker-compose up

Switching out Capybara Driver

If you'd like to not run your tests headless, for example, to troubleshoot an issue and see what's on the screen, modify the driven_by driver in spec/support/system_test_configuration.rb to use :selenium_chrome instead of :selenium_chrome_headless. After the change, this block should look as follows:

config.before(:each, type: :system, js: true) do
  driven_by :selenium_chrome
end

Running the Application

$ bin/setup
$ bin/dev

Visit localhost:3000 in your browser

About The Gnar Company

The Gnar Company

The Gnar Company is a Boston-based development company that builds robust web and mobile apps designed for the long haul.

For more information see our website.

gnarails's People

Contributors

kevin-j-m avatar alxjrvs avatar mikestone14 avatar blakewilliams avatar reese avatar admande avatar jyurek avatar rdobrins avatar zelaznik avatar zfletch avatar kenyonj avatar ngmaloney avatar pachun avatar taylorkearns avatar danfrenette avatar

Watchers

 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.