Sha256: 1cddfe487b6bfd3697b69356ebc512d08485b9783816e0cff848d9f8ee8898c0

Contents?: true

Size: 1.15 KB

Versions: 5

Compression:

Stored size: 1.15 KB

Contents

#!/usr/bin/env ruby

require 'gen'

def usage
  puts <<-USAGE

NAME
     gen - frontend for the Nitro generator mechanism.

SYNOPSIS
     gen [generator] [generator options]

DESCRIPTION
     This is a frontend to the Nitro generator mechanism. Nitro 
     generators are used to 'bootstrap' development by creating 
     a standard directory structure and files for common tasks.
     
     app: 
        This will create some basic files to get you 
        started fleshing out your Nitro web application.

     form:
        This will create an html representation of a model.      

EXAMPLE
     gen app ~/my_application

       This will generate a new Nitro application in the 
       ~/my_application folder.

     gen form model.rb Model _model.html

       This will generate an html form of the class Model
       defined in model.rb. The html form will be output
       to _model.html
USAGE
  exit 1  
end

generator = ARGV.shift || usage()

begin
  require "gen/#{generator}/gen.rb"
rescue LoadError 
  puts 'Cannot load the specified generator!'
  exit 1
end

$generator.generator_dir = File.join(Gen::LibPath, 'gen', generator)
$generator.setup
$generator.run

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gen-0.41.0 bin/gen
gen-0.29.0 bin/gen
gen-0.30.0 bin/gen
gen-0.31.0 bin/gen
gen-0.40.0 bin/gen