public
Fork of Caged/gitnub
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/dustin/gitnub.git
Search Repo:
Caged (author)
Mon Apr 14 14:12:26 -0700 2008
commit  31d87daed47be3336a133aea4a52b0fd3ed2bfc4
tree    e26c7badd893553ae60b6f91243a251e0804a8cf
parent  87c0a61921d76f4e5076798b398bc69bf9e0d990 parent  8371aa6417af86ce08b556b585aa2ef4630d2af8
gitnub / InfoWindowController.rb
100644 28 lines (23 sloc) 0.623 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# InfoWindowController.rb
# GitNub
#
# Created by Justin Palmer on 3/6/08.
# Copyright (c) 2008 Active Reload, LLC. All rights reserved.
#
 
require 'osx/cocoa'
 
class InfoWindowController < OSX::NSWindowController
  ib_outlet :push_url
  ib_outlet :clone_url
  ib_outlet :commits_count
  
  def init_with_repository(repository)
    @repo = repository
    initWithWindowNibName("Info")
    return self
  end
  
  def awakeFromNib
    clone_url = @repo.git.config({}, "--get", "remote.origin.url").gsub("\n", '')
    @clone_url.stringValue = clone_url
    
    @commits_count.stringValue = @repo.commit_count
  end
end