Bringing various things inline with the current state of Rails develolpment

This commit is contained in:
Alexey Verkhovsky 2005-03-25 19:11:41 +00:00
parent 0a63789e61
commit 8de7ca3cee
38 changed files with 204 additions and 5484 deletions

View file

@ -1,35 +1,4 @@
#!/usr/local/bin/ruby
RAILS_ROOT = File.expand_path(File.dirname(__FILE__) + '/..')
# Model subdirectories.
ADDITIONAL_LOAD_PATHS = Dir["#{RAILS_ROOT}/app/models/[_a-z]*"]
# Followed by the standard includes.
ADDITIONAL_LOAD_PATHS.concat %w(
app
app/models
app/controllers
app/helpers
config
libraries
).map { |dir| "#{File.expand_path(File.join(RAILS_ROOT, dir))}" }
ADDITIONAL_LOAD_PATHS.concat %w(
vendor/bluecloth-1.0.0/lib
vendor/madeleine-0.7.1/lib
vendor/RedCloth-3.0.3/lib
vendor/rubyzip-0.5.6
vendor/actionpack/lib
vendor/activesupport/lib
vendor/railties/lib
).map { |dir|
"#{File.expand_path(File.join(RAILS_ROOT, dir))}"
}.delete_if { |dir|
puts dir
not File.exist?(dir) }
# Prepend to $LOAD_PATH
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) }
#!e:/ruby/bin/ruby
require 'rubygems'
require_gem 'rails'
require 'breakpoint_client'

View file

@ -28,7 +28,7 @@ ARGV.options do |opts|
'Default: 2500') { |OPTIONS[:port]| }
opts.on('-b', '--binding=ip', String,
'Binds Rails to the specified ip.',
'Default: 127.0.0.1') { |OPTIONS[:ip]| }
'Default: 0.0.0.0') { |OPTIONS[:ip]| }
opts.on('-e', '--environment=name', String,
'Specifies the environment to run this server under (test/development/production).',
'Default: production') { |OPTIONS[:environment]| }
@ -43,7 +43,7 @@ ARGV.options do |opts|
'Makes Instiki use the specified directory for storage.',
'Default: ./storage/[port]') { |OPTIONS[:storage]| }
opts.on('-v', '--verbose',
'Enable debug-level logging'
'Enables debug-level logging'
) { OPTIONS[:verbose] = true }
opts.separator ''
@ -73,7 +73,6 @@ else
puts "=> Data files are stored in #{storage_path}"
require 'webrick_server'
require 'application'
OPTIONS[:index_controller] = 'wiki'
ApplicationController.wiki = WikiService.instance