explorer 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/explorer/cli/process.rb +1 -0
- data/lib/explorer/ipc_client.rb +2 -1
- data/lib/explorer/log_watcher.rb +23 -17
- data/lib/explorer/servers.rb +1 -1
- data/lib/explorer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98c521d0a44b160340aada8309f8dd0d477a5ed1
|
4
|
+
data.tar.gz: 914098ac5bf5a11069543362fa6784cbbb69a283
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea0b143c3fd4db514d9151bdaa3fdf79020169cdd1716c31c518d9ffcd7a77f1dea2f791136dbe5de8e5a50c4afe36b8a54e9df648eceb751dfbc5018888d12a
|
7
|
+
data.tar.gz: 803f6d1d50a28a59fef4e0d485ed7ea7554561db0d54210fdacd2d2a6f8bd6e8d33e22299f8c63afe0ef59ea930444ebf6d4b217d0498d8b3e947b4727d730fd
|
data/README.md
CHANGED
@@ -11,6 +11,16 @@ Install it yourself as:
|
|
11
11
|
|
12
12
|
$ gem install explorer
|
13
13
|
|
14
|
+
`.dev` domain support can be installed with:
|
15
|
+
|
16
|
+
$ explore setup install
|
17
|
+
|
18
|
+
And uninstalled with:
|
19
|
+
|
20
|
+
$ explore setup uninstall
|
21
|
+
|
22
|
+
This will override Invoker or Pow! installation files.
|
23
|
+
|
14
24
|
## Usage
|
15
25
|
|
16
26
|
Run the following command to start up the server
|
data/lib/explorer/cli/process.rb
CHANGED
data/lib/explorer/ipc_client.rb
CHANGED
data/lib/explorer/log_watcher.rb
CHANGED
@@ -1,35 +1,41 @@
|
|
1
|
+
require 'rainbow'
|
2
|
+
|
1
3
|
module Explorer
|
2
4
|
class LogWatcher
|
5
|
+
COLORS = [:red, :green, :yellow, :blue, :magenta, :cyan]
|
6
|
+
include Celluloid
|
7
|
+
|
3
8
|
def initialize
|
4
9
|
@watchers = []
|
5
|
-
@
|
10
|
+
@label_colors = {}
|
6
11
|
end
|
7
12
|
|
8
|
-
# TODO: terminate
|
9
|
-
|
10
13
|
def add(watcher)
|
11
|
-
@
|
12
|
-
@watchers << watcher
|
13
|
-
end
|
14
|
+
@watchers << watcher
|
14
15
|
end
|
15
16
|
|
16
17
|
def remove(watcher)
|
17
|
-
|
18
|
-
|
19
|
-
@watchers.delete watcher
|
20
|
-
end
|
18
|
+
watcher.close unless watcher.closed?
|
19
|
+
@watchers.delete watcher
|
21
20
|
end
|
22
21
|
|
23
22
|
def log(label, line)
|
24
|
-
@
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
23
|
+
@watchers.each do |watcher|
|
24
|
+
begin
|
25
|
+
color = @label_colors[label] ||= next_color
|
26
|
+
watcher.puts Rainbow(label).color(color).bright + " : " + line
|
27
|
+
rescue => e
|
28
|
+
remove(watcher)
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def next_color
|
36
|
+
color = COLORS.shift
|
37
|
+
COLORS.push color
|
38
|
+
color
|
39
|
+
end
|
34
40
|
end
|
35
41
|
end
|
data/lib/explorer/servers.rb
CHANGED
data/lib/explorer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: explorer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Peters
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|