Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cherry-pick core extensions. Don't explicitly require rubygems. Use l…

…oad path for vendored thor.
  • Loading branch information...
commit 70d2640700f178f1430c4080d2e7183fe06bd7a8 1 parent 51d202e
@jeremy jeremy authored
Showing with 12 additions and 13 deletions.
  1. +11 −13 railties/lib/generators.rb
  2. +1 −0  railties/lib/generators/base.rb
View
24 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'
View
1  railties/lib/generators/base.rb
@@ -1,3 +1,4 @@
+require 'thor'
require 'generators/actions'
module Rails
Please sign in to comment.
Something went wrong with that request. Please try again.