Sha256: 12ef61538f070ebce11f3cf5d660b9b2fb6ce01b4813d2fdaa75f1b8d4a0af81

Contents?: true

Size: 1.81 KB

Versions: 1

Compression:

Stored size: 1.81 KB

Contents

#!/usr/bin/env ruby

require 'rake/gempackagetask'
require 'rake/rdoctask'

rdoc_files = ["Declare.rdoc", 'HISTORY.txt'] + Dir.glob('lib/*/*.rb')

#
# TASK: Gem specification and creation ('gem')
#
spec = Gem::Specification.new do |spec|
  spec.name = "getopt-declare"
  spec.version = '1.22'
  spec.author = "Gonzalo Garramuno"
  spec.email = 'ggarra@advancedsl.com.ar, GGarramuno@aol.com'
  spec.homepage = 'http://www.rubyforge.org/projects/getoptdeclare/'
  spec.summary = 'Getopt-Declare is a command-line argument parser.'
  spec.require_path = "lib"
  spec.autorequire = "Getopt/Declare"
  spec.files = ["lib/Getopt/Declare.rb", "lib/Getopt/DelimScanner.rb", 
                "Rakefile"]
  spec.description = <<-"EOF"
    Comprehensive and easy to use command-line parser library using
    regular expressions.  Port of Damian Conway\'s Perl Getopt-Declare.
EOF
  # to fix emacs coloring bug
  spec.extra_rdoc_files = rdoc_files
  spec.has_rdoc = true
  spec.test_files = Dir.glob('samples/*.rb')
  spec.rubyforge_project = 'getoptdeclare'
  spec.required_ruby_version = '>= 1.6.8'
end

Rake::GemPackageTask.new(spec) do |pkg|
  pkg.need_tar = true
end


#
# TASK: Run rdoc to document code ('rdoc')
#
html_dir = 'doc/html'
library = 'Getopt/Declare'
Rake::RDocTask.new('rdoc') do |t|
  t.rdoc_files.include(rdoc_files)
  t.main = 'doc/index.html'  # Main web page
  t.title = "#{library} API documentation"
  t.rdoc_dir = html_dir
end


#
# TASK: Upload docs to rubyforge ('upload-docs')
#
desc 'Upload documentation to RubyForge.'
task 'upload-docs' => ['rdoc'] do
  rubyforge_user    = 'gga'
  rubyforge_project = spec.rubyforge_project
  rubyforge_path = "/var/www/gforge-projects/#{rubyforge_project}/"

  sh "scp -r #{html_dir}/* #{rubyforge_user}@rubyforge.org:#{rubyforge_path}"
end


#
# Main task
#
task :default => ['gem', 'upload-docs']

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
getopt-declare-1.22 Rakefile