GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
at long last, apply the frozen gems dir patch / thanks dcparker for 
championing this
ivey (author)
Mon Feb 11 15:49:16 -0800 2008
commit  39fa1cc46deac8dffa3806d971d6482700f54b9f
tree    f662488c846e309435fd087fedf9c0e68f221b23
parent  13ce57a8bcb9a546438bfda5c75af027471bccfe
...
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
 
 
31
32
33
34
35
36
37
38
39
 
 
40
41
42
...
11
12
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
15
16
17
 
 
 
 
 
 
 
 
18
19
20
21
22
0
@@ -11,32 +11,12 @@ module Kernel
0
 
0
   def dependency(name, *ver)
0
     begin
0
- # If it's not in ROOT/gems, skip to the next attempt
0
- raise LoadError unless File.directory?(Merb.root / "gems")
0
-
0
- # cache the gem path
0
- begin
0
- # Clear out the paths and reset them to Merb
0
- Gem.use_paths(Merb.root / "gems", [Merb.root / "gems"])
0
-
0
- # Try activating the gem (Failure will raise a LoadError)
0
- Gem.activate(name, true, *ver)
0
- Merb.logger.info("#{Time.now.httpdate}: loading gem '#{name}' from #{__app_file_trace__.first} ...")
0
- ensure
0
- # Either way, set the gem path back to normal
0
- Gem.clear_paths
0
- end
0
-
0
- # If we couldn't load the gem or there was no ROOT/gems, try again, now with the full gem path
0
+ # Try activating the gem
0
+ Gem.activate(name, true, *ver)
0
+ Merb.logger.info("#{Time.now.httpdate}: loading gem '#{name}' from #{__app_file_trace__.first} ...")
0
     rescue LoadError
0
- begin
0
- # Try activating again
0
- Gem.activate(name, true, *ver)
0
- Merb.logger.info("#{Time.now.httpdate}: loading gem '#{name}' from #{__app_file_trace__.first} ...")
0
- rescue LoadError
0
- # Failed requiring as a gem, let's try loading with a normal require.
0
- require name
0
- end
0
+ # Failed requiring as a gem, let's try loading with a normal require.
0
+ require name
0
     end
0
   end
0
   

Comments

    No one has commented yet.