cline 0.3.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/README.md +77 -42
- data/bin/cline +7 -13
- data/cline.gemspec +32 -20
- data/lib/cline.rb +60 -38
- data/lib/cline/client.rb +28 -0
- data/lib/cline/collectors.rb +7 -3
- data/lib/cline/collectors/feed.rb +28 -22
- data/lib/cline/command.rb +93 -17
- data/lib/cline/configure.rb +4 -2
- data/lib/cline/monkey.rb +7 -0
- data/lib/cline/notification.rb +12 -12
- data/lib/cline/notify_io.rb +24 -0
- data/lib/cline/scheduled_job.rb +26 -0
- data/lib/cline/server.rb +102 -0
- data/lib/cline/version.rb +1 -1
- data/spec/lib/notification_spec.rb +7 -15
- data/spec/lib/server_spec.rb +22 -0
- data/spec/spec_helper.rb +3 -3
- data/spec/support/example_group_helper.rb +8 -0
- metadata +65 -93
- data/lib/cline/out_streams.rb +0 -34
data/lib/cline/out_streams.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
require 'notify'
|
4
|
-
|
5
|
-
module Cline::OutStreams
|
6
|
-
def self.const_missing(name)
|
7
|
-
case name
|
8
|
-
when :WithGrowl
|
9
|
-
WithNotify
|
10
|
-
else
|
11
|
-
super
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
class WithNotify
|
16
|
-
attr_reader:stream
|
17
|
-
|
18
|
-
def initialize(stream = $stdout)
|
19
|
-
@stream = stream
|
20
|
-
end
|
21
|
-
|
22
|
-
def puts(str)
|
23
|
-
puts_stream str
|
24
|
-
|
25
|
-
Notify.notify '', str
|
26
|
-
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
|
-
def puts_stream(str)
|
31
|
-
stream.puts str
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|