Sha256: 6d607538b55239d02be87249a4de69f9fca07c94cabebeac086d816cf98cee7e

Contents?: true

Size: 742 Bytes

Versions: 3

Compression:

Stored size: 742 Bytes

Contents

def sys(*args)
  STDERR.puts "#{args.join(" ")}"
  system *args
end

namespace :gem do
  task :build => :spec do
    options = []
    sys "gem build .gemspec #{options.join(" ")} && mkdir -p pkg && mv *.gem pkg"
  end

  task :spec do
    File.open ".gemspec", "w" do |file|
      file.write <<-TXT
require "vex/gem"
Gem.spec File.dirname(__FILE__)
TXT
    end
  end
  
  task :install => :build do
    file = Dir.glob("pkg/*.gem").sort.last
    sys "gem install #{file}"
  end
  
  task :push => :build do
    file = Dir.glob("pkg/*.gem").sort.last
    puts "To push the gem to gemcutter please run"
    puts
    puts "\tgem push #{file}"
  end
end

desc "Build gem"
# task :gem => %w(test gem:install)
task :gem => %w(gem:install gem:push)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
etest-0.6.3 vex/gem.rake
etest-0.6.2 vex/gem.rake
etest-0.6.1 vex/gem.rake