0
-# $:.unshift File.dirname(__FILE__) + "/../../lib"
0
-%w( rubygems mime/types camping
0
+%w( rubygems mime/types camping cgi
0
digest/md5 net/https redcloth ).each { |lib| require lib }
0
Camping.goes :UtiliTool
0
@@ -54,19 +53,20 @@ module UtiliTool::Models
0
[self.url_base, self.uri_string].join("?")
0
+ # Sending a request relies on net/https instead of open-uri because
0
+ # it's easier to skip the SSL validity checks. In Ruby 1.9, this
0
uri = URI.parse self.url
0
server = Net::HTTP.new uri.host, uri.port
0
server.use_ssl = uri.scheme == 'https'
0
server.verify_mode = OpenSSL::SSL::VERIFY_NONE
0
- response = server.get uri.request_uri
0
+ # use POST instead of GET
0
+ response = server.post self.url_base, self.uri_string
0
+ alias response send_request
0
def determine_api_url_base
0
@@ -287,8 +287,8 @@ module UtiliTool::Views
0
- script(:type => "text/javascript") do "
0
- var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");
0
+ script(:type => "text/javascript") do
0
+ "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");
0
document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));"
0
@@ -302,14 +302,16 @@ document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/
0
h2 "Braintree MD5 Hash Generator"
0
div.static do; static_content("hasher"); end
0
- td "The string to hash was:"
0
- td { code @hasher.string_to_hash}
0
- td "The MD5 hash generated was:"
0
- td { code @hasher.hash }
0
+ td "The string to hash was:"
0
+ td { code @hasher.string_to_hash}
0
+ td "The MD5 hash generated was:"
0
+ td { code @hasher.hash }
0
@@ -336,16 +338,19 @@ document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/
0
div.static do; static_content("quick_get"); end
0
unless @gateway_response.nil?
0
- p { code { word_wrap(@gateway_request.uri_string) }}
0
- table.response(:cellspacing => "0") do
0
- @gateway_response.to_hash.each do |key, value|
0
+ p { code { word_wrap(@gateway_request.uri_string) }}
0
+ table.response(:cellspacing => "0") do
0
+ @gateway_response.to_hash.each do |key, value|
Comments
No one has commented yet.