lib/3scale_toolbox/helper.rb in 3scale_toolbox-1.0.0 vs lib/3scale_toolbox/helper.rb in 3scale_toolbox-1.0.1
- old
+ new
@@ -23,15 +23,10 @@
end
end
def parse_uri(uri)
# raises error when remote_str is not string, but object or something else.
- uri_obj = URI(uri)
- # URI::HTTP is parent of URI::HTTPS
- # with single check both types are checked
- raise ThreeScaleToolbox::InvalidUrlError, "invalid url: #{uri}" unless uri_obj.kind_of?(URI::HTTP)
-
- uri_obj
+ URI(uri)
end
def hash_deep_dup(hash)
JSON.parse(JSON.generate(hash))
end