ApplicationChecker compatibility and bug fix
- Ruby 1.8 returns method names as strings whereas 1.9 returns symbols so remove both within run method. - Wrap culprits in Array to ensure we can enumerate over them.
This commit is contained in:
parent
035b8168e6
commit
00a7255a88
|
@ -15,7 +15,8 @@ module Rails
|
||||||
|
|
||||||
# Run all the check methods
|
# Run all the check methods
|
||||||
def run
|
def run
|
||||||
the_methods = (self.public_methods - Object.methods) - ["run", "initialize"]
|
# Ruby 1.8 returns method names as strings whereas 1.9 uses symbols
|
||||||
|
the_methods = (self.public_methods - Object.methods) - [:run, :initialize, "run", "initialize"]
|
||||||
|
|
||||||
the_methods.each {|m| send m }
|
the_methods.each {|m| send m }
|
||||||
end
|
end
|
||||||
|
@ -299,7 +300,7 @@ module Rails
|
||||||
puts "More information: #{more_info_url}"
|
puts "More information: #{more_info_url}"
|
||||||
puts
|
puts
|
||||||
puts "The culprits: "
|
puts "The culprits: "
|
||||||
culprits.each do |c|
|
Array(culprits).each do |c|
|
||||||
puts "\t- #{c}"
|
puts "\t- #{c}"
|
||||||
end
|
end
|
||||||
puts
|
puts
|
||||||
|
@ -312,7 +313,7 @@ module Rails
|
||||||
puts "#{BOLD}More information:#{CLEAR} #{CYAN}#{more_info_url}"
|
puts "#{BOLD}More information:#{CLEAR} #{CYAN}#{more_info_url}"
|
||||||
puts
|
puts
|
||||||
puts "#{WHITE}The culprits: "
|
puts "#{WHITE}The culprits: "
|
||||||
culprits.each do |c|
|
Array(culprits).each do |c|
|
||||||
puts "#{YELLOW}\t- #{c}"
|
puts "#{YELLOW}\t- #{c}"
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
|
|
Loading…
Reference in New Issue