Permalink
Browse files

Autoload SCMs

BTW, I wonder wheter we could get rid of SCM.new and class_for
by requiring buildable to return a class. WDYT?
  • Loading branch information...
1 parent a511d7c commit 8b74a8840b0afd9ef2e5e9152cff31310763946b @sr sr committed Apr 17, 2009
Showing with 3 additions and 2 deletions.
  1. +0 −2 lib/bob.rb
  2. +3 −0 lib/bob/scm.rb
View
@@ -6,8 +6,6 @@
require "bob/builder"
require "bob/scm"
-require "bob/scm/git"
-require "bob/scm/svn"
require "bob/background_engines"
module Bob
View
@@ -2,6 +2,9 @@
module Bob
module SCM
+ autoload :Git, "bob/scm/git"
+ autoload :Svn, "bob/scm/svn"
+
class CantRunCommand < RuntimeError; end
# Factory to return appropriate SCM instances (according to repository kind)

0 comments on commit 8b74a88

Please sign in to comment.