diff options
Diffstat (limited to 'railties/lib/generator.rb')
-rw-r--r-- | railties/lib/generator.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/railties/lib/generator.rb b/railties/lib/generator.rb new file mode 100644 index 0000000000..cc3a983d60 --- /dev/null +++ b/railties/lib/generator.rb @@ -0,0 +1,24 @@ +activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" +$:.unshift(activesupport_path) if File.directory?(activesupport_path) +require 'active_support/all' + +# TODO Use vendored Thor +require 'rubygems' +gem 'josevalim-thor' +require 'thor' + +$:.unshift(File.dirname(__FILE__)) +require 'rails/version' unless defined?(Rails::VERSION) + +require 'generator/base' +require 'generator/named_base' + +module Rails + module Generators + def self.builtin + Dir[File.dirname(__FILE__) + '/generator/generators/*'].collect do |file| + File.basename(file) + end + end + end +end |