[BACK]Return to patch-core_plugin_photo__support_photo__support.rb CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / net / mikutter / patches

File: [cvs.NetBSD.org] / pkgsrc / net / mikutter / patches / Attic / patch-core_plugin_photo__support_photo__support.rb (download)

Revision 1.5, Fri Mar 9 14:37:02 2018 UTC (6 years, 1 month ago) by tsutsui
Branch: MAIN
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1
Changes since 1.4: +2 -15 lines

mikutter: update to 3.6.5.

pkgsrc changes:
* explicitly depends on json_pure gem as per Gemfile
* remove patches that has been integrated in upstream

Upstream changes:

mikutter 3.6.5

* world: on serializing World Model, change format to JSON to use
  functions of Diva
* show an active account name in tooltip when mouse hovers on
  World Shifter icon
* logo image in Form DSL about dialog widget was not shown in some case
* avoid warning caused by use of a deprecated constant
* follows and followers are not taken properly so that notifications
  of follow and remove didn't work
* form DLS options were not in order
* Twitter: time of direct messages in the Activity tab was shown in UTC
* clear search timeline if blank is specified in the search box
* update description of requirements in README by assuming use of bundler
* twitpic images were not shown in some case

$NetBSD: patch-core_plugin_photo__support_photo__support.rb,v 1.5 2018/03/09 14:37:02 tsutsui Exp $

- temporary workaround to skip totorijp gems (sorry, @toshi_a)

--- core/plugin/photo_support/photo_support.rb.orig	2017-06-10 01:11:51.000000000 +0000
+++ core/plugin/photo_support/photo_support.rb
@@ -1,7 +1,7 @@
 # coding: utf-8
 require 'nokogiri'
 require 'httpclient'
-require 'totoridipjp'
+#require 'totoridipjp'
 
 module Plugin::PhotoSupport
   INSTAGRAM_PATTERN = %r{\Ahttps?://(?:instagr\.am|(?:www\.)?instagram\.com)/p/([a-zA-Z0-9_\-]+)/}
@@ -181,9 +181,14 @@ Plugin.create :photo_support do
 
   # totori.dip.jp
   defimageopener('totori.dip.jp', %r#\Ahttp://totori\.dip\.jp/?\Z#) do |display_url|
-    iwashi = Totoridipjp.åâ¤ã¦±åâ·ã¡ìåá¨å¢¥åá±ã¡äåá ã¡âãà¦ã¢£åâ®å¢¥åá¨ã¢¢åáÂå£âåâ²å¢¥åá¦ã¡äåáÆå¡æåá¶å¢¬
-    if iwashi.url
-      open(iwashi.url) end
+#    iwashi = Totoridipjp.åâ¤ã¦±åâ·ã¡ìåá¨å¢¥åá±ã¡äåá ã¡âãà¦ã¢£åâ®å¢¥åá¨ã¢¢åáÂå£âåâ²å¢¥åá¦ã¡äåáÆå¡æåá¶å¢¬
+#    if iwashi.url
+#      open(iwashi.url) end
+    connection = HTTPClient.new
+    page = connection.get_content(display_url)
+    next nil if page.empty?
+    doc = Nokogiri::HTML(page)
+    open(doc.css('meta[property="og:image"]').first.attribute('content'))
   end
 
   # 600eur.gochiusa.net