New Rails project wizard. Onotole will help!
Read more ENG | RUS | RUS lurk
Fork from thoughtbot/suspenders(https://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 '~> 4.2.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.
- bootstrap3 Bootstrap with asset pipeline support
- bootstrap3_sass Bootstrap sass
*
slim Slim is a template language which goal to reduce the syntax to the essential parts without becoming cryptic. http://slim-lang.com- html2slim HTML2SLIM utility, installs with slim
- haml HTML Abstraction Markup Language - A Markup Haiku http://haml.info
- devise Flexible authentication solution for Rails with Warden. http://blog.plataformatec.com.br/tag/devise/
- devise-bootstrap-views
- rails_admin Rails engine that provides an easy-to-use interface for managing your data
- activeadmin Rails framework for creating elegant backends for website administration.
- typus Ruby on Rails control panel to allow trusted users edit structured content. http://docs.typuscmf.com
- rails_db Rails Database Viewer and SQL Query Runner https://youtu.be/TYsRxXRFp1g
- ActiveAdminImport Based on ActiveRecord-import gem - the most efficient way to import for ActiveAdmin
- ActiveAdminTheme Flat skin for ActiveAdmin
- Active_skin Flat skin for active admin.
- flattened_active_admin Theme. Bring your Active Admin up-to-date with this customizable add on
- Face_of_active_admin Theme for ActiveAdmin with glyphicons and flattens
- active_admin_bootstrap Very simple ActiveAdmin Bootstrap theme
- will_paginate Pagination library for Rails, Sinatra, Merb, DataMapper
- will_paginate-bootstrap Integrates the Twitter Bootstrap pagination component with will_paginate
- kaminari A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails
- bootstrap-kaminari-views Bootstrap kaminari plugin
- ckeditor CKEditor is a WYSIWYG text editor designed to simplify web content creation.
- tinymce-rails Integration of TinyMCE with the Rails asset pipeline
- Airbrake For exception notification
- bundler_audit Patch-level verification for Bundler
*
faker A library for generating fake data such as names, addresses, and phone numbers.*
guard Guard is a command line tool to easily handle events on file system modifications. http://guardgem.org- guard_rubocop Guard plugin for RuboCop
*
meta_request Supporting gem for Rails Panel (Google Chrome extension for Rails development).*
rubocop A Ruby static code analyzer, based on the community Ruby style guide.*
annotate Annotate Rails classes with schema and routes info*
overcommit A fully configurable and extendable Git hook manager*
rubycritic A Ruby code quality reporter- railroady Model and controller UML class diagram generator. Originally based on the "railroad" plugin
- hirb-unicode Unicode support for hirb
- dotenv-heroku Addition for quick variables export to heroku
- image_optim Optimize (lossless compress, optionally lossy) images (jpeg, png, gif, svg) using external utilities
- mailcatcher Catches mail and serves it through a dream. http://mailcatcher.me
*
rack-mini-profiler Middleware that displays speed badge for every html page. Designed to work both in production and in development.
- activerecord_import Activerecord-import is a library for bulk inserting data using ActiveRecord.
*
responders A set of responders modules to dry up your Rails 4.2+ app.- paper_trail Track changes to your models' data. Good for auditing or versioning.
- validates_timeliness Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.
- font-awesome-sass Font-Awesome Sass gem for use in Ruby/Rails projects
- cyrillizer Character conversion from latin to cyrillic and vice versa
- fotoramajs Fotorama JS gallery for Ruby on Rails http://fotorama.io/
- rack-cors Rack Middleware for handling Cross-Origin Resource Sharing (CORS), which makes cross-origin AJAX possible.
- newrelic_rpm for monitoring performance
- axslx Xlsx generation with charts, images, automated column width, customizable styles and full schema validation.
- axlsx_rails A Rails plug-in to provide templates for the axlsx gem for providing Excel files format support
- prawn Fast, Nimble PDF Writer for Ruby http://prawnpdf.org
- prawn-table Provides support for tables in Prawn
- geocoder Complete Ruby geocoding solution. http://www.rubygeocoder.com
- Gmaps4rails Enables easy Google map + overlays creation in Ruby apps http://apneadiving.github.io/
Mandatory installation gem list you will find in Gemfile
section of this readme
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:
onotole projectname
will generate project with default mandatory gems and default flexible gemsonotole 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.
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.
- Autoprefixer Rails for CSS vendor prefixes
- Delayed Job for background processing
- Flutie for
page_title
andbody_class
view helpers - High Voltage for static pages
- jQuery Rails for jQuery
- Normalize for resetting browser styles
- Postgres for access to the Postgres database
- Rack Canonical Host to ensure all requests are served from the same domain
- Rack Timeout to abort requests that are taking too long
- Recipient Interceptor to avoid accidentally sending emails to real people from staging
- Simple Form for form markup and style
- Title for storing titles in translations
- Puma to serve HTTP requests
And development gems like:
- Dotenv for loading environment variables
- Pry Rails for interactively exploring objects
- Hirb for pretty tables view in the console
- Awesome_print Pretty print your Ruby objects with style -- in full color and with proper indentation
- ByeBug for interactively debugging behavior
- Bullet for help to kill N+1 queries and unused eager loading
- Spring for fast Rails actions via pre-loading
- Web Console for better debugging via in-browser IRB consoles.
- Quiet Assets for muting assets pipeline log messages
- Better_errors Better error page for Rack apps
- Binding_of_caller Retrieve the binding of a method's caller in MRI 1.9.2+
And testing gems like:
- Capybara and Capybara Webkit for integration testing
- Factory Girl for test data
- Formulaic for integration testing HTML forms
- RSpec for unit testing
- RSpec Mocks for stubbing and spying
- Shoulda Matchers for common RSpec matchers
- Timecop for testing time
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.
Onotole also comes with:
- The [
./bin/setup
][setup] convention for new developer setup - Rails' flashes set up and in application layout
- A few nice time formats set up for localization
Rack::Deflater
to [compress responses with Gzip][compress]- A [low database connection pool limit][pool]
- [Safe binstubs][binstub]
- [t() and l() in specs without prefixing with I18n][i18n]
- An automatically-created
#{APP_NAME}_SECRET_KEY_BASE
environment variable in all environments - The analytics adapter [Segment][segment] (and therefore config for Google Analytics, Intercom, Facebook Ads, Twitter Ads, etc.)
- Check existing of app DB and ask about continuation if base persisted
- Added style flash messagaes for
bootstrap-sass
gem - Auto add gem
devise_bootstrap_views
whenbootstrap-sass
anddevise
selected for pretty view from the box - Added autoload js and scss from
vendor/assets/javascripts
andvendor/assets/stylesheets
- Added autoload fonts from
app/assets/fonts/**/*
- Patch for no error work, if
Mailcatcher
is not loaded. In this casedelivery_method = :file
. It checks on therails server
starts. - No need to add
rails_helper
orspec_helper
in specs. - In
.env
just switch on#{app_name}_COVERAGE
to true and get your test coverage. - Added
kaminari-i18n
installation withActiveAdmin
orkaminari
gem
You can optionally create Heroku staging and production apps:
onotole app * heroku true
This:
- Creates a staging and production Heroku app
- Sets them as
staging
andproduction
Git remotes - Configures staging with
RACK_ENV
environment variable set tostaging
- Adds the Rails Stdout Logging gem to configure the app to log to standard out, which is how Heroku's logging works.
- Creates a Heroku Pipeline for review apps
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
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
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
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.
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.
If you want to get your gem in Onotole follow this steps
- Clone this repository
- If you need to add new question in menu add it in UserGemsMenu
- Add your gem with description in
EditMenuQuestions
. - Add per
bundler
hooks inBeforeBundlePatch
. Use function name with this templateadd_awesome_gem
whereawesome
is a gem name. Usually minimum is to add gem intoGemfile
. - Add after install hooks in
AfterInstallPatch
. Name your functionafter_install_awesome
. Also, add it in query at#post_init
. Other way it will not run - Update README.MD
- Make PR
Please, do not change version or gems for default install.
Appname tmp
is preferred for develop. It already added to gitignore.
If you find some misprints fell free to fix them.
Thank you!
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.
MIT Licence