Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
Tree: d4e930a870

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
README.markdown
turbomode.gemspec

README.markdown

What's this?

Turbo mode makes reloading code fast and easy.

Usage

  1. To reload, Ctrl+\ (or kill -SIGQUIT child_pid)
  2. Note that 'exit' doesn't quite work at the moment. Use Ctrl+C to exit.
  3. To see the list of files that aren't reloadable: puts $SHARED_FEATURES.sort

Setup

Rails

  1. TURBO_MODE=true script/console
    • Files loaded before route initialization won't be reloadable: (e.g. Gemfile, initializers, and any app files referenced during startup)
    • Files not yet loaded will be reloadable (most models, views, and controllers)

Not Rails

   # a bunch of code that won't be reloadable

  TurboMode.enable! do
    # after_fork hooks:
    # ActiveRecord::Base.clear_all_connections!
  end

  # a bunch of code that will be reloadable

Configuration

  1. ENV['TURBO_SIGNAL'] - The signal used to request reloads. e.g. TURBO_SIGNAL=HUP

Things it breaks

  1. SIGQUIT is captured. This breaks the exit method, but provides the reload shortcut Ctrl+\
  2. Let's find out.
Something went wrong with that request. Please try again.