Sha256: 151161c9ee9bb020ba4bf76509e694f7b5930ce0a0c65fff6055ec46b154cbd3
Contents?: true
Size: 1.52 KB
Versions: 3
Compression:
Stored size: 1.52 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. # require File.dirname(__FILE__) + '/../lib/version' APP_NAME = "railroad" APP_HUMAN_NAME = "RailRoad" APP_VERSION = [RailRoad::VERSION::MAJOR, RailRoad::VERSION::MINOR, RailRoad::VERSION::PATCH] COPYRIGHT = "Copyright (C) 2007-2008 Javier Smaldone, 2009 Peter Hoeg" if ARGV.first == '--version' puts "#{APP_HUMAN_NAME} v#{RailRoad::VERSION::STRING}" exit(0) end require 'options_struct' require 'models_diagram' require 'controllers_diagram' require '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 "#{APP_HUMAN_NAME} v#{RailRoad::VERSION::STRING}\n" + "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
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
peterhoeg-railroad-0.5.7 | bin/railroad |
peterhoeg-railroad-0.5.8 | bin/railroad |
shift-railroad-0.5.8 | bin/railroad |