Skip to content

Instantly share code, notes, and snippets.

@lsegal
Created December 17, 2009 01:01
Show Gist options
  • Select an option

  • Save lsegal/258396 to your computer and use it in GitHub Desktop.

Select an option

Save lsegal/258396 to your computer and use it in GitHub Desktop.
require 'rake/gempackagetask'
class Gem::Specification
attribute :wiki
attribute :bugtracker
end
SPEC = Gem::Specification.new do |s|
s.name = "gemspec-test"
s.summary = "Testing a gemspec"
s.version = "1.0"
s.wiki = "http://example.com/wiki"
s.bugtracker = "http://example.com/tracker"
end
Rake::GemPackageTask.new(SPEC) {|pkg| pkg.gem_spec = SPEC }
task :test => :package do
format = Gem::Format.from_file_by_path(File.join('pkg', SPEC.full_name + '.gem'))
puts "Wiki: " + format.spec.wiki
puts "Bugtracker: " + format.spec.bugtracker
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment