Class: Toe::Gem

Inherits:
GemTask
  • Object
show all
Defined in:
lib/toe/gem.rb

Overview

::task package a gem

Instance Method Summary collapse

Methods inherited from GemTask

#default_path, #gemspec

Instance Method Details

#process(path = default_path) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/toe/gem.rb', line 10

def process(path=default_path)
  unless File.directory?(output_dir)
    FileUtils.mkdir_p(output_dir)
  end

  path = ::Gem::Builder.new(gemspec(path)).build
  FileUtils.mv(path, File.join(output_dir, File.basename(path)))

  path
end