Browse files

Move the gemspec out to its own file for GitHub integration.

  • Loading branch information...
1 parent 36ef1fa commit 588f7726dd513946eaf150dc1ba5aad8a44054dc @nex3 nex3 committed May 5, 2008
Showing with 25 additions and 30 deletions.
  1. +2 −30 Rakefile
  2. +23 −0 benchwarmer.gemspec
View
32 Rakefile
@@ -1,36 +1,8 @@
require 'rubygems'
require 'rake/gempackagetask'
+load File.join(File.dirname(__FILE__), 'benchwarmer.gemspec')
-GEM = "benchwarmer"
-VERSION = "0.5"
-AUTHOR = "Yehuda Katz"
-EMAIL = "wycats@gmail.com"
-HOMEPAGE = "http://yehudakatz.com"
-SUMMARY = "A gem that provides a prettier formatting and DSL for Ruby benchmarks"
-
-spec = Gem::Specification.new do |s|
- s.name = GEM
- s.version = VERSION
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.extra_rdoc_files = ["README", "LICENSE"]
- s.summary = SUMMARY
- s.description = s.summary
- s.author = AUTHOR
- s.email = EMAIL
- s.homepage = HOMEPAGE
-
- # Uncomment this to add a dependency
- # s.add_dependency "foo"
-
- s.require_path = 'lib'
- s.autorequire = GEM
- s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib}/**/*")
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
+Rake::GemPackageTask.new(GEMSPEC).define
task :install => [:package] do
sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
View
23 benchwarmer.gemspec
@@ -0,0 +1,23 @@
+GEM = "benchwarmer"
+VERSION = "0.5"
+AUTHOR = "Yehuda Katz"
+EMAIL = "wycats@gmail.com"
+HOMEPAGE = "http://yehudakatz.com"
+SUMMARY = "A gem that provides a prettier formatting and DSL for Ruby benchmarks"
+
+GEMSPEC = Gem::Specification.new do |s|
+ s.name = GEM
+ s.version = VERSION
+ s.platform = Gem::Platform::RUBY
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README", "LICENSE"]
+ s.summary = SUMMARY
+ s.description = s.summary
+ s.author = AUTHOR
+ s.email = EMAIL
+ s.homepage = HOMEPAGE
+
+ s.require_path = 'lib'
+ s.autorequire = GEM
+ s.files = %w(LICENSE README Rakefile lib/benchwarmer.rb lib/vendor/dictionary.rb)
+end

0 comments on commit 588f772

Please sign in to comment.