summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorEzra Zygmuntowicz <ez@engineyard.com>2008-10-03 13:32:22 -0700
committerEzra Zygmuntowicz <ez@engineyard.com>2008-10-03 13:32:22 -0700
commit1fd7173fed447b2d4e401c7dedf66131288151b6 (patch)
tree93e934eceed0dc522948440a1c54e7d524c0e521 /Rakefile
parentc982ebfe0ce22884939c2d3419d7a51f4c271f49 (diff)
downloadchef-1fd7173fed447b2d4e401c7dedf66131288151b6.tar.gz
Update RakeFile to actually build a gem with dependencies
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile56
1 files changed, 43 insertions, 13 deletions
diff --git a/Rakefile b/Rakefile
index eebcdedd69..094e7b22aa 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,21 +1,51 @@
# -*- ruby -*-
-
require 'rubygems'
-require 'hoe'
+require 'rake/gempackagetask'
require './lib/chef.rb'
require './tasks/rspec.rb'
-# require Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rb')].sort.each do |lib|
-# require lib
-# end
-Hoe.new('chef', Chef::VERSION) do |p|
- p.rubyforge_name = 'chef'
- p.author = 'Adam Jacob'
- p.email = 'adam@hjksolutions.com'
- p.summary = 'A configuration management system.'
- p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
- p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
+GEM = "chef"
+VERSION = "0.0.1"
+AUTHOR = "Adam Jacob"
+EMAIL = "adam@hjksolutions.com"
+HOMEPAGE = "http://hjksolutions.com"
+SUMMARY = "A configuration management system."
+
+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.txt", "LICENSE", 'NOTICE']
+ 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 "stomp"
+ s.add_dependency "stompserver"
+ s.add_dependency "ferret"
+ s.add_dependency "facter"
+ s.add_dependency "merb-core"
+ s.add_dependency "haml"
+ s.add_dependency "ruby-openid"
+ s.add_dependency "json"
+
+ s.bindir = "bin"
+ s.executables = %w( chef-client chef-indexer chef-server chef-solo )
+
+ s.require_path = 'lib'
+ s.files = %w(LICENSE README.txt Rakefile) + Dir.glob("{lib,specs}/**/*")
+end
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
+task :install => [:package] do
+ sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
end
# vim: syntax=Ruby