hubeye 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md.html ADDED
@@ -0,0 +1,212 @@
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>&gt;hubeye
15
+ commit 77b82b54044c16751228
16
+ tree 8ce18af1461b5c741003
17
+ parent ea63fe317fe58dff1c95
18
+ log tracking info for repos on client quit =&gt; 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>&gt;hubeye -s
31
+ </code></pre>
32
+
33
+ <p>or just</p>
34
+
35
+ <pre><code>&gt;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>&gt;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>&gt;hubeye -sp 9001
47
+ </code></pre>
48
+
49
+ <p>To connect with the client:</p>
50
+
51
+ <pre><code>&gt;hubeye -c
52
+ </code></pre>
53
+
54
+ <p>For more options:</p>
55
+
56
+ <pre><code>&gt;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>&gt;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>&gt;.
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>&gt;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>&gt;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>&gt;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>&gt;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>&gt;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>&gt;load repos my_work_repos
143
+ </code></pre>
144
+
145
+ <h3>Working with hooks</h3>
146
+
147
+ <pre><code>&gt;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>&gt;hook list
163
+ </code></pre>
164
+
165
+ <p>To save all hooks for next sessions (after a server shutdown)</p>
166
+
167
+ <pre><code>&gt;save hooks as weekend_projects_hooks
168
+ </code></pre>
169
+
170
+ <p>Then, next weekend:</p>
171
+
172
+ <pre><code>&gt;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>
data/VERSION.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Hubeye
2
- # 0.0.3 since sept.4 2011
3
- VERSION = [0,0,3]
2
+ # 0.0.4 since sept.5 2011
3
+ VERSION = [0,0,4]
4
4
  end
5
5
 
Binary file
data/tasks/install.rb ADDED
@@ -0,0 +1,36 @@
1
+ task :install => :chmod do
2
+ puts "Done"
3
+ end
4
+
5
+ task :chmod => :config_file do
6
+ binfile = File.join(File.expand_path(File.dirname(__FILE__) + '/..'), "/bin/hubeye")
7
+ chmod 0777, binfile unless File.executable?(binfile)
8
+ end
9
+
10
+ task :config_file do
11
+ config_file = File.join(ENV['HOME'], "/.hubeye/hubeyerc")
12
+ touch config_file unless File.exists? config_file
13
+ end
14
+
15
+ task :config_file => :makelog
16
+
17
+ task :makelog => :message do
18
+ hubeye_dir = ENV['HOME'] + "/.hubeye"
19
+ mkdir(hubeye_dir) unless File.exists?(hubeye_dir)
20
+
21
+ hooks_dir = hubeye_dir + "/hooks"
22
+ mkdir(hooks_dir) unless File.exists?(hooks_dir)
23
+
24
+ repos_dir = hubeye_dir + "/repos"
25
+ mkdir(repos_dir) unless File.exists?(repos_dir)
26
+
27
+ hubeye_log_file = File.join(ENV['HOME'], "/.hubeye/log")
28
+ touch hubeye_log_file unless File.exists?(hubeye_log_file)
29
+ end
30
+
31
+
32
+
33
+ task :message do
34
+ puts "Installing Hubeye..."
35
+ end
36
+
metadata CHANGED
@@ -1,82 +1,81 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hubeye
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
4
5
  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
- date: 2011-09-04 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-09-05 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: nokogiri
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &71785010 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
24
22
  type: :runtime
25
- version_requirements: *id001
26
- description: Github repository commit watcher -- keep your eye on new commits from multiple repos through an interactive CLI
23
+ prerelease: false
24
+ version_requirements: *71785010
25
+ description: Github repository commit watcher -- keep your eye on new commits from
26
+ multiple repos through an interactive CLI
27
27
  email: luke.gru@gmail.com
28
- executables:
28
+ executables:
29
29
  - hubeye
30
30
  extensions: []
31
-
32
31
  extra_rdoc_files: []
33
-
34
- files:
32
+ files:
33
+ - lib/config/parser.rb
34
+ - lib/client/hubeye_client.rb
35
+ - lib/notification/growl.rb
35
36
  - lib/notification/gnomenotify.rb
36
37
  - lib/notification/notification.rb
37
- - lib/notification/growl.rb
38
- - lib/config/parser.rb
39
- - lib/helpers/time.rb
40
- - lib/hooks/git_hooks.rb
41
- - lib/hooks/executer.rb
42
38
  - lib/server/hubeye_server.rb
39
+ - lib/hooks/executer.rb
40
+ - lib/hooks/git_hooks.rb
43
41
  - lib/log/logger.rb
44
42
  - lib/environment.rb
45
- - lib/client/hubeye_client.rb
43
+ - lib/helpers/time.rb
46
44
  - bin/hubeye
47
- - LICENSE
45
+ - README.md.html
48
46
  - README.md
49
47
  - VERSION.rb
50
- - test/notification.rb
51
- - test/runner.rb
48
+ - LICENSE
52
49
  - test/config_parser.rb
50
+ - test/runner.rb
53
51
  - test/environment.rb
52
+ - test/notification.rb
53
+ - images/change_icon.jpg
54
+ - tasks/install.rb
54
55
  homepage:
55
- licenses:
56
+ licenses:
56
57
  - MIT
57
58
  post_install_message:
58
59
  rdoc_options: []
59
-
60
- require_paths:
60
+ require_paths:
61
61
  - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
63
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
67
  version: 1.8.7
68
- required_rubygems_version: !ruby/object:Gem::Requirement
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: "0"
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
74
  requirements: []
75
-
76
75
  rubyforge_project:
77
76
  rubygems_version: 1.8.10
78
77
  signing_key:
79
78
  specification_version: 3
80
- summary: Github repository commit watcher -- keep your eye on new commits from multiple repos through an interactive CLI
79
+ summary: Github repository commit watcher -- keep your eye on new commits from multiple
80
+ repos through an interactive CLI
81
81
  test_files: []
82
-