Sha256: 4ba043fac4343201f3e8306365431a33e9d942b48d2cfd1345a6dacf2d48d4d7

Contents?: true

Size: 1.42 KB

Versions: 1

Compression:

Stored size: 1.42 KB

Contents

require 'pathname'
require 'rake/testtask'
require 'rake/gempackagetask'

task :default => :test

Rake::TestTask.new("test") do |t|
  t.libs << 'test'
  t.pattern = 'test/**/*_test.rb'
  t.warning = true
  t.verbose = true
end

desc "Generate file list for .gemspec"
task :gem_file_list do
  f = FileList.new
  f.include('lib/**/**')
  f.include('rdoc/**/**')
  f.exclude('rdoc/test/**/**')
  print "%w(" + f.to_a.select{|file| !File.directory? file }.join(' ') + ")\n"
end

begin
  require 'jeweler'
  jewler = Jeweler::Tasks.new do |gem|
    gem.name = "sdoc"
    gem.summary = "rdoc html with javascript search index."
    gem.email = "voloko@gmail.com"
    gem.homepage = "http://github.com/voloko/sdoc"
    gem.authors = ["Volodya Kolesnikov"]
    gem.add_dependency("json", ">= 1.1.3")
    gem.add_dependency("rdoc", ">= 2.4.2")

    # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
  end

  desc "Replace system gem with symlink to this folder"
  task 'ghost' do
    gem_path = Pathname(Gem.searcher.find(echoe.name).full_gem_path)
    current_path = Pathname('.').expand_path
    cmd = gem_path.writable? && gem_path.parent.writable? ? %w() : %w(sudo)
    system(*cmd + %W[rm -r #{gem_path}])
    system(*cmd + %W[ln -s #{current_path} #{gem_path}])
  end
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
toy-sdoc-0.2.15 Rakefile