@@ -33,7 +33,7 @@ module PrototypeHelper
3333 begin
3434 `git --version`
3535 return true
36- rescue Error => e
36+ rescue Error
3737 return false
3838 end
3939 end
@@ -43,7 +43,7 @@ module PrototypeHelper
4343 puts "\n Prototype requires Git in order to load its dependencies."
4444 puts "\n Make sure you've got Git installed and in your path."
4545 puts "\n For more information, visit:\n \n "
46- puts " http://book. git-scm.com/2_installing_git.html "
46+ puts " http://git-scm.com/book/en/v2/Getting-Started-Installing-Git "
4747 exit
4848 end
4949
106106 def self . require_package ( name )
107107 begin
108108 require name
109- rescue LoadError => e
109+ rescue LoadError
110110 puts "You need the #{ name } package. Try installing it with:\n "
111111 puts " $ gem install #{ name } "
112112 exit
147147 when :coderay
148148 begin
149149 require 'coderay'
150- rescue LoadError => e
150+ rescue LoadError
151151 if verbose
152152 puts "\n You asked to use CodeRay, but I can't find the 'coderay' gem. Just run:\n \n "
153153 puts " $ gem install coderay"
@@ -212,13 +212,15 @@ EOF
212212
213213 def self . require_submodule ( name , path )
214214 begin
215- require path
215+ full_path = File . join ( PrototypeHelper ::ROOT_DIR , 'vendor' , path , 'lib' , path )
216+ # We need to require the explicit version in the submodule.
217+ require full_path
216218 rescue LoadError => e
217219 # Wait until we notice that a submodule is missing before we bother the
218220 # user about installing git. (Maybe they brought all the files over
219221 # from a different machine.)
220222 missing_file = e . message . sub ( 'no such file to load -- ' , '' ) . sub ( 'cannot load such file -- ' , '' )
221- if missing_file == path
223+ if missing_file == full_path
222224 # Missing a git submodule.
223225 retry if get_submodule ( name , path )
224226 else
@@ -293,10 +295,6 @@ namespace :test do
293295 UnitTests . run!
294296 end
295297
296- task :require do
297- PrototypeHelper . require_package ( 'sinatra' )
298- end
299-
300298 desc "Opens the test suite in several different browsers. (Does not start or stop the server; you should do that separately.)"
301299 task :run => [ :require ] do
302300 browsers , tests , grep = ENV [ 'BROWSERS' ] , ENV [ 'TESTS' ] , ENV [ 'GREP' ]
0 commit comments