Generate packages to distribute Rails applications
$ gem install dist
In your Rails root, run:
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.
config/dist.rb file looks like this:
set :application, 'myrailsapp' set :version, '1.0' set :maintainer, 'John Doe <firstname.lastname@example.org>' set :description, 'My awesome Rails app' set :summary, 'Demonstrates the usage of dist' use :mail
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'.
- 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