1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

dealing with some -w warnings on startup

This commit is contained in:
Aaron Patterson 2011-08-24 13:25:11 -07:00
parent 2f88743c30
commit 44f07098fe
5 changed files with 11 additions and 2 deletions

View file

@ -38,6 +38,8 @@ module I18n
protected
@i18n_inited = false
# Setup i18n configuration
def self.initialize_i18n(app)
return if @i18n_inited

View file

@ -55,6 +55,11 @@ module Rails
delegate :default_url_options, :default_url_options=, :to => :routes
def initialize
super
@initialized = false
end
# This method is called just after an application inherits from Rails::Application,
# allowing the developer to load classes in lib and use them during application
# configuration.

View file

@ -28,7 +28,7 @@ module Rails
logger.level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase)
logger.auto_flushing = false if Rails.env.production?
logger
rescue StandardError => e
rescue StandardError
logger = ActiveSupport::BufferedLogger.new(STDERR)
logger.level = ActiveSupport::BufferedLogger::WARN
logger.warn(

View file

@ -360,6 +360,7 @@ module Rails
end
def endpoint(endpoint = nil)
@endpoint ||= nil
@endpoint = endpoint if endpoint
@endpoint
end

View file

@ -74,7 +74,8 @@ module Rails
initializer :load_init_rb, :before => :load_config_initializers do |app|
init_rb = File.expand_path("init.rb", root)
if File.file?(init_rb)
config = app.config
# FIXME: do we call this for side effects??
app.config
# TODO: think about evaling initrb in context of Engine (currently it's
# always evaled in context of Rails::Application)
eval(File.read(init_rb), binding, init_rb)