rails-new-app
Command-line tool to assist in the creation of new Rails 5 and 6 apps
Installation:
Run gem install "rails-new-app"
Usage:
Run rails-new-app
command and follow the step by step wizard.
Alternative
If, for any reason, the menu navigation does not work, run rails-new-app navigation=false
.
Current configurations:
- Rails version (validate and install)
- Database: none / MySQL / PostgreSQL / SQLite
- Tests:
- - runner: none / Minitest / RSpec
- - CodeCoverage: none / Simplecov
- - Factories: none / FactoryBot
- - Fake data: none / Faker
- TemplateEngine: None (just ERB) / Slim / HAML
- RubyLinter: None / RuboCop / StandardRB
- FormBuilder: None / Simple Form / Formtastic
- JS Framework: None / ReactJS / VueJS / Angular / Elm / Stimulus
- Pagination: None / Pagy / Kaminari / WillPaginate
TODOs and ideas:
- improve GUI and UX
- - toggle options using arrow keys?
- - describe steps better
- - add links to the different tools
- add tests
- add more tools
- support
rails new
flags configuration - research requirements
- improve validations (check rails version, ruby version, if gems are compatible with rails, etc)
- show the user the current Ruby version
- support a
rails-new-app-defaults
file at the HOME dir to set default options if empty answers
Ideas for other tools:
- support other databases like MongoDB that require more config
- type of app: standard/minimal/api
- CI config? github actions / travis / circleci / bitbucket / gitlab / others
- js linter? None/ESlint/StandardJS
- devise?
- carrierwave/paperclip/dragonfly?
- exception_notification / airbreak / other reporting tools
- dotenv/figaro
- redis?
- memcached/dalli/other?
- resque/sideqik/suckerpunch/other?
- CSS framework? bootstrap/tailwind/material/spectre/bulma (this affects the form builders processor)
- add basic docker config?
- admin gems? ActiveAdmin/RailsAdmin/Trestle/others
- pre-commit hooks? overcommit
- cancancan/pundit ?
Adding more configurations and tools:
- Add a new step at
lib/rails-new-app/steps
(or modify an existing one) - Collect step config in the
config
hash - Update configuration details before confirmation
- Add a new preocessor at
lib/rails-new-app/processors
(or modify an existing one) - Add a template to ONLY modify the gemfile at
lib/rails-new-app/templates
- Add another template to ONLY modify the code/configuration at
lib/rails-new-app/templates
- Update Runner to run the
update_gemfile
andconfigure
methods
- Steps 5 and 6 are split so we can run
bundle install
once.
Changelogs
0.0.1
This is a really early Alpha version as a proof of concept.
0.0.2
Added navigation between menus.
0.0.3
- Added
next_step
to configure related tools without going back to menu - Apply linter fixes after creation
- Add a git initial commit
- Added new tools: Faker, pagination gems
- Bug fixing