document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode wrap\">\n");
document.write("	<pre class=\"textmate-source\"><pre class=\"sunburst\">  <span class=\'meta meta_function meta_function_method meta_function_method_without-arguments meta_function_method_without-arguments_ruby\'><span class=\'keyword keyword_control keyword_control_def keyword_control_def_ruby\'>def<\/span> <span class=\'entity entity_name entity_name_function entity_name_function_ruby\'>log_it<\/span><\/span>\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby\'>||=<\/span> <span class=\'support support_class support_class_ruby\'>ProxyRequest<\/span>.create\n");
document.write("\n");
document.write("    <span class=\'keyword keyword_control keyword_control_ruby\'>unless<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@http_response<\/span>.blank? <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>||<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@http_response<\/span>.code.blank?\n");
document.write("      http_response_body <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@http_response<\/span>.body\n");
document.write("      http_response_code <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@http_response<\/span>.code\n");
document.write("    <span class=\'keyword keyword_control keyword_control_ruby\'>end<\/span>\n");
document.write("\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.username           <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@username<\/span>                       <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.username.blank?           <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@username<\/span>.blank?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.user_agent         <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@request<\/span>.env[<span class=\'string string_quoted string_quoted_double string_quoted_double_ruby\'>&quot;HTTP_USER_AGENT&quot;<\/span>] <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.user_agent.blank?         <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@request<\/span>.nil? <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@request<\/span>.env[<span class=\'string string_quoted string_quoted_double string_quoted_double_ruby\'>&quot;HTTP_USER_AGENT&quot;<\/span>].blank?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.original_uri       <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@original_uri<\/span>                   <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.original_uri.blank?       <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@original_uri<\/span>.blank?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.request_uri        <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@uri_path<\/span>                       <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.request_uri.blank?        <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@uri_path<\/span>.blank?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.twitter_url        <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@twitter_url<\/span>                    <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.twitter_url.blank?        <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@twitter_url<\/span>.blank?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.action             <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@action<\/span>                         <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.action.blank?             <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@action<\/span>.blank?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.form_hash          <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@post_params<\/span>                    <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.form_hash.blank?          <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@post_params<\/span>.nil?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.query_hash         <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@get_params<\/span>                     <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.query_hash.blank?         <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span><span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@get_params<\/span>.nil?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.http_response_body <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> http_response_body              <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.http_response_body.blank? <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span>http_response_body.blank?\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.http_response_code <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> http_response_code              <span class=\'keyword keyword_control keyword_control_ruby\'>if<\/span> <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.http_response_code.blank? <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>&amp;&amp;<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_ruby\'>!<\/span>http_response_code.blank?\n");
document.write("\n");
document.write("    <span class=\'variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby\'>@proxy_request<\/span>.save!\n");
document.write("  <span class=\'keyword keyword_control keyword_control_ruby\'>end<\/span>\n");
document.write("<\/pre><\/pre>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/1013462.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/1013462\">Pastie #1013462<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");

