Class: Corundum::GemBuilding

Inherits:
Mattock::TaskLib
  • Object
show all
Defined in:
lib/corundum/gem_building.rb

Instance Method Summary collapse

Instance Method Details

#default_configuration(toolkit) ⇒ Object



9
10
11
12
# File 'lib/corundum/gem_building.rb', line 9

def default_configuration(toolkit)
  super
  toolkit.copy_settings_to(self)
end

#defineObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/corundum/gem_building.rb', line 14

def define
  require 'rubygems/package_task'

  in_namespace do
    package_task = Gem::PackageTask.new(gemspec) do |t|
      t.need_tar_gz = true
      t.need_tar_bz2 = true
      t.package_dir = package.abspath
    end

    task :clobber_package_dir_path do
      rm_rf package_task.package_dir_path
    end

    task :gem => :clobber_package_dir_path
    file package_task.package_dir_path + ".gem" => :clobber_package_dir_path
    file package_task.package_dir_path => :clobber_package_dir_path

    task(:package).prerequisites.each do |package_type|
      file package_type => qa_file
    end
  end

  task :build => in_namespace("gem")
end