Sha256: 95c58080dbaa0321f96af7edc0037f1f626081d544e27a3546bccba144c08380

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

#!/usr/local/bin/ruby
require File.join(File.dirname(__FILE__), '..', 'lib', 'gems')
# add_gem_path(File.join(File.dirname(__FILE__), '..', 'lib', 'gems'))

require 'fileutils'
require 'optparse'
require 'optparse/time'
require 'ostruct'
require 'pp'
require 'erb'
require 'genosaurus'
require 'mack-facets'
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"

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({'app' => app, "orm" => options.orm, "testing_framework" => options.testing_framework, "js_framework" => options.js_framework})

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mack-0.8.3.1 bin/mack
mack-0.8.3 bin/mack