Skip to content
Browse files

Vendorized Thor.

  • Loading branch information...
1 parent 52673cd commit 5021dc69a423e1dbf59aca84217af920707c10ba @josevalim josevalim committed Jul 13, 2009
Showing with 13 additions and 6 deletions.
  1. +2 −1 Rakefile
  2. +1 −5 railties/lib/generators.rb
  3. +1 −0 railties/lib/vendor/thor
  4. +9 −0 railties/lib/vendor/thor.rb
View
3 Rakefile
@@ -38,7 +38,8 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include('railties/CHANGELOG')
rdoc.rdoc_files.include('railties/MIT-LICENSE')
rdoc.rdoc_files.include('railties/README')
- rdoc.rdoc_files.include('railties/lib/{*.rb,commands/*.rb,rails/*.rb,rails_generator/*.rb}')
+ rdoc.rdoc_files.include('railties/lib/{*.rb,commands/*.rb,rails/*.rb,generators/*.rb}')
+ rdoc.rdoc_files.exclude('railties/lib/vendor/*')
rdoc.rdoc_files.include('activerecord/README')
rdoc.rdoc_files.include('activerecord/CHANGELOG')
View
6 railties/lib/generators.rb
@@ -11,11 +11,7 @@
$:.unshift(File.dirname(__FILE__))
-# TODO Use vendored Thor
-require 'rubygems'
-gem 'josevalim-thor'
-require 'thor'
-
+require 'vendor/thor'
require 'generators/base'
require 'generators/named_base'
1 railties/lib/vendor/thor
@@ -0,0 +1 @@
+Subproject commit fccc2fddfb3e696d4715bfddc1c25211fc7480d6
View
9 railties/lib/vendor/thor.rb
@@ -0,0 +1,9 @@
+begin
+ # Prefer gems to the bundled libs.
+ require 'rubygems'
+ gem 'thor', '>= 0.11.0'
+rescue Gem::LoadError
+ $:.unshift "#{File.dirname(__FILE__)}/thor/lib"
+end
+
+require 'thor'

0 comments on commit 5021dc6

Please sign in to comment.
Something went wrong with that request. Please try again.