Sha256: 5682f6b91a8bf8e7a7d02944919cb4cffa4453eb796475f7b5ee1f4ed8ae05fe

Contents?: true

Size: 1.27 KB

Versions: 7

Compression:

Stored size: 1.27 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.
#

APP_NAME       = "railroad"
APP_HUMAN_NAME = "RailRoad"
APP_VERSION    = [0,5,0]
COPYRIGHT      = "Copyright (C) 2007-2008 Javier Smaldone"

require 'railroad/options_struct'
require 'railroad/models_diagram'
require 'railroad/controllers_diagram'
require 'railroad/aasm_diagram'

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

7 entries across 7 versions & 3 rubygems

Version Path
royw-railroad_xing-0.5.0.1 bin/railroad
royw-railroad_xing-0.5.0.2 bin/railroad
royw-railroad_xing-0.5.1 bin/railroad
royw-railroad_xing-0.5.2 bin/railroad
royw-railroad_xing-0.5.3 bin/railroad
dmattes-railroad_xing-0.5.4 bin/railroad
railroad-0.5.0 bin/railroad