diff options
author | José Valim <jose.valim@gmail.com> | 2009-10-21 11:12:30 -0200 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-27 16:46:19 -0700 |
commit | c28a45ad8bb72896d84285158e7f5dc728933062 (patch) | |
tree | 2dceaf28acf656e2b6696925f1194f3325c3a8d0 /railties/lib/rails/vendor | |
parent | b30294b54ab019b0e53402c6927981f8c306e976 (diff) | |
download | rails-c28a45ad8bb72896d84285158e7f5dc728933062.tar.gz rails-c28a45ad8bb72896d84285158e7f5dc728933062.tar.bz2 rails-c28a45ad8bb72896d84285158e7f5dc728933062.zip |
Fix rake dev and update vendored Thor.
Signed-off-by: Yehuda Katz <wycats@gmail.com>
Diffstat (limited to 'railties/lib/rails/vendor')
-rwxr-xr-x | railties/lib/rails/vendor/thor-0.11.6/bin/rake2thor | 87 | ||||
-rwxr-xr-x | railties/lib/rails/vendor/thor-0.11.6/bin/thor | 7 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/CHANGELOG.rdoc (renamed from railties/lib/rails/vendor/thor-0.11.6/CHANGELOG.rdoc) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/LICENSE (renamed from railties/lib/rails/vendor/thor-0.11.6/LICENSE) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/README.rdoc (renamed from railties/lib/rails/vendor/thor-0.11.6/README.rdoc) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/Thorfile | 63 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor.rb) | 1 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/create_file.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/create_file.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/directory.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/directory.rb) | 4 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/empty_directory.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/empty_directory.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/file_manipulation.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/file_manipulation.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/inject_into_file.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/inject_into_file.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/base.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/base.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/core_ext/hash_with_indifferent_access.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/core_ext/hash_with_indifferent_access.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/core_ext/ordered_hash.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/core_ext/ordered_hash.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/error.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/error.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/group.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/group.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/invocation.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/invocation.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/argument.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/argument.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/arguments.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/arguments.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/option.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/option.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/options.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/options.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/rake_compat.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/rake_compat.rb) | 11 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/runner.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/runner.rb) | 2 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell.rb) | 10 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell/basic.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell/basic.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell/color.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell/color.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/task.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/task.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/util.rb (renamed from railties/lib/rails/vendor/thor-0.11.6/lib/thor/util.rb) | 4 | ||||
-rw-r--r-- | railties/lib/rails/vendor/thor-0.11.8/lib/thor/version.rb | 3 |
32 files changed, 85 insertions, 107 deletions
diff --git a/railties/lib/rails/vendor/thor-0.11.6/bin/rake2thor b/railties/lib/rails/vendor/thor-0.11.6/bin/rake2thor deleted file mode 100755 index 50c7410d80..0000000000 --- a/railties/lib/rails/vendor/thor-0.11.6/bin/rake2thor +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' -require 'ruby2ruby' -require 'parse_tree' -if Ruby2Ruby::VERSION >= "1.2.0" - require 'parse_tree_extensions' -end -require 'rake' - -input = ARGV[0] || 'Rakefile' -output = ARGV[1] || 'Thorfile' - -$requires = [] - -module Kernel - def require_with_record(file) - $requires << file if caller[1] =~ /rake2thor:/ - require_without_record file - end - alias_method :require_without_record, :require - alias_method :require, :require_with_record -end - -load input - -@private_methods = [] - -def file_task_name(name) - "compile_" + name.gsub('/', '_slash_').gsub('.', '_dot_').gsub(/\W/, '_') -end - -def method_for_task(task) - file_task = task.is_a?(Rake::FileTask) - comment = task.instance_variable_get('@comment') - prereqs = task.instance_variable_get('@prerequisites').select(&Rake::Task.method(:task_defined?)) - actions = task.instance_variable_get('@actions') - name = task.name.gsub(/^([^:]+:)+/, '') - name = file_task_name(name) if file_task - meth = '' - - meth << "desc #{name.inspect}, #{comment.inspect}\n" if comment - meth << "def #{name}\n" - - meth << prereqs.map do |pre| - pre = pre.to_s - pre = file_task_name(pre) if Rake::Task[pre].is_a?(Rake::FileTask) - ' ' + pre - end.join("\n") - - meth << "\n\n" unless prereqs.empty? || actions.empty? - - meth << actions.map do |act| - act = act.to_ruby - unless act.gsub!(/^proc \{ \|(\w+)\|\n/, - " \\1 = Struct.new(:name).new(#{name.inspect}) # A crude mock Rake::Task object\n") - act.gsub!(/^proc \{\n/, '') - end - act.gsub(/\n\}$/, '') - end.join("\n") - - meth << "\nend" - - if file_task - @private_methods << meth - return - end - - meth -end - -body = Rake::Task.tasks.map(&method(:method_for_task)).compact.map { |meth| meth.gsub(/^/, ' ') }.join("\n\n") - -unless @private_methods.empty? - body << "\n\n private\n\n" - body << @private_methods.map { |meth| meth.gsub(/^/, ' ') }.join("\n\n") -end - -requires = $requires.map { |r| "require #{r.inspect}" }.join("\n") - -File.open(output, 'w') { |f| f.write(<<END.lstrip) } -#{requires} - -class Default < Thor -#{body} -end -END diff --git a/railties/lib/rails/vendor/thor-0.11.6/bin/thor b/railties/lib/rails/vendor/thor-0.11.6/bin/thor deleted file mode 100755 index eaf849fb4a..0000000000 --- a/railties/lib/rails/vendor/thor-0.11.6/bin/thor +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env ruby -# -*- mode: ruby -*- - -require File.join(File.dirname(__FILE__), '..', 'lib', 'thor') -require 'thor/runner' - -Thor::Runner.start diff --git a/railties/lib/rails/vendor/thor-0.11.6/CHANGELOG.rdoc b/railties/lib/rails/vendor/thor-0.11.8/CHANGELOG.rdoc index dba25b7205..dba25b7205 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/CHANGELOG.rdoc +++ b/railties/lib/rails/vendor/thor-0.11.8/CHANGELOG.rdoc diff --git a/railties/lib/rails/vendor/thor-0.11.6/LICENSE b/railties/lib/rails/vendor/thor-0.11.8/LICENSE index 98722da459..98722da459 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/LICENSE +++ b/railties/lib/rails/vendor/thor-0.11.8/LICENSE diff --git a/railties/lib/rails/vendor/thor-0.11.6/README.rdoc b/railties/lib/rails/vendor/thor-0.11.8/README.rdoc index f1106f02b6..f1106f02b6 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/README.rdoc +++ b/railties/lib/rails/vendor/thor-0.11.8/README.rdoc diff --git a/railties/lib/rails/vendor/thor-0.11.8/Thorfile b/railties/lib/rails/vendor/thor-0.11.8/Thorfile new file mode 100644 index 0000000000..f71a1e57e2 --- /dev/null +++ b/railties/lib/rails/vendor/thor-0.11.8/Thorfile @@ -0,0 +1,63 @@ +# enconding: utf-8 + +require File.join(File.dirname(__FILE__), "lib", "thor", "version") +require 'thor/rake_compat' +require 'spec/rake/spectask' +require 'rdoc/task' + +GEM_NAME = 'thor' +EXTRA_RDOC_FILES = ["README.rdoc", "LICENSE", "CHANGELOG.rdoc", "VERSION", "Thorfile"] + +class Default < Thor + include Thor::RakeCompat + + Spec::Rake::SpecTask.new(:spec) do |t| + t.libs << 'lib' + t.spec_opts = ['--options', "spec/spec.opts"] + t.spec_files = FileList['spec/**/*_spec.rb'] + end + + Spec::Rake::SpecTask.new(:rcov) do |t| + t.libs << 'lib' + t.spec_opts = ['--options', "spec/spec.opts"] + t.spec_files = FileList['spec/**/*_spec.rb'] + t.rcov = true + t.rcov_dir = "rcov" + end + + RDoc::Task.new do |rdoc| + rdoc.main = "README.rdoc" + rdoc.rdoc_dir = "rdoc" + rdoc.title = GEM_NAME + rdoc.rdoc_files.include(*EXTRA_RDOC_FILES) + rdoc.rdoc_files.include('lib/**/*.rb') + rdoc.options << '--line-numbers' << '--inline-source' + end + + begin + require 'jeweler' + Jeweler::Tasks.new do |s| + s.name = GEM_NAME + s.version = Thor::VERSION + s.rubyforge_project = "textmate" + s.platform = Gem::Platform::RUBY + s.summary = "A scripting framework that replaces rake, sake and rubigen" + s.email = "ruby-thor@googlegroups.com" + s.homepage = "http://yehudakatz.com" + s.description = "A scripting framework that replaces rake, sake and rubigen" + s.authors = ['Yehuda Katz', 'José Valim'] + s.has_rdoc = true + s.extra_rdoc_files = EXTRA_RDOC_FILES + s.require_path = 'lib' + s.bindir = "bin" + s.executables = %w( thor rake2thor ) + s.files = s.extra_rdoc_files + Dir.glob("{bin,lib}/**/*") + s.files.exclude 'spec/sandbox/**/*' + s.test_files.exclude 'spec/sandbox/**/*' + end + + Jeweler::RubyforgeTasks.new + rescue LoadError + puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com" + end +end diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor.rb index 3b45c4e9b7..68944f140d 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor.rb @@ -1,4 +1,3 @@ -$:.unshift File.expand_path(File.dirname(__FILE__)) require 'thor/base' require 'thor/group' require 'thor/actions' diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions.rb index d561ccb2aa..d561ccb2aa 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/create_file.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/create_file.rb index 8f6badee27..8f6badee27 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/create_file.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/create_file.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/directory.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/directory.rb index be5eb822ac..063ac57406 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/directory.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/directory.rb @@ -73,7 +73,9 @@ class Thor case file_source when /\.empty_directory$/ - base.empty_directory(File.dirname(file_destination), config) + dirname = File.dirname(file_destination).gsub(/\/\.$/, '') + next if dirname == given_destination + base.empty_directory(dirname, config) when /\.tt$/ base.template(file_source, file_destination[0..-4], config) else diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/empty_directory.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/empty_directory.rb index 03c1fe4af1..03c1fe4af1 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/empty_directory.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/empty_directory.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/file_manipulation.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/file_manipulation.rb index d77d90d448..d77d90d448 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/file_manipulation.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/file_manipulation.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/inject_into_file.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/inject_into_file.rb index 0636ec6591..0636ec6591 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/actions/inject_into_file.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/actions/inject_into_file.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/base.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/base.rb index 700d794123..700d794123 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/base.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/base.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/core_ext/hash_with_indifferent_access.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/core_ext/hash_with_indifferent_access.rb index 78bc5cf4bf..78bc5cf4bf 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/core_ext/hash_with_indifferent_access.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/core_ext/hash_with_indifferent_access.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/core_ext/ordered_hash.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/core_ext/ordered_hash.rb index 27fea5bb35..27fea5bb35 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/core_ext/ordered_hash.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/core_ext/ordered_hash.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/error.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/error.rb index f9b31a35d1..f9b31a35d1 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/error.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/error.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/group.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/group.rb index 1e59df2313..1e59df2313 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/group.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/group.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/invocation.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/invocation.rb index 32e6a72454..32e6a72454 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/invocation.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/invocation.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser.rb index 57a3f6e1a5..57a3f6e1a5 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/argument.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/argument.rb index aa8ace4719..aa8ace4719 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/argument.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/argument.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/arguments.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/arguments.rb index fb5d965e06..fb5d965e06 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/arguments.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/arguments.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/option.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/option.rb index 9e40ec73fa..9e40ec73fa 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/option.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/option.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/options.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/options.rb index 75092308b5..75092308b5 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/parser/options.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/parser/options.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/rake_compat.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/rake_compat.rb index 3ab6bb21f5..0d0757fdda 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/rake_compat.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/rake_compat.rb @@ -22,7 +22,8 @@ class Thor def self.included(base) # Hack. Make rakefile point to invoker, so rdoc task is generated properly. - Rake.application.instance_variable_set(:@rakefile, caller[0].match(/(.*):\d+/)[1]) + rakefile = File.basename(caller[0].match(/(.*):\d+/)[1]) + Rake.application.instance_variable_set(:@rakefile, rakefile) self.rake_classes << base end end @@ -43,11 +44,9 @@ class Object #:nodoc: description.strip! klass.desc description, task.comment || non_namespaced_name - klass.class_eval <<-METHOD - def #{non_namespaced_name}(#{task.arg_names.join(', ')}) - Rake::Task[#{task.name.to_sym.inspect}].invoke(#{task.arg_names.join(', ')}) - end - METHOD + klass.send :define_method, non_namespaced_name do |*args| + Rake::Task[task.name.to_sym].invoke(*args) + end end task diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/runner.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/runner.rb index 43da09b336..9dc70ea069 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/runner.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/runner.rb @@ -215,7 +215,7 @@ class Thor::Runner < Thor #:nodoc: # 5. c:\ <-- no Thorfiles found! # def thorfiles(relevant_to=nil, skip_lookup=false) - # Deal with deprecated thor when :namespaces: is available as constants + # TODO Remove this dealing with deprecated thor when :namespaces: is available as constants save_yaml(thor_yaml) if Thor::Util.convert_constants_to_namespaces(thor_yaml) thorfiles = [] diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell.rb index 0d3f4d5951..1dc8f0e5b4 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell.rb @@ -1,11 +1,17 @@ +require 'rbconfig' require 'thor/shell/color' class Thor module Base - # Returns the shell used in all Thor classes. Default to color one. + # Returns the shell used in all Thor classes. If you are in a Unix platform + # it will use a colored log, otherwise it will use a basic one without color. # def self.shell - @shell ||= Thor::Shell::Color + @shell ||= if Config::CONFIG['host_os'] =~ /mswin|mingw/ + Thor::Shell::Basic + else + Thor::Shell::Color + end end # Sets the shell used in all Thor classes. diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell/basic.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell/basic.rb index ea9665380b..ea9665380b 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell/basic.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell/basic.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell/color.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell/color.rb index 24704f7885..24704f7885 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/shell/color.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/shell/color.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/task.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/task.rb index 91c7564d3f..91c7564d3f 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/task.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/task.rb diff --git a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/util.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/util.rb index fd820d7462..ebae0a3193 100644 --- a/railties/lib/rails/vendor/thor-0.11.6/lib/thor/util.rb +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/util.rb @@ -209,7 +209,7 @@ class Thor # Returns the root where thor files are located, dependending on the OS. # def self.thor_root - File.join(user_home, ".thor") + File.join(user_home, ".thor").gsub(/\\/, '/') end # Returns the files in the thor root. On Windows thor_root will be something @@ -220,7 +220,7 @@ class Thor # If we don't #gsub the \ character, Dir.glob will fail. # def self.thor_root_glob - files = Dir["#{thor_root.gsub(/\\/, '/')}/*"] + files = Dir["#{thor_root}/*"] files.map! do |file| File.directory?(file) ? File.join(file, "main.thor") : file diff --git a/railties/lib/rails/vendor/thor-0.11.8/lib/thor/version.rb b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/version.rb new file mode 100644 index 0000000000..885230fac4 --- /dev/null +++ b/railties/lib/rails/vendor/thor-0.11.8/lib/thor/version.rb @@ -0,0 +1,3 @@ +class Thor + VERSION = "0.11.8".freeze +end |