Sha256: ad7d3c2b8a14b144c8f8a12cc689a3dd1b06c66d27da44edcfd2dddeb0a37501

Contents?: true

Size: 759 Bytes

Versions: 2

Compression:

Stored size: 759 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 "sudo 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

2 entries across 2 versions & 1 rubygems

Version Path
dlog-0.2.1 vex/gem.rake
dlog-0.2 vex/gem.rake