GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: Resource-oriented open source Ruby framework for Web apps.
Homepage: http://rubywaves.com/
Clone URL: git://github.com/dyoder/waves.git
rake dep:check, dep:install tasks. break em if you can!
ab5tract (author)
Wed Aug 27 07:11:19 -0700 2008
automatthew (committer)
Wed Sep 03 07:58:43 -0700 2008
commit  09150b1e6e84ed546b499aaded4ae7fd40a11093
tree    3e59cb518cbb2affa5ecf7f235202be3207f1fce
parent  5f996c14842e922026b8ce0ebefa794acf22fbed
...
23
24
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
27
28
...
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
0
@@ -23,6 +23,54 @@ rescue LoadError => e
0
   end
0
 end
0
 
0
+namespace :dep do
0
+
0
+ desc "check if all the dependencies specified in the configuration"
0
+ task :check do
0
+
0
+ gems = Gem::SourceIndex.from_installed_gems.to_a.to_s
0
+ missing = Array.new
0
+
0
+ Waves.config.dependencies.each do |dep|
0
+ missing << dep unless gems.include? dep
0
+ end
0
+
0
+ puts "You are missing the following expected dependencies:"
0
+ missing.each { |x| puts "\t#{x}" }
0
+ puts "(do a 'rake dep:install' to get 'em)"
0
+
0
+ end
0
+
0
+ desc "install any missing dependencies specified in the configuration"
0
+ task :install do
0
+
0
+ gems = Gem::SourceIndex.from_installed_gems.to_a.to_s
0
+ missing = Array.new
0
+
0
+ Waves.config.dependencies.each do |dep|
0
+ missing << dep unless gems.include? dep
0
+ end
0
+
0
+ missing.each do |dep|
0
+ puts "Installing dependency: #{dep}"
0
+ begin
0
+ require 'rubygems/dependency_installer'
0
+ if Gem::RubyGemsVersion =~ /^1\.0\./
0
+ Gem::DependencyInstaller.new(dep).install
0
+ else
0
+ # as of 1.1.0
0
+ Gem::DependencyInstaller.new.install(dep)
0
+ end
0
+ rescue LoadError # < rubygems 1.0.1
0
+ require 'rubygems/remote_installer'
0
+ Gem::RemoteInstaller.new.install(dep)
0
+ end
0
+ end
0
+
0
+ end
0
+
0
+end
0
+
0
 namespace :waves do
0
   
0
   desc "freeze src=<wherever> to ./waves"

Comments

    No one has commented yet.