Sha256: c4ed77c626b50765c2da4832c59681b9f8428e2b5cfeb623ae048beee9e79a55

Contents?: true

Size: 1.63 KB

Versions: 16

Compression:

Stored size: 1.63 KB

Contents

#!/usr/bin/env ruby

# RailRoady - RoR diagrams generator
# http://github.com/preston/railroady
#
#   RailRoady generates models and controllers diagrams in DOT language
#   for a Rails v3 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.
#
# Modification 2010 by Preston Lee.
#

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'railroady'

APP_NAME       = "railroady"
APP_HUMAN_NAME = "RailRoady"
# APP_VERSION    = [RailRoady::VERSION::MAJOR, RailRoady::VERSION::MINOR, RailRoady::VERSION::PATCH]
APP_VERSION    = RailRoady::VERSION::STRING
COPYRIGHT      = "Copyright (C) 2007-2008 Javier Smaldone, 2009 Peter Hoeg, 2010 Preston Lee"

options = OptionsStruct.new({:app_name => APP_NAME, :app_human_name => APP_HUMAN_NAME, :app_version =>APP_VERSION, :copyright =>COPYRIGHT})

options.parse ARGV

# puts "OPTS!!!"
# puts options

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 "#{APP_HUMAN_NAME} v#{RailRoady::VERSION::STRING}\n" +
    "Error: You must supply a command\n" +
    "  (try #{APP_NAME} -h)\n\n"
  exit 1
end

diagram.process
diagram.generate

Dir.chdir(old_dir)

diagram.print

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
railroady-1.1.0 bin/railroady
railroady-1.0.9 bin/railroady
railroady-1.0.8 bin/railroady
railroady-1.0.7 bin/railroady
railroady-1.0.6 bin/railroady
railroady-1.0.5 bin/railroady
railroady-1.0.4 bin/railroady
railroady-1.0.3 bin/railroady
railroady-1.0.2 bin/railroady
railroady-1.0.1 bin/railroady
railroady-1.0.0 bin/railroady
railroady-0.11.3 bin/railroady
railroady-0.11.2 bin/railroady
railroady-0.11.1 bin/railroady
railroady-0.11.0 bin/railroady
railroady-0.9.0 bin/railroady