Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created March 9, 2010 01:41
Show Gist options
  • Select an option

  • Save defunkt/326059 to your computer and use it in GitHub Desktop.

Select an option

Save defunkt/326059 to your computer and use it in GitHub Desktop.
Quickly create a gemspec.
#!/usr/bin/env ruby
# Usage: generate a blank gemspec, for defunkt
abort "pass a name" unless name = ARGV[0]
date = Time.now.strftime('%Y-%m-%d')
puts <<spec
require "#{name}/version"
Gem::Specification.new do |s|
s.name = "#{name}"
s.version = "#{name.capitalize}::Version"
s.date = Time.now.strftime('%Y-%m-%d')
s.summary = "Feed me."
s.homepage = "http://github.com/defunkt/#{name}"
s.email = "[email protected]"
s.authors = [ "Chris Wanstrath" ]
s.has_rdoc = false
s.files = %w( README.md Rakefile LICENSE )
s.files += Dir.glob("lib/**/*")
s.files += Dir.glob("bin/**/*")
s.files += Dir.glob("man/**/*")
s.files += Dir.glob("test/**/*")
# s.executables = %w( #{name} )
s.description = <<desc
Feed me.
desc
end
spec
@jonatas
Copy link

jonatas commented May 13, 2010

Cool!

@PhreeMason
Copy link

how do I use this?

@PhreeMason
Copy link

Never mind figured it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment