8000 GitHub - mweitzel/firetower-ruby: A firetower host which runs/reruns from within ruby process.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mweitzel/firetower-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

firetower ruby

Run and re-run a ruby script without restarting the process. Plays well with firetower and firetower editor hooks, but neither are required.

Especially useful when the REPL isn't enough, but the config or initialization overhead is high.

Instalation

Clone the repository, add a symlink you'll remember.

git clone https://github.com/mweitzel/firetower-ruby ~/projects/firetower-ruby
ln -s ~/projects/firetower-ruby/firetower.rb ~/bin/firetower.rb

Usage

Preface your script with the path to firetower.rb

ruby ~/bin/firetower.rb my-script.rb

Re-load the script with ^R (control-r), or with firetower editor hooks

Exit with ^C (control-c)

Example Usage in Rails

rails runner ~/bin/firetower.rb my-script.rb

This will load the rails config, then load and run my-script.rb. Unlike Zeus or Spring, only the specified file will be reloaded.

Keep in mind

Continually reloading a file in Ruby does not clear variables and functions which were previous defined in the file

About

A firetower host which runs/reruns from within ruby process.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0