gitoe 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd353bb620692d7931c95fbb0366c0d7bbc5b97b
4
- data.tar.gz: 6ca8600540cc942b042f01026d6b1dd0eef5de3e
3
+ metadata.gz: 9cd8e211e54d2e535132c5285ff672eea4e787bb
4
+ data.tar.gz: 379eef1455b57234941a4af6ff15f8eba8d4cb2d
5
5
  SHA512:
6
- metadata.gz: 575750976f459a8a4ed8934673b1ce143eb85fa29559a98b37ce2a7245cb78498bca2743dd8c278f6174ad0f6db59bd4bad826a829446c9c81eaf2030be2794c
7
- data.tar.gz: febe71ce3581f012e283c8b4882e84b97a4cfee96442aafec73ae81d75fb0dd9a9c6516fcad07275b52d1bf52862049df4f0ac47473535e86f352784df04f94a
6
+ metadata.gz: 91822f7bf98ddec4de8ee0e808014e78e5af75611ece844eda46fa0c6bd77d36e7a0bc72fa333cd7a70ab14f5782ebd7f108d0db73ff08559a2d22fb68d35754
7
+ data.tar.gz: aee445070c39568999bdcdab8ab30ebee87fb6689090d60d2c9c1a17e95ac841b73f60414b9e0412895cea35f6e1c121f6c66283a71bdc74b37c9dcb642968c9
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  # XXX a working version over https://github.com/guard/guard-nanoc.git
4
- gem "guard-nanoc", :git => "https://github.com/nanoc/guard-nanoc.git"
4
+ # gem "guard-nanoc", :git => "https://github.com/nanoc/guard-nanoc.git"
5
5
 
6
6
  # Specify your gem's dependencies in gitoe.gemspec
7
7
  gemspec
data/Gemfile.lock CHANGED
@@ -1,9 +1,3 @@
1
- GIT
2
- remote: https://github.com/nanoc/guard-nanoc.git
3
- revision: ab6d3a3f19b73b37b1cff8e12bfae527bf63c98b
4
- specs:
5
- guard-nanoc (1.0.0b1)
6
-
7
1
  PATH
8
2
  remote: .
9
3
  specs:
@@ -38,19 +32,22 @@ GEM
38
32
  lumberjack (>= 1.0.2)
39
33
  pry (>= 0.9.10)
40
34
  thor (>= 0.14.6)
41
- haml (4.0.2)
35
+ guard-nanoc (1.0.1)
36
+ guard (>= 1.8.0)
37
+ nanoc (>= 3.6.3)
38
+ haml (4.0.3)
42
39
  tilt
43
40
  i18n (0.6.1)
44
- listen (1.0.2)
41
+ listen (1.1.6)
45
42
  rb-fsevent (>= 0.9.3)
46
43
  rb-inotify (>= 0.9)
47
44
  rb-kqueue (>= 0.2)
48
45
  lumberjack (1.0.3)
49
46
  method_source (0.8.1)
50
- multi_json (1.7.2)
51
- nanoc (3.6.3)
47
+ multi_json (1.7.6)
48
+ nanoc (3.6.4)
52
49
  cri (~> 2.3)
53
- pry (0.9.12.1)
50
+ pry (0.9.12.2)
54
51
  coderay (~> 1.0.5)
55
52
  method_source (~> 0.8)
56
53
  slop (~> 3.4)
@@ -63,18 +60,18 @@ GEM
63
60
  rb-kqueue (0.2.0)
64
61
  ffi (>= 0.5.0)
65
62
  rugged (0.16.0)
66
- sass (3.2.7)
63
+ sass (3.2.9)
67
64
  sinatra (1.4.2)
68
65
  rack (~> 1.5, >= 1.5.2)
69
66
  rack-protection (~> 1.4)
70
67
  tilt (~> 1.3, >= 1.3.4)
71
- slop (3.4.4)
68
+ slop (3.4.5)
72
69
  thin (1.5.1)
73
70
  daemons (>= 1.0.9)
74
71
  eventmachine (>= 0.12.6)
75
72
  rack (>= 1.0.0)
76
73
  thor (0.18.1)
77
- tilt (1.3.7)
74
+ tilt (1.4.1)
78
75
 
79
76
  PLATFORMS
80
77
  ruby
@@ -83,7 +80,7 @@ DEPENDENCIES
83
80
  coffee-script
84
81
  gitoe!
85
82
  guard
86
- guard-nanoc!
83
+ guard-nanoc
87
84
  haml
88
85
  nanoc (>= 3.6.3)
89
86
  pry
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ end
8
8
  desc "gitoe (development)"
9
9
  task :run do
10
10
  ENV["RACK_ENV"] = "development"
11
- sh "bundle exec gitoe"
11
+ sh "bundle exec gitoe -o --port=3000"
12
12
  end
13
13
 
14
14
  desc "gitoe (production)"
@@ -17,6 +17,11 @@ task :production do
17
17
  sh "bundle exec gitoe"
18
18
  end
19
19
 
20
+ task :demo do
21
+ ENV["RACK_ENV"] = "production"
22
+ sh "bundle exec gitoe -o --port=12345"
23
+ end
24
+
20
25
  desc "watch and re-compile with guard"
21
26
  task :guard do
22
27
  sh "bundle exec guard"
data/bin/gitoe CHANGED
@@ -1,27 +1,31 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "sinatra"
3
+ require 'optparse'
4
+
4
5
  require "gitoe/httpserver/static"
5
6
  require "gitoe/httpserver/repos"
6
7
 
7
- handler = \
8
- begin
9
- require "thin"
10
- Rack::Handler::Thin
11
- rescue LoadError
12
- false
13
- end ||
14
-
15
- handler ||= \
16
- begin
17
- require "mongrel"
18
- Rack::Handler::Mongrel
19
- rescue LoadError
20
- false
8
+ handler_options = {
9
+ Port: 3000,
10
+ Host: '127.0.0.1',
11
+ }
12
+
13
+ OptionParser.new do |opts|
14
+ opts.banner = "Usage: gitoe [options]"
15
+ opts.on("-p N", "--port N", "port to listen on, default: 3000") do |port|
16
+ handler_options[ :Port ] = port.to_i
21
17
  end
18
+ opts.on("-o", "--open", "open to non-localhost access") do
19
+ handler_options[ :Host ] = '0.0.0.0'
20
+ end
21
+ end.parse!
22
+
23
+ handlers = [ :Thin, :Mongrel, :WEBrick ]
24
+ handler_name = handlers[
25
+ handlers.find_index {|h| Rack::Handler.const_defined? h }
26
+ ]
22
27
 
23
- handler ||= \
24
- Rack::Handler::WEBrick
28
+ handler = Rack::Handler::const_get handler_name
25
29
 
26
30
  root = Rack::Builder.new do
27
31
 
@@ -33,4 +37,4 @@ end
33
37
 
34
38
  root = Rack::Reloader.new(root,cooldown=0) if ENV["RACK_ENV"]=="development"
35
39
 
36
- handler.run root, Port: 12345
40
+ handler.run root, handler_options
@@ -1,4 +1,5 @@
1
1
  $ = jQuery or throw "demand jQuery"
2
+ moment or throw "demand moment"
2
3
 
3
4
  url_root = "/repo"
4
5
 
@@ -211,6 +212,23 @@ class GitoeChange
211
212
  @span sha1, "sha1_commit"
212
213
  br: ->
213
214
  $('<br>')
215
+ pretty_abs_time: (change)->
216
+ @span moment.unix( change.committer.time ).format("YYYY-MM-DD HH:mm:ss"), "git_abs_time"
217
+ pretty_relative_time: (change)->
218
+ @span moment.unix( change.committer.time ).fromNow(), "git_rel_time"
219
+ p_with_time: (change, elems)->
220
+ @p [
221
+ @pretty_abs_time change
222
+ @span " / "
223
+ @pretty_relative_time change
224
+ @span " : "
225
+ elems...
226
+ ]
227
+ p: ( elements )->
228
+ ret = $('<p>')
229
+ for e in elements
230
+ ret.append e
231
+ ret
214
232
  }
215
233
 
216
234
  @message_rules = {
@@ -235,175 +253,236 @@ class GitoeChange
235
253
  actions : {
236
254
  clone: (matched,change)->
237
255
  @li [
238
- @git_command "git clone"
239
- @span ": create "
240
- @ref (@ref_fullname change)
241
- @span " at "
242
- @sha1_commit change.oid_new
256
+ @p_with_time change, [
257
+ @git_command "git clone"
258
+ ]
259
+ @p [
260
+ @span "create "
261
+ @ref (@ref_fullname change)
262
+ @span " at "
263
+ @sha1_commit change.oid_new
264
+ ]
243
265
  ]
244
266
  branch: (matched, change)->
245
267
  # TODO show position better
246
268
  @li [
247
- @git_command "git branch"
248
- @span ": branch out "
249
- @ref (@ref_fullname change)
250
- @span " at "
251
- @sha1_commit change.oid_new
252
- if /^refs/.test matched[1]
253
- @span " (was "
254
- if /^refs/.test matched[1]
255
- @ref @ref_realname(matched[1])
256
- if /^refs/.test matched[1]
257
- @span " )"
269
+ @p_with_time change, [
270
+ @git_command "git branch"
271
+ ]
272
+ @p [
273
+ @span "create branch "
274
+ @ref (@ref_fullname change)
275
+ @span " at "
276
+ @sha1_commit change.oid_new
277
+ if /^refs/.test matched[1]
278
+ @span " (was "
279
+ if /^refs/.test matched[1]
280
+ @ref @ref_realname(matched[1])
281
+ if /^refs/.test matched[1]
282
+ @span " )"
283
+ ]
258
284
  ]
259
285
  commit: (matched, change)->
260
286
  @li [
261
- @git_command "git commit"
262
- @span ": move "
263
- @ref (@ref_fullname change)
264
- @span " from "
265
- @sha1_commit change.oid_old
266
- @span " to "
267
- @sha1_commit change.oid_new
287
+ @p_with_time change, [
288
+ @git_command "git commit"
289
+ ]
290
+ @p [
291
+ @span "move "
292
+ @ref (@ref_fullname change)
293
+ @span " from "
294
+ @sha1_commit change.oid_old
295
+ @span " to "
296
+ @sha1_commit change.oid_new
297
+ ]
268
298
  ]
269
299
  merge_commit: (matched, change)->
270
300
  @li [
271
- @git_command "git merge"
272
- @span ": move "
273
- @span matched[2], "ref_name"
274
- @span ' to '
275
- @sha1_commit change.oid_new
276
- @span ' by merging '
277
- @span matched[1], "ref_name"
301
+ @p_with_time change, [
302
+ @git_command "git merge"
303
+ ]
304
+ @p [
305
+ @span "move "
306
+ @span matched[2], "ref_name"
307
+ @span ' to '
308
+ @sha1_commit change.oid_new
309
+ @span ' by merging '
310
+ @span matched[1], "ref_name"
311
+ ]
278
312
  ]
279
313
  commit_amend: (matched, change)->
280
314
  @li [
281
- @git_command "git commit --amend"
282
- @span ": move "
283
- @ref (@ref_fullname change)
284
- @span " from "
285
- @sha1_commit change.oid_old
286
- @span " to "
287
- @sha1_commit change.oid_new
315
+ @p_with_time change, [
316
+ @git_command "git commit --amend"
317
+ ]
318
+ @p [
319
+ @span "move "
320
+ @ref (@ref_fullname change)
321
+ @span " from "
322
+ @sha1_commit change.oid_old
323
+ @span " to "
324
+ @sha1_commit change.oid_new
325
+ ]
288
326
  ]
289
327
  merge_ff: (matched, change)->
290
328
  @li [
291
- @git_command "git merge"
292
- @span ": move "
293
- @ref (@ref_fullname change)
294
- @span ' to '
295
- @sha1_commit change.oid_new
296
- @span ' by merging '
297
- @span matched[1], "ref_name"
329
+ @p_with_time change, [
330
+ @git_command "git merge"
331
+ @span " (fast-forward)", "comment"
332
+ ]
333
+ @p [
334
+ @span "move "
335
+ @ref (@ref_fullname change)
336
+ @span ' to '
337
+ @sha1_commit change.oid_new
338
+ @span ' by merging '
339
+ @span matched[1], "ref_name"
340
+ ]
298
341
  ]
299
342
  reset: (matched, change)->
300
343
  @li [
301
- @git_command "git reset"
302
- @span ": point "
303
- @ref (@ref_fullname change)
304
- @span " to "
305
- @sha1_commit change.oid_new
306
- @span " ( was "
307
- @sha1_commit change.oid_old
308
- @span " )"
344
+ @p_with_time change, [
345
+ @git_command "git reset"
346
+ ]
347
+ @p [
348
+ @span "point "
349
+ @ref (@ref_fullname change)
350
+ @span " to "
351
+ @sha1_commit change.oid_new
352
+ @span "(was "
353
+ @sha1_commit change.oid_old
354
+ @span ")"
355
+ ]
309
356
  ]
310
357
  push: (matched, change)->
311
358
  @li [
312
- @git_command "git push"
313
- @span ": update "
314
- @ref (@ref_fullname change)
315
- @span " to "
316
- @sha1_commit change.oid_new
317
- if change.oid_old isnt "0000000000000000000000000000000000000000"
318
- @span " ( was "
319
- if change.oid_old isnt "0000000000000000000000000000000000000000"
320
- @sha1_commit change.oid_old
321
- if change.oid_old isnt "0000000000000000000000000000000000000000"
322
- @span " )"
359
+ @p_with_time change, [
360
+ @git_command "git push"
361
+ ]
362
+ @p [
363
+ @span "update "
364
+ @ref (@ref_fullname change)
365
+ if change.oid_old isnt "0000000000000000000000000000000000000000"
366
+ @span " from "
367
+ if change.oid_old isnt "0000000000000000000000000000000000000000"
368
+ @sha1_commit change.oid_old
369
+ @span " to "
370
+ @sha1_commit change.oid_new
371
+ ]
323
372
  ]
324
373
  fetch: (matched, change)->
325
374
  @li [
326
- @git_command "git fetch"
327
- @span ": update "
328
- @ref (@ref_fullname change)
329
- @span " to "
330
- @sha1_commit change.oid_new
331
- if change.oid_old isnt "0000000000000000000000000000000000000000"
332
- @span " ( was "
333
- if change.oid_old isnt "0000000000000000000000000000000000000000"
334
- @sha1_commit change.oid_old
335
- if change.oid_old isnt "0000000000000000000000000000000000000000"
336
- @span " )"
375
+ @p_with_time change, [
376
+ @git_command "git fetch"
377
+ ]
378
+ @p [
379
+ @span "update "
380
+ @ref (@ref_fullname change)
381
+ if change.oid_old isnt "0000000000000000000000000000000000000000"
382
+ @span " from "
383
+ if change.oid_old isnt "0000000000000000000000000000000000000000"
384
+ @sha1_commit change.oid_old
385
+ @span " to "
386
+ @sha1_commit change.oid_new
387
+ ]
337
388
  ]
338
389
  pull: (matched, change)->
339
390
  @li [
340
- @git_command "git pull"
341
- @span ": update "
342
- @ref (@ref_fullname change)
343
- @span " from "
344
- @sha1_commit change.oid_old
345
- @span " to "
346
- @sha1_commit change.oid_new
391
+ @p_with_time change, [
392
+ @git_command "git pull"
393
+ ]
394
+ @p [
395
+ @span "update "
396
+ @ref (@ref_fullname change)
397
+ @span " from "
398
+ @sha1_commit change.oid_old
399
+ @span " to "
400
+ @sha1_commit change.oid_new
401
+ ]
347
402
  ]
348
403
  checkout: (matched, change, rest)->
349
404
  # TODO handle remaining "checkout SHA1" message of removed branch
350
405
  @li [
351
- @git_command "git checkout"
352
- @span ": checkout "
353
- @ref matched[2]
354
- @span " at "
355
- @sha1_commit change.oid_new
406
+ @p_with_time change,[
407
+ @git_command "git checkout"
408
+ ]
409
+ @p [
410
+ @span "checkout "
411
+ @ref matched[2]
412
+ @span " at "
413
+ @sha1_commit change.oid_new
414
+ ]
356
415
  ]
357
416
  rename_remote: (matched, change)->
358
417
  @li [
359
- @git_command "git remote rename"
360
- @span ": rename "
361
- @ref @ref_realname(matched[1])
362
- @span " to "
363
- @ref @ref_realname(matched[2])
418
+ @p_with_time change, [
419
+ @git_command "git remote rename"
420
+ ]
421
+ @p [
422
+ @span "rename "
423
+ @ref @ref_realname(matched[1])
424
+ @span " to "
425
+ @ref @ref_realname(matched[2])
426
+ ]
364
427
  ]
365
428
  rebase_finish: (matched, change)->
366
429
  @li [
367
- if matched[1]
368
- @git_command "git rebase #{matched[1]}"
369
- else
370
- @git_command "git rebase"
371
- @span ": rebase "
372
- @ref @ref_realname(matched[2])
373
- @span " to "
374
- @sha1_commit change.oid_new
430
+ @p_with_time change, [
431
+ if matched[1]
432
+ @git_command "git rebase #{matched[1]}"
433
+ else
434
+ @git_command "git rebase"
435
+ ]
436
+ @p [
437
+ @span "rebase "
438
+ @ref @ref_realname(matched[2])
439
+ @span " to "
440
+ @sha1_commit change.oid_new
441
+ ]
375
442
  ]
376
443
  rebase_finish2: (matched, change)->
377
444
  @li [
378
- if matched[1]
379
- @git_command "git rebase #{matched[1]}"
380
- else
381
- @git_command "git rebase"
382
- @span ": rebase "
383
- @ref (@ref_fullname change)
384
- @span " to "
385
- @sha1_commit change.oid_new
445
+ @p_with_time change, [
446
+ if matched[1]
447
+ @git_command "git rebase #{matched[1]}"
448
+ else
449
+ @git_command "git rebase"
450
+ ]
451
+ @p [
452
+ @span "rebase "
453
+ @ref (@ref_fullname change)
454
+ @span " to "
455
+ @sha1_commit change.oid_new
456
+ ]
386
457
  ]
387
458
  rebase_finish3: (matched, change)->
388
459
  @li [
389
- if matched[1]
390
- @git_command "git rebase #{matched[1]}"
391
- else
392
- @git_command "git rebase"
393
- @span ": rebase "
394
- @ref (@ref_fullname change)
395
- @span " to "
396
- @sha1_commit change.oid_new
460
+ @p_with_time change, [
461
+ if matched[1]
462
+ @git_command "git rebase #{matched[1]}"
463
+ else
464
+ @git_command "git rebase"
465
+ ]
466
+ @p [
467
+ @span ": rebase "
468
+ @ref (@ref_fullname change)
469
+ @span " to "
470
+ @sha1_commit change.oid_new
471
+ ]
397
472
  ]
398
473
  rebase_abort: (matched, change, rest)->
399
474
  if rest.length > 0
400
475
  if matched_head = rest[0].message.match /^checkout: moving from ([^ ]+)/
401
476
  real_ref = matched_head[1]
402
477
  @li [
403
- @git_command "git rebase --abort"
404
- @span ": didn't rebase "
405
- if real_ref
406
- @ref real_ref
478
+ @p_with_time change, [
479
+ @git_command "git rebase --abort"
480
+ ]
481
+ @p [
482
+ @span "didn't rebase "
483
+ if real_ref
484
+ @ref real_ref
485
+ ]
407
486
  ]
408
487
  }
409
488
  }
data/content/gitoe.coffee CHANGED
@@ -41,6 +41,7 @@ class GitoeUI
41
41
  @elems = {}
42
42
 
43
43
  repo_path = @elems.repo_path = $("<input>")
44
+ # repo_path = @elems.repo_path = $("<input>").val("/home/mono/gitoe") # test purpose
44
45
  @elems.repo_open = $("<input>").attr( type: "button" ).val("open").on "click", ->
45
46
  cb.repo_open? repo_path.val()
46
47
  @elems.num_commits = $("<span>").text 0
data/content/index.haml CHANGED
@@ -4,8 +4,9 @@
4
4
  %link(rel="stylesheet" type="text/css" href="reset.css")
5
5
  %link(rel="stylesheet" type="text/css" href="style.css")
6
6
  %script(src="/jquery/jquery-1.9.1.min.js")
7
- %script(src="/jquery/jquery.scrollTo.min.js")
8
- %script(src="/raphael-min.js")
7
+ %script(src="jquery/jquery.scrollTo.min.js")
8
+ %script(src="raphael-min.js")
9
+ %script(src="moment.min.js")
9
10
  %script(src="gitoe-repo.js")
10
11
  %script(src="gitoe-draw.js")
11
12
  %script(src="gitoe.js")
@@ -0,0 +1,6 @@
1
+ // moment.js
2
+ // version : 2.0.0
3
+ // author : Tim Wood
4
+ // license : MIT
5
+ // momentjs.com
6
+ (function(e){function O(e,t){return function(n){return j(e.call(this,n),t)}}function M(e){return function(t){return this.lang().ordinal(e.call(this,t))}}function _(){}function D(e){H(this,e)}function P(e){var t=this._data={},n=e.years||e.year||e.y||0,r=e.months||e.month||e.M||0,i=e.weeks||e.week||e.w||0,s=e.days||e.day||e.d||0,o=e.hours||e.hour||e.h||0,u=e.minutes||e.minute||e.m||0,a=e.seconds||e.second||e.s||0,f=e.milliseconds||e.millisecond||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=B(f/1e3),t.seconds=a%60,u+=B(a/60),t.minutes=u%60,o+=B(u/60),t.hours=o%24,s+=B(o/24),s+=i*7,t.days=s%30,r+=B(s/30),t.months=r%12,n+=B(r/12),t.years=n}function H(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function B(e){return e<0?Math.ceil(e):Math.floor(e)}function j(e,t){var n=e+"";while(n.length<t)n="0"+n;return n}function F(e,t,n){var r=t._milliseconds,i=t._days,s=t._months,o;r&&e._d.setTime(+e+r*n),i&&e.date(e.date()+i*n),s&&(o=e.date(),e.date(1).month(e.month()+s*n).date(Math.min(o,e.daysInMonth())))}function I(e){return Object.prototype.toString.call(e)==="[object Array]"}function q(e,t){var n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)~~e[s]!==~~t[s]&&i++;return i+r}function R(e,t){return t.abbr=e,s[e]||(s[e]=new _),s[e].set(t),s[e]}function U(e){return e?(!s[e]&&o&&require("./lang/"+e),s[e]):t.fn._lang}function z(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function W(e){var t=e.match(a),n,r;for(n=0,r=t.length;n<r;n++)A[t[n]]?t[n]=A[t[n]]:t[n]=z(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=typeof t[n].call=="function"?t[n].call(i,e):t[n];return s}}function X(e,t){function r(t){return e.lang().longDateFormat(t)||t}var n=5;while(n--&&f.test(t))t=t.replace(f,r);return C[t]||(C[t]=W(t)),C[t](e)}function V(e){switch(e){case"DDDD":return p;case"YYYY":return d;case"YYYYY":return v;case"S":case"SS":case"SSS":case"DDD":return h;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return m;case"X":return b;case"Z":case"ZZ":return g;case"T":return y;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return c;default:return new RegExp(e.replace("\\",""))}}function $(e,t,n){var r,i,s=n._a;switch(e){case"M":case"MM":s[1]=t==null?0:~~t-1;break;case"MMM":case"MMMM":r=U(n._l).monthsParse(t),r!=null?s[1]=r:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":t!=null&&(s[2]=~~t);break;case"YY":s[0]=~~t+(~~t>68?1900:2e3);break;case"YYYY":case"YYYYY":s[0]=~~t;break;case"a":case"A":n._isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":s[3]=~~t;break;case"m":case"mm":s[4]=~~t;break;case"s":case"ss":s[5]=~~t;break;case"S":case"SS":case"SSS":s[6]=~~(("0."+t)*1e3);break;case"X":n._d=new Date(parseFloat(t)*1e3);break;case"Z":case"ZZ":n._useUTC=!0,r=(t+"").match(x),r&&r[1]&&(n._tzh=~~r[1]),r&&r[2]&&(n._tzm=~~r[2]),r&&r[0]==="+"&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}t==null&&(n._isValid=!1)}function J(e){var t,n,r=[];if(e._d)return;for(t=0;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];r[3]+=e._tzh||0,r[4]+=e._tzm||0,n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.setHours(r[3],r[4],r[5],r[6])),e._d=n}function K(e){var t=e._f.match(a),n=e._i,r,i;e._a=[];for(r=0;r<t.length;r++)i=(V(t[r]).exec(n)||[])[0],i&&(n=n.slice(n.indexOf(i)+i.length)),A[t[r]]&&$(t[r],i,e);e._isPm&&e._a[3]<12&&(e._a[3]+=12),e._isPm===!1&&e._a[3]===12&&(e._a[3]=0),J(e)}function Q(e){var t,n,r,i=99,s,o,u;while(e._f.length){t=H({},e),t._f=e._f.pop(),K(t),n=new D(t);if(n.isValid()){r=n;break}u=q(t._a,n.toArray()),u<i&&(i=u,r=n)}H(e,r)}function G(e){var t,n=e._i;if(w.exec(n)){e._f="YYYY-MM-DDT";for(t=0;t<4;t++)if(S[t][1].exec(n)){e._f+=S[t][0];break}g.exec(n)&&(e._f+=" Z"),K(e)}else e._d=new Date(n)}function Y(t){var n=t._i,r=u.exec(n);n===e?t._d=new Date:r?t._d=new Date(+r[1]):typeof n=="string"?G(t):I(n)?(t._a=n.slice(0),J(t)):t._d=n instanceof Date?new Date(+n):new Date(n)}function Z(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function et(e,t,n){var i=r(Math.abs(e)/1e3),s=r(i/60),o=r(s/60),u=r(o/24),a=r(u/365),f=i<45&&["s",i]||s===1&&["m"]||s<45&&["mm",s]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",r(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=n,Z.apply({},f)}function tt(e,n,r){var i=r-n,s=r-e.day();return s>i&&(s-=7),s<i-7&&(s+=7),Math.ceil(t(e).add("d",s).dayOfYear()/7)}function nt(e){var n=e._i,r=e._f;return n===null||n===""?null:(typeof n=="string"&&(e._i=n=U().preparse(n)),t.isMoment(n)?(e=H({},n),e._d=new Date(+n._d)):r?I(r)?Q(e):K(e):Y(e),new D(e))}function rt(e,n){t.fn[e]=t.fn[e+"s"]=function(e){var t=this._isUTC?"UTC":"";return e!=null?(this._d["set"+t+n](e),this):this._d["get"+t+n]()}}function it(e){t.duration.fn[e]=function(){return this._data[e]}}function st(e,n){t.duration.fn["as"+e]=function(){return+this/n}}var t,n="2.0.0",r=Math.round,i,s={},o=typeof module!="undefined"&&module.exports,u=/^\/?Date\((\-?\d+)/i,a=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,f=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,l=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,c=/\d\d?/,h=/\d{1,3}/,p=/\d{3}/,d=/\d{1,4}/,v=/[+\-]?\d{1,6}/,m=/[0-9]*[a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i,g=/Z|[\+\-]\d\d:?\d\d/i,y=/T/i,b=/[\+\-]?\d+(\.\d{1,3})?/,w=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,E="YYYY-MM-DDTHH:mm:ssZ",S=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],x=/([\+\-]|\d\d)/gi,T="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),N={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},C={},k="DDD w W M D d".split(" "),L="M D H h m s w W".split(" "),A={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return j(this.year()%100,2)},YYYY:function(){return j(this.year(),4)},YYYYY:function(){return j(this.year(),5)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return j(~~(this.milliseconds()/10),2)},SSS:function(){return j(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+j(~~(e/60),2)+":"+j(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+j(~~(10*e/6),4)},X:function(){return this.unix()}};while(k.length)i=k.pop(),A[i+"o"]=M(A[i]);while(L.length)i=L.pop(),A[i+i]=O(A[i],2);A.DDDD=O(A.DDD,3),_.prototype={set:function(e){var t,n;for(n in e)t=e[n],typeof t=="function"?this[n]=t:this["_"+n]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e){var n,r,i,s;this._monthsParse||(this._monthsParse=[]);for(n=0;n<12;n++){this._monthsParse[n]||(r=t([2e3,n]),i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i"));if(this._monthsParse[n].test(e))return n}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return tt(e,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},t=function(e,t,n){return nt({_i:e,_f:t,_l:n,_isUTC:!1})},t.utc=function(e,t,n){return nt({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=t.isDuration(e),i=typeof e=="number",s=r?e._data:i?{}:e,o;return i&&(n?s[n]=e:s.milliseconds=e),o=new P(s),r&&e.hasOwnProperty("_lang")&&(o._lang=e._lang),o},t.version=n,t.defaultFormat=E,t.lang=function(e,n){var r;if(!e)return t.fn._lang._abbr;n?R(e,n):s[e]||U(e),t.duration.fn._lang=t.fn._lang=U(e)},t.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),U(e)},t.isMoment=function(e){return e instanceof D},t.isDuration=function(e){return e instanceof P},t.fn=D.prototype={clone:function(){return t(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return t.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return this._isValid==null&&(this._a?this._isValid=!q(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(e){var n=X(this,e||t.defaultFormat);return this.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,-1),this},diff:function(e,n,r){var i=this._isUTC?t(e).utc():t(e).local(),s=(this.zone()-i.zone())*6e4,o,u;return n&&(n=n.replace(/s$/,"")),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,n==="year"&&(u/=12)):(o=this-i-s,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?o/864e5:n==="week"?o/6048e5:o),r?u:B(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=this.diff(t().startOf("day"),"days",!0),n=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(n,this))},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()<t([this.year()]).zone()||this.zone()<t([this.year(),5]).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e==null?t:this.add({d:e-t})},startOf:function(e){e=e.replace(/s$/,"");switch(e){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return e==="week"&&this.day(0),this},endOf:function(e){return this.startOf(e).add(e.replace(/s?$/,"s"),1).subtract("ms",1)},isAfter:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)>+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)===+t(e).startOf(n)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return t.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var n=r((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},isoWeek:function(e){var t=tt(this,1,4);return e==null?t:this.add("d",(e-t)*7)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},lang:function(t){return t===e?this._lang:(this._lang=U(t),this)}};for(i=0;i<T.length;i++)rt(T[i].toLowerCase().replace(/s$/,""),T[i]);rt("year","FullYear"),t.fn.days=t.fn.day,t.fn.weeks=t.fn.week,t.fn.isoWeeks=t.fn.isoWeek,t.duration.fn=P.prototype={weeks:function(){return B(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(e){var t=+this,n=et(t,!e,this.lang());return e&&(n=this.lang().pastFuture(t,n)),this.lang().postformat(n)},lang:t.fn.lang};for(i in N)N.hasOwnProperty(i)&&(st(i,N[i]),it(i.toLowerCase()));st("Weeks",6048e5),t.lang("en",{ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),o&&(module.exports=t),typeof ender=="undefined"&&(this.moment=t),typeof define=="function"&&define.amd&&define("moment",[],function(){return t})}).call(this);
data/content/style.sass CHANGED
@@ -1,4 +1,4 @@
1
- $left_width: 650px
1
+ $left_width: 500px
2
2
  $header_height: 7em
3
3
  $footer_height: 1.5em
4
4
 
@@ -55,30 +55,40 @@ body, html, #wrapper
55
55
  margin: 10px 0px
56
56
 
57
57
  li
58
- span.repo_name,
59
- span.ref_name,
60
- span.sha1_commit,
61
- span.git_command,
62
- span.comment
58
+
59
+ margin: 10px 0px
60
+ background-color: #dadada
61
+
62
+ span.repo_name, span.ref_name, span.sha1_commit,
63
+ span.git_command, span.comment,
64
+ span.git_abs_time, span.git_rel_time,
63
65
  display: inline-block
64
66
  font-family: monospace
67
+
65
68
  span.repo_name
66
69
  background-color: yellow
67
70
  span.ref_name
68
71
  background-color: lightblue
72
+ span.git_abs_time
73
+ background-color: yellow
74
+ span.git_rel_time
75
+ background-color: lightgreen
69
76
  span.sha1_commit
70
77
  background-color: pink
71
78
  width: 4.94em
72
79
  overflow: hidden
73
80
  span.git_command
74
- min-width: 7em
81
+ min-width: 6em
75
82
  text-align: center
76
- background-color: lightgreen
83
+ background-color: cyan
77
84
  span.comment
78
85
  font-size: 0.8em
79
86
 
80
87
  // list-style: none
81
- margin: 5px 0px
88
+
89
+ p:nth-child(n+2)
90
+ // except first p
91
+ padding-left: 2em
82
92
  li.unknown
83
93
  color: red
84
94
 
@@ -1,11 +1,16 @@
1
1
  (function() {
2
2
  var $, DAGtopo, GitoeChange, GitoeHistorian, GitoeRepo, OrderedSet, clone, exec_callback, local, strcmp, uniq, url_root, _ref,
3
+ __slice = [].slice,
3
4
  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
4
5
 
5
6
  $ = jQuery || (function() {
6
7
  throw "demand jQuery";
7
8
  })();
8
9
 
10
+ moment || (function() {
11
+ throw "demand moment";
12
+ })();
13
+
9
14
  url_root = "/repo";
10
15
 
11
16
  exec_callback = function(context, fun, args) {
@@ -304,6 +309,25 @@
304
309
  },
305
310
  br: function() {
306
311
  return $('<br>');
312
+ },
313
+ pretty_abs_time: function(change) {
314
+ return this.span(moment.unix(change.committer.time).format("YYYY-MM-DD HH:mm:ss"), "git_abs_time");
315
+ },
316
+ pretty_relative_time: function(change) {
317
+ return this.span(moment.unix(change.committer.time).fromNow(), "git_rel_time");
318
+ },
319
+ p_with_time: function(change, elems) {
320
+ return this.p([this.pretty_abs_time(change), this.span(" / "), this.pretty_relative_time(change), this.span(" : ")].concat(__slice.call(elems)));
321
+ },
322
+ p: function(elements) {
323
+ var e, ret, _i, _len;
324
+
325
+ ret = $('<p>');
326
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
327
+ e = elements[_i];
328
+ ret.append(e);
329
+ }
330
+ return ret;
307
331
  }
308
332
  };
309
333
 
@@ -328,49 +352,49 @@
328
352
  },
329
353
  actions: {
330
354
  clone: function(matched, change) {
331
- return this.li([this.git_command("git clone"), this.span(": create "), this.ref(this.ref_fullname(change)), this.span(" at "), this.sha1_commit(change.oid_new)]);
355
+ return this.li([this.p_with_time(change, [this.git_command("git clone")]), this.p([this.span("create "), this.ref(this.ref_fullname(change)), this.span(" at "), this.sha1_commit(change.oid_new)])]);
332
356
  },
333
357
  branch: function(matched, change) {
334
- return this.li([this.git_command("git branch"), this.span(": branch out "), this.ref(this.ref_fullname(change)), this.span(" at "), this.sha1_commit(change.oid_new), /^refs/.test(matched[1]) ? this.span(" (was ") : void 0, /^refs/.test(matched[1]) ? this.ref(this.ref_realname(matched[1])) : void 0, /^refs/.test(matched[1]) ? this.span(" )") : void 0]);
358
+ return this.li([this.p_with_time(change, [this.git_command("git branch")]), this.p([this.span("create branch "), this.ref(this.ref_fullname(change)), this.span(" at "), this.sha1_commit(change.oid_new), /^refs/.test(matched[1]) ? this.span(" (was ") : void 0, /^refs/.test(matched[1]) ? this.ref(this.ref_realname(matched[1])) : void 0, /^refs/.test(matched[1]) ? this.span(" )") : void 0])]);
335
359
  },
336
360
  commit: function(matched, change) {
337
- return this.li([this.git_command("git commit"), this.span(": move "), this.ref(this.ref_fullname(change)), this.span(" from "), this.sha1_commit(change.oid_old), this.span(" to "), this.sha1_commit(change.oid_new)]);
361
+ return this.li([this.p_with_time(change, [this.git_command("git commit")]), this.p([this.span("move "), this.ref(this.ref_fullname(change)), this.span(" from "), this.sha1_commit(change.oid_old), this.span(" to "), this.sha1_commit(change.oid_new)])]);
338
362
  },
339
363
  merge_commit: function(matched, change) {
340
- return this.li([this.git_command("git merge"), this.span(": move "), this.span(matched[2], "ref_name"), this.span(' to '), this.sha1_commit(change.oid_new), this.span(' by merging '), this.span(matched[1], "ref_name")]);
364
+ return this.li([this.p_with_time(change, [this.git_command("git merge")]), this.p([this.span("move "), this.span(matched[2], "ref_name"), this.span(' to '), this.sha1_commit(change.oid_new), this.span(' by merging '), this.span(matched[1], "ref_name")])]);
341
365
  },
342
366
  commit_amend: function(matched, change) {
343
- return this.li([this.git_command("git commit --amend"), this.span(": move "), this.ref(this.ref_fullname(change)), this.span(" from "), this.sha1_commit(change.oid_old), this.span(" to "), this.sha1_commit(change.oid_new)]);
367
+ return this.li([this.p_with_time(change, [this.git_command("git commit --amend")]), this.p([this.span("move "), this.ref(this.ref_fullname(change)), this.span(" from "), this.sha1_commit(change.oid_old), this.span(" to "), this.sha1_commit(change.oid_new)])]);
344
368
  },
345
369
  merge_ff: function(matched, change) {
346
- return this.li([this.git_command("git merge"), this.span(": move "), this.ref(this.ref_fullname(change)), this.span(' to '), this.sha1_commit(change.oid_new), this.span(' by merging '), this.span(matched[1], "ref_name")]);
370
+ return this.li([this.p_with_time(change, [this.git_command("git merge"), this.span(" (fast-forward)", "comment")]), this.p([this.span("move "), this.ref(this.ref_fullname(change)), this.span(' to '), this.sha1_commit(change.oid_new), this.span(' by merging '), this.span(matched[1], "ref_name")])]);
347
371
  },
348
372
  reset: function(matched, change) {
349
- return this.li([this.git_command("git reset"), this.span(": point "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new), this.span(" ( was "), this.sha1_commit(change.oid_old), this.span(" )")]);
373
+ return this.li([this.p_with_time(change, [this.git_command("git reset")]), this.p([this.span("point "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new), this.span("(was "), this.sha1_commit(change.oid_old), this.span(")")])]);
350
374
  },
351
375
  push: function(matched, change) {
352
- return this.li([this.git_command("git push"), this.span(": update "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new), change.oid_old !== "0000000000000000000000000000000000000000" ? this.span(" ( was ") : void 0, change.oid_old !== "0000000000000000000000000000000000000000" ? this.sha1_commit(change.oid_old) : void 0, change.oid_old !== "0000000000000000000000000000000000000000" ? this.span(" )") : void 0]);
376
+ return this.li([this.p_with_time(change, [this.git_command("git push")]), this.p([this.span("update "), this.ref(this.ref_fullname(change)), change.oid_old !== "0000000000000000000000000000000000000000" ? this.span(" from ") : void 0, change.oid_old !== "0000000000000000000000000000000000000000" ? this.sha1_commit(change.oid_old) : void 0, this.span(" to "), this.sha1_commit(change.oid_new)])]);
353
377
  },
354
378
  fetch: function(matched, change) {
355
- return this.li([this.git_command("git fetch"), this.span(": update "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new), change.oid_old !== "0000000000000000000000000000000000000000" ? this.span(" ( was ") : void 0, change.oid_old !== "0000000000000000000000000000000000000000" ? this.sha1_commit(change.oid_old) : void 0, change.oid_old !== "0000000000000000000000000000000000000000" ? this.span(" )") : void 0]);
379
+ return this.li([this.p_with_time(change, [this.git_command("git fetch")]), this.p([this.span("update "), this.ref(this.ref_fullname(change)), change.oid_old !== "0000000000000000000000000000000000000000" ? this.span(" from ") : void 0, change.oid_old !== "0000000000000000000000000000000000000000" ? this.sha1_commit(change.oid_old) : void 0, this.span(" to "), this.sha1_commit(change.oid_new)])]);
356
380
  },
357
381
  pull: function(matched, change) {
358
- return this.li([this.git_command("git pull"), this.span(": update "), this.ref(this.ref_fullname(change)), this.span(" from "), this.sha1_commit(change.oid_old), this.span(" to "), this.sha1_commit(change.oid_new)]);
382
+ return this.li([this.p_with_time(change, [this.git_command("git pull")]), this.p([this.span("update "), this.ref(this.ref_fullname(change)), this.span(" from "), this.sha1_commit(change.oid_old), this.span(" to "), this.sha1_commit(change.oid_new)])]);
359
383
  },
360
384
  checkout: function(matched, change, rest) {
361
- return this.li([this.git_command("git checkout"), this.span(": checkout "), this.ref(matched[2]), this.span(" at "), this.sha1_commit(change.oid_new)]);
385
+ return this.li([this.p_with_time(change, [this.git_command("git checkout")]), this.p([this.span("checkout "), this.ref(matched[2]), this.span(" at "), this.sha1_commit(change.oid_new)])]);
362
386
  },
363
387
  rename_remote: function(matched, change) {
364
- return this.li([this.git_command("git remote rename"), this.span(": rename "), this.ref(this.ref_realname(matched[1])), this.span(" to "), this.ref(this.ref_realname(matched[2]))]);
388
+ return this.li([this.p_with_time(change, [this.git_command("git remote rename")]), this.p([this.span("rename "), this.ref(this.ref_realname(matched[1])), this.span(" to "), this.ref(this.ref_realname(matched[2]))])]);
365
389
  },
366
390
  rebase_finish: function(matched, change) {
367
- return this.li([matched[1] ? this.git_command("git rebase " + matched[1]) : this.git_command("git rebase"), this.span(": rebase "), this.ref(this.ref_realname(matched[2])), this.span(" to "), this.sha1_commit(change.oid_new)]);
391
+ return this.li([this.p_with_time(change, [matched[1] ? this.git_command("git rebase " + matched[1]) : this.git_command("git rebase")]), this.p([this.span("rebase "), this.ref(this.ref_realname(matched[2])), this.span(" to "), this.sha1_commit(change.oid_new)])]);
368
392
  },
369
393
  rebase_finish2: function(matched, change) {
370
- return this.li([matched[1] ? this.git_command("git rebase " + matched[1]) : this.git_command("git rebase"), this.span(": rebase "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new)]);
394
+ return this.li([this.p_with_time(change, [matched[1] ? this.git_command("git rebase " + matched[1]) : this.git_command("git rebase")]), this.p([this.span("rebase "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new)])]);
371
395
  },
372
396
  rebase_finish3: function(matched, change) {
373
- return this.li([matched[1] ? this.git_command("git rebase " + matched[1]) : this.git_command("git rebase"), this.span(": rebase "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new)]);
397
+ return this.li([this.p_with_time(change, [matched[1] ? this.git_command("git rebase " + matched[1]) : this.git_command("git rebase")]), this.p([this.span(": rebase "), this.ref(this.ref_fullname(change)), this.span(" to "), this.sha1_commit(change.oid_new)])]);
374
398
  },
375
399
  rebase_abort: function(matched, change, rest) {
376
400
  var matched_head, real_ref;
@@ -380,7 +404,7 @@
380
404
  real_ref = matched_head[1];
381
405
  }
382
406
  }
383
- return this.li([this.git_command("git rebase --abort"), this.span(": didn't rebase "), real_ref ? this.ref(real_ref) : void 0]);
407
+ return this.li([this.p_with_time(change, [this.git_command("git rebase --abort")]), this.p([this.span("didn't rebase "), real_ref ? this.ref(real_ref) : void 0])]);
384
408
  }
385
409
  }
386
410
  };
@@ -80,7 +80,7 @@
80
80
  cb = this.cb;
81
81
  this.sections = {};
82
82
  this.elems = {};
83
- repo_path = this.elems.repo_path = $("<input>").val("/home/mono/gitoe");
83
+ repo_path = this.elems.repo_path = $("<input>");
84
84
  this.elems.repo_open = $("<input>").attr({
85
85
  type: "button"
86
86
  }).val("open").on("click", function() {
@@ -4,8 +4,9 @@
4
4
  <link href='reset.css' rel='stylesheet' type='text/css'>
5
5
  <link href='style.css' rel='stylesheet' type='text/css'>
6
6
  <script src='/jquery/jquery-1.9.1.min.js'></script>
7
- <script src='/jquery/jquery.scrollTo.min.js'></script>
8
- <script src='/raphael-min.js'></script>
7
+ <script src='jquery/jquery.scrollTo.min.js'></script>
8
+ <script src='raphael-min.js'></script>
9
+ <script src='moment.min.js'></script>
9
10
  <script src='gitoe-repo.js'></script>
10
11
  <script src='gitoe-draw.js'></script>
11
12
  <script src='gitoe.js'></script>
@@ -0,0 +1,6 @@
1
+ // moment.js
2
+ // version : 2.0.0
3
+ // author : Tim Wood
4
+ // license : MIT
5
+ // momentjs.com
6
+ (function(e){function O(e,t){return function(n){return j(e.call(this,n),t)}}function M(e){return function(t){return this.lang().ordinal(e.call(this,t))}}function _(){}function D(e){H(this,e)}function P(e){var t=this._data={},n=e.years||e.year||e.y||0,r=e.months||e.month||e.M||0,i=e.weeks||e.week||e.w||0,s=e.days||e.day||e.d||0,o=e.hours||e.hour||e.h||0,u=e.minutes||e.minute||e.m||0,a=e.seconds||e.second||e.s||0,f=e.milliseconds||e.millisecond||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=B(f/1e3),t.seconds=a%60,u+=B(a/60),t.minutes=u%60,o+=B(u/60),t.hours=o%24,s+=B(o/24),s+=i*7,t.days=s%30,r+=B(s/30),t.months=r%12,n+=B(r/12),t.years=n}function H(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function B(e){return e<0?Math.ceil(e):Math.floor(e)}function j(e,t){var n=e+"";while(n.length<t)n="0"+n;return n}function F(e,t,n){var r=t._milliseconds,i=t._days,s=t._months,o;r&&e._d.setTime(+e+r*n),i&&e.date(e.date()+i*n),s&&(o=e.date(),e.date(1).month(e.month()+s*n).date(Math.min(o,e.daysInMonth())))}function I(e){return Object.prototype.toString.call(e)==="[object Array]"}function q(e,t){var n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)~~e[s]!==~~t[s]&&i++;return i+r}function R(e,t){return t.abbr=e,s[e]||(s[e]=new _),s[e].set(t),s[e]}function U(e){return e?(!s[e]&&o&&require("./lang/"+e),s[e]):t.fn._lang}function z(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function W(e){var t=e.match(a),n,r;for(n=0,r=t.length;n<r;n++)A[t[n]]?t[n]=A[t[n]]:t[n]=z(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=typeof t[n].call=="function"?t[n].call(i,e):t[n];return s}}function X(e,t){function r(t){return e.lang().longDateFormat(t)||t}var n=5;while(n--&&f.test(t))t=t.replace(f,r);return C[t]||(C[t]=W(t)),C[t](e)}function V(e){switch(e){case"DDDD":return p;case"YYYY":return d;case"YYYYY":return v;case"S":case"SS":case"SSS":case"DDD":return h;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return m;case"X":return b;case"Z":case"ZZ":return g;case"T":return y;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return c;default:return new RegExp(e.replace("\\",""))}}function $(e,t,n){var r,i,s=n._a;switch(e){case"M":case"MM":s[1]=t==null?0:~~t-1;break;case"MMM":case"MMMM":r=U(n._l).monthsParse(t),r!=null?s[1]=r:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":t!=null&&(s[2]=~~t);break;case"YY":s[0]=~~t+(~~t>68?1900:2e3);break;case"YYYY":case"YYYYY":s[0]=~~t;break;case"a":case"A":n._isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":s[3]=~~t;break;case"m":case"mm":s[4]=~~t;break;case"s":case"ss":s[5]=~~t;break;case"S":case"SS":case"SSS":s[6]=~~(("0."+t)*1e3);break;case"X":n._d=new Date(parseFloat(t)*1e3);break;case"Z":case"ZZ":n._useUTC=!0,r=(t+"").match(x),r&&r[1]&&(n._tzh=~~r[1]),r&&r[2]&&(n._tzm=~~r[2]),r&&r[0]==="+"&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}t==null&&(n._isValid=!1)}function J(e){var t,n,r=[];if(e._d)return;for(t=0;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];r[3]+=e._tzh||0,r[4]+=e._tzm||0,n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.setHours(r[3],r[4],r[5],r[6])),e._d=n}function K(e){var t=e._f.match(a),n=e._i,r,i;e._a=[];for(r=0;r<t.length;r++)i=(V(t[r]).exec(n)||[])[0],i&&(n=n.slice(n.indexOf(i)+i.length)),A[t[r]]&&$(t[r],i,e);e._isPm&&e._a[3]<12&&(e._a[3]+=12),e._isPm===!1&&e._a[3]===12&&(e._a[3]=0),J(e)}function Q(e){var t,n,r,i=99,s,o,u;while(e._f.length){t=H({},e),t._f=e._f.pop(),K(t),n=new D(t);if(n.isValid()){r=n;break}u=q(t._a,n.toArray()),u<i&&(i=u,r=n)}H(e,r)}function G(e){var t,n=e._i;if(w.exec(n)){e._f="YYYY-MM-DDT";for(t=0;t<4;t++)if(S[t][1].exec(n)){e._f+=S[t][0];break}g.exec(n)&&(e._f+=" Z"),K(e)}else e._d=new Date(n)}function Y(t){var n=t._i,r=u.exec(n);n===e?t._d=new Date:r?t._d=new Date(+r[1]):typeof n=="string"?G(t):I(n)?(t._a=n.slice(0),J(t)):t._d=n instanceof Date?new Date(+n):new Date(n)}function Z(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function et(e,t,n){var i=r(Math.abs(e)/1e3),s=r(i/60),o=r(s/60),u=r(o/24),a=r(u/365),f=i<45&&["s",i]||s===1&&["m"]||s<45&&["mm",s]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",r(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=n,Z.apply({},f)}function tt(e,n,r){var i=r-n,s=r-e.day();return s>i&&(s-=7),s<i-7&&(s+=7),Math.ceil(t(e).add("d",s).dayOfYear()/7)}function nt(e){var n=e._i,r=e._f;return n===null||n===""?null:(typeof n=="string"&&(e._i=n=U().preparse(n)),t.isMoment(n)?(e=H({},n),e._d=new Date(+n._d)):r?I(r)?Q(e):K(e):Y(e),new D(e))}function rt(e,n){t.fn[e]=t.fn[e+"s"]=function(e){var t=this._isUTC?"UTC":"";return e!=null?(this._d["set"+t+n](e),this):this._d["get"+t+n]()}}function it(e){t.duration.fn[e]=function(){return this._data[e]}}function st(e,n){t.duration.fn["as"+e]=function(){return+this/n}}var t,n="2.0.0",r=Math.round,i,s={},o=typeof module!="undefined"&&module.exports,u=/^\/?Date\((\-?\d+)/i,a=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,f=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,l=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,c=/\d\d?/,h=/\d{1,3}/,p=/\d{3}/,d=/\d{1,4}/,v=/[+\-]?\d{1,6}/,m=/[0-9]*[a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i,g=/Z|[\+\-]\d\d:?\d\d/i,y=/T/i,b=/[\+\-]?\d+(\.\d{1,3})?/,w=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,E="YYYY-MM-DDTHH:mm:ssZ",S=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],x=/([\+\-]|\d\d)/gi,T="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),N={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},C={},k="DDD w W M D d".split(" "),L="M D H h m s w W".split(" "),A={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return j(this.year()%100,2)},YYYY:function(){return j(this.year(),4)},YYYYY:function(){return j(this.year(),5)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return j(~~(this.milliseconds()/10),2)},SSS:function(){return j(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+j(~~(e/60),2)+":"+j(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+j(~~(10*e/6),4)},X:function(){return this.unix()}};while(k.length)i=k.pop(),A[i+"o"]=M(A[i]);while(L.length)i=L.pop(),A[i+i]=O(A[i],2);A.DDDD=O(A.DDD,3),_.prototype={set:function(e){var t,n;for(n in e)t=e[n],typeof t=="function"?this[n]=t:this["_"+n]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e){var n,r,i,s;this._monthsParse||(this._monthsParse=[]);for(n=0;n<12;n++){this._monthsParse[n]||(r=t([2e3,n]),i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i"));if(this._monthsParse[n].test(e))return n}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return tt(e,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},t=function(e,t,n){return nt({_i:e,_f:t,_l:n,_isUTC:!1})},t.utc=function(e,t,n){return nt({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=t.isDuration(e),i=typeof e=="number",s=r?e._data:i?{}:e,o;return i&&(n?s[n]=e:s.milliseconds=e),o=new P(s),r&&e.hasOwnProperty("_lang")&&(o._lang=e._lang),o},t.version=n,t.defaultFormat=E,t.lang=function(e,n){var r;if(!e)return t.fn._lang._abbr;n?R(e,n):s[e]||U(e),t.duration.fn._lang=t.fn._lang=U(e)},t.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),U(e)},t.isMoment=function(e){return e instanceof D},t.isDuration=function(e){return e instanceof P},t.fn=D.prototype={clone:function(){return t(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return t.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return this._isValid==null&&(this._a?this._isValid=!q(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(e){var n=X(this,e||t.defaultFormat);return this.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,-1),this},diff:function(e,n,r){var i=this._isUTC?t(e).utc():t(e).local(),s=(this.zone()-i.zone())*6e4,o,u;return n&&(n=n.replace(/s$/,"")),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,n==="year"&&(u/=12)):(o=this-i-s,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?o/864e5:n==="week"?o/6048e5:o),r?u:B(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=this.diff(t().startOf("day"),"days",!0),n=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(n,this))},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()<t([this.year()]).zone()||this.zone()<t([this.year(),5]).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e==null?t:this.add({d:e-t})},startOf:function(e){e=e.replace(/s$/,"");switch(e){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return e==="week"&&this.day(0),this},endOf:function(e){return this.startOf(e).add(e.replace(/s?$/,"s"),1).subtract("ms",1)},isAfter:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)>+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)===+t(e).startOf(n)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return t.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var n=r((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},isoWeek:function(e){var t=tt(this,1,4);return e==null?t:this.add("d",(e-t)*7)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},lang:function(t){return t===e?this._lang:(this._lang=U(t),this)}};for(i=0;i<T.length;i++)rt(T[i].toLowerCase().replace(/s$/,""),T[i]);rt("year","FullYear"),t.fn.days=t.fn.day,t.fn.weeks=t.fn.week,t.fn.isoWeeks=t.fn.isoWeek,t.duration.fn=P.prototype={weeks:function(){return B(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(e){var t=+this,n=et(t,!e,this.lang());return e&&(n=this.lang().pastFuture(t,n)),this.lang().postformat(n)},lang:t.fn.lang};for(i in N)N.hasOwnProperty(i)&&(st(i,N[i]),it(i.toLowerCase()));st("Weeks",6048e5),t.lang("en",{ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),o&&(module.exports=t),typeof ender=="undefined"&&(this.moment=t),typeof define=="function"&&define.amd&&define("moment",[],function(){return t})}).call(this);
@@ -3,12 +3,12 @@ body, html, #wrapper {
3
3
  width: 100%; }
4
4
 
5
5
  #left {
6
- width: 650px;
6
+ width: 500px;
7
7
  background-color: #eeffff; }
8
8
 
9
9
  #right {
10
10
  position: absolute;
11
- left: 650px; }
11
+ left: 500px; }
12
12
 
13
13
  #banner {
14
14
  background-color: lightblue;
@@ -54,28 +54,33 @@ body, html, #wrapper {
54
54
  padding: 15px;
55
55
  margin: 10px 0px; }
56
56
  #control li {
57
- margin: 5px 0px; }
58
- #control li span.repo_name,
59
- #control li span.ref_name,
60
- #control li span.sha1_commit,
61
- #control li span.git_command,
62
- #control li span.comment {
57
+ margin: 10px 0px;
58
+ background-color: #dadada; }
59
+ #control li span.repo_name, #control li span.ref_name, #control li span.sha1_commit,
60
+ #control li span.git_command, #control li span.comment,
61
+ #control li span.git_abs_time, #control li span.git_rel_time {
63
62
  display: inline-block;
64
63
  font-family: monospace; }
65
64
  #control li span.repo_name {
66
65
  background-color: yellow; }
67
66
  #control li span.ref_name {
68
67
  background-color: lightblue; }
68
+ #control li span.git_abs_time {
69
+ background-color: yellow; }
70
+ #control li span.git_rel_time {
71
+ background-color: lightgreen; }
69
72
  #control li span.sha1_commit {
70
73
  background-color: pink;
71
74
  width: 4.94em;
72
75
  overflow: hidden; }
73
76
  #control li span.git_command {
74
- min-width: 7em;
77
+ min-width: 6em;
75
78
  text-align: center;
76
- background-color: lightgreen; }
79
+ background-color: cyan; }
77
80
  #control li span.comment {
78
81
  font-size: 0.8em; }
82
+ #control li p:nth-child(n+2) {
83
+ padding-left: 2em; }
79
84
  #control li.unknown {
80
85
  color: red; }
81
86
 
data/lib/gitoe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gitoe
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/todo.markdown CHANGED
@@ -1,3 +1,10 @@
1
+ - find a way, to play with huge repo
2
+ - partial-fetching from latest commits
3
+ - IN A MORE space/time efficent way
4
+ - deferred fetch?
5
+ - -> partial-rendering of DAG ?
6
+ - from bottom-most layer
7
+
1
8
  - gitoe.Historian
2
9
  - more patterns
3
10
  - display time of changes in natural language
@@ -0,0 +1,6 @@
1
+ // moment.js
2
+ // version : 2.0.0
3
+ // author : Tim Wood
4
+ // license : MIT
5
+ // momentjs.com
6
+ (function(e){function O(e,t){return function(n){return j(e.call(this,n),t)}}function M(e){return function(t){return this.lang().ordinal(e.call(this,t))}}function _(){}function D(e){H(this,e)}function P(e){var t=this._data={},n=e.years||e.year||e.y||0,r=e.months||e.month||e.M||0,i=e.weeks||e.week||e.w||0,s=e.days||e.day||e.d||0,o=e.hours||e.hour||e.h||0,u=e.minutes||e.minute||e.m||0,a=e.seconds||e.second||e.s||0,f=e.milliseconds||e.millisecond||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=B(f/1e3),t.seconds=a%60,u+=B(a/60),t.minutes=u%60,o+=B(u/60),t.hours=o%24,s+=B(o/24),s+=i*7,t.days=s%30,r+=B(s/30),t.months=r%12,n+=B(r/12),t.years=n}function H(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function B(e){return e<0?Math.ceil(e):Math.floor(e)}function j(e,t){var n=e+"";while(n.length<t)n="0"+n;return n}function F(e,t,n){var r=t._milliseconds,i=t._days,s=t._months,o;r&&e._d.setTime(+e+r*n),i&&e.date(e.date()+i*n),s&&(o=e.date(),e.date(1).month(e.month()+s*n).date(Math.min(o,e.daysInMonth())))}function I(e){return Object.prototype.toString.call(e)==="[object Array]"}function q(e,t){var n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)~~e[s]!==~~t[s]&&i++;return i+r}function R(e,t){return t.abbr=e,s[e]||(s[e]=new _),s[e].set(t),s[e]}function U(e){return e?(!s[e]&&o&&require("./lang/"+e),s[e]):t.fn._lang}function z(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function W(e){var t=e.match(a),n,r;for(n=0,r=t.length;n<r;n++)A[t[n]]?t[n]=A[t[n]]:t[n]=z(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=typeof t[n].call=="function"?t[n].call(i,e):t[n];return s}}function X(e,t){function r(t){return e.lang().longDateFormat(t)||t}var n=5;while(n--&&f.test(t))t=t.replace(f,r);return C[t]||(C[t]=W(t)),C[t](e)}function V(e){switch(e){case"DDDD":return p;case"YYYY":return d;case"YYYYY":return v;case"S":case"SS":case"SSS":case"DDD":return h;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return m;case"X":return b;case"Z":case"ZZ":return g;case"T":return y;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return c;default:return new RegExp(e.replace("\\",""))}}function $(e,t,n){var r,i,s=n._a;switch(e){case"M":case"MM":s[1]=t==null?0:~~t-1;break;case"MMM":case"MMMM":r=U(n._l).monthsParse(t),r!=null?s[1]=r:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":t!=null&&(s[2]=~~t);break;case"YY":s[0]=~~t+(~~t>68?1900:2e3);break;case"YYYY":case"YYYYY":s[0]=~~t;break;case"a":case"A":n._isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":s[3]=~~t;break;case"m":case"mm":s[4]=~~t;break;case"s":case"ss":s[5]=~~t;break;case"S":case"SS":case"SSS":s[6]=~~(("0."+t)*1e3);break;case"X":n._d=new Date(parseFloat(t)*1e3);break;case"Z":case"ZZ":n._useUTC=!0,r=(t+"").match(x),r&&r[1]&&(n._tzh=~~r[1]),r&&r[2]&&(n._tzm=~~r[2]),r&&r[0]==="+"&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}t==null&&(n._isValid=!1)}function J(e){var t,n,r=[];if(e._d)return;for(t=0;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];r[3]+=e._tzh||0,r[4]+=e._tzm||0,n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.setHours(r[3],r[4],r[5],r[6])),e._d=n}function K(e){var t=e._f.match(a),n=e._i,r,i;e._a=[];for(r=0;r<t.length;r++)i=(V(t[r]).exec(n)||[])[0],i&&(n=n.slice(n.indexOf(i)+i.length)),A[t[r]]&&$(t[r],i,e);e._isPm&&e._a[3]<12&&(e._a[3]+=12),e._isPm===!1&&e._a[3]===12&&(e._a[3]=0),J(e)}function Q(e){var t,n,r,i=99,s,o,u;while(e._f.length){t=H({},e),t._f=e._f.pop(),K(t),n=new D(t);if(n.isValid()){r=n;break}u=q(t._a,n.toArray()),u<i&&(i=u,r=n)}H(e,r)}function G(e){var t,n=e._i;if(w.exec(n)){e._f="YYYY-MM-DDT";for(t=0;t<4;t++)if(S[t][1].exec(n)){e._f+=S[t][0];break}g.exec(n)&&(e._f+=" Z"),K(e)}else e._d=new Date(n)}function Y(t){var n=t._i,r=u.exec(n);n===e?t._d=new Date:r?t._d=new Date(+r[1]):typeof n=="string"?G(t):I(n)?(t._a=n.slice(0),J(t)):t._d=n instanceof Date?new Date(+n):new Date(n)}function Z(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function et(e,t,n){var i=r(Math.abs(e)/1e3),s=r(i/60),o=r(s/60),u=r(o/24),a=r(u/365),f=i<45&&["s",i]||s===1&&["m"]||s<45&&["mm",s]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",r(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=n,Z.apply({},f)}function tt(e,n,r){var i=r-n,s=r-e.day();return s>i&&(s-=7),s<i-7&&(s+=7),Math.ceil(t(e).add("d",s).dayOfYear()/7)}function nt(e){var n=e._i,r=e._f;return n===null||n===""?null:(typeof n=="string"&&(e._i=n=U().preparse(n)),t.isMoment(n)?(e=H({},n),e._d=new Date(+n._d)):r?I(r)?Q(e):K(e):Y(e),new D(e))}function rt(e,n){t.fn[e]=t.fn[e+"s"]=function(e){var t=this._isUTC?"UTC":"";return e!=null?(this._d["set"+t+n](e),this):this._d["get"+t+n]()}}function it(e){t.duration.fn[e]=function(){return this._data[e]}}function st(e,n){t.duration.fn["as"+e]=function(){return+this/n}}var t,n="2.0.0",r=Math.round,i,s={},o=typeof module!="undefined"&&module.exports,u=/^\/?Date\((\-?\d+)/i,a=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,f=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,l=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,c=/\d\d?/,h=/\d{1,3}/,p=/\d{3}/,d=/\d{1,4}/,v=/[+\-]?\d{1,6}/,m=/[0-9]*[a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i,g=/Z|[\+\-]\d\d:?\d\d/i,y=/T/i,b=/[\+\-]?\d+(\.\d{1,3})?/,w=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,E="YYYY-MM-DDTHH:mm:ssZ",S=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],x=/([\+\-]|\d\d)/gi,T="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),N={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},C={},k="DDD w W M D d".split(" "),L="M D H h m s w W".split(" "),A={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return j(this.year()%100,2)},YYYY:function(){return j(this.year(),4)},YYYYY:function(){return j(this.year(),5)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return j(~~(this.milliseconds()/10),2)},SSS:function(){return j(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+j(~~(e/60),2)+":"+j(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+j(~~(10*e/6),4)},X:function(){return this.unix()}};while(k.length)i=k.pop(),A[i+"o"]=M(A[i]);while(L.length)i=L.pop(),A[i+i]=O(A[i],2);A.DDDD=O(A.DDD,3),_.prototype={set:function(e){var t,n;for(n in e)t=e[n],typeof t=="function"?this[n]=t:this["_"+n]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e){var n,r,i,s;this._monthsParse||(this._monthsParse=[]);for(n=0;n<12;n++){this._monthsParse[n]||(r=t([2e3,n]),i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i"));if(this._monthsParse[n].test(e))return n}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return tt(e,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},t=function(e,t,n){return nt({_i:e,_f:t,_l:n,_isUTC:!1})},t.utc=function(e,t,n){return nt({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=t.isDuration(e),i=typeof e=="number",s=r?e._data:i?{}:e,o;return i&&(n?s[n]=e:s.milliseconds=e),o=new P(s),r&&e.hasOwnProperty("_lang")&&(o._lang=e._lang),o},t.version=n,t.defaultFormat=E,t.lang=function(e,n){var r;if(!e)return t.fn._lang._abbr;n?R(e,n):s[e]||U(e),t.duration.fn._lang=t.fn._lang=U(e)},t.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),U(e)},t.isMoment=function(e){return e instanceof D},t.isDuration=function(e){return e instanceof P},t.fn=D.prototype={clone:function(){return t(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return t.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return this._isValid==null&&(this._a?this._isValid=!q(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(e){var n=X(this,e||t.defaultFormat);return this.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,-1),this},diff:function(e,n,r){var i=this._isUTC?t(e).utc():t(e).local(),s=(this.zone()-i.zone())*6e4,o,u;return n&&(n=n.replace(/s$/,"")),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,n==="year"&&(u/=12)):(o=this-i-s,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?o/864e5:n==="week"?o/6048e5:o),r?u:B(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=this.diff(t().startOf("day"),"days",!0),n=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(n,this))},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()<t([this.year()]).zone()||this.zone()<t([this.year(),5]).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e==null?t:this.add({d:e-t})},startOf:function(e){e=e.replace(/s$/,"");switch(e){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return e==="week"&&this.day(0),this},endOf:function(e){return this.startOf(e).add(e.replace(/s?$/,"s"),1).subtract("ms",1)},isAfter:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)>+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)===+t(e).startOf(n)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return t.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var n=r((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},isoWeek:function(e){var t=tt(this,1,4);return e==null?t:this.add("d",(e-t)*7)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},lang:function(t){return t===e?this._lang:(this._lang=U(t),this)}};for(i=0;i<T.length;i++)rt(T[i].toLowerCase().replace(/s$/,""),T[i]);rt("year","FullYear"),t.fn.days=t.fn.day,t.fn.weeks=t.fn.week,t.fn.isoWeeks=t.fn.isoWeek,t.duration.fn=P.prototype={weeks:function(){return B(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(e){var t=+this,n=et(t,!e,this.lang());return e&&(n=this.lang().pastFuture(t,n)),this.lang().postformat(n)},lang:t.fn.lang};for(i in N)N.hasOwnProperty(i)&&(st(i,N[i]),it(i.toLowerCase()));st("Weeks",6048e5),t.lang("en",{ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),o&&(module.exports=t),typeof ender=="undefined"&&(this.moment=t),typeof define=="function"&&define.amd&&define("moment",[],function(){return t})}).call(this);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wang Guan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-14 00:00:00.000000000 Z
11
+ date: 2013-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
@@ -188,6 +188,7 @@ files:
188
188
  - content/index.haml
189
189
  - content/jquery/jquery-1.9.1.min.js
190
190
  - content/jquery/jquery.scrollTo.min.js
191
+ - content/moment.min.js
191
192
  - content/raphael-min.js
192
193
  - content/reset.sass
193
194
  - content/style.sass
@@ -199,6 +200,7 @@ files:
199
200
  - lib/gitoe/httpserver/public/index.html
200
201
  - lib/gitoe/httpserver/public/jquery/jquery-1.9.1.min.js
201
202
  - lib/gitoe/httpserver/public/jquery/jquery.scrollTo.min.js
203
+ - lib/gitoe/httpserver/public/moment.min.js
202
204
  - lib/gitoe/httpserver/public/raphael-min.js
203
205
  - lib/gitoe/httpserver/public/reset.css
204
206
  - lib/gitoe/httpserver/public/style.css
@@ -211,6 +213,7 @@ files:
211
213
  - test/test.rb
212
214
  - todo.markdown
213
215
  - vendor/jquery-1.9.1.min.js
216
+ - vendor/moment.min.js
214
217
  - vendor/raphael-min.js
215
218
  homepage: https://github.com/jokester/gitoe
216
219
  licenses: []
@@ -231,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
234
  version: '0'
232
235
  requirements: []
233
236
  rubyforge_project:
234
- rubygems_version: 2.0.0.rc.2
237
+ rubygems_version: 2.0.2
235
238
  signing_key:
236
239
  specification_version: 4
237
240
  summary: visualize local git activities