aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-12-23 00:05:38 +0100
committerXavier Noria <fxn@hashref.com>2010-12-23 00:05:38 +0100
commit55f2e9f898cb6d1c518eaef23592638813c23450 (patch)
treedbcc464657b352fc3029c9516054ba23db3929d2 /Rakefile
parent09195f10bd3add1be1983a42760113ef2bd31602 (diff)
downloadrails-55f2e9f898cb6d1c518eaef23592638813c23450.tar.gz
rails-55f2e9f898cb6d1c518eaef23592638813c23450.tar.bz2
rails-55f2e9f898cb6d1c518eaef23592638813c23450.zip
removes binary? hack for RDoc, API requires RDoc 3 and horo 1.0.3
Diffstat (limited to 'Rakefile')
-rwxr-xr-xRakefile29
1 files changed, 1 insertions, 28 deletions
diff --git a/Rakefile b/Rakefile
index 1f3c770c77..4b94595dc1 100755
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,5 @@
#!/usr/bin/env rake
-gem 'rdoc', '>= 2.5.10'
+gem 'rdoc', '~> 3.0'
require 'rdoc'
require 'rdoc/task'
@@ -14,31 +14,6 @@ task :build => "all:build"
desc "Release all gems to gemcutter and create a tag"
task :release => "all:release"
-# RDoc skips some files in the Rails tree due to its binary? predicate. This is a quick
-# hack for edge docs, until we decide which is the correct way to address this issue.
-# If not fixed in RDoc itself, via an option or something, we should probably move this
-# to railties and use it also in doc:rails.
-def hijack_rdoc!
- require "rdoc/parser"
- class << RDoc::Parser
- def binary?(file)
- s = File.read(file, 1024) or return false
-
- if s[0, 2] == Marshal.dump('')[0, 2] then
- true
- elsif file =~ /erb\.rb$/ then
- false
- elsif s.index("\x00") then # ORIGINAL is s.scan(/<%|%>/).length >= 4 || s.index("\x00")
- true
- elsif 0.respond_to? :fdiv then
- s.count("^ -~\t\r\n").fdiv(s.size) > 0.3
- else # HACK 1.8.6
- (s.count("^ -~\t\r\n").to_f / s.size) > 0.3
- end
- end
- end
-end
-
PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)
desc 'Run all tests by default'
@@ -76,8 +51,6 @@ end
desc "Generate documentation for the Rails framework"
RDoc::Task.new do |rdoc|
- hijack_rdoc!
-
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.title = "Ruby on Rails Documentation"