#!/usr/bin/env ruby # Usage: gemspec [-s] GEMNAME # # Prints a basic gemspec for GEMNAME based on your git-config info. # If -s is passed, saves it as a GEMNAME.gemspec in the current # directory. Otherwise prints to standard output. # # Once you check this gemspec into your project, releasing a new gem # is dead simple: # # $ gem build GEMNAME.gemspec # $ gem push GEMNAME-VERSION.gem # # Wants you to have a "lib/GEMNAME/version.rb" file in your project # which sets the GEMNAME::VERSION constant. fullname = `git config --get user.name`.chomp email = `git config --get user.email`.chomp login = `git config --get github.user`.chomp save = ARGV.delete('-s') abort "* Pass a gem name." unless name = ARGV[0] gemspec = <