Dist
Generate packages to distribute Rails applications
Installation
$ gem install dist
Usage
In your Rails root, run:
$ dist
If it's the first time you run it, it will prompt you to run:
$ dist init
This will create a config/dist.rb
file that contains some information about how to create the package.
A typical config/dist.rb
file looks like this:
set :application, 'myrailsapp'
set :version, '1.0'
set :maintainer, 'John Doe <[email protected]>'
set :description, 'My awesome Rails app'
set :summary, 'Demonstrates the usage of dist'
use :mail
Settings
To prompt for settings while installing the package yo:
config :settings do
string :host, prompt: "Enter the host name"
end
This will prompt the user to enter a host name. The installer package will replace the key 'host' inside 'config/settings.yml' with the inputted value.
If settings.yml contains a 'production' key, 'host' will be replaced inside 'production'.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request