Skip to content

Commit

Permalink
Fixed deprecation and constant defined warnngs in FileFormat.all_form…
Browse files Browse the repository at this point in the history
…ats method.
  • Loading branch information
wvanbergen committed Nov 18, 2009
1 parent f10284f commit 0070fba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/request_log_analyzer/file_format.rb
Expand Up @@ -46,7 +46,9 @@ def self.load(file_format, *args)

# Returns an array of all FileFormat instances that are shipped with request-log-analyzer by default.
def self.all_formats
@all_formats ||= Dir[File.dirname(__FILE__) + '/file_format/*.rb'].map { |file| self.load(file) }
@all_formats ||= Dir[File.dirname(__FILE__) + '/file_format/*.rb'].map do |file|
self.load(File.basename(file, '.rb'))
end
end

# Autodetects the filetype of a given file.
Expand Down
2 changes: 1 addition & 1 deletion lib/request_log_analyzer/file_format/rails_development.rb
Expand Up @@ -5,7 +5,7 @@ module RequestLogAnalyzer::FileFormat
# as well.
class RailsDevelopment < Rails
def self.create
puts 'DEPRECATED: use --rails-format development instead!'
# puts 'DEPRECATED: use --rails-format development instead!'
super('development')
end
end
Expand Down

0 comments on commit 0070fba

Please sign in to comment.