Sha256: ac60a25647f3a356d90fff5aad5d814ecd8901fc0cc23b2bde82247320e12c08

Contents?: true

Size: 1.39 KB

Versions: 1

Compression:

Stored size: 1.39 KB

Contents

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

dist_dirs = [ "config", "lib", "samples" ]

manifest = YAML.load_file(File.join(File.dirname(__FILE__),"config", "manifest.yml"))

gem_spec = Gem::Specification.new do |s|
    tiny_ver    = 0
    s.platform  = Gem::Platform::RUBY
    s.name      = manifest[:name]
    s.version   = manifest[:version].join(".") + ".#{tiny_ver}" 
    s.author    = "RHG Team"
    s.email     = "rails-trunk@revolution.com"
    s.summary   = manifest[:description]
    s.files = [ "Changelog", "MIT-LICENSE", "Rakefile", "README" ]
    dist_dirs.each do |dir|
      s.files = s.files + Dir.glob( "#{dir}/**/*" ).delete_if { |item| /(\.[svn|log|db])|(schema\.rb)/ === item }
    end
    s.autorequire = s.name
    s.require_path  =   "lib"
    s.has_rdoc  =   false
    s.extra_rdoc_files  =   ["README", "Changelog"]
    manifest[:dependencies].each do|pkg,version|
      s.add_dependency(pkg, version)
    end if manifest[:dependencies]
end
    
gem = Rake::GemPackageTask.new(gem_spec) do |pkg|
  pkg.need_tar = true
  pkg.need_zip = true
end

desc 'Generate documentation for the plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = manifest[:name].gsub(/_/, ' ').capitalize
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/*.rb')
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
threadsafe_benchmark-1.0.0 Rakefile