BloggerPost REL-0.1.7用のpatch
対象はREL-0.1.7のタグのものです。
diff -ur lib.old/bloggerpost/service.rb lib/bloggerpost/service.rb
--- lib.old/bloggerpost/service.rb 2008-02-22 12:55:26.000000000 +0900
+++ lib/bloggerpost/service.rb 2008-02-22 22:18:11.000000000 +0900
@@ -1,3 +1,5 @@
+require "xmlrpc/client"
+
module BloggerPost
class Service
def initialize(config)
@@ -132,12 +134,13 @@
entry.updated = DateTime.now
entry.date = entry.updated unless entry.date
return
- elsif method == 'new' || entry.blog.service.atom_at_put
+ elsif (method == 'new' || entry.blog.service.atom_at_put) && response_body !~ /^\n*$/
published, updated, url, edit_id = parse_atom(response_body)
else
published = entry.date.to_s
url = entry.url
edit_id = entry.edit_id
+ updated = DateTime.now.strftime('%Y-%m-%d %H:%M:%S')
end
entry.update_url(url)
entry.edit_id = edit_id if edit_id
@@ -258,6 +261,7 @@
end
class XMLRPCAPI
+ include BloggerPost::Common
def initialize(config)
@config = config
end
@@ -340,7 +344,7 @@
if @config.use_proxy
proxy_host, proxy_port, proxy_user, proxy_passwd = get_proxy_info(config, use_ssl)
end
- XMLRPC::Client.new(url.host, url.path, url.port, proxy_host, proxy_port, proxy_user, proxy_passwd, use_ssl)
+ XMLRPC::Client.new(url.host, url.path, url.port, proxy_host, proxy_port, proxy_user, proxy_passwd, use_ssl, 360)
end
end
end