[Fix] rake setup fails in absence of micronaut

0 views
Skip to first unread message

ab5tract

unread,
May 3, 2009, 1:44:42 AM5/3/09
to rubywaves
Here is a patch:

diff --git a/Rakefile b/Rakefile
index 4a6ff1e..6ab5cd7 100644
--- a/Rakefile
+++ b/Rakefile
@@ -10,10 +10,10 @@ runtime_deps = { :rack => '~> 0.4', 'rack-cache'
=> '~> 0.2',
:live_console => '~> 0.2', :functor => '>= 0.5.0',
:rakegen => '~> 0.6', :autocode => '>= 1.0.0',
:filebase => '>= 0.3.5', :RedCloth => '~> 4.0',
- :choice => '~> 0.1', :metaid => '~> 1.0', :daemons => '~>1.0.10',
+ :choice => '~> 0.1', :metaid => '~> 1.0', :daemons => '~>1.0.10'
}

-developer_deps = { :bacon => '~> 1.0', :facon => '~> 0.4' }
+developer_deps = { 'spicycode-micronaut' => '~> 0.2.7', :rr '~=>
0.9.0', :bacon => '~> 1.0', :facon => '~> 0.4' }

gem = Gem::Specification.new do |gem|
gem.name = "waves"
@@ -117,6 +117,10 @@ task( :setup ) do
# Add build-time dependencies, like this:
dependencies.each do |dep|
if gems.find_name(dep.name, dep.version_requirements).empty?
+ if dep.name =~ /spicycode-micronaut/
+ puts "\n\n***\nYou will need to install micronaut by hand.\n # gem
sources -a http://gems.github.com\n # (sudo) gem install spicycode-
micronaut\n\n"
+ raise LoadError, "Required dependency 'micronaut' missing. Install
by hand through github gem."
+ end
puts "Installing dependency: #{dep}"
begin
require 'rubygems/dependency_installer'

This will at least fail gracefully, with instructions. It would be
nice if micronaut were on rubyforge, or if rubygems/
dependency_installer can install from different sources. I will look
into that but for tonight just wanted to get the basic setup working
better. Wasn't sure of the status of bacon and facon in the tests, so
they are still in as deps (and indeed are both still required by test/
helpers.rb). Should that change in the future?
Reply all
Reply to author
Forward
0 new messages