Sha256: effeb66d36e17a5e832a3566d7293568518e7f9784a6a893a9b11605af4d1408

Contents?: true

Size: 1.06 KB

Versions: 9

Compression:

Stored size: 1.06 KB

Contents

#!/usr/bin/env ruby

# RailRoad - RoR diagrams generator
# http://railroad.rubyforge.org
#
#   RailRoad generates models and controllers diagrams in DOT language
#   for a Rails application.
#
# Copyright 2007-2008 - Javier Smaldone (http://www.smaldone.com.ar)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#

$: << File.join(File.dirname(__FILE__), '../lib/')
require 'railroad'

options = OptionsStruct.new

options.parse ARGV

old_dir = Dir.pwd

Dir.chdir(options.root) if options.root != ''

if options.command == 'models'
  diagram = ModelsDiagram.new options
elsif options.command == 'controllers'
  diagram = ControllersDiagram.new options
elsif options.command == 'aasm'
  diagram = AasmDiagram.new options
else
  STDERR.print "Error: You must supply a command\n" +
               "  (try #{APP_NAME} -h)\n\n"
  exit 1
end

diagram.generate

Dir.chdir(old_dir)

diagram.print

Version data entries

9 entries across 9 versions & 5 rubygems

Version Path
bryanlarsen-railroad-0.7.7 bin/railroad
ddollar-railroad-0.7.1.1 bin/railroad
ddollar-railroad-0.7.3 bin/railroad
ddollar-railroad-0.7.6 bin/railroad
factorylabs-railroad-0.6.0.1 bin/railroad
nono-railroad-0.7.4 bin/railroad
nono-railroad-0.7.5 bin/railroad
nono-railroad-0.7.6 bin/railroad
terotil-railroad-0.7.1 bin/railroad