Base template for creating Ruby-on-Rails applications
Current version: 0.1.2
- Download or clone the template
- Set your ruby version and gemset
$ rvm use 2.3.0@myapp --create
- Install rails gem for the gemset
$ gem install rails -v 'your_rails_version'
- Simply use the template when you are creating your application
$ rails new myapp -m /path/to/template/bootstrap.rb
- Have fun with your application
Template uses config.yml
file for installing and configuring rails gems and other stuff.
The list of statements that will help you to customize your own template are given below.
- The configuration file consists of several blocks like. They divide the application generation
process into some logic parts.
rvm: ... testing: ... documentation: ... deploy: ...
- The main part of each block is
gems
. So if you want more gems to be added to your project just add a new block with any name, which suits your aim with appropriategems
block or add yourgems
to any existing block.You can use justtesting: gems: faker: true rspec-rails: group: test, development factory_girl_rails: version: ~> 4.8 group: test, development
true
value for a gem. In this case the gem will be added toGemfile
likeYou can also pass version and/or group params and they will be used ingem 'faker'
Gemfile
eithergem 'factory_girl_rails', '~> 4.8', group: [:test, :development]
- Each block can run his own runner from runners folder if one exists. There you can put any
code you want to execute, i.e.
create_file '.ruby-version', RUBY_VERSION create_file '.ruby-gemset', app_name file '.rvmrc', "rvm use #{RUBY_VERSION}@#{app_name}"
- If you need to make some actions after gem is added, i.e. run
rails generate rspec:install
you can put callback to the runner that will be executed after gem is added. By convention callback name depends on gem name and should look like thisSo, for rspec-rails the full configuration will look like that"#{your_gem_name.gsub('-', '_')}_callback"
# config.yml testing: gems: rspec-rails: group: test, development
# runners/testing.rb def rspec_rails_callback generate('rspec:install') end
Add gitignore with appropriate file exclusions- Implement a convenient way for user logins and passwords injecting to initializers
- Add more configurations to capistrano
Problems? Check the Issues block to find the solution or create an new issue that we will fix asap. Feel free to contribute.
This Rails application template is open-sourced by Agilie Team info@agilie.com
If you have any questions, suggestions or just need a help with web or mobile development, please email us at web@agilie.com. You can ask us anything from basic to complex questions.
We will continue publishing new open-source projects. Stay with us, more updates will follow!
The MIT License (MIT) Copyright © 2017 Agilie Team