zeus 0.4.6 → 0.10.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -4
- data/Rakefile +52 -8
- data/bin/zeus +14 -6
- data/build/fsevents-wrapper +0 -0
- data/build/zeus-darwin-amd64 +0 -0
- data/build/zeus-linux-386 +0 -0
- data/build/zeus-linux-amd64 +0 -0
- data/examples/zeus.json +22 -0
- data/ext/fsevents-wrapper/fsevents-wrapper +0 -0
- data/ext/inotify-wrapper/extconf.rb +24 -0
- data/ext/inotify-wrapper/inotify-wrapper.cpp +86 -0
- data/lib/zeus.rb +123 -35
- data/lib/zeus/{server/load_tracking.rb → load_tracking.rb} +1 -3
- data/lib/zeus/rails.rb +141 -0
- data/man/build/zeus +49 -0
- data/man/build/zeus-init +13 -0
- data/man/build/zeus-init.txt +17 -0
- data/man/build/zeus-start +16 -0
- data/man/build/zeus-start.txt +18 -0
- data/man/build/zeus.txt +50 -0
- data/zeus.gemspec +17 -6
- metadata +27 -58
- data/.gitignore +0 -17
- data/.travis.yml +0 -5
- data/.zeus.rb +0 -11
- data/README.md +0 -73
- data/docs/acceptor_registration.md +0 -14
- data/docs/client_server_handshake.md +0 -25
- data/ext/fsevents-wrapper/main.m +0 -118
- data/lib/thrud.rb +0 -97
- data/lib/zeus/cli.rb +0 -80
- data/lib/zeus/client.rb +0 -114
- data/lib/zeus/client/winsize.rb +0 -28
- data/lib/zeus/error_printer.rb +0 -16
- data/lib/zeus/plan.rb +0 -18
- data/lib/zeus/plan/acceptor.rb +0 -38
- data/lib/zeus/plan/node.rb +0 -66
- data/lib/zeus/plan/stage.rb +0 -50
- data/lib/zeus/server.rb +0 -103
- data/lib/zeus/server/acceptor.rb +0 -79
- data/lib/zeus/server/acceptor_registration_monitor.rb +0 -75
- data/lib/zeus/server/client_handler.rb +0 -106
- data/lib/zeus/server/command_runner.rb +0 -70
- data/lib/zeus/server/file_monitor.rb +0 -8
- data/lib/zeus/server/file_monitor/fsevent.rb +0 -102
- data/lib/zeus/server/process_tree_monitor.rb +0 -89
- data/lib/zeus/server/stage.rb +0 -88
- data/lib/zeus/server/stage/error_state.rb +0 -42
- data/lib/zeus/server/stage/feature_notifier.rb +0 -38
- data/lib/zeus/templates/rails.rb +0 -133
- data/lib/zeus/ui.rb +0 -57
- data/lib/zeus/version.rb +0 -3
- data/spec/cli_spec.rb +0 -95
- data/spec/error_printer_spec.rb +0 -27
- data/spec/integration_spec.rb +0 -106
- data/spec/server/file_monitor/fsevent_spec.rb +0 -88
- data/spec/server/load_tracking_spec.rb +0 -67
- data/spec/server/process_tree_monitor_spec.rb +0 -50
- data/spec/spec_helper.rb +0 -38
- data/spec/ui_spec.rb +0 -54
data/man/build/zeus
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "ZEUS" "1" "September 2012" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBzeus\fR \- preload development tasks for slow codebases
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBzeus\fR [\-\-no\-color] COMMAND [ARGS]
|
11
|
+
.
|
12
|
+
.SH "DESCRIPTION"
|
13
|
+
Zeus makes working with large codebases much less painful\.
|
14
|
+
.
|
15
|
+
.P
|
16
|
+
It is primarily targeted at ruby and other dynamic languages, where application boot time can be tens of seconds, but it can be made to work for nearly any language\. However, zeus does not work well with multithreaded applications\. It relies heavily on \fBfork(2)\fR, which is largely incompatible with multithreaded systems\.
|
17
|
+
.
|
18
|
+
.P
|
19
|
+
Zeus lets you define common tasks, and preloads all of them in the background\. When you ask to run them, zeus transparently connects your terminal to the already\-running process in milliseconds\.
|
20
|
+
.
|
21
|
+
.P
|
22
|
+
This lets you, for example, run unit tests in dozens of milliseconds, rather than dozens of seconds\.
|
23
|
+
.
|
24
|
+
.P
|
25
|
+
Zeus also optionally monitors all files loaded by your application, and restarts as much of it as is necessary when a dependency changes\.
|
26
|
+
.
|
27
|
+
.P
|
28
|
+
To use zeus with a Ruby on Rails application, install the gem \'\fBzeus\-rails\fR\'\.
|
29
|
+
.
|
30
|
+
.SH "OPTIONS"
|
31
|
+
.
|
32
|
+
.TP
|
33
|
+
\fB\-\-no\-color\fR
|
34
|
+
Prints all output without color
|
35
|
+
.
|
36
|
+
.SH "BUILTIN COMMANDS"
|
37
|
+
.
|
38
|
+
.TP
|
39
|
+
zeus start(1) \fIzeus\-start\.1\.html\fR
|
40
|
+
Start a zeus server in the current directory using \fBzeus\.json\fR
|
41
|
+
.
|
42
|
+
.TP
|
43
|
+
zeus init(1) \fIzeus\-init\.1\.html\fR
|
44
|
+
Generate a template zeus\.json
|
45
|
+
.
|
46
|
+
.TP
|
47
|
+
\fBzeus commands(1)\fR
|
48
|
+
List the commands defined by zeus\.json
|
49
|
+
|
data/man/build/zeus-init
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "ZEUS\-INIT" "1" "September 2012" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBzeus\-init\fR \- Generate a template zeus\.json
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBzeus init\fR
|
11
|
+
.
|
12
|
+
.SH "DESCRIPTION"
|
13
|
+
Creates a \fBzeus\.json\fR file in the current directory\. This example file is useful for rails applications, but can be modified to suit your needs\.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
ZEUS-INIT(1) ZEUS-INIT(1)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
zeus-init - Generate a template zeus.json
|
7
|
+
|
8
|
+
SYNOPSIS
|
9
|
+
zeus init
|
10
|
+
|
11
|
+
DESCRIPTION
|
12
|
+
Creates a zeus.json file in the current directory. This example file is
|
13
|
+
useful for rails applications, but can be modified to suit your needs.
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
September 2012 ZEUS-INIT(1)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "ZEUS\-START" "1" "September 2012" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBzeus\-start\fR \- Start a zeus server
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBzeus start\fR
|
11
|
+
.
|
12
|
+
.SH "DESCRIPTION"
|
13
|
+
Start a server\.
|
14
|
+
.
|
15
|
+
.P
|
16
|
+
TODO: Better docs\.
|
data/man/build/zeus.txt
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
ZEUS(1) ZEUS(1)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
zeus - preload development tasks for slow codebases
|
7
|
+
|
8
|
+
SYNOPSIS
|
9
|
+
zeus [--no-color] COMMAND [ARGS]
|
10
|
+
|
11
|
+
DESCRIPTION
|
12
|
+
Zeus makes working with large codebases much less painful.
|
13
|
+
|
14
|
+
It is primarily targeted at ruby and other dynamic languages, where
|
15
|
+
application boot time can be tens of seconds, but it can be made to
|
16
|
+
work for nearly any language. However, zeus does not work well with
|
17
|
+
multithreaded applications. It relies heavily on fork(2), which is
|
18
|
+
largely incompatible with multithreaded systems.
|
19
|
+
|
20
|
+
Zeus lets you define common tasks, and preloads all of them in the
|
21
|
+
background. When you ask to run them, zeus transparently connects your
|
22
|
+
terminal to the already-running process in milliseconds.
|
23
|
+
|
24
|
+
This lets you, for example, run unit tests in dozens of milliseconds,
|
25
|
+
rather than dozens of seconds.
|
26
|
+
|
27
|
+
Zeus also optionally monitors all files loaded by your application, and
|
28
|
+
restarts as much of it as is necessary when a dependency changes.
|
29
|
+
|
30
|
+
To use zeus with a Ruby on Rails application, install the gem
|
31
|
+
'zeus-rails'.
|
32
|
+
|
33
|
+
OPTIONS
|
34
|
+
--no-color
|
35
|
+
Prints all output without color
|
36
|
+
|
37
|
+
BUILTIN COMMANDS
|
38
|
+
zeus start(1) zeus-start.1.html
|
39
|
+
Start a zeus server in the current directory using zeus.json
|
40
|
+
|
41
|
+
zeus init(1) zeus-init.1.html
|
42
|
+
Generate a template zeus.json
|
43
|
+
|
44
|
+
zeus commands(1)
|
45
|
+
List the commands defined by zeus.json
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
September 2012 ZEUS(1)
|
data/zeus.gemspec
CHANGED
@@ -1,18 +1,29 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
2
|
+
|
3
|
+
# This preamble is basically used to deal with bundler/gem_tasks, which loads the gemspec
|
4
|
+
# on rake init, even though some prerequisites are not generated until `rake build` is invoked.
|
5
|
+
version = begin
|
6
|
+
require File.expand_path('../lib/zeus/version', __FILE__)
|
7
|
+
Zeus::VERSION
|
8
|
+
rescue LoadError
|
9
|
+
"0.0.0"
|
10
|
+
end
|
11
|
+
|
12
|
+
files = File.exist?('MANIFEST') ? File.read("MANIFEST").lines.map(&:chomp) : []
|
3
13
|
|
4
14
|
Gem::Specification.new do |gem|
|
5
15
|
gem.authors = ["Burke Libbey"]
|
6
16
|
gem.email = ["burke@libbey.me"]
|
7
17
|
gem.description = %q{Boot any rails app in under a second}
|
8
18
|
gem.summary = %q{Zeus is an intelligent preloader for ruby applications. It allows normal development tasks to be run in a fraction of a second.}
|
9
|
-
gem.homepage = "
|
19
|
+
gem.homepage = "http://zeus.is"
|
10
20
|
|
11
|
-
gem.files =
|
12
|
-
gem.
|
13
|
-
gem.
|
21
|
+
gem.files = files
|
22
|
+
gem.extensions = ["ext/inotify-wrapper/extconf.rb"]
|
23
|
+
gem.executables = ['zeus']
|
24
|
+
gem.test_files = []
|
14
25
|
gem.name = "zeus"
|
15
26
|
gem.require_paths = ["lib"]
|
16
|
-
gem.version =
|
27
|
+
gem.version = version
|
17
28
|
gem.license = "MIT"
|
18
29
|
end
|
metadata
CHANGED
@@ -1,71 +1,48 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.10.0.pre
|
5
|
+
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Burke Libbey
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Boot any rails app in under a second
|
15
15
|
email:
|
16
16
|
- burke@libbey.me
|
17
17
|
executables:
|
18
18
|
- zeus
|
19
|
-
extensions:
|
19
|
+
extensions:
|
20
|
+
- ext/inotify-wrapper/extconf.rb
|
20
21
|
extra_rdoc_files: []
|
21
22
|
files:
|
22
|
-
- .gitignore
|
23
|
-
- .travis.yml
|
24
|
-
- .zeus.rb
|
25
|
-
- Gemfile
|
26
|
-
- MIT-LICENSE
|
27
|
-
- README.md
|
28
|
-
- Rakefile
|
29
23
|
- bin/zeus
|
30
|
-
-
|
31
|
-
-
|
24
|
+
- build/fsevents-wrapper
|
25
|
+
- build/zeus-darwin-amd64
|
26
|
+
- build/zeus-linux-386
|
27
|
+
- build/zeus-linux-amd64
|
28
|
+
- examples/zeus.json
|
32
29
|
- ext/fsevents-wrapper/fsevents-wrapper
|
33
|
-
- ext/
|
34
|
-
-
|
30
|
+
- ext/inotify-wrapper/extconf.rb
|
31
|
+
- ext/inotify-wrapper/inotify-wrapper.cpp
|
32
|
+
- Gemfile
|
33
|
+
- lib/zeus/load_tracking.rb
|
34
|
+
- lib/zeus/rails.rb
|
35
35
|
- lib/zeus.rb
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
- lib/zeus/server.rb
|
45
|
-
- lib/zeus/server/acceptor.rb
|
46
|
-
- lib/zeus/server/acceptor_registration_monitor.rb
|
47
|
-
- lib/zeus/server/client_handler.rb
|
48
|
-
- lib/zeus/server/command_runner.rb
|
49
|
-
- lib/zeus/server/file_monitor.rb
|
50
|
-
- lib/zeus/server/file_monitor/fsevent.rb
|
51
|
-
- lib/zeus/server/load_tracking.rb
|
52
|
-
- lib/zeus/server/process_tree_monitor.rb
|
53
|
-
- lib/zeus/server/stage.rb
|
54
|
-
- lib/zeus/server/stage/error_state.rb
|
55
|
-
- lib/zeus/server/stage/feature_notifier.rb
|
56
|
-
- lib/zeus/templates/rails.rb
|
57
|
-
- lib/zeus/ui.rb
|
58
|
-
- lib/zeus/version.rb
|
59
|
-
- spec/cli_spec.rb
|
60
|
-
- spec/error_printer_spec.rb
|
61
|
-
- spec/integration_spec.rb
|
62
|
-
- spec/server/file_monitor/fsevent_spec.rb
|
63
|
-
- spec/server/load_tracking_spec.rb
|
64
|
-
- spec/server/process_tree_monitor_spec.rb
|
65
|
-
- spec/spec_helper.rb
|
66
|
-
- spec/ui_spec.rb
|
36
|
+
- man/build/zeus
|
37
|
+
- man/build/zeus-init
|
38
|
+
- man/build/zeus-init.txt
|
39
|
+
- man/build/zeus-start
|
40
|
+
- man/build/zeus-start.txt
|
41
|
+
- man/build/zeus.txt
|
42
|
+
- MIT-LICENSE
|
43
|
+
- Rakefile
|
67
44
|
- zeus.gemspec
|
68
|
-
homepage:
|
45
|
+
homepage: http://zeus.is
|
69
46
|
licenses:
|
70
47
|
- MIT
|
71
48
|
post_install_message:
|
@@ -81,9 +58,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
59
|
none: false
|
83
60
|
requirements:
|
84
|
-
- - ! '
|
61
|
+
- - ! '>'
|
85
62
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
63
|
+
version: 1.3.1
|
87
64
|
requirements: []
|
88
65
|
rubyforge_project:
|
89
66
|
rubygems_version: 1.8.23
|
@@ -91,12 +68,4 @@ signing_key:
|
|
91
68
|
specification_version: 3
|
92
69
|
summary: Zeus is an intelligent preloader for ruby applications. It allows normal
|
93
70
|
development tasks to be run in a fraction of a second.
|
94
|
-
test_files:
|
95
|
-
- spec/cli_spec.rb
|
96
|
-
- spec/error_printer_spec.rb
|
97
|
-
- spec/integration_spec.rb
|
98
|
-
- spec/server/file_monitor/fsevent_spec.rb
|
99
|
-
- spec/server/load_tracking_spec.rb
|
100
|
-
- spec/server/process_tree_monitor_spec.rb
|
101
|
-
- spec/spec_helper.rb
|
102
|
-
- spec/ui_spec.rb
|
71
|
+
test_files: []
|
data/.gitignore
DELETED
data/.zeus.rb
DELETED
data/README.md
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
# Zeus [![Build Status](https://secure.travis-ci.org/burke/zeus.png?branch=master)](http://travis-ci.org/burke/zeus) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/burke/zeus)
|
2
|
-
|
3
|
-
## What is Zeus?
|
4
|
-
|
5
|
-
Zeus preloads your app so that your normal development tasks such as `console`, `server`, `generate`, and specs/tests take **less than one second**.
|
6
|
-
|
7
|
-
This screencast gives a quick overview of how to use zeus:
|
8
|
-
|
9
|
-
[![Watch the screencast!](http://s3.amazonaws.com/burkelibbey/vimeo-zeus.png)](http://vimeo.com/burkelibbey/zeus)
|
10
|
-
|
11
|
-
## Requirements
|
12
|
-
|
13
|
-
Pretty specific:
|
14
|
-
|
15
|
-
* OS X 10.7+
|
16
|
-
* Ruby 1.9+
|
17
|
-
* Rails 3.0+ (Support for other versions is not difficult and is planned.)
|
18
|
-
* Backported GC from Ruby 2.0.
|
19
|
-
|
20
|
-
You can install the GC-patched ruby from [this gist](https://gist.github.com/1688857) or from RVM. This is 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.
|
21
|
-
|
22
|
-
## Installation
|
23
|
-
|
24
|
-
Install the gem.
|
25
|
-
|
26
|
-
gem install zeus
|
27
|
-
|
28
|
-
Q: "I should put it in my `Gemfile`, right?"
|
29
|
-
|
30
|
-
A: You can, but running `bundle exec zeus` instead of `zeus` can add precious seconds to a command that otherwise would take 200ms. Zeus was built to be run from outside of bundler.
|
31
|
-
|
32
|
-
## Usage
|
33
|
-
|
34
|
-
Start the server:
|
35
|
-
|
36
|
-
zeus start
|
37
|
-
|
38
|
-
Run some commands:
|
39
|
-
|
40
|
-
zeus console
|
41
|
-
zeus server
|
42
|
-
zeus testrb test/unit/widget_test.rb
|
43
|
-
zeus rspec spec/widget_spec.rb
|
44
|
-
zeus generate model omg
|
45
|
-
zeus rake -T
|
46
|
-
zeus runner omg.rb
|
47
|
-
|
48
|
-
## What's coming?
|
49
|
-
|
50
|
-
[See the roadmap](https://github.com/burke/zeus/wiki/Roadmap)
|
51
|
-
|
52
|
-
## Contributing
|
53
|
-
|
54
|
-
Fork, Branch, Pull Request.
|
55
|
-
|
56
|
-
Check [Rails tests](https://github.com/burke/zeus-extended-testcases) if you change something rails related.
|
57
|
-
|
58
|
-
## Thanks...
|
59
|
-
|
60
|
-
* To [Michael Grosser](http://github.com/grosser) for various contributions
|
61
|
-
* To [Stefan Penner](http://github.com/stefanpenner) for discussion and various contributions.
|
62
|
-
* To [Samuel Kadolph](http://github.com/samuelkadolph) for doing most of the cross-process pseudoterminal legwork.
|
63
|
-
* To [Jesse Storimer](http://github.com/jstorimer) for spin, part of the inspiration for this project
|
64
|
-
* To [Shopify](http://github.com/Shopify) for letting me spend (some of) my days working on this.
|
65
|
-
|
66
|
-
## Doesn't work for you?
|
67
|
-
|
68
|
-
Try these libraries instead:
|
69
|
-
|
70
|
-
* [spin](https://github.com/jstorimer/spin)
|
71
|
-
* [spork](https://github.com/sporkrb/spork)
|
72
|
-
* [guard](https://github.com/guard/guard)
|
73
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Acceptor Registration
|
2
|
-
|
3
|
-
When an acceptor is booted, it registers itself with the master process through UNIX Sockets. Specifically, it talks to the `AcceptorRegistrationMonitor`.
|
4
|
-
|
5
|
-
Here's an overview of the registration process:
|
6
|
-
|
7
|
-
1. `AcceptorRegistrationMonitor` creates a socketpair for Acceptor registration (`S_REG`)
|
8
|
-
2. When an `Acceptor` is started, it:
|
9
|
-
1. Creates a new socketpair for communication with the master process (`S_ACC`)
|
10
|
-
2. Sends one side of `S_ACC` over `S_REG` to the master.
|
11
|
-
3. Sends its pid and then a newline character over `S_REG`.
|
12
|
-
3. `AcceptorRegistrationMonitor` receives first the IO and then the pid, and stores them for later reference.
|
13
|
-
|
14
|
-
|