<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,8 +1,5 @@
 #!/usr/bin/env ruby
-require 'rubygems'
-require 'optparse'
-
 $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
-require 'jeweler'
+require 'jeweler/generator'
 
 Jeweler::Generator::Application.run!(*ARGV)</diff>
      <filename>bin/jeweler</filename>
    </modified>
    <modified>
      <diff>@@ -1,28 +1,24 @@
 require 'date'
-require 'rubygems/user_interaction'
-require 'rubygems/builder'
-require 'rubyforge'
 
-require 'jeweler/errors'
-require 'jeweler/version_helper'
-require 'jeweler/gemspec_helper'
-require 'jeweler/generator'
-require 'jeweler/generator/options'
-require 'jeweler/generator/application'
-
-require 'jeweler/commands'
+# A Jeweler helps you craft the perfect Rubygem. Give him a gemspec, and he takes care of the rest.
+class Jeweler
+  require 'jeweler/errors'
+  require 'rubygems/user_interaction'
 
-require 'jeweler/tasks'
-require 'jeweler/gemcutter_tasks'
-require 'jeweler/rubyforge_tasks'
+  autoload :Generator,      'jeweler/generator'
 
-require 'jeweler/specification'
+  autoload :Commands,       'jeweler/commands'
+  
+  autoload :VersionHelper,  'jeweler/version_helper'
+  autoload :GemSpecHelper,  'jeweler/gemspec_helper'
 
-# A Jeweler helps you craft the perfect Rubygem. Give him a gemspec, and he takes care of the rest.
-class Jeweler
+  autoload :Tasks,          'jeweler/tasks'
+  autoload :GemcutterTasks, 'jeweler/gemcutter_tasks'
+  autoload :RubyforgeTasks, 'jeweler/rubyforge_tasks'
+  autoload :Specification,  'jeweler/specification'
 
   attr_reader :gemspec, :gemspec_helper, :version_helper
-  attr_accessor :base_dir, :output, :repo, :commit, :rubyforge
+  attr_accessor :base_dir, :output, :repo, :commit
 
   def initialize(gemspec, base_dir = '.')
     raise(GemspecError, &quot;Can't create a Jeweler with a nil gemspec&quot;) if gemspec.nil?
@@ -37,7 +33,6 @@ class Jeweler
     @output         = $stdout
     @commit         = true
     @gemspec_helper = GemSpecHelper.new(gemspec, base_dir)
-    @rubyforge      = RubyForge.new
   end
 
   # Major version, as defined by the gemspec's Version module.</diff>
      <filename>lib/jeweler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,21 @@
-require 'jeweler/commands/build_gem'
-require 'jeweler/commands/install_gem'
-require 'jeweler/commands/check_dependencies'
-require 'jeweler/commands/release'
-require 'jeweler/commands/release_to_gemcutter'
-require 'jeweler/commands/release_to_rubyforge'
-require 'jeweler/commands/setup_rubyforge'
-require 'jeweler/commands/validate_gemspec'
-require 'jeweler/commands/write_gemspec'
-require 'jeweler/commands/version/base'
-require 'jeweler/commands/version/bump_major'
-require 'jeweler/commands/version/bump_minor'
-require 'jeweler/commands/version/bump_patch'
-require 'jeweler/commands/version/write'
+class Jeweler
+  module Commands
+    autoload :BuildGem, 'jeweler/commands/build_gem'
+    autoload :InstallGem, 'jeweler/commands/install_gem'
+    autoload :CheckDependencies, 'jeweler/commands/check_dependencies'
+    autoload :Release, 'jeweler/commands/release'
+    autoload :ReleaseToGemcutter, 'jeweler/commands/release_to_gemcutter'
+    autoload :ReleaseToRubyforge, 'jeweler/commands/release_to_rubyforge'
+    autoload :SetupRubyforge, 'jeweler/commands/setup_rubyforge'
+    autoload :ValidateGemspec, 'jeweler/commands/validate_gemspec'
+    autoload :WriteGemspec, 'jeweler/commands/write_gemspec'
+
+    module Version
+      autoload :Base,      'jeweler/commands/version/base'
+      autoload :BumpMajor, 'jeweler/commands/version/bump_major'
+      autoload :BumpMinor, 'jeweler/commands/version/bump_minor'
+      autoload :BumpPatch, 'jeweler/commands/version/bump_patch'
+      autoload :Write,     'jeweler/commands/version/write'
+    end
+  end
+end</diff>
      <filename>lib/jeweler/commands.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,7 @@ class Jeweler
 
       def run
         gemspec = gemspec_helper.parse
+        require 'rubygems/builder'
         gem_file_name = Gem::Builder.new(gemspec).build
 
         pkg_dir = File.join(base_dir, 'pkg')</diff>
      <filename>lib/jeweler/commands/build_gem.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,3 @@
-require 'rubyforge'
-
 class Jeweler
   module Commands
     class ReleaseToRubyforge
@@ -7,9 +5,13 @@ class Jeweler
 
       def initialize
         self.output = $stdout
+
+        require 'rubyforge'
+        self.rubyforge = RubyForge.new
       end
 
       def run
+
         raise NoRubyForgeProjectInGemspecError unless @gemspec.rubyforge_project
         
         @rubyforge.configure rescue nil
@@ -40,7 +42,6 @@ class Jeweler
         command.gemspec = jeweler.gemspec
         command.gemspec_helper = jeweler.gemspec_helper
         command.version = jeweler.version
-        command.rubyforge = jeweler.rubyforge
         command.output = jeweler.output
 
         command</diff>
      <filename>lib/jeweler/commands/release_to_rubyforge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,13 @@ class Jeweler
     class SetupRubyforge
       attr_accessor :gemspec, :output, :rubyforge
 
+
+      def initialize
+        self.output = $stdout
+        require 'rubyforge'
+        self.rubyforge = RubyForge.new
+      end
+
       def run
         raise NoRubyForgeProjectInGemspecError unless @gemspec.rubyforge_project
 
@@ -48,7 +55,6 @@ class Jeweler
 
         command.gemspec = jeweler.gemspec
         command.output = jeweler.output
-        command.rubyforge = jeweler.rubyforge
 
         command
       end</diff>
      <filename>lib/jeweler/commands/setup_rubyforge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,9 @@ class Jeweler
   end    
 
   class Generator    
+    require 'jeweler/generator/options'
+    require 'jeweler/generator/application'
+
     attr_accessor :target_dir, :user_name, :user_email, :summary,
                   :description, :project_name, :github_username, :github_token,
                   :repo, :should_create_repo, </diff>
      <filename>lib/jeweler/generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+
 class Jeweler
   class Generator
     class Options &lt; Hash
@@ -10,6 +11,7 @@ class Jeweler
         self[:testing_framework]       = :shoulda
         self[:documentation_framework] = :rdoc
 
+        require 'optparse'
         @opts = OptionParser.new do |o|
           o.banner = &quot;Usage: #{File.basename($0)} [options] reponame\ne.g. #{File.basename($0)} the-perfect-gem&quot;
 </diff>
      <filename>lib/jeweler/generator/options.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,5 @@
 require 'rake'
 require 'rake/tasklib'
-require 'rake/contrib/sshpublisher'
-
 
 class Jeweler
   # Rake tasks for putting a Jeweler gem on Rubyforge.</diff>
      <filename>lib/jeweler/rubyforge_tasks.rb</filename>
    </modified>
    <modified>
      <diff>@@ -146,10 +146,6 @@ class Jeweler
         should &quot;assign output&quot; do
           assert_equal @output, @command.output
         end
-
-        should &quot;assign rubyforge&quot; do
-          assert_equal @rubyforge, @command.rubyforge
-        end
       end
       
     end</diff>
      <filename>test/jeweler/commands/test_release_to_rubyforge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -171,10 +171,6 @@ class Jeweler
         should &quot;assign output&quot; do
           assert_equal @output, @command.output
         end
-
-        should &quot;assign rubyforge&quot; do
-          assert_equal @rubyforge, @command.rubyforge
-        end
       end
 
     end</diff>
      <filename>test/jeweler/commands/test_setup_rubyforge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -168,8 +168,4 @@ class TestJeweler &lt; Test::Unit::TestCase
     assert_respond_to build_jeweler, :commit
   end
 
-  should &quot;respond to rubyforge&quot; do
-    assert_respond_to build_jeweler, :rubyforge
-  end
-
 end</diff>
      <filename>test/test_jeweler.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>320ad5735e4ba72487c549207ea8b0ded26a4d0c</id>
    </parent>
  </parents>
  <author>
    <name>Joshua Nichols</name>
    <email>josh@technicalpickles.com</email>
  </author>
  <url>http://github.com/technicalpickles/jeweler/commit/601412247b0b5b1de7154f2091d3eb7d1f67344c</url>
  <id>601412247b0b5b1de7154f2091d3eb7d1f67344c</id>
  <committed-date>2009-09-28T10:31:06-07:00</committed-date>
  <authored-date>2009-09-28T10:31:06-07:00</authored-date>
  <message>Be lazier about initialization, both for internal and external dependencies.</message>
  <tree>dd8126fd8b1ac8f387d16ad57d206ca085ddff8b</tree>
  <committer>
    <name>Joshua Nichols</name>
    <email>josh@technicalpickles.com</email>
  </committer>
</commit>
