File: Rakefile [rdoc-4.0.1 Documentation]

### Home Classes Methods

### Files

- CVE-2013-0256.rdoc
- DEVELOPERS.rdoc
- LICENSE.rdoc
- Manifest.txt
- README.rdoc
- RI.rdoc
- Rakefile
- TODO.rdoc

### Class Index

Quicksearch

- RDoc
- RDoc::Alias
- RDoc::AnonClass
- RDoc::AnyMethod
- RDoc::Attr
- RDoc::ClassModule
- RDoc::CodeObject
- RDoc::Comment
- RDoc::Constant
- RDoc::Context
- RDoc::Context::Section
- RDoc::CrossReference
- RDoc::ERBIO
- RDoc::ERBPartial
- RDoc::Encoding
- RDoc::Error
- RDoc::Extend
- RDoc::Gauntlet
- RDoc::Generator
- RDoc::Generator::Darkfish
- RDoc::Generator::JsonIndex
- RDoc::Generator::Markup
- RDoc::Generator::RI
- RDoc::GhostMethod
- RDoc::Include
- RDoc::Markdown
- RDoc::Markdown::Literals
- RDoc::Markup
- RDoc::Markup::AttrChanger
- RDoc::Markup::AttrSpan
- RDoc::Markup::AttributeManager
- RDoc::Markup::Attributes
- RDoc::Markup::BlankLine
- RDoc::Markup::BlockQuote
- RDoc::Markup::Document
- RDoc::Markup::Formatter
- RDoc::Markup::FormatterTestCase
- RDoc::Markup::HardBreak
- RDoc::Markup::Include
- RDoc::Markup::IndentedParagraph
- RDoc::Markup::List
- RDoc::Markup::ListItem
- RDoc::Markup::Paragraph
- RDoc::Markup::Parser
- RDoc::Markup::Parser::Error
- RDoc::Markup::Parser::ParseError
- RDoc::Markup::PreProcess
- RDoc::Markup::Raw
- RDoc::Markup::Rule
- RDoc::Markup::Special
- RDoc::Markup::TextFormatterTestCase
- RDoc::Markup::ToAnsi
- RDoc::Markup::ToBs
- RDoc::Markup::ToHtml
- RDoc::Markup::ToHtmlCrossref
- RDoc::Markup::ToHtmlSnippet
- RDoc::Markup::ToJoinedParagraph
- RDoc::Markup::ToLabel
- RDoc::Markup::ToMarkdown
- RDoc::Markup::ToRdoc
- RDoc::Markup::ToTableOfContents
- RDoc::Markup::ToTest
- RDoc::Markup::ToTtOnly
- RDoc::Markup::Verbatim
- RDoc::MetaMethod
- RDoc::MethodAttr
- RDoc::NormalClass
- RDoc::NormalModule
- RDoc::Options
- RDoc::Parser
- RDoc::Parser::C
- RDoc::Parser::ChangeLog
- RDoc::Parser::Markdown
- RDoc::Parser::RD
- RDoc::Parser::Ruby
- RDoc::Parser::RubyTools
- RDoc::Parser::Simple
- RDoc::Parser::Text
- RDoc::RD
- RDoc::RD::BlockParser
- RDoc::RD::Inline
- RDoc::RD::InlineParser
- RDoc::RDoc
- RDoc::RI
- RDoc::RI::Driver
- RDoc::RI::Driver::Error
- RDoc::RI::Driver::NotFoundError
- RDoc::RI::Error
- RDoc::RI::Paths
- RDoc::Require
- RDoc::RubyLex
- RDoc::RubyLex::Error
- RDoc::RubyToken
- RDoc::RubygemsHook
- RDoc::Servlet
- RDoc::SingleClass
- RDoc::Stats
- RDoc::Stats::Normal
- RDoc::Stats::Quiet
- RDoc::Stats::Verbose
- RDoc::Store
- RDoc::Store::Error
- RDoc::Store::MissingFileError
- RDoc::Task
- RDoc::Task
- RDoc::TestCase
- RDoc::TokenStream
- RDoc::TomDoc
- RDoc::TopLevel
- Object

No matching classes.

$:.unshift File.expand_path 'lib' require 'rdoc' require 'hoe'

ENV = 'yes'

task :docs => :generate task :test => :generate

PARSER_FILES = %w[

    lib/rdoc/rd/block_parser.rb
    lib/rdoc/rd/inline_parser.rb
    lib/rdoc/markdown.rb
    lib/rdoc/markdown/literals_1_8.rb
    lib/rdoc/markdown/literals_1_9.rb

]

Hoe.plugin :git Hoe.plugin :kpeg Hoe.plugin :minitest Hoe.plugin :travis

$rdoc_rakefile = true

hoe = Hoe.spec 'rdoc' do

    developer 'Eric Hodel', 'drbrain@segment7.net'
    developer 'Dave Thomas', ''
    developer 'Phil Hagelberg', 'technomancy@gmail.com'
    developer 'Tony Strauss', 'tony.strauss@designingpatterns.com'

    self.rsync_args = '-avz'
    rdoc_locations << 'docs.seattlerb.org:/data/www/docs.seattlerb.org/rdoc/'
    rdoc_locations << 'drbrain@rubyforge.org:/var/www/gforge-projects/rdoc/'

    spec_extras[:post_install_message] = <<-MESSAGE

Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported

    = 1.8.7 : gem install rdoc-data; rdoc-data --install
    = 1.9.1 : gem install rdoc-data; rdoc-data --install

>= 1.9.2 : nothing to do! Yay!

    MESSAGE

    self.licenses << 'Ruby'
    self.readme_file  = 'README.rdoc'
    self.history_file = 'History.rdoc'
    self.testlib = :minitest
    self.extra_rdoc_files += %w[
      DEVELOPERS.rdoc
      CVE-2013-0256.rdoc
      History.rdoc
      LICENSE.rdoc
      LEGAL.rdoc
      README.rdoc
      RI.rdoc
      TODO.rdoc
    ]

    self.clean_globs += PARSER_FILES
    self.kpeg_flags = '-fsv' if self.respond_to? :kpeg_flags= # no plugin

    require_ruby_version '>= 1.8.7'
    extra_deps     << ['json',     '~> 1.4']
    extra_dev_deps << ['racc',     '~> 1.4']
    extra_dev_deps << ['minitest', '~> 4']
    extra_dev_deps << ['ZenTest',  '~> 4']

    extra_rdoc_files << 'Rakefile'
    spec_extras['required_rubygems_version'] = '>= 1.3'
    spec_extras['homepage'] = 'http://docs.seattlerb.org/rdoc'

end

# requires ruby 1.8 and ruby 1.8 to build hoe.clean_globs -= PARSER_FILES.grep(/literals_/)

task :generate => :isolate task :generate => PARSER_FILES task :check_manifest => :generate

rule '.rb' => '.ry' do |t|

    racc = Gem.bin_path 'racc', 'racc'

    ruby "-rubygems #{racc} -l -o #{t.name} #{t.source}"

end

path = "pkg/#{hoe.spec.full_name}"

package_parser_files = PARSER_FILES.map do |parser_file|

    package_parser_file = "#{path}/#{parser_file}"
    file package_parser_file => parser_file # ensure copy runs before racc
    package_parser_file

end

task "#{path}.gem" => package_parser_files

# These tasks expect to have the following directory structure: # # git/git.rubini.us/code # Rubinius git HEAD checkout # svn/ruby/trunk # ruby subversion HEAD checkout # svn/rdoc/trunk # RDoc subversion HEAD checkout # # If you don't have this directory structure, set RUBY_PATH and/or # RUBINIUS_PATH.

diff_options = "-urpN --exclude 'svn' --exclude '*swp' --exclude '*rbc'" rsync_options = "-avP --exclude 'svn' --exclude '*swp' --exclude '*rbc' --exclude '*.rej' --exclude '*.orig' --exclude '*.kpeg' --exclude '*.ry' --exclude 'literals_1_8.rb' --exclude 'gauntlet_rdoc.rb'"

rubinius_dir = ENV || '../../../git/git.rubini.us/code' ruby_dir = ENV || '../../svn/ruby/trunk'

desc "Updates Ruby HEAD with the currently checked-out copy of RDoc." task :update_ruby do

    sh "rsync #{rsync_options} bin/rdoc #{ruby_dir}/bin/rdoc"
    sh "rsync #{rsync_options} bin/ri #{ruby_dir}/bin/ri"
    sh "rsync #{rsync_options} lib/ #{ruby_dir}/lib"
    sh "rsync #{rsync_options} test/ #{ruby_dir}/test/rdoc"

end

desc "Diffs Ruby HEAD with the currently checked-out copy of RDoc." task :diff_ruby do

    options = "-urpN --exclude '*svn*' --exclude '*swp' --exclude '*rbc'"

    sh "diff #{diff_options} bin/rdoc #{ruby_dir}/bin/rdoc; true"
    sh "diff #{diff_options} bin/ri #{ruby_dir}/bin/ri; true"
    sh "diff #{diff_options} lib/rdoc.rb #{ruby_dir}/lib/rdoc.rb; true"
    sh "diff #{diff_options} lib/rdoc #{ruby_dir}/lib/rdoc; true"
    sh "diff #{diff_options} test #{ruby_dir}/test/rdoc; true"

end

desc "Updates Rubinius HEAD with the currently checked-out copy of RDoc." task :update_rubinius do

    sh "rsync #{rsync_options} bin/rdoc #{rubinius_dir}/lib/bin/rdoc.rb"
    sh "rsync #{rsync_options} bin/ri #{rubinius_dir}/lib/bin/ri.rb"
    sh "rsync #{rsync_options} lib/ #{rubinius_dir}/lib"
    sh "rsync #{rsync_options} test/ #{rubinius_dir}/test/rdoc"

end

desc "Diffs Rubinius HEAD with the currently checked-out copy of RDoc." task :diff_rubinius do

    sh "diff #{diff_options} bin/rdoc #{rubinius_dir}/lib/bin/rdoc.rb; true"
    sh "diff #{diff_options} bin/ri #{rubinius_dir}/lib/bin/ri.rb; true"
    sh "diff #{diff_options} lib/rdoc.rb #{rubinius_dir}/lib/rdoc.rb; true"
    sh "diff #{diff_options} lib/rdoc #{rubinius_dir}/lib/rdoc; true"
    sh "diff #{diff_options} test #{rubinius_dir}/test/rdoc; true"

end

[Validate]

Generated with the Darkfish Rdoc Generator 2.