GithubHelp home page GithubHelp logo

joshvar88 / zeus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from burke/zeus

0.0 2.0 0.0 1.34 MB

Boot any rails app in under a second.

License: MIT License

Ruby 36.76% Makefile 2.07% Objective-C 2.32% Go 56.36% C++ 2.48%

zeus's Introduction

Zeus

Build Status

Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.

This screencast gives a quick overview of how to use zeus with Rails.

Watch the screencast!

Zeus is also covered in RailsCasts episode 412.

More generally, Zeus is a language-agnostic application checkpointer for non-multithreaded applications. Currently only ruby is targeted, but explicit support for other languages is possible.

Requirements (for use with Rails)

  • OS X 10.7+ OR Linux 2.6.13+
  • Rails 3.x or 4.x
  • Compatible Ruby installation

For Ruby 1.9.3+, GC patches are not actually 100% necessary, especially if you have a lot of memory. Feel free to give it a shot first without, but if you're suddenly out of RAM, switching to the GC-patched Ruby will fix it.

Please note: Zeus requires your project to be running on a file system that supports FSEvents or inotify. This means no NFS, CIFS, Samba, or VBox/VMWare shared folders.

Installation

Install the gem.

gem install zeus

Q: "I should put it in my Gemfile, right?"

A: No. You can, but running bundle exec zeus instead of zeus adds precious seconds to commands that otherwise would be quite a bit faster. Zeus was built to be run from outside of bundler.

IMPORTANT

It is common to see tests running twice when starting out with Zeus. If you see your tests/specs running twice, you should try disabling require 'rspec/autotest' and require 'rspec/autorun' (for RSpec), or require 'minitest/autorun' (for Minitest). (see #134 for more information).

Usage

Start the server:

zeus start

The server will print a list of available commands.

Run some commands in another shell:

zeus console
zeus server
zeus test test/unit/widget_test.rb
zeus test spec/widget_spec.rb
zeus generate model omg
zeus rake -T
zeus runner omg.rb

Limitations

You need to restart zeus if you make changes to various initialization files. Examples of these files include:

  • FactoryGirl factories
  • RSpec support files

Related gems

  • Spork - a DRb server that forks before each run to ensure a clean testing state
  • Commands - a persistent console that runs Rails commands without reloading the env
  • Spring - like Zeus but in pure Ruby, totally automatic, and included in Rails 4.1+.

If you're switching from Spork, be sure to read the wiki page on Spork.

Customizing Zeus Commands

To add/modify commands, see docs/ruby/modifying.md.

Contributing

To get started hacking on Zeus itself, see docs/overview.md.

See also the handy contribution guide at contributing.md.

Rails 2.3 Support

The default plan bundled with zeus only supports Rails 3.x and 4.x. There is a project to provide Rails 2.3 support here, however it has not been updated in some time.

zeus's People

Contributors

burke avatar latortuga avatar turadg avatar antifuchs avatar stefanpenner avatar grosser avatar sideshowcoder avatar sshao avatar e2 avatar mocoso avatar albertyw avatar sevos avatar rcook avatar veloper avatar panthomakos avatar despo avatar bendilley avatar andyw8 avatar andyl avatar swrobel avatar sos4nt avatar stasl avatar squidarth avatar rtlong avatar mikz avatar lastobelus avatar padi avatar jroes avatar jell avatar jasonm avatar

Watchers

Joshva avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.