Onotole & Rails 5

New Rails project wizard. Onotole will help!

Read more ENG | RUS | RUS lurk

About

Fork from thoughtbot/suspenders(github.com/thoughtbot/suspenders) implemented function of user choice gems installation with all their settings, so you can use fully working application with everything needed installed and configured from the box. Cut Bitters as default choice.

As default uses the latest Ruby version and Rails '~> 5.0.0'

This user gem pack is available for custom installation (you will only choose what you need) all of this will be available in the customization menu with -c flag usage (no default selected gems will be installed), otherwise default gem list will be installed. Gems with * mark will be installed as addition like default, if starting onotole without -c flag. You can provide automatic installation with options, like --haml. Default pack will not be installed with any gem option.

I begin collecting some goodies where some patches and tweaks will be placed in, for easier getting into and using it with already started projects.

At this monent, I found unworking this gems: * ActiveAdmin * WillPaginane

I hope Rails 5 support willl be added there soon, or you may easyly find monkey patches for fixes. Feel free to edit this list.

Flexible gem group

Frontend frameworks

Template engines

Authenticate engines

CMS engines & DB viewers

ActiveAdmin plug-ins

Pagination

WYSIWYG

#### Memory DB * redis A Ruby client library for Redis. * redis-rails Provides a full set of stores (Cache, Session, HTTP Cache) for Ruby on Rails * redis-namespace Provides an interface to a namespaced subset of your redis keyspace (e.g., keys with a common beginning).

File storage

Developer tools

Misc

XLS & PDF
Geolocation

Mandatory installation gem list you will find in Gemfile section of this readme

Installation

First install the onotole gem add this in Gemfile and bundle

group :development do
      gem 'onotole', require: false
    end

or

gem install onotole

Then run:

onotole projectname [ -c ] [ * rails_genetator_flags ]

There are 2 main ways of using: 1. onotole projectname will generate project with default mandatory gems and default flexible gems 2. onotole projectname -c will generate project with mandatory gems and will provide a menu for gem selection, where you will need to choose all options.

Of course you are free to add standard rails new flags, inasmuch as Onotole based on standard rails generator

And command like this will add some magic

onotole app  * github organization/project * heroku true

This will provide a dialog, where you can select needed gems, also you can add it with gemname flag, after app_name, like onotole projectname --slim. List of gems you always can get with onotole --gems command. Also, onotole --help can be useful.

*NB: if you install custom gems, default user gem pack will not be installed.

Gemfile

To see the latest and greatest gems, look at Onotole' Gemfile, which will be appended to the default generated projectname/Gemfile. This gem will be installed anyway.

Mandatory gem group

And development gems like:

And testing gems like:

ENV Variables

All variables are stored in .env file and calls with project name prefix. It made for avoid name space problems with placing more than 1 of Onotole created app on 1 server. Onotole prefix all env variables with #{app_name} and now you will not have any problems with export variables in production. In production environment you can make .env.production file and put all consants there. Also with this thick you can easy use ENV export tool or just put ENV variables in .bashrc without name space conflicts.

NOSQL Memory based db

Now supported only Redis db, and Onotole do not install or config Redis itself, it just setup support gems. For getting access to Redis you can use $redis variable, and $ns_redis for namespaced access wich is provided by redis-namespace gem. Feel free in changing settings in config/initializers/redis.rb

Other goodies

Onotole also comes with:

Heroku

You can optionally create Heroku staging and production apps:

onotole app  * heroku true

This:

You can optionally specify alternate Heroku flags:

onotole app \
   * heroku true \
   * heroku-flags " * region eu  * addons newrelic,sendgrid,ssl"

See all possible Heroku flags:

heroku help create

Git

This will initialize a new git repository for your Rails app. You can bypass this with the * skip-git option:

onotole app  * skip-git true

GitHub auto repository create

You can optionally create a GitHub repository for the suspended Rails app. It requires that you have Hub on your system:

curl http://hub.github.com/standalone -sLo ~/bin/hub && chmod +x ~/bin/hub
onotole app  * github organization/project

This has the same effect as running:

hub create organization/project

Spring

Onotole uses spring by default. It makes Rails applications load faster, but it might introduce confusing issues around stale code not being refreshed. If you think your application is running old code, run spring stop. And if you'd rather not use spring, add DISABLE_SPRING=1 to your login file.

Dependencies

Onotole requires the latest version of Ruby.

Some gems included in Onotole have native extensions. You should have GCC installed on your machine before generating an app with Onotole.

Use OS X GCC Installer for Snow Leopard (OS X 10.6).

Use Command Line Tools for XCode for Lion (OS X 10.7) or Mountain Lion (OS X 10.8).

We use Capybara Webkit for full-stack JavaScript integration testing. It requires QT. Instructions for installing QT are here.

PostgreSQL needs to be installed and running for the db:create rake task. Also DB existing checking in PostgreSQL only.

Contributing

If you want to get your gem in Onotole follow this steps

  1. Clone this repository

  2. If you need to add new question in menu add it in UserGemsMenu

  3. Add your gem with description in EditMenuQuestions.

  4. Add per bundler hooks in BeforeBundlePatch. Use function name with this template add_awesome_gem where awesome is a gem name. Usually minimum is to add gem into Gemfile.

  5. Add after install hooks in AfterInstallPatch. Name your function after_install_awesome. Also, add it in query at #post_init. Other way it will not run

  6. Update README.MD

  7. Make PR

Please, do not change version or gems for default install. Appname tmp is preferred for develop. It already added to gitignore.

Keep in mind, that tests will need installed hub

If you find some misprints fell free to fix them.

Thank you!

Direct GitHub gem installation

Gems, which have been installed from github, with 'github:' option in Gemfile.erb will be automatically installed with gem install command. It made for making available support fresh fixes. If you do not need it, use 'git:' option with full gem trace.

License

MIT Licence