module FakeWeb

def self.print_missing_http_method_deprecation_warning(*args)

def self.print_missing_http_method_deprecation_warning(*args)
  method = caller.first.match(/`(.*?)'/)[1]
  new_args = args.map { |a| a.inspect }.unshift(":any")
  new_args.last.gsub!(/^\{|\}$/, "").gsub!("=>", " => ") if args.last.is_a?(Hash)
  $stderr.puts
  $stderr.puts "Deprecation warning: FakeWeb requires an HTTP method argument (or use :any). Try this:"
  $stderr.puts "  FakeWeb.#{method}(#{new_args.join(', ')})"
  $stderr.puts "Called at #{caller[1]}"
end