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
Separation of ORM and framework level dependency
ab5tract (author)
Tue Sep 02 18:54:29 -0700 2008
automatthew (committer)
Wed Sep 03 08:01:26 -0700 2008
commit  2d242836c00675f33dd22ff8d8e6fa91910bb94b
tree    8ed71d9eb44cb0d9ce6129ee5c700fce20dab628
parent  0b9b3bb1bd4146ff7624339b20df93f7e2c89194
...
31
32
33
 
 
 
34
35
36
37
38
39
40
41
42
43
44
45
 
 
 
 
 
 
 
46
47
48
...
31
32
33
34
35
36
37
38
 
 
 
 
 
 
 
 
 
 
39
40
41
42
43
44
45
46
47
48
0
@@ -31,18 +31,18 @@ namespace :dep do
0
     gems = Gem::SourceIndex.from_installed_gems.to_a.to_s
0
     missing = Array.new
0
 
0
+ puts "\nApplication-level dependencies:"
0
+ puts " ('*' means gem is installed and available)"
0
+
0
     Waves.config.dependencies.each do |dep|
0
       pattern = /=#{dep}\s/
0
- missing << dep if pattern.match(gems).nil?
0
- end
0
-
0
- unless missing.empty?
0
- puts "Environment is missing the following expected dependencies:"
0
- missing.each { |x| puts "\t#{x}" }
0
- else
0
- puts "Environment has all expected dependencies."
0
- end
0
-
0
+ print "\t#{dep}:\t\t["
0
+ unless pattern.match(gems).nil?
0
+ print "*]\n"
0
+ else
0
+ print " ]\n"
0
+ end
0
+ end
0
   end
0
   
0
   desc "install any missing dependencies specified in the configuration"
...
10
11
12
 
13
14
15
...
17
18
19
20
 
 
21
22
 
23
24
25
...
10
11
12
13
14
15
16
...
18
19
20
 
21
22
23
 
24
25
26
27
0
@@ -10,6 +10,7 @@ module Waves
0
         # - creates on the application module a database method that establishes and returns the ActiveRecord connection
0
         # - arranges for autoloading/autocreation of missing constants in the Models namespace
0
         # - defines ActiveRecord-specific helper methods on Waves::Controllers::Base
0
+ # - adds 'active-record' to the application-level dependencies index, Waves.config.dependencies
0
         #
0
         # The controller helper methdods are:
0
         # - all
0
@@ -17,9 +18,10 @@ module Waves
0
         # - create
0
         # - delete(name)
0
         # - update(name)
0
-
0
+
0
+
0
         def self.included(app)
0
-
0
+ Waves.config.dependencies << 'activerecord'
0
 
0
           require 'active_record'
0
           require "#{File.dirname(__FILE__)}/active_record/tasks/schema" if defined?(Rake)
...
6
7
8
9
10
11
12
13
 
14
15
16
...
19
20
21
 
 
22
 
23
24
25
...
6
7
8
 
9
10
11
12
13
14
15
16
...
19
20
21
22
23
24
25
26
27
28
0
@@ -6,11 +6,11 @@ module Waves
0
       # namespace get loaded from file or created as subclasses of Models::Default. The dataset for models is set to the
0
       # snakecased version of the model's class name.
0
       module Sequel
0
-
0
         # On inclusion, this module:
0
         # - creates on the application module a database method that establishes the Sequel connection
0
         # - arranges for autoloading/autocreation of missing constants in the Models namespace
0
         # - defines Sequel-specific helper methods on Waves::Controllers::Base
0
+ # - adds 'sequel' to the application-level dependencies index, Waves.config.dependencies
0
         #
0
         # The controller helper methdods are:
0
         # - all
0
@@ -19,7 +19,10 @@ module Waves
0
         # - delete(name)
0
         # - update(name)
0
         #
0
+
0
+
0
         def self.included(app)
0
+ Waves.config.dependencies << 'sequel'
0
           
0
           gem 'sequel', '>= 2.0.0'
0
           require 'sequel'

Comments

    No one has commented yet.