靴のアプリケーションで、いくつかの内部 Web サイトからコンテンツをダウンロードしようとしています。このエラーが発生します
Error in /tmp/selfgz14214/ruby/lib/net/protocol.rb line 66
undefined method 'closed?' for #<OpenSSL::SSL::SSLSocket:0xb6af94f0>
このコードで上記のエラーが発生しました。これにより、Shoes から使用すると上記のエラーが発生します。
require 'net/http'
require 'net/https'
require 'rexml/document'
class Blogs
attr_reader :Connection
def initialize
@Connection = Net::HTTP::new("someInternalWebSite", 443)
@Connection.use_ssl = true
end
def get_blogs
doc = REXML::Document.new @Connection.get('/weblogs/feed/entries/atom').body
blogs = Array.new
# ----- some crap to parse the blogs
return blogs
end
end
この問題は、靴の内側から実行した場合にのみ発生することに注意してください。
また、靴に組み込みのダウンロード メソッドを使用しても返されず、開始イベントも発生しません。以下はそのためのコードです
download "https://internalWebsite/weblogs/feed/entries/atom",
:start => lambda {
alert "hello"
},
:progress => lambda {
alert "progress"
},
:finish => lambda {
alert "finish"
}