File: Rakefile

package info (click to toggle)
ticgit 1.0.2.17-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 488 kB
  • sloc: ruby: 2,849; sh: 124; makefile: 21
file content (32 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/rdoctask'
require 'rspec/core/rake_task'

CLEAN.include('**/*.gem')

desc "Creates the TicGit-ng gem"
task :create_gem => [:clean] do
  spec = eval(IO.read('ticgit-ng.gemspec'))
  gem = Gem::Builder.new(spec).build
  Dir.mkdir("pkg") unless Dir.exists? "pkg"
  FileUtils.mv("#{File.dirname(__FILE__)}/#{gem}", "pkg")
end

desc "Runs spec suite"
RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.pattern = 'spec/*_spec.rb'
  spec.rspec_opts = ['--backtrace --colour']
end

desc "Creates rdoc documentation"
Rake::RDocTask.new do |rdoc|
  version = File.exist?('VERSION') ? File.read('VERSION').chomp : ""
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "TicGit-ng #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

task :default => :create_gem