lib/sproutcore/bundle_installer.rb
# Tries to fetch the specified github_path to the named location.  If the
# fetched path uses tar/zip, then the file will be decompressed into that
# location.
# 
# ==== Options
# :method :: Indicates the preferred fetch form.  Can be git, zip, or tar
Tries to fetch the specified github_path to the named location.  If the
fetched path uses tar/zip, then the file will be decompressed into that
location.

Options
:method :: Indicates the preferred fetch form.  Can be git, zip, or tar
Tries to fetch the specified github_path to the named location . If the fetched path uses tar / zip then the file will be decompressed into that location . Options : method :: Indicates the preferred fetch form . Can be git zip or tar
def fetch(github_path, install_path, opts)  
      SC.logger.info(" ~ Fetching from #{github_path}")
      method = opts[:method] || (has_git? ? :git : has_zip? ? :zip : :tar)
      SC.logger.debug(" ~ using method: #{method}")
      if (method == :git) && has_git? 
        install_dir = File.dirname(install_path)
        install_filename = File.basename(install_path)
        SC.logger.debug %( ~ cd #{install_dir};)
        SC.logger.debug %( ~ git clone #{github_path}.git "#{install_filename}")
        if !opts[:dry_run]
          result = `cd #{install_dir}; git clone #{github_path}.git "#{install_filename}"`
        end
      elsif (method == :zip) && has_zip?
        raise "ZIP not yet supported!"
      elsif (method == :tar) && has_tar?
        raise "TAR not yet supported!"
      else
        SC.logger.info(" ~ Cannot fetch because git is not installed")
        SC.logger.info(" ~ Please install git and try again.")
        raise "No fetch tool installed"
      end
    end
def fetch ( github_path , install_path , opts ) SC . logger . info ( " ~ Fetching from #{github_path}" ) method = opts [ :method ] || ( has_git? ? :git : has_zip? ? :zip : :tar ) SC . logger . debug ( " ~ using method: #{method}" ) if ( method == :git ) && has_git? install_dir = File . dirname ( install_path ) install_filename = File . basename ( install_path ) SC . logger . debug %( ~ cd #{install_dir};) SC . logger . debug %( ~ git clone #{github_path}.git "#{install_filename}") if ! opts [ :dry_run ] result = ` cd  #{ install_dir } ; git clone  #{ github_path } .git " #{ install_filename } " ` end elsif ( method == :zip ) && has_zip? raise "ZIP not yet supported!" elsif ( method == :tar ) && has_tar? raise "TAR not yet supported!" else SC . logger . info ( " ~ Cannot fetch because git is not installed" ) SC . logger . info ( " ~ Please install git and try again." ) raise "No fetch tool installed" end end
Tries to fetch the specified github_path to the named location.
Tries to fetch the specified github_path to the named location .
# If none of the fetch mechanisms are installed, ask the user to  # install git.
github_path
<not_specific>
install_path
<not_specific>
opts
<not_specific>