This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pokemon Showdown Data Interpreter | |
# Created by ABrambleNinja (smogon: Piccolo Daimao), released under MIT license | |
# <abrambleninja.mit-license.org> | |
# | |
# Find the most updated version of this code here: | |
# https://gist.github.com/ABrambleNinja/359e8811c0cd8885bb31 | |
require 'pry' | |
require 'uri' | |
require 'net/http' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow open-uri to follow unsafe redirects (i.e. https to http). | |
# Relevant issue: | |
# http://redmine.ruby-lang.org/issues/3719 | |
# Source here: | |
# https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb | |
module OpenURI | |
class <<self | |
alias_method :open_uri_original, :open_uri | |
alias_method :redirectable_cautious?, :redirectable? |