diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-14 12:52:28 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-14 13:04:43 -0700 |
commit | 70d2640700f178f1430c4080d2e7183fe06bd7a8 (patch) | |
tree | aee9e551fae81564d41c0c7b114b3d64707f76d1 | |
parent | 51d202e6f32d65f05da8c4905d4e53ee7eb9a574 (diff) | |
download | rails-70d2640700f178f1430c4080d2e7183fe06bd7a8.tar.gz rails-70d2640700f178f1430c4080d2e7183fe06bd7a8.tar.bz2 rails-70d2640700f178f1430c4080d2e7183fe06bd7a8.zip |
Cherry-pick core extensions. Don't explicitly require rubygems. Use load path for vendored thor.
-rw-r--r-- | railties/lib/generators.rb | 24 | ||||
-rw-r--r-- | railties/lib/generators/base.rb | 1 |
2 files changed, 12 insertions, 13 deletions
diff --git a/railties/lib/generators.rb b/railties/lib/generators.rb index 879abb1c41..2a196f65ea 100644 --- a/railties/lib/generators.rb +++ b/railties/lib/generators.rb @@ -1,17 +1,15 @@ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" -$:.unshift(activesupport_path) if File.directory?(activesupport_path) - -begin - require 'active_support/mini' -rescue LoadError - require 'rubygems' - gem 'activesupport' - require 'active_support/mini' -end - -$:.unshift(File.dirname(__FILE__)) - -require 'vendor/thor-0.11.6/lib/thor' +$LOAD_PATH.unshift(activesupport_path) if File.directory?(activesupport_path) +require 'active_support' +require 'active_support/core_ext/object/blank' +require 'active_support/core_ext/object/metaclass' +require 'active_support/core_ext/array' +require 'active_support/core_ext/hash' +require 'active_support/core_ext/module/attribute_accessors' +require 'active_support/core_ext/string/inflections' + +$LOAD_PATH.unshift(File.dirname(__FILE__)) +$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/vendor/thor-0.11.6/lib") require 'generators/base' require 'generators/named_base' diff --git a/railties/lib/generators/base.rb b/railties/lib/generators/base.rb index c5d769b6ed..cb6a129264 100644 --- a/railties/lib/generators/base.rb +++ b/railties/lib/generators/base.rb @@ -1,3 +1,4 @@ +require 'thor' require 'generators/actions' module Rails |