Sha256: c8aaf2a672833a677788eab0fe29c876c7cc978e2662bf430f9e2b20b759417e
Contents?: true
Size: 1.87 KB
Versions: 1
Compression:
Stored size: 1.87 KB
Contents
#!/usr/bin/env rake # -*- Ruby -*- require 'rubygems' require 'rake/testtask' require 'fileutils' ROOT_DIR = File.dirname(__FILE__) require File.join %W(#{ROOT_DIR} lib linecache) def gemspec @gemspec ||= eval(File.read('.gemspec'), binding, '.gemspec') end require 'rubygems/package_task' desc "Build the gem" task :package=>:gem task :gem=>:gemspec do Dir.chdir(ROOT_DIR) do sh "gem build .gemspec" FileUtils.mkdir_p 'pkg' FileUtils.mv("#{gemspec.file_name}", "pkg/") end end desc "Install the gem locally" task :install => :gem do Dir.chdir(ROOT_DIR) do sh %{gem install --local pkg/#{gemspec.file_name}} end end desc "Test everything" Rake::TestTask.new(:test) do |t| t.libs << './lib' t.pattern = 'test/test-*.rb' t.options = '--verbose' if $VERBOSE end task :test => :lib desc "same as test" task :check => :test desc "Create a GNU-style ChangeLog via svn2cl" task :ChangeLog do system('git log --pretty --numstat --summary | git2cl > ChangeLog') end task :default => [:test] desc "Remove built files" task :clean => [:clobber_package, :clobber_rdoc] desc "Generate the gemspec" task :generate do puts gemspec.to_ruby end desc "Validate the gemspec" task :gemspec do gemspec.validate end # --------- RDoc Documentation ------ require 'rdoc/task' desc "Generate rdoc documentation" Rake::RDocTask.new("rdoc") do |rdoc| rdoc.rdoc_dir = 'doc' rdoc.title = "LineCache #{LineCache::VERSION} Documentation" # Show source inline with line numbers rdoc.options += %w(--inline-source --line-numbers) # Make the README file the start page for the generated html rdoc.options += %w(--main README) rdoc.rdoc_files.include('lib/*.rb', 'README', 'COPYING') end desc "Same as rdoc" task :doc => :rdoc task :clobber_package do FileUtils.rm_rf File.join(ROOT_DIR, 'pkg') end task :clobber_rdoc do FileUtils.rm_rf File.join(ROOT_DIR, 'doc') end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
linecache-tf-1.2 | Rakefile |