hubeye 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.rb +2 -2
- data/lib/server/hubeye_server.rb +5 -5
- metadata +44 -41
- data/README.md.html +0 -212
data/VERSION.rb
CHANGED
data/lib/server/hubeye_server.rb
CHANGED
@@ -340,8 +340,8 @@ module Server
|
|
340
340
|
|
341
341
|
|
342
342
|
def parse_hook
|
343
|
-
if %r{
|
344
|
-
|
343
|
+
if %r{hook add} =~ @input
|
344
|
+
hook_add()
|
345
345
|
else
|
346
346
|
return
|
347
347
|
end
|
@@ -354,7 +354,7 @@ module Server
|
|
354
354
|
# of array is the local directory for that remote repo, rest are commands
|
355
355
|
# related to hooks called on change of commit message (with plans to change
|
356
356
|
# that to commit SHA reference) of the remote repo
|
357
|
-
def
|
357
|
+
def hook_add
|
358
358
|
@input.gsub!(/diiv/, '/')
|
359
359
|
# make match-$globals parse input
|
360
360
|
@input =~ /add ([^\/]+\/\w+) (dir: (\S*) )?cmd: (.*)\Z/
|
@@ -369,11 +369,11 @@ module Server
|
|
369
369
|
end
|
370
370
|
@socket.puts("Hook added")
|
371
371
|
else
|
372
|
-
@socket.puts("Format: '
|
372
|
+
@socket.puts("Format: 'hook add user/repo [dir: /my/dir/repo ] cmd: git pull origin'")
|
373
373
|
end
|
374
374
|
throw(:next)
|
375
375
|
end
|
376
|
-
private :
|
376
|
+
private :hook_add
|
377
377
|
|
378
378
|
|
379
379
|
def save_hooks_or_repos
|
metadata
CHANGED
@@ -1,79 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubeye
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Luke Gruber
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
date: 2011-09-04 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
15
16
|
name: nokogiri
|
16
|
-
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
19
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
22
24
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
description: Github repository commit watcher -- keep your eye on new commits from
|
26
|
-
multiple repos through an interactive CLI
|
25
|
+
version_requirements: *id001
|
26
|
+
description: Github repository commit watcher -- keep your eye on new commits from multiple repos through an interactive CLI
|
27
27
|
email: luke.gru@gmail.com
|
28
|
-
executables:
|
28
|
+
executables:
|
29
29
|
- hubeye
|
30
30
|
extensions: []
|
31
|
+
|
31
32
|
extra_rdoc_files: []
|
32
|
-
|
33
|
-
|
34
|
-
- lib/client/hubeye_client.rb
|
35
|
-
- lib/notification/growl.rb
|
33
|
+
|
34
|
+
files:
|
36
35
|
- lib/notification/gnomenotify.rb
|
37
36
|
- lib/notification/notification.rb
|
38
|
-
- lib/
|
39
|
-
- lib/
|
37
|
+
- lib/notification/growl.rb
|
38
|
+
- lib/config/parser.rb
|
39
|
+
- lib/helpers/time.rb
|
40
40
|
- lib/hooks/git_hooks.rb
|
41
|
+
- lib/hooks/executer.rb
|
42
|
+
- lib/server/hubeye_server.rb
|
41
43
|
- lib/log/logger.rb
|
42
44
|
- lib/environment.rb
|
43
|
-
- lib/
|
45
|
+
- lib/client/hubeye_client.rb
|
44
46
|
- bin/hubeye
|
45
|
-
-
|
47
|
+
- LICENSE
|
46
48
|
- README.md
|
47
49
|
- VERSION.rb
|
48
|
-
-
|
49
|
-
- test/config_parser.rb
|
50
|
+
- test/notification.rb
|
50
51
|
- test/runner.rb
|
52
|
+
- test/config_parser.rb
|
51
53
|
- test/environment.rb
|
52
|
-
- test/notification.rb
|
53
54
|
homepage:
|
54
|
-
licenses:
|
55
|
+
licenses:
|
55
56
|
- MIT
|
56
57
|
post_install_message:
|
57
58
|
rdoc_options: []
|
58
|
-
|
59
|
+
|
60
|
+
require_paths:
|
59
61
|
- lib
|
60
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
63
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
65
67
|
version: 1.8.7
|
66
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
69
|
none: false
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version:
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
72
74
|
requirements: []
|
75
|
+
|
73
76
|
rubyforge_project:
|
74
77
|
rubygems_version: 1.8.10
|
75
78
|
signing_key:
|
76
79
|
specification_version: 3
|
77
|
-
summary: Github repository commit watcher -- keep your eye on new commits from multiple
|
78
|
-
repos through an interactive CLI
|
80
|
+
summary: Github repository commit watcher -- keep your eye on new commits from multiple repos through an interactive CLI
|
79
81
|
test_files: []
|
82
|
+
|
data/README.md.html
DELETED
@@ -1,212 +0,0 @@
|
|
1
|
-
<h1>Hubeye</h1>
|
2
|
-
|
3
|
-
<p><br />
|
4
|
-
Keep track of repositories on Github, get notified when they change and<br />
|
5
|
-
(optionally) run local system commands when new commits come in to Github.<br />
|
6
|
-
<br /></p>
|
7
|
-
|
8
|
-
<p>Hubeye is composed of a client and server. Once the server is run,<br />
|
9
|
-
you can connect to it via the client. Once connected, you'll be<br />
|
10
|
-
prompted by a '>'. Type the name of a Github repository.</p>
|
11
|
-
|
12
|
-
<p>Example: (what the user enters is preceded by the prompt)</p>
|
13
|
-
|
14
|
-
<pre><code>>hubeye
|
15
|
-
commit 77b82b54044c16751228
|
16
|
-
tree 8ce18af1461b5c741003
|
17
|
-
parent ea63fe317fe58dff1c95
|
18
|
-
log tracking info for repos on client quit => luke-gru
|
19
|
-
</code></pre>
|
20
|
-
|
21
|
-
<p>What you see is the latest commit reference, tree reference and parent<br />
|
22
|
-
commit reference on Github for that repository. Note that the user did<br />
|
23
|
-
not type a username. This is because the user defined a username in his<br />
|
24
|
-
~/.hubeye/hubeyerc file.</p>
|
25
|
-
|
26
|
-
<h2>Starting Hubeye</h2>
|
27
|
-
|
28
|
-
<p>To start the server:</p>
|
29
|
-
|
30
|
-
<pre><code>>hubeye -s
|
31
|
-
</code></pre>
|
32
|
-
|
33
|
-
<p>or just</p>
|
34
|
-
|
35
|
-
<pre><code>>hubeye
|
36
|
-
</code></pre>
|
37
|
-
|
38
|
-
<p>This starts the server as a daemonized process. To run the server in<br />
|
39
|
-
your terminal (on <b>t</b>op):</p>
|
40
|
-
|
41
|
-
<pre><code>>hubeye -st
|
42
|
-
</code></pre>
|
43
|
-
|
44
|
-
<p>Hubeye runs on port 2000 be default. Change the port like this:</p>
|
45
|
-
|
46
|
-
<pre><code>>hubeye -sp 9001
|
47
|
-
</code></pre>
|
48
|
-
|
49
|
-
<p>To connect with the client:</p>
|
50
|
-
|
51
|
-
<pre><code>>hubeye -c
|
52
|
-
</code></pre>
|
53
|
-
|
54
|
-
<p>For more options:</p>
|
55
|
-
|
56
|
-
<pre><code>>hubeye -h
|
57
|
-
</code></pre>
|
58
|
-
|
59
|
-
<h3>~/.hubeye/hubeyerc</h3>
|
60
|
-
|
61
|
-
<pre><code>username: luke-gru
|
62
|
-
</code></pre>
|
63
|
-
|
64
|
-
<p>This allows the user to type a repository name only, and to receive<br />
|
65
|
-
information regarding that <i>username</i>'s repository. The username<br />
|
66
|
-
should be a valid Github username.</p>
|
67
|
-
|
68
|
-
<h3>Keeping track of repositories</h3>
|
69
|
-
|
70
|
-
<p>Hubeye doesn't actually track any repositories unless you disconnect<br />
|
71
|
-
from the server and leave the server running. This can be done by:</p>
|
72
|
-
|
73
|
-
<pre><code>>quit
|
74
|
-
Bye!
|
75
|
-
</code></pre>
|
76
|
-
|
77
|
-
<p>If Hubeye has any repos to watch (track), it will watch Github for changes.<br />
|
78
|
-
It can keep track of as many repos as you want; just keep typing<br />
|
79
|
-
them in. If Hubeye finds a change to a repo, it will notify you of the<br />
|
80
|
-
changes using your Desktop notification system (libnotify, growl). It will<br />
|
81
|
-
also log the changes to your $HOME/.hubeye/log file. If the server is run<br />
|
82
|
-
in a terminal (-t option), the changes will also be logged to the terminal.<br
|
83
|
-
/></p>
|
84
|
-
|
85
|
-
<p>To track your own repository, start the client in the root directory<br />
|
86
|
-
of your local git repo:</p>
|
87
|
-
|
88
|
-
<pre><code>>.
|
89
|
-
</code></pre>
|
90
|
-
|
91
|
-
<p>This only works if a <i>username</i> is added to the hubeyerc, and if the<br />
|
92
|
-
Github repository name is the same as the local root directory name.<br />
|
93
|
-
ie: '.' put in '/home/luke/code/hubeye' would track https://www.github.com/
|
94
|
-
luke-gru/hubeye<br />
|
95
|
-
if <i>username</i> was set to luke-gru.<br /></p>
|
96
|
-
|
97
|
-
<p>You can add another user's repo like this:</p>
|
98
|
-
|
99
|
-
<pre><code>>rails/rails
|
100
|
-
</code></pre>
|
101
|
-
|
102
|
-
<p>This adds https://github.com/rails/rails to the watch list.<br />
|
103
|
-
Hubeye does not remove a repo from the watch list unless explicitly<br />
|
104
|
-
told to do so:</p>
|
105
|
-
|
106
|
-
<pre><code>>rm luke-gru/hubeye
|
107
|
-
</code></pre>
|
108
|
-
|
109
|
-
<p>To see a list of all repos (with recent commit messages) in the watch (track) list:</p>
|
110
|
-
|
111
|
-
<pre><code>>tracking
|
112
|
-
</code></pre>
|
113
|
-
|
114
|
-
<h3>Desktop Notification</h3>
|
115
|
-
|
116
|
-
<p><i>On Linux: install libnotify-bin. On Mac: install growl (if not already installed).<br />
|
117
|
-
The autotest gem is needed for Desktop notification to work in both
|
118
|
-
cases.</i><br /></p>
|
119
|
-
|
120
|
-
<h3>Shutting down and persistence between sessions</h3>
|
121
|
-
|
122
|
-
<pre><code>>shutdown
|
123
|
-
</code></pre>
|
124
|
-
|
125
|
-
<p>Next time you start up the server, the watch list will be empty<br />
|
126
|
-
(and so will the log file). In order to have a default watch list:</p>
|
127
|
-
|
128
|
-
<p><i>~/.hubeye/hubeyerc</i></p>
|
129
|
-
|
130
|
-
<pre><code>track: rails/rails, dchelimsky/rspec
|
131
|
-
</code></pre>
|
132
|
-
|
133
|
-
<p>These will be watched automatically when starting up the server.<br /></p>
|
134
|
-
|
135
|
-
<p>A way to interactively save all currently tracked repositories:</p>
|
136
|
-
|
137
|
-
<pre><code>>save repos as my_work_repos
|
138
|
-
</code></pre>
|
139
|
-
|
140
|
-
<p>And then load any time (even after a shutdown; next session, next week, etc...)</p>
|
141
|
-
|
142
|
-
<pre><code>>load repos my_work_repos
|
143
|
-
</code></pre>
|
144
|
-
|
145
|
-
<h3>Working with hooks</h3>
|
146
|
-
|
147
|
-
<pre><code>>hook add rails/rails dir: /path/to/local/rails cmd: git pull origin master
|
148
|
-
</code></pre>
|
149
|
-
|
150
|
-
<p>When <b>https://www.github.com/rails/rails</b> changes, a process will start,
|
151
|
-
<br />
|
152
|
-
change to the selected directory and execute the command. The <i>(dir: /my/dir)
|
153
|
-
<br />
|
154
|
-
</i> part is optional, and when ignored won't change directories. In this
|
155
|
-
case,
|
156
|
-
<br />
|
157
|
-
the directory will be where the hubeye server was originally
|
158
|
-
started from.<br /></p>
|
159
|
-
|
160
|
-
<p>To see all currently loaded hooks:</p>
|
161
|
-
|
162
|
-
<pre><code>>hook list
|
163
|
-
</code></pre>
|
164
|
-
|
165
|
-
<p>To save all hooks for next sessions (after a server shutdown)</p>
|
166
|
-
|
167
|
-
<pre><code>>save hooks as weekend_projects_hooks
|
168
|
-
</code></pre>
|
169
|
-
|
170
|
-
<p>Then, next weekend:</p>
|
171
|
-
|
172
|
-
<pre><code>>load hooks weekend_projects_hooks
|
173
|
-
</code></pre>
|
174
|
-
|
175
|
-
<p>These hooks, of course, will only really do anything if the repositories they
|
176
|
-
<br />
|
177
|
-
are hooked to are currently being watched. This is not done automatically.</p>
|
178
|
-
|
179
|
-
<h3>All ~/.hubeyerc configurations</h3>
|
180
|
-
|
181
|
-
<p>When the server is started, the options are set here.</p>
|
182
|
-
|
183
|
-
<pre><code>username: luke-gru
|
184
|
-
track: username/reponame, username2/reponame2, myreponame
|
185
|
-
oncearound = 90
|
186
|
-
load hooks: myhook1, myworkhooks
|
187
|
-
load repos: workprojects, funprojects
|
188
|
-
desktop notification: on/off
|
189
|
-
</code></pre>
|
190
|
-
|
191
|
-
<p><i>username</i>: username used for Github URLS when the full path is not
|
192
|
-
given<br />
|
193
|
-
inside of the client.<br /></p>
|
194
|
-
|
195
|
-
<p><i>track</i>: default repositories to watch for changes upon server start<br /></p>
|
196
|
-
|
197
|
-
<p><i>oncearound</i>: number of seconds before completing a check of every repo in<br />
|
198
|
-
the watch list for changes<br /></p>
|
199
|
-
|
200
|
-
<p><i>load hooks</i>: load hooks on server start. To see how to save hooks in the
|
201
|
-
<br />
|
202
|
-
client, see the <i>Working with hooks</i> section<br /></p>
|
203
|
-
|
204
|
-
<p><i>load repos</i>: load repos on server start. To see how to save repos in the
|
205
|
-
<br />
|
206
|
-
client, see the <i>Shutting down and persistence between sessions</i> section.
|
207
|
-
<br /></p>
|
208
|
-
|
209
|
-
<p><i>desktop notification</i>: whether to notify of repo changes using libnotify
|
210
|
-
<br />
|
211
|
-
or growl. This is set to <i>on</i> by default. However, if no notification<br />
|
212
|
-
system is found, it is ignored.</p>
|