Permalink
Browse files

Beginning work on the initializer and boot areas.

Making rails 3 compatible
  • Loading branch information...
1 parent c29fdc0 commit c18b28013c182495634d7006394bcf1d14c3b5cb Dirk Kelly committed Nov 12, 2010
Showing with 9 additions and 11 deletions.
  1. +5 −9 bin/radiant
  2. +1 −0 config/boot.rb
  3. +3 −2 lib/radiant/initializer.rb
View
@@ -4,9 +4,6 @@ require File.join(File.dirname(__FILE__), '..', 'config', 'boot')
$LOAD_PATH << File.join(File.dirname(__FILE__), '..')
-require 'lib/ruby_version_check'
-Signal.trap("INT") { puts; exit }
-
require 'lib/radiant'
if ARGV.any? { |arg| %w(--version -v).any? { |flag| arg == flag } }
puts "Radiant #{Radiant::Version}"
@@ -15,14 +12,13 @@ end
app_path = ARGV.first
-require 'lib/rails_generator'
-require 'rails_generator/scripts/generate'
+require 'rails/generators'
-class Rails::Generator::Base
+class Rails::Generators::Base
def self.use_application_sources!
reset_sources
- sources << Rails::Generator::PathSource.new(:builtin, "#{File.dirname(__FILE__)}/../lib/generators")
+ sources << Rails::Generators::PathSource.new(:builtin, "#{File.dirname(__FILE__)}/../lib/generators")
end
def add_general_options!(opt)
@@ -49,5 +45,5 @@ class Rails::Generator::Base
end
-Rails::Generator::Base.use_application_sources!
-Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'instance')
+Rails::Generators::Base.use_application_sources!
+Rails::Generators::Scripts::Generate.new.run(ARGV, :generator => 'instance')
View
@@ -6,6 +6,7 @@
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
+ require 'rails'
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
@@ -1,11 +1,12 @@
-require 'initializer'
+# require 'initializer'
require 'radiant/admin_ui'
require 'radiant/extension_loader'
module Radiant
autoload :Cache, 'radiant/cache'
- class Configuration < Rails::Configuration
+ module Configuration
+ include Rails::Configuration
attr_accessor :extension_paths
attr_writer :extensions
attr_accessor :view_paths

0 comments on commit c18b280

Please sign in to comment.