Sha256: 63f7d3ee160b5dd5caf436462a21bfdae70bb36928ba43a84ae4047b922dd22e

Contents?: true

Size: 1.95 KB

Versions: 18

Compression:

Stored size: 1.95 KB

Contents

begin
  require 'rake/gempackagetask'
rescue LoadError
end
require 'rake/clean'
require 'rbconfig'
include Config

PKG_NAME = 'term-ansicolor'
PKG_VERSION = File.read('VERSION').chomp
PKG_FILES = FileList['**/*'].exclude(/(CVS|\.svn|pkg|coverage|doc)/)
CLEAN.include 'coverage', 'doc'

desc "Installing library"
task :install  do
  ruby 'install.rb'
end

desc "Creating documentation"
task :doc do
  ruby 'make_doc.rb'
end


if defined? Gem
  spec = Gem::Specification.new do |s|
    s.name = PKG_NAME
    s.version = PKG_VERSION
    s.summary = "Ruby library that colors strings using ANSI escape sequences"
    s.description = ""

    s.files = PKG_FILES.to_a.sort

    s.require_path = 'lib'

    s.has_rdoc = true
    s.extra_rdoc_files << 'README'
    s.executables << 'cdiff' << 'decolor'
    s.rdoc_options << '--main' <<  'README' << '--title' << 'Term::ANSIColor'
    s.test_files = Dir['tests/*.rb']

    s.author = "Florian Frank"
    s.email = "flori@ping.de"
    s.homepage = "http://flori.github.com/#{PKG_NAME}"
    s.rubyforge_project = PKG_NAME
  end

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

desc m = "Writing version information for #{PKG_VERSION}"
task :version do
  puts m
  File.open(File.join('lib', 'term', 'ansicolor', 'version.rb'), 'w') do |v|
    v.puts <<EOT
module Term
  module ANSIColor
    # Term::ANSIColor version
    VERSION         = '#{PKG_VERSION}'
    VERSION_ARRAY   = VERSION.split(/\\./).map { |x| x.to_i } # :nodoc:
    VERSION_MAJOR   = VERSION_ARRAY[0] # :nodoc:
    VERSION_MINOR   = VERSION_ARRAY[1] # :nodoc:
    VERSION_BUILD   = VERSION_ARRAY[2] # :nodoc:
  end
end
EOT
  end
end

desc "Run tests"
task :tests do
  sh 'testrb -Ilib tests/*.rb'
end
task :test => :tests

desc "Run tests with coverage"
task :coverage do
  sh 'rcov -Ilib tests/*.rb'
end

desc "Default"
task :default => [ :version ]

desc "Prepare a release"
task :release => [ :clean, :version, :package ]

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
Hokkaido-0.1.5 ansiterm-color/Rakefile
Hokkaido-0.1.4 ansiterm-color/Rakefile
Hokkaido-0.1.3 ansiterm-color/Rakefile
Hokkaido-0.1.2 ansiterm-color/Rakefile
Hokkaido-0.1.1 ansiterm-color/Rakefile
Hokkaido-0.1.0 ansiterm-color/Rakefile
Hokkaido-0.0.9 ansiterm-color/Rakefile
Hokkaido-0.0.6 ansiterm-color/Rakefile
Hokkaido-0.0.5 ansiterm-color/Rakefile
Hokkaido-0.0.4 ansiterm-color/Rakefile
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/term-ansicolor-1.0.5/Rakefile
vim-jar-0.1.2 bundler/ruby/1.8/gems/term-ansicolor-1.0.5/Rakefile
vim-jar-0.1.1 bundler/ruby/1.8/gems/term-ansicolor-1.0.5/Rakefile
vim-jar-0.1.0 bundler/ruby/1.8/gems/term-ansicolor-1.0.5/Rakefile
exemplor-3000.3.0 vendor/term-ansicolor-1.0.5/Rakefile
exemplor-3000.2.0 vendor/term-ansicolor-1.0.5/Rakefile
exemplor-3000.1.0 vendor/term-ansicolor-1.0.5/Rakefile
term-ansicolor-1.0.5 Rakefile