Restart Puma when some files change
Add this line to your application's Gemfile:
gem 'guard-puma'
And then execute:
$ bundle
Or install it yourself as:
$ gem install guard-puma
guard init puma
or add the following manually to your Guardfile
guard 'puma', :port => 4000 do
watch('Gemfile.lock')
watch(%r{^config|lib/.*})
end
:port
is the port number to run on (default4000
):environment
is the environment to use (defaultdevelopment
):start_on_start
will start the server when starting Guard (defaulttrue
):force_run
kills any process that's holding open the listen port before attempting to (re)start Puma (defaultfalse
).:daemon
runs the server as a daemon, without any output to the terminal that ranguard
(defaultfalse
).:debugger
runs the server with the debugger enabled (defaultfalse
). Required ruby-debug gem.:timeout
waits this number of seconds when restarting the Puma server before reporting there's a problem (default20
).:config
is the path to the Puma config file (optional):bind
is URI to bind to (tcp:// and unix:// only) (optional):control_token
is the token to use as authentication for the control server(optional):control_port
is the port to use for the control server(optional):threads
is the min:max number of threads to use. Defaults to 0:16 (optional)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Leave the version alone!
- Add what you changed to CHANGES.md
- Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request