Permalink
Browse files

Autoload thor/actions and thor/group.

  • Loading branch information...
1 parent dad6da6 commit ba20598579802c609707663cce1dac4342dbc336 @josevalim josevalim committed Feb 3, 2010
Showing with 6 additions and 3 deletions.
  1. +0 −2 lib/thor.rb
  2. +3 −0 lib/thor/base.rb
  3. +2 −1 lib/thor/group.rb
  4. +1 −0 spec/spec_helper.rb
View
2 lib/thor.rb
@@ -1,6 +1,4 @@
require 'thor/base'
-require 'thor/group'
-require 'thor/actions'
# TODO: Update thor to allow for git-style CLI (git bisect run)
class Thor
View
3 lib/thor/base.rb
@@ -8,6 +8,9 @@
require 'thor/util'
class Thor
+ autoload :Actions, 'thor/actions'
+ autoload :RakeCompat, 'thor/rake_compat'
+
# Shortcuts for help.
HELP_MAPPINGS = %w(-h -? --help -D)
View
3 lib/thor/group.rb
@@ -1,8 +1,9 @@
+require 'thor/base'
+
# Thor has a special class called Thor::Group. The main difference to Thor class
# is that it invokes all tasks at once. It also include some methods that allows
# invocations to be done at the class method, which are not available to Thor
# tasks.
-#
class Thor::Group
class << self
# The descrition for this Thor::Group. If none is provided, but a source root
View
1 spec/spec_helper.rb
@@ -2,6 +2,7 @@
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require 'thor'
+require 'thor/group'
require 'stringio'
require 'rubygems'

0 comments on commit ba20598

Please sign in to comment.