lib/railroady/options_struct.rb in railroady-1.1.0 vs lib/railroady/options_struct.rb in railroady-1.1.1

- old
+ new

@@ -32,10 +32,11 @@ :hide_through => false, :transitive => false, :verbose => false, :xmi => false, :command => '', + :config_file => 'config/environment', :app_name => 'railroady', :app_human_name => 'Railroady', :app_version =>'', :copyright =>'' } super(init_options.merge(args)) end # initialize def parse(args) @@ -130,9 +131,14 @@ "#{self.copyright}\nThis is free software; see the source " + "for copying conditions.\n\n" exit end opts.separator "" + opts.on("-c", "--config FILE", "File to load environment (defaults to config/environment)") do |c| + if c && c != '' + self.config_file = c + end + end opts.separator "Commands (you must supply one of these):" opts.on("-M", "--models", "Generate models diagram") do |c| if self.command != '' STDERR.print "Error: Can only generate one diagram type\n\n" exit 1