markbates / mack

A Ruby web application framework

This URL has Read+Write access

mack / bin / mack
bf54347e » markbates 2008-03-18 Added #!/usr/local/bin/ruby... 1 #!/usr/local/bin/ruby
10c8c7b8 » markbates 2008-03-05 initial import 2 require 'fileutils'
3 require 'optparse'
4 require 'optparse/time'
5 require 'ostruct'
6 require 'pp'
7 require 'erb'
751e5908 » markbates 2008-04-22 All generators, including t... 8 require 'genosaurus'
e81da1d9 » dsutedja 2008-07-27 Fixed mack executable probl... 9 require File.join(File.dirname(__FILE__), "..", "lib", "mack", "generators", "mack_application_generator", "mack_application_generator")
10c8c7b8 » markbates 2008-03-05 initial import 10
11 app = ARGV[0]
12 raise "You must specify a name for this application!" if app.nil?
13
14 options = OpenStruct.new
a4546f82 » markbates 2008-05-04 Removed support for ActiveR... 15 options.orm = "data_mapper"
0266a364 » dsutedja 2008-07-02 initial commit for selectab... 16 options.testing_framework = "rspec"
eb155798 » dsutedja 2008-07-21 - deprecate orm_support in ... 17 options.js_framework = "jquery"
2720e328 » markbates 2008-07-16 mack binary at 0.6.0.100 18 options.version = "0.6.0.100"
10c8c7b8 » markbates 2008-03-05 initial import 19
20 opts = OptionParser.new do |opts|
3661b06d » markbates 2008-04-16 Added banner to the options... 21 opts.banner = "Usage: mack <application_name> [options]"
10c8c7b8 » markbates 2008-03-05 initial import 22
3661b06d » markbates 2008-04-16 Added banner to the options... 23 opts.on("-o [data_mapper|active_record]") do |v|
10c8c7b8 » markbates 2008-03-05 initial import 24 options.orm = v
25 end
26
0266a364 » dsutedja 2008-07-02 initial commit for selectab... 27 opts.on("-t [rspec|test_case]") do |v|
28 options.testing_framework = v
29 end
30
eb155798 » dsutedja 2008-07-21 - deprecate orm_support in ... 31 opts.on("-j [jquery|prototype]") do |v|
32 options.js_framework = v
33 end
34
10c8c7b8 » markbates 2008-03-05 initial import 35 end
36
37 opts.parse!(ARGV)
38
eb155798 » dsutedja 2008-07-21 - deprecate orm_support in ... 39 MackApplicationGenerator.run({"version" => options.version, "app" => app, "orm" => options.orm, "testing_framework" => options.testing_framework, "js_framework" => options.js_framework})