watch_tower 0.0.0.1 → 0.0.1.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. data/.todo +3 -0
  2. data/.travis.yml +4 -0
  3. data/Gemfile +0 -4
  4. data/README.md +48 -2
  5. data/TODO +3 -0
  6. data/ci/travis.rb +4 -1
  7. data/lib/watch_tower/appscript.rb +65 -7
  8. data/lib/watch_tower/cli/install.rb +27 -3
  9. data/lib/watch_tower/cli/open.rb +2 -0
  10. data/lib/watch_tower/cli/start.rb +3 -1
  11. data/lib/watch_tower/cli.rb +2 -0
  12. data/lib/watch_tower/config.rb +2 -0
  13. data/lib/watch_tower/core_ext.rb +2 -0
  14. data/lib/watch_tower/editor/base_appscript.rb +28 -1
  15. data/lib/watch_tower/editor/base_ps.rb +25 -0
  16. data/lib/watch_tower/editor/textmate.rb +2 -0
  17. data/lib/watch_tower/editor/xcode.rb +2 -0
  18. data/lib/watch_tower/editor.rb +2 -0
  19. data/lib/watch_tower/errors.rb +2 -0
  20. data/lib/watch_tower/eye.rb +13 -2
  21. data/lib/watch_tower/file_tree.rb +78 -0
  22. data/lib/watch_tower/project/any_based.rb +2 -0
  23. data/lib/watch_tower/project/git_based.rb +2 -0
  24. data/lib/watch_tower/project/init.rb +2 -0
  25. data/lib/watch_tower/project/path_based.rb +2 -0
  26. data/lib/watch_tower/project.rb +2 -0
  27. data/lib/watch_tower/server/app.rb +37 -7
  28. data/lib/watch_tower/server/assets/javascripts/application.js +4 -0
  29. data/lib/watch_tower/server/assets/javascripts/datepicker.coffee +21 -0
  30. data/lib/watch_tower/server/assets/javascripts/file_tree.coffee +30 -0
  31. data/lib/watch_tower/server/assets/javascripts/percentage.coffee +15 -5
  32. data/lib/watch_tower/server/assets/stylesheets/application.css +1 -0
  33. data/lib/watch_tower/server/assets/stylesheets/date.sass +17 -0
  34. data/lib/watch_tower/server/assets/stylesheets/file_tree.sass +42 -0
  35. data/lib/watch_tower/server/assets/stylesheets/global.sass +7 -4
  36. data/lib/watch_tower/server/configurations/asset.rb +2 -0
  37. data/lib/watch_tower/server/configurations.rb +2 -0
  38. data/lib/watch_tower/server/database.rb +2 -0
  39. data/lib/watch_tower/server/db/migrate/001_create_projects.rb +2 -0
  40. data/lib/watch_tower/server/db/migrate/002_create_files.rb +2 -0
  41. data/lib/watch_tower/server/db/migrate/003_create_time_entries.rb +2 -0
  42. data/lib/watch_tower/server/db/migrate/004_create_durations.rb +2 -0
  43. data/lib/watch_tower/server/db/migrate/005_add_hash_to_time_entries.rb +2 -0
  44. data/lib/watch_tower/server/db/migrate/006_add_hash_to_files.rb +2 -0
  45. data/lib/watch_tower/server/db/migrate/007_add_editor_to_times_entries.rb +8 -0
  46. data/lib/watch_tower/server/db/migrate/008_rename_editor_to_editor_name_in_times_entries.rb +5 -0
  47. data/lib/watch_tower/server/db/migrate/009_remove_editor_index_from_time_entries.rb +7 -0
  48. data/lib/watch_tower/server/db/migrate/010_add_editor_version_to_times_entries.rb +7 -0
  49. data/lib/watch_tower/server/helpers/asset.rb +2 -0
  50. data/lib/watch_tower/server/helpers/improved_partials.rb +2 -0
  51. data/lib/watch_tower/server/helpers/presenters.rb +33 -0
  52. data/lib/watch_tower/server/helpers.rb +3 -0
  53. data/lib/watch_tower/server/models/duration.rb +9 -0
  54. data/lib/watch_tower/server/models/file.rb +17 -0
  55. data/lib/watch_tower/server/models/project.rb +30 -0
  56. data/lib/watch_tower/server/models/time_entry.rb +5 -0
  57. data/lib/watch_tower/server/presenters/application_presenter.rb +165 -0
  58. data/lib/watch_tower/server/presenters/file_presenter.rb +10 -0
  59. data/lib/watch_tower/server/presenters/project_presenter.rb +20 -0
  60. data/lib/watch_tower/server/presenters.rb +13 -0
  61. data/lib/watch_tower/server/public/assets/{WatchTower-4d6de11e1bd34165ad91ac46fb711bf3.jpg → WatchTower-58eff0713efffbc6054defddc879e0b1.jpg} +0 -0
  62. data/lib/watch_tower/server/public/assets/application-4e6971066e06aa53b0c8e52c764044d1.css +389 -0
  63. data/lib/watch_tower/server/public/assets/application-6a1be75d4fd6a545faceb638e47a2486.js +23778 -0
  64. data/lib/watch_tower/server/public/assets/calendar-379834cd6e6321a940b662ace47f3032.gif +0 -0
  65. data/lib/watch_tower/server/public/assets/calendar-blue-d6aa74feef7ee4287532761db99a6c0a.gif +0 -0
  66. data/lib/watch_tower/server/public/assets/calendar-green-3752fe2996091379c8d321f759039385.gif +0 -0
  67. data/lib/watch_tower/server/public/assets/jquery.datepick-9c8dfe3a4d40bcafc7b182e194c13836.css +227 -0
  68. data/lib/watch_tower/server/public/assets/{percentage-d8589e21a5fc85d32a445f531ff8ab95.png → percentage-d0176e99520c95e93eee63738ef5d487.png} +0 -0
  69. data/lib/watch_tower/server/vendor/assets/images/calendar-blue.gif +0 -0
  70. data/lib/watch_tower/server/vendor/assets/images/calendar-green.gif +0 -0
  71. data/lib/watch_tower/server/vendor/assets/images/calendar.gif +0 -0
  72. data/lib/watch_tower/server/vendor/assets/javascripts/jquery-datepick-ext.js +266 -0
  73. data/lib/watch_tower/server/vendor/assets/javascripts/jquery-datepick-validation.js +232 -0
  74. data/lib/watch_tower/server/vendor/assets/javascripts/jquery-datepick.js +2092 -0
  75. data/lib/watch_tower/server/vendor/assets/stylesheets/jquery.datepick.css +226 -0
  76. data/lib/watch_tower/server/views/_project.haml +10 -13
  77. data/lib/watch_tower/server/views/index.haml +9 -6
  78. data/lib/watch_tower/server/views/layout.haml +7 -4
  79. data/lib/watch_tower/server/views/project.haml +9 -11
  80. data/lib/watch_tower/server.rb +8 -1
  81. data/lib/watch_tower/templates/{watchtower.plist → watchtower.plist.erb} +5 -6
  82. data/lib/watch_tower/version.rb +12 -3
  83. data/lib/watch_tower.rb +20 -1
  84. data/spec/factories.rb +2 -0
  85. data/spec/watch_tower/appscript_spec.rb +36 -2
  86. data/spec/watch_tower/editor/base_appscript_spec.rb +83 -0
  87. data/spec/watch_tower/editor/textmate_spec.rb +37 -0
  88. data/spec/watch_tower/editor/xcode_spec.rb +6 -0
  89. data/spec/watch_tower/eye_spec.rb +21 -0
  90. data/spec/watch_tower/file_tree_spec.rb +156 -0
  91. data/spec/watch_tower/server/app_spec.rb +64 -20
  92. data/spec/watch_tower/server/models/file_spec.rb +93 -31
  93. data/spec/watch_tower/server/models/project_spec.rb +147 -18
  94. data/spec/watch_tower/server/models/time_entry_spec.rb +10 -0
  95. data/spec/watch_tower/server/{decorator/project_decorator_spec.rb → presenters/application_presenter_spec.rb} +24 -13
  96. data/spec/watch_tower/server/presenters/file_presenter_spec.rb +8 -0
  97. data/spec/watch_tower/server/presenters/project_presenter_spec.rb +130 -0
  98. data/watch_tower.gemspec +10 -4
  99. metadata +114 -74
  100. data/lib/watch_tower/server/decorator/application_decorator.rb +0 -91
  101. data/lib/watch_tower/server/decorator/file_decorator.rb +0 -38
  102. data/lib/watch_tower/server/decorator/project_decorator.rb +0 -51
  103. data/lib/watch_tower/server/decorator.rb +0 -21
  104. data/lib/watch_tower/server/public/assets/application-7829b53b5ece1a16d22dc3d00f329023.css +0 -107
  105. data/lib/watch_tower/server/public/assets/application-e0e6b7731aade460f680331e65cf0682.js +0 -9359
  106. data/lib/watch_tower/server/views/_file.haml +0 -9
@@ -0,0 +1,389 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ */
6
+ /* Default styling for jQuery Datepicker v4.0.6. */
7
+
8
+ .datepick {
9
+ background-color: #fff;
10
+ color: #000;
11
+ border: 1px solid #444;
12
+ border-radius: 0.25em;
13
+ -moz-border-radius: 0.25em;
14
+ -webkit-border-radius: 0.25em;
15
+ font-family: Arial,Helvetica,Sans-serif;
16
+ font-size: 90%;
17
+ }
18
+ .datepick-rtl {
19
+ direction: rtl;
20
+ }
21
+ .datepick-popup {
22
+ z-index: 1000;
23
+ }
24
+ .datepick-disable {
25
+ position: absolute;
26
+ z-index: 100;
27
+ background-color: white;
28
+ opacity: 0.5;
29
+ filter: alpha(opacity=50);
30
+ }
31
+ .datepick a {
32
+ color: #fff;
33
+ text-decoration: none;
34
+ }
35
+ .datepick a.datepick-disabled {
36
+ color: #888;
37
+ cursor: auto;
38
+ }
39
+ .datepick button {
40
+ margin: 0.25em;
41
+ padding: 0.125em 0em;
42
+ background-color: #fcc;
43
+ border: none;
44
+ border-radius: 0.25em;
45
+ -moz-border-radius: 0.25em;
46
+ -webkit-border-radius: 0.25em;
47
+ font-weight: bold;
48
+ }
49
+ .datepick-nav, .datepick-ctrl {
50
+ float: left;
51
+ width: 100%;
52
+ background-color: #000;
53
+ color: #fff;
54
+ font-size: 90%;
55
+ font-weight: bold;
56
+ }
57
+ .datepick-ctrl {
58
+ background-color: #600;
59
+ }
60
+ .datepick-cmd {
61
+ width: 30%;
62
+ }
63
+ .datepick-cmd:hover {
64
+ background-color: #777;
65
+ }
66
+ .datepick-ctrl .datepick-cmd:hover {
67
+ background-color: #f08080;
68
+ }
69
+ .datepick-cmd-prevJump, .datepick-cmd-nextJump {
70
+ width: 8%;
71
+ }
72
+ a.datepick-cmd {
73
+ height: 1.5em;
74
+ }
75
+ button.datepick-cmd {
76
+ text-align: center;
77
+ }
78
+ .datepick-cmd-prev, .datepick-cmd-prevJump, .datepick-cmd-clear {
79
+ float: left;
80
+ padding-left: 2%;
81
+ }
82
+ .datepick-cmd-current, .datepick-cmd-today {
83
+ float: left;
84
+ width: 35%;
85
+ text-align: center;
86
+ }
87
+ .datepick-cmd-next, .datepick-cmd-nextJump, .datepick-cmd-close {
88
+ float: right;
89
+ padding-right: 2%;
90
+ text-align: right;
91
+ }
92
+ .datepick-rtl .datepick-cmd-prev, .datepick-rtl .datepick-cmd-prevJump,
93
+ .datepick-rtl .datepick-cmd-clear {
94
+ float: right;
95
+ padding-left: 0%;
96
+ padding-right: 2%;
97
+ text-align: right;
98
+ }
99
+ .datepick-rtl .datepick-cmd-current, .datepick-rtl .datepick-cmd-today {
100
+ float: right;
101
+ }
102
+ .datepick-rtl .datepick-cmd-next, .datepick-rtl .datepick-cmd-nextJump,
103
+ .datepick-rtl .datepick-cmd-close {
104
+ float: left;
105
+ padding-left: 2%;
106
+ padding-right: 0%;
107
+ text-align: left;
108
+ }
109
+ .datepick-month-nav {
110
+ float: left;
111
+ background-color: #777;
112
+ text-align: center;
113
+ }
114
+ .datepick-month-nav div {
115
+ float: left;
116
+ width: 12.5%;
117
+ margin: 1%;
118
+ padding: 1%;
119
+ }
120
+ .datepick-month-nav span {
121
+ color: #888;
122
+ }
123
+ .datepick-month-row {
124
+ clear: left;
125
+ }
126
+ .datepick-month {
127
+ float: left;
128
+ width: 15em;
129
+ border: 1px solid #444;
130
+ text-align: center;
131
+ }
132
+ .datepick-month-header, .datepick-month-header select, .datepick-month-header input {
133
+ height: 1.5em;
134
+ background-color: #444;
135
+ color: #fff;
136
+ font-weight: bold;
137
+ }
138
+ .datepick-month-header select, .datepick-month-header input {
139
+ height: 1.4em;
140
+ border: none;
141
+ }
142
+ .datepick-month-header input {
143
+ position: absolute;
144
+ display: none;
145
+ }
146
+ .datepick-month table {
147
+ width: 100%;
148
+ border-collapse: collapse;
149
+ }
150
+ .datepick-month thead {
151
+ border-bottom: 1px solid #aaa;
152
+ }
153
+ .datepick-month th, .datepick-month td {
154
+ margin: 0em;
155
+ padding: 0em;
156
+ font-weight: normal;
157
+ text-align: center;
158
+ }
159
+ .datepick-month th {
160
+ border: 1px solid #777;
161
+ }
162
+ .datepick-month th, .datepick-month th a {
163
+ background-color: #777;
164
+ color: #fff;
165
+ }
166
+ .datepick-month td {
167
+ background-color: #eee;
168
+ border: 1px solid #aaa;
169
+ }
170
+ .datepick-month td.datepick-week {
171
+ border: 1px solid #777;
172
+ }
173
+ .datepick-month td.datepick-week * {
174
+ background-color: #777;
175
+ color: #fff;
176
+ border: none;
177
+ }
178
+ .datepick-month a {
179
+ display: block;
180
+ width: 100%;
181
+ padding: 0.125em 0em;
182
+ background-color: #eee;
183
+ color: #000;
184
+ text-decoration: none;
185
+ }
186
+ .datepick-month span {
187
+ display: block;
188
+ width: 100%;
189
+ padding: 0.125em 0em;
190
+ }
191
+ .datepick-month td span {
192
+ color: #888;
193
+ }
194
+ .datepick-month td .datepick-other-month {
195
+ background-color: #fff;
196
+ }
197
+ .datepick-month td .datepick-weekend {
198
+ background-color: #ddd;
199
+ }
200
+ .datepick-month td .datepick-today {
201
+ background-color: #f0c0c0;
202
+ }
203
+ .datepick-month td .datepick-highlight {
204
+ background-color: #f08080;
205
+ }
206
+ .datepick-month td .datepick-selected {
207
+ background-color: #777;
208
+ color: #fff;
209
+ }
210
+ .datepick-month th.datepick-week {
211
+ background-color: #777;
212
+ color: #fff;
213
+ }
214
+ .datepick-status {
215
+ clear: both;
216
+ background-color: #ddd;
217
+ text-align: center;
218
+ }
219
+ .datepick-clear-fix {
220
+ clear: both;
221
+ }
222
+ .datepick-cover {
223
+ display: none;
224
+ display/**/: block;
225
+ position: absolute;
226
+ z-index: -1;
227
+ filter: mask();
228
+ top: -1px;
229
+ left: -1px;
230
+ width: 100px;
231
+ height: 100px;
232
+ }
233
+ aside#date {
234
+ float: right;
235
+ width: 200px;
236
+ height: 30px;
237
+ padding: 1px;
238
+ border: 1px solid #cdcdcd;
239
+ -webkit-border-radius: 5px;
240
+ -moz-border-radius: 5px;
241
+ border-radius: 5px; }
242
+ aside#date:hover {
243
+ border: 1px solid #aaaaaa; }
244
+ aside#date input {
245
+ border: none;
246
+ width: 201px;
247
+ height: 21px; }
248
+ .file_tree {
249
+ background: #f7f7f7;
250
+ padding: 10px;
251
+ min-height: 16px;
252
+ border: 1px solid #cdcdcd;
253
+ -webkit-border-radius: 5px;
254
+ -moz-border-radius: 5px;
255
+ border-radius: 5px; }
256
+ .file_tree .collapsed, .file_tree .expanded {
257
+ float: left;
258
+ text-align: center;
259
+ width: 10px;
260
+ height: 9px;
261
+ margin-right: 10px;
262
+ background: white;
263
+ padding: 0 3px 7px 3px;
264
+ -webkit-border-radius: 29px;
265
+ -moz-border-radius: 29px;
266
+ border-radius: 29px; }
267
+ .file_tree .collapsed:hover, .file_tree .expanded:hover {
268
+ background: #5d4bff;
269
+ color: white;
270
+ cursor: pointer; }
271
+ .file_tree .name {
272
+ float: left; }
273
+ .file_tree .path {
274
+ float: left;
275
+ width: auto !important; }
276
+ .file_tree .elapsed_time {
277
+ float: right; }
278
+ .file_tree .files {
279
+ display: none;
280
+ list-style: none;
281
+ margin: 0; }
282
+ .file_tree .nested_folder {
283
+ display: none; }
284
+ .file_tree .nested_folder {
285
+ margin-left: 15px; }
286
+ h1 {
287
+ font-size: 2em; }
288
+
289
+ h2 {
290
+ font-size: 1em; }
291
+
292
+ #logo a {
293
+ color: black;
294
+ text-decoration: none;
295
+ display: block;
296
+ background: url("WatchTower-58eff0713efffbc6054defddc879e0b1.jpg") no-repeat;
297
+ width: 390px;
298
+ height: 94px; }
299
+ #logo a:visited, #logo a:hover {
300
+ text-decoration: none; }
301
+ #logo h1 {
302
+ float: left;
303
+ margin-top: 30px;
304
+ margin-left: 180px; }
305
+
306
+ .clearfix {
307
+ clear: both; }
308
+
309
+ a {
310
+ color: +#b36c6c;
311
+ text-decoration: none; }
312
+ a:hover, a:visited {
313
+ text-decoration: none; }
314
+
315
+ body {
316
+ background: #f7f7f7;
317
+ color: black;
318
+ font-family: Arial, Helvetica, sans-serif; }
319
+ body #wrapper {
320
+ width: 960px;
321
+ margin: 0 auto; }
322
+ body #wrapper #main {
323
+ border: 1px solid #cdcdcd;
324
+ -webkit-border-radius: 5px 5px 0 0;
325
+ -moz-border-radius: 5px 5px 0 0;
326
+ border-radius: 5px 5px 0 0;
327
+ padding: 10px;
328
+ min-height: 200px;
329
+ background: white; }
330
+ body #wrapper #main .page {
331
+ padding: 40px 0 0; }
332
+ body #wrapper #footer {
333
+ width: 960px;
334
+ text-align: center;
335
+ background: #d6afaf;
336
+ color: black;
337
+ padding: 5px 0;
338
+ font-size: 12px; }
339
+ body #wrapper #footer a {
340
+ color: black;
341
+ text-decoration: none; }
342
+ body #wrapper #footer a:visited, body #wrapper #footer a:hover {
343
+ text-decoration: none; }
344
+ #projects header .name {
345
+ float: left;
346
+ width: 200px;
347
+ font-size: 20px;
348
+ text-decoration: underline; }
349
+ #projects header .percentage {
350
+ width: 310px;
351
+ float: left;
352
+ font-size: 20px;
353
+ text-decoration: underline; }
354
+ #projects header .percentage .percentage_img {
355
+ height: 20px; }
356
+ #projects header .elapsed {
357
+ float: left;
358
+ font-size: 20px;
359
+ text-decoration: underline; }
360
+ #projects .project .name {
361
+ float: left;
362
+ width: 200px; }
363
+ #projects .project .percentage_img_container {
364
+ width: 310px;
365
+ float: left; }
366
+ #projects .project .percentage_img_container .percentage_img {
367
+ height: 20px; }
368
+ #projects .project .elapsed {
369
+ float: left; }
370
+
371
+ #project #files header .path {
372
+ font-size: 20px;
373
+ text-decoration: underline;
374
+ float: left;
375
+ width: 600px; }
376
+ #project #files header .elapsed {
377
+ font-size: 20px;
378
+ text-decoration: underline;
379
+ float: left; }
380
+ #project .path {
381
+ float: left;
382
+ width: 600px; }
383
+ #project .elapsed {
384
+ float: left; }
385
+ #project .percentage_img_container {
386
+ width: 310px;
387
+ float: left; }
388
+ #project .percentage_img_container .percentage_img {
389
+ height: 20px; }