Sha256: e21be3254cfc4d25bc09b280879819d03622b3246591e9294078c9c5fc3e996f

Contents?: true

Size: 754 Bytes

Versions: 6

Compression:

Stored size: 754 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

6 entries across 6 versions & 6 rubygems

Version Path
vex-0.6.2 vex/gem.rake
rack-mason-0.1.2 vex/gem.rake
cached-0.2 vex/gem.rake
dlog-0.2.3 vex/gem.rake
etest-0.6.0 vex/gem.rake
dispaaro-couch-0.1 vex/gem.rake