Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

109 lines (84 sloc) 2.513 kB
begin
require 'rubygems'
require 'rake/gempackagetask'
rescue Exception
nil
end
require 'rake/testtask'
require 'rake/rdoctask'
PKG_VERSION = '0.2.1'
PKG_FILES = FileList[
'lib/**/*.rb',
'ext/extconf.rb',
'ext/*.cxx',
'test/test_*.rb',
'test/data/*.mp3',
'test/data/cover.jpg',
'Rakefile',
'setup.rb'
]
desc 'Default task is to build extension.'
task :default => [:ext]
desc "Build extension."
task :ext do
sh "cd ext && rake"
puts "(end)"
end
Rake::TestTask.new do |t|
t.libs = ['lib', 'ext']
t.test_files = FileList['test/test_*.rb']
t.verbose = true
end
RDOC_OPTS = ['--line-numbers', '--main', 'README']
desc "Generate RDOC documentation."
Rake::RDocTask.new :rdoc do |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = 'id3lib-ruby'
rdoc.options = RDOC_OPTS
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.rdoc_files.include('README', 'TODO', 'CHANGES')
end
task :doc => [:rdoc]
if defined? Gem
spec = Gem::Specification.new do |s|
s.name = 'id3lib-ruby'
s.version = PKG_VERSION
s.summary =
'id3lib-ruby provides a Ruby interface to the id3lib C++ library for ' +
'easily editing ID3 tags (v1 and v2) like with pyid3lib.'
s.requirements << 'id3lib C++ library'
s.files = PKG_FILES
s.extensions = ['ext/extconf.rb']
s.test_files = FileList['test/test_*.rb']
s.has_rdoc = true
s.extra_rdoc_files = FileList['README', 'CHANGES', 'TODO']
s.rdoc_options = RDOC_OPTS
s.author = 'Robin Stocker'
s.email = 'robinstocker@rubyforge.org'
s.homepage = 'http://id3lib-ruby.rubyforge.org'
s.rubyforge_project = "id3lib-ruby"
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar_gz = true
pkg.need_zip = true
end
end
task :web => [:web_doc] do
puts "# Now execute the following:"
puts "scp web/* robinstocker@rubyforge.org:/var/www/gforge-projects/id3lib-ruby/"
puts "scp -r web/doc robinstocker@rubyforge.org:/var/www/gforge-projects/id3lib-ruby/doc"
end
desc "Generate RDOC documentation on web."
Rake::RDocTask.new :web_doc do |rdoc|
rdoc.rdoc_dir = 'web/doc'
rdoc.title = 'id3lib-ruby'
rdoc.options << '--line-numbers' << '--main' << 'ID3Lib::Tag'
rdoc.rdoc_files.include('README', 'TODO', 'CHANGES')
rdoc.rdoc_files.include('lib/**/*.rb')
end
task :usage_html do
require 'syntax/convertors/html'
convertor = Syntax::Convertors::HTML.for_syntax('ruby')
html = convertor.convert(File.read('usage.rb'))
puts html
end
Jump to Line
Something went wrong with that request. Please try again.