public
Description: A Ruby web application framework
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack.git
Click here to lend your support to: mack and make a donation at www.pledgie.com !
mack / bin / mack
100644 40 lines (30 sloc) 1.073 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/local/bin/ruby
require 'fileutils'
require 'optparse'
require 'optparse/time'
require 'ostruct'
require 'pp'
require 'erb'
require 'genosaurus'
require File.join(File.dirname(__FILE__), "..", "lib", "mack", "generators", "mack_application_generator", "mack_application_generator")
 
app = ARGV[0]
raise "You must specify a name for this application!" if app.nil?
 
options = OpenStruct.new
options.orm = "data_mapper"
options.testing_framework = "rspec"
options.js_framework = "jquery"
options.version = "0.6.0.100"
 
opts = OptionParser.new do |opts|
  opts.banner = "Usage: mack <application_name> [options]"
  
  opts.on("-o [data_mapper|active_record]") do |v|
    options.orm = v
  end
  
  opts.on("-t [rspec|test_case]") do |v|
    options.testing_framework = v
  end
  
  opts.on("-j [jquery|prototype]") do |v|
    options.js_framework = v
  end
  
end
 
opts.parse!(ARGV)
 
MackApplicationGenerator.run({"version" => options.version, "app" => app, "orm" => options.orm, "testing_framework" => options.testing_framework, "js_framework" => options.js_framework})