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
Sprucing up --orm switch. Invalid arguments now raises, plus activerecord 
and active-record work as well as active_record
ab5tract (author)
Tue Sep 02 21:56:57 -0700 2008
automatthew (committer)
Wed Sep 03 14:10:22 -0700 2008
commit  fb393fbd4205f4c2ced3ca2e7bf8574b8733916a
tree    51d62283461f7bfa3c27dbc096097817ec2b7195
parent  4d0965b896ae065bce45214922aa63703b4fd273
...
33
34
35
 
36
37
38
39
40
 
41
42
43
 
 
 
 
 
44
45
46
...
33
34
35
36
37
38
39
40
 
41
42
43
 
44
45
46
47
48
49
50
51
0
@@ -33,14 +33,19 @@ end
0
 
0
 puts "** Waves Runtime #{Waves.version}"
0
 
0
+available_orms = [ 'sequel' , 'active_record' , 'none' ]
0
 orm = Choice.choices.orm.snake_case
0
 orm_require, orm_include = case orm
0
 when 'sequel'
0
   ["require 'layers/orm/sequel'", "include Waves::Layers::ORM::Sequel"]
0
-when 'active_record'
0
+when /active([-_]*)record/
0
   ["require 'layers/orm/active_record'", "include Waves::Layers::ORM::ActiveRecord"]
0
 when 'none'
0
- ['', '# This app was generated without an ORM layer']
0
+ ['', '# This app was generated without an ORM layer.']
0
+else
0
+ puts "I'm sorry, '#{orm}' is not listed as an available option.\nTry: \t"
0
+ available_orms.each { |x| puts "\t\t#{x}" }
0
+ raise
0
 end
0
 
0
 app_path = ARGV[0]

Comments

    No one has commented yet.