godo 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ K�R��O s?���bs� �Ble�MS���R?ʘ�<��o���2K����j����-�2�bX�c��_����n�Im����6�5d�j��g2?��
2
+ %$Hɇ�ד� J�^��Pi���"o��ŕ_6=�7��}d�ۇ��1��wZ�z�/y��o��g¢�+G���%幫���>T���{���ց9*۟.O��������#�񇞧����H�]7vR��p?��khD~�㷮4x�P`6�j��H��$s
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2008-03-05
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
@@ -0,0 +1,11 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ bin/godo
6
+ lib/godo.rb
7
+ lib/finder.rb
8
+ lib/iterm.rb
9
+ lib/project.rb
10
+ lib/session.rb
11
+ lib/template.yml
@@ -0,0 +1,73 @@
1
+ = godo
2
+
3
+ * http://rubymatt.rubyforge.org/godo
4
+
5
+ == DESCRIPTION:
6
+
7
+ go (to project) do (stuffs)
8
+
9
+ godo provides a smart way of opening a project folder and invoking a set of commands appropriate to
10
+ that project. Examples might be starting mongrel, tailing one or more logs, starting consoles or IRB,
11
+ opening empty terminal sessions, or making ssh connections.
12
+
13
+ godo works by searching your project paths for a search string and attempting to find the project you
14
+ are talking about. It makes some straightforward efforts to disambiguate.
15
+
16
+ godo then uses heuristics (which can be overriden or extended) to figure out what type of project it is,
17
+ for example a RoR project using RSpec and Subversion. It then invokes a series of action appropriate to
18
+ that project type, each action in its own terminal session.
19
+
20
+ godo is entirely configured by a YAML file (~/.godo) that contains project types, heuristics, actions,
21
+ project paths, and a session controller.
22
+
23
+ godo comes with an iTerm session controller that uses the rb-appscript gem to control iTerm. It should
24
+ be straightforward to add a controller for Leopard Terminal or a controller that works in a different way
25
+ (e.g. creating new windows instead of new tabs).
26
+
27
+ == FEATURES/PROBLEMS:
28
+
29
+ * All-in-one configuration file
30
+ * Flexible heuristics for detecting project type
31
+ * Flexible actions for running commands
32
+
33
+ == SYNOPSIS:
34
+
35
+ godo project-search-string
36
+
37
+ To override the project type use -o <matcher-name>
38
+
39
+ == REQUIREMENTS:
40
+
41
+ * Trollop
42
+ * rb-appscript
43
+
44
+ == INSTALL:
45
+
46
+ * sudo gem install godo
47
+ * godo --install
48
+ * mate|vi|emacs ~/.godo
49
+
50
+ == LICENSE:
51
+
52
+ (The MIT License)
53
+
54
+ Copyright (c) 2008 Matt Mower <self@mattmower.com>
55
+
56
+ Permission is hereby granted, free of charge, to any person obtaining
57
+ a copy of this software and associated documentation files (the
58
+ 'Software'), to deal in the Software without restriction, including
59
+ without limitation the rights to use, copy, modify, merge, publish,
60
+ distribute, sublicense, and/or sell copies of the Software, and to
61
+ permit persons to whom the Software is furnished to do so, subject to
62
+ the following conditions:
63
+
64
+ The above copyright notice and this permission notice shall be
65
+ included in all copies or substantial portions of the Software.
66
+
67
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
68
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
70
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
71
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
72
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
73
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+ require './lib/godo.rb'
6
+
7
+ Hoe.new('godo', Godo::VERSION) do |p|
8
+ p.rubyforge_name = 'rubymatt'
9
+ p.developer( 'Matt Mower', 'self@mattmower.com' )
10
+ p.extra_deps << ['trollop','>= 1.7']
11
+ p.extra_deps << ['rb-appscript','>= 0.5.1']
12
+ p.remote_rdoc_dir = 'godo'
13
+ end
14
+
15
+ # vim: syntax=Ruby
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby -w
2
+
3
+ require 'rubygems'
4
+ require 'trollop'
5
+ require 'godo'
6
+
7
+ opts = Trollop::options do
8
+ opt :install, "Create a fresh ~/.godo configuration file"
9
+ opt :override, "Override heuristics to specify project type", :short => 'o', :type => :string
10
+ end
11
+
12
+ if opts[:install]
13
+ begin
14
+ Godo.install_config
15
+ puts "Installed configuration file ~/.godo, please customise"
16
+ exit 0
17
+ rescue => e
18
+ puts e.message
19
+ exit 1
20
+ end
21
+ else
22
+ begin
23
+ Godo.invoke( ARGV.shift, opts )
24
+ rescue Errno::ENOENT => e
25
+ puts e.message
26
+ puts "Use --install to create the default configuration file."
27
+ exit 1
28
+ else
29
+ exit 0
30
+ end
31
+ end
@@ -0,0 +1,50 @@
1
+ require 'find'
2
+
3
+ module Godo
4
+
5
+ class Finder
6
+
7
+ def self.find( query, options )
8
+ finder = Finder.new( options["projects"], options["ignores"] )
9
+ finder.find( Regexp.escape( query ) )
10
+ end
11
+
12
+ def initialize( roots, ignores )
13
+ @roots = roots.map { |root| File.expand_path( root ) }
14
+ @ignores = ignores.map { |ignore| Regexp.compile( "/#{ignore}" ) }
15
+ end
16
+
17
+ def find( query )
18
+ matches = []
19
+ @roots.each do |root|
20
+ # puts "Searching for #{query} in #{root}"
21
+ Find.find( root ) do |path|
22
+ if filtered?( path )
23
+ Find.prune
24
+ elsif matches?( path, query )
25
+ matches << path
26
+ end
27
+ end
28
+ end
29
+
30
+ # puts "Found: #{matches.inspect}"
31
+ matches
32
+ end
33
+
34
+ def matches?( path, query )
35
+ path.match( query )
36
+ end
37
+
38
+ def filtered?( path )
39
+ !File.directory?( path ) || excluded?( path )
40
+ end
41
+
42
+ def excluded?( path )
43
+ ignore = !!@ignores.detect { |ignore| ignore.match( path ) }
44
+ #puts "Ignore: #{path.inspect} -> #{ignore.inspect}"
45
+ ignore
46
+ end
47
+
48
+ end
49
+
50
+ end
@@ -0,0 +1,82 @@
1
+ require 'yaml'
2
+
3
+ module Godo
4
+ VERSION = '1.0.0'
5
+ LIBPATH = File.expand_path( File.dirname( __FILE__ ) )
6
+
7
+ def self.libpath( *args )
8
+ args.empty? ? LIBPATH : File.join( LIBPATH, *args )
9
+ end
10
+
11
+ def self.install_config
12
+ raise "Will not overwrite config. Please delete ~/.godo if you wish to update it." if File.exists?( File.expand_path( '~/.godo' ) )
13
+ self.copy( libpath( 'template.yml' ), '~/.godo' )
14
+ end
15
+
16
+ def self.copy( from, path, overwrite = false )
17
+ if File.exists?( path ) && !overwrite
18
+ raise "Cannot overwrite #{path}. Please delete first and try again."
19
+ else
20
+ File.open( File.expand_path( path ), "w" ) do |file|
21
+ file.write( File.read( from ) )
22
+ end
23
+ end
24
+ end
25
+
26
+ def self.invoke( query, options )
27
+ Invoker.new( options ).invoke( query )
28
+ end
29
+
30
+ class Invoker
31
+
32
+ def initialize( options )
33
+ @options = options
34
+ @config = YAML::load( File.read( File.expand_path( "~/.godo" ) ) )
35
+ end
36
+
37
+ def invoke( query )
38
+ require 'finder'
39
+ paths = Finder.find( query, @config )
40
+ if paths.empty?
41
+ puts "No match for: #{query}"
42
+ else
43
+ paths = strip_inexact_matches( query, paths )
44
+ if paths.size > 1
45
+ if base_match( paths )
46
+ invoke_project( paths.first )
47
+ else
48
+ puts "Multiple ambgiuous matches for: #{query}"
49
+ paths.each do |path|
50
+ puts "\t#{path}"
51
+ end
52
+ end
53
+ else
54
+ invoke_project( paths.first )
55
+ end
56
+ end
57
+ end
58
+
59
+ def strip_inexact_matches( query, paths )
60
+ # If any of the paths have the query as a complete path component
61
+ # then strip any paths that don't
62
+ if paths.any? { |path| path.split( File::SEPARATOR ).any? { |component| query == component } }
63
+ paths.select { |path| path.split( File::SEPARATOR ).any? { |component| query == component } }
64
+ else
65
+ paths
66
+ end
67
+ end
68
+
69
+ def base_match( paths )
70
+ # Is the first path a prefix for all subsequent-paths
71
+ path_match = Regexp.compile( "^#{paths.first}" )
72
+ paths[1..-1].all? { |path| path.match( path_match ) }
73
+ end
74
+
75
+ def invoke_project( path )
76
+ require 'project'
77
+ project = Project.new( @options, @config )
78
+ project.invoke( path )
79
+ end
80
+ end
81
+
82
+ end
@@ -0,0 +1,24 @@
1
+ require 'session'
2
+ require 'appscript'
3
+
4
+ module Godo
5
+
6
+ class ITermSession < Session
7
+
8
+ def initialize( path )
9
+ super( path )
10
+ @@iterm ||= Appscript::app( 'iTerm' )
11
+ end
12
+
13
+ def start
14
+ @session = @@iterm.current_terminal.sessions.end.make( :new => :session )
15
+ @session.exec( :command => 'bash -l' )
16
+ end
17
+
18
+ def execute( command )
19
+ @session.write( :text => command )
20
+ end
21
+
22
+ end
23
+
24
+ end
@@ -0,0 +1,79 @@
1
+ module Godo
2
+
3
+ class Project
4
+
5
+ def initialize( options, config )
6
+ @options = options
7
+ @heuristics = config["heuristics"]
8
+ @actions = config["actions"]
9
+ @matchers = config["matchers"]
10
+
11
+ require config["sessions"].downcase
12
+ @session_class = Godo.const_get( "#{config[ "sessions" ]}Session" )
13
+ end
14
+
15
+ def invoke( path )
16
+ matcher = find_match( path )
17
+ if matcher
18
+ puts "Project type: #{matcher["name"]}"
19
+ invoke_actions( path, matcher["actions"] )
20
+ else
21
+ puts "No matching project type"
22
+ end
23
+ end
24
+
25
+ private
26
+ def invoke_actions( path, action_group )
27
+ session = @session_class.new( path )
28
+
29
+ missing_actions = action_group.find_all { |action| !@actions.has_key?( action ) }
30
+ if missing_actions.empty?
31
+ action_group.each { |action_name|
32
+ action = @actions[action_name]
33
+ exit = case action["exit"]
34
+ when true
35
+ true
36
+ when "true"
37
+ true
38
+ when "1"
39
+ true
40
+ when "y"
41
+ true
42
+ else
43
+ false
44
+ end
45
+
46
+ puts "\trunning: #{action_name} (exit: #{exit})"
47
+ session.create( action["label"], action["command"], exit )
48
+ }
49
+ else
50
+ missing_actions.each do |action|
51
+ puts "\tMissing action: #{action}"
52
+ end
53
+ end
54
+ end
55
+
56
+ def find_match( path )
57
+ if @options[:override]
58
+ puts @options[:override]
59
+ @matchers.find { |matcher| matcher["name"] == @options[:override] }
60
+ else
61
+ @matchers.detect { |matcher|
62
+ matcher["heuristics"].all? { |heuristic|
63
+ satisfies?( path, heuristic )
64
+ }
65
+ }
66
+ end
67
+ end
68
+
69
+ def satisfies?( path, heuristic )
70
+ eval( @heuristics[heuristic], get_binding( path ) )
71
+ end
72
+
73
+ def get_binding( project_path )
74
+ binding
75
+ end
76
+
77
+ end
78
+
79
+ end
@@ -0,0 +1,57 @@
1
+ module Godo
2
+
3
+ class Session
4
+ attr_reader :path
5
+
6
+ def initialize( path )
7
+ @path = path
8
+ @counters = Hash.new { 0 }
9
+ end
10
+
11
+ def create( label, command, exit )
12
+ start
13
+ set_label( label )
14
+ execute( "cd #{path}; clear;" )
15
+
16
+ if command
17
+ puts "Command: #{command}"
18
+ command = eval( "\"" + command + "\"", get_binding )
19
+ puts "\tNow: #{command}"
20
+ execute( command )
21
+ end
22
+
23
+ if exit
24
+ execute( "sleep 5; exit" )
25
+ end
26
+ end
27
+
28
+ def set_label( label )
29
+ if label
30
+ label = eval( "\"" + label + "\"" )
31
+ execute( "echo -n -e \"\\033]0;#{label}\\007\"; clear;" )
32
+ else
33
+ execute( "clear;" )
34
+ end
35
+ end
36
+
37
+ def start
38
+ raise "#{self.class.name} must implement #start"
39
+ end
40
+
41
+ def execute( command )
42
+ raise "#{self.class.name} must implement #execute"
43
+ end
44
+
45
+ def counter( name )
46
+ @counters[name] += 1
47
+ "#{@counters[name]}"
48
+ end
49
+
50
+ private
51
+ def get_binding( project_path = @path )
52
+ binding
53
+ end
54
+
55
+ end
56
+
57
+ end
@@ -0,0 +1,202 @@
1
+ # Heuristics are used to "sniff" a project folder once found
2
+ # and determine whether it is of some kind, e.g. a Rails project.
3
+ # Heuristic code should be a ruby expression returning true or
4
+ # false. The value of 'project_path' will be bound to the found
5
+ # path when the heuristic is run.
6
+ #
7
+ heuristics:
8
+ rails: |
9
+ File.exists?( File.join( project_path, "config", "environment.rb" ) ) &&
10
+ File.exists?( File.join( project_path, "config", "environments", "development.rb" ) ) &&
11
+ File.exists?( File.join( project_path, "config", "environments", "test.rb" ) )
12
+ rspec: |
13
+ File.exists?( File.join( project_path, "spec" ) )
14
+ svn: |
15
+ File.exists?( File.join( project_path, ".svn" ) )
16
+ git: |
17
+ File.exists?( File.join( project_path, ".git" ) )
18
+ true: |
19
+ true
20
+
21
+ # Actions are shell commands that are run in their own terminal session (by default
22
+ # this will be a new tab in iTerm). Each action can optionally label the terminal
23
+ # session.
24
+ #
25
+ # Where the session should not hang around after the command has run (e.g. opening
26
+ # a GUI app) then specify
27
+ # exit: true.
28
+ # This will ensure that the session is closes without causing AppleScript
29
+ # errors due to terminal sessions getting re-numbered.
30
+ #
31
+ actions:
32
+ say:
33
+ command: "say #{project_path}"
34
+ exit: true
35
+ mongrel:
36
+ label: mongrel
37
+ command: mongrel_rails start
38
+ devlog:
39
+ label: dev-log
40
+ command: tail -f log/development.log
41
+ reqlog:
42
+ label: req-log
43
+ command: tail -f log/request.log
44
+ autotest-unit:
45
+ label: tests
46
+ command: autotest
47
+ autotest-spec:
48
+ label: specs
49
+ command: autotest
50
+ console:
51
+ label: console
52
+ command: ruby script/console
53
+ irb:
54
+ label: IRB
55
+ command: irb
56
+ diffly:
57
+ command: diffly .
58
+ exit: true
59
+ browser:
60
+ command: open -a BonEcho http://localhost:3000/
61
+ exit: true
62
+ terminal:
63
+ label: Con-#{counter(:terminal)}
64
+ textmate:
65
+ command: mate .
66
+ exit: true
67
+ view-git:
68
+ command: (PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/bin nohup gitk &)
69
+ exit: true
70
+
71
+ # A list of paths that should be ignored when searching for the project path
72
+ #
73
+ ignores:
74
+ - \.svn
75
+ - \.git
76
+ - CVS
77
+ - app
78
+ - lib
79
+ - vendor
80
+ - config
81
+ - db
82
+ - log
83
+ - public
84
+ - script
85
+ - test
86
+ - spec
87
+ - tmp
88
+ - doc
89
+ - components
90
+ - rdoc
91
+ - generators
92
+ - data
93
+ - man
94
+ - build
95
+ - backup
96
+ - bin
97
+ - include
98
+ - .*\.lproj
99
+ - .*\.xcodeproj
100
+ - .*\.wdgtproj
101
+ - .*\.app
102
+
103
+ # Once the project folder has been identified each listed matcher, in turn, gets to run
104
+ # its heuristics against the folder. Once a matcher has all of its heuristics succeed
105
+ # that matcher is selected and its action are run.
106
+ #
107
+ # Where matchers share common heuristics they should be listed in order of most to least
108
+ # specific, e.g. rail+spec+svn should be listed before rails+svn otherwise the more
109
+ # specific matcher will not get a chance to run.
110
+ #
111
+ matchers:
112
+ -
113
+ name: rails+spec+svn
114
+ heuristics:
115
+ - rspec
116
+ - rails
117
+ - svn
118
+ actions:
119
+ - say
120
+ - mongrel
121
+ - devlog
122
+ - reqlog
123
+ - autotest-spec
124
+ - console
125
+ - irb
126
+ - terminal
127
+ - terminal
128
+ - diffly
129
+ - browser
130
+ - textmate
131
+ -
132
+ name: rails+spec+git
133
+ heuristics:
134
+ - rails
135
+ - rspec
136
+ - git
137
+ actions:
138
+ - say
139
+ - mongrel
140
+ - devlog
141
+ - reqlog
142
+ - autotest-spec
143
+ - console
144
+ - irb
145
+ - terminal
146
+ - terminal
147
+ - view-git
148
+ - browser
149
+ - textmate
150
+ -
151
+ name: rails+svn
152
+ heuristics:
153
+ - rails
154
+ - svn
155
+ actions:
156
+ - say
157
+ - mongrel
158
+ - devlog
159
+ - reqlog
160
+ - autotest-unit
161
+ - console
162
+ - irb
163
+ - terminal
164
+ - terminal
165
+ - diffly
166
+ - browser
167
+ - textmate
168
+ -
169
+ name: rails+git
170
+ heuristics:
171
+ - rails
172
+ - git
173
+ actions:
174
+ - say
175
+ - mongrel
176
+ - devlog
177
+ - reqlog
178
+ - autotest-unit
179
+ - console
180
+ - irb
181
+ - terminal
182
+ - terminal
183
+ - view-git
184
+ - browser
185
+ - textmate
186
+ -
187
+ name: default
188
+ heuristics:
189
+ - true
190
+ actions:
191
+ - terminal
192
+ - say
193
+
194
+ # A list of project root paths to be searched
195
+ projects:
196
+ - ~/Projects/ruby
197
+ - ~/Projects/rails
198
+ - ~/Projects/Cocoa
199
+
200
+ # The session controller to use. Right now iTerm is the only
201
+ # game in town.
202
+ sessions: ITerm
File without changes
metadata ADDED
@@ -0,0 +1,114 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: godo
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Matt Mower
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDMjCCAhqgAwIBAgIBADANBgkqhkiG9w0BAQUFADA/MQ0wCwYDVQQDDARzZWxm
14
+ MRkwFwYKCZImiZPyLGQBGRYJbWF0dG1vd2VyMRMwEQYKCZImiZPyLGQBGRYDY29t
15
+ MB4XDTA3MTAwMzIzMjkwN1oXDTA4MTAwMjIzMjkwN1owPzENMAsGA1UEAwwEc2Vs
16
+ ZjEZMBcGCgmSJomT8ixkARkWCW1hdHRtb3dlcjETMBEGCgmSJomT8ixkARkWA2Nv
17
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQejbmmtJD6FfTwc9+
18
+ QsWEqNFgNL8+tbrpxUuT8J2j0O0Pvkhw3wGT3tzMdXlnaz+OwUz8qU6HGwDAiK/3
19
+ zWAGuBRApkIAooTryRWLYmkZfnZidG8A2msmRwQd84Rkzn6Vgad+46o6jQfJSgy1
20
+ pDsZVfsRcUZ0dWetp+ll7Lq/4HyecdNgRfmrQh6pmKwIUmh5cj91iBX3NEqx5TN6
21
+ AKkYIOBMuOnBMNrXvApH10ruvus1d/PiJIjAavvbgSih+vyB8NTXTF4kOhKXnF0w
22
+ Zx3CF5asJejopRGNUcY9Vmjr7WiRHhUnFjc8hs385MlQNKEdAirVwIIgWfkQwJO+
23
+ GQ0CAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFL99
24
+ Fuw4VZwExQog/QSr8zIFfj1WMA0GCSqGSIb3DQEBBQUAA4IBAQATHmiqgSFKeJQM
25
+ QZjefTiRH6q1TgnJEt0/ylb9gNUCBpIFC1QOtuf68NAt90n6q1CZ51W3EreOPmi2
26
+ k2UxzfnPH6av2HQxmC1Xwv+X/eKF65shy/D75XWeCKLwynlXbA0cSjkV8/jSDB9I
27
+ pPXX1PjTNmzS2oNGSBroG567Uod41eAjlFA2FQTSWu/lDaYvLBjupGzz59/lZfkl
28
+ oCvK+OORDtfJ/a8CdYuD7PltGIEGV9srqdsEsmcrXGHaZt+jGRLYi60h5ZEd7lOm
29
+ 1WEvMXOXF3ofp87Yw1MSpG7yQyr0i5DW6VM3v6AP0ABxoM4p80JDHhwAmKWRWWQk
30
+ yMQ/kUco
31
+ -----END CERTIFICATE-----
32
+
33
+ date: 2008-03-08 00:00:00 +00:00
34
+ default_executable:
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: trollop
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "1.7"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: rb-appscript
47
+ version_requirement:
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 0.5.1
53
+ version:
54
+ - !ruby/object:Gem::Dependency
55
+ name: hoe
56
+ version_requirement:
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 1.5.1
62
+ version:
63
+ description: go (to project) do (stuffs) godo provides a smart way of opening a project folder and invoking a set of commands appropriate to that project. Examples might be starting mongrel, tailing one or more logs, starting consoles or IRB, opening empty terminal sessions, or making ssh connections. godo works by searching your project paths for a search string and attempting to find the project you are talking about. It makes some straightforward efforts to disambiguate. godo then uses heuristics (which can be overriden or extended) to figure out what type of project it is, for example a RoR project using RSpec and Subversion. It then invokes a series of action appropriate to that project type, each action in its own terminal session. godo is entirely configured by a YAML file (~/.godo) that contains project types, heuristics, actions, project paths, and a session controller. godo comes with an iTerm session controller that uses the rb-appscript gem to control iTerm. It should be straightforward to add a controller for Leopard Terminal or a controller that works in a different way (e.g. creating new windows instead of new tabs).
64
+ email:
65
+ - self@mattmower.com
66
+ executables:
67
+ - godo
68
+ extensions: []
69
+
70
+ extra_rdoc_files:
71
+ - History.txt
72
+ - Manifest.txt
73
+ - README.txt
74
+ files:
75
+ - History.txt
76
+ - Manifest.txt
77
+ - README.txt
78
+ - Rakefile
79
+ - bin/godo
80
+ - lib/godo.rb
81
+ - lib/finder.rb
82
+ - lib/iterm.rb
83
+ - lib/project.rb
84
+ - lib/session.rb
85
+ - lib/template.yml
86
+ has_rdoc: true
87
+ homepage: http://rubymatt.rubyforge.org/godo
88
+ post_install_message:
89
+ rdoc_options:
90
+ - --main
91
+ - README.txt
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: "0"
99
+ version:
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: "0"
105
+ version:
106
+ requirements: []
107
+
108
+ rubyforge_project: rubymatt
109
+ rubygems_version: 1.0.1
110
+ signing_key:
111
+ specification_version: 2
112
+ summary: go (to project) do (stuffs) godo provides a smart way of opening a project folder and invoking a set of commands appropriate to that project
113
+ test_files:
114
+ - test/test_godo.rb
@@ -0,0 +1,2 @@
1
+ /H=A�v�sH�z��Z�y,�A=ױ%(q�:" ����q�0Z���T 3zzOB�ԐG�RK���򊰜��id �K�C�i�����t�}�5T�Y�C�������޹��1&^`��+����jw
2
+ �2��#OdZ��}��m��4��ض�'�:7թ͏7K7�1�g%��땰D��;��Q\��4:)�f������̱�+x1=���0.�D�B��vt*�,���ZԐ݊�)�zx/��]$ѷ��:��4�