Permalink
Browse files

added vendor_rails? to Rails module

  • Loading branch information...
1 parent 9bc737a commit e93023e91de72598a2683bead3a44785c66c1156 @saturnflyer saturnflyer committed Jul 26, 2008
Showing with 16 additions and 9 deletions.
  1. +16 −9 config/boot.rb
View
@@ -3,6 +3,14 @@
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
+module Rails
+ class << self
+ def vendor_rails?
+ File.exist?("#{RAILS_ROOT}/vendor/rails")
+ end
+ end
+end
+
module Radiant
class << self
def boot!
@@ -17,15 +25,14 @@ def booted?
end
def pick_boot
- # case
- # when app?
- # AppBoot.new
- # when vendor?
- # VendorBoot.new
- # else
- # GemBoot.new
- # end
- (vendor? ? VendorBoot : GemBoot).new
+ case
+ when app?
+ AppBoot.new
+ when vendor?
+ VendorBoot.new
+ else
+ GemBoot.new
+ end
end
def vendor?

0 comments on commit e93023e

Please sign in to comment.