diff -Nru tdiary-contrib-5.0.4/debian/changelog tdiary-contrib-5.0.5/debian/changelog --- tdiary-contrib-5.0.4/debian/changelog 2017-06-19 19:17:09.000000000 +0000 +++ tdiary-contrib-5.0.5/debian/changelog 2017-08-21 15:50:19.000000000 +0000 @@ -1,3 +1,15 @@ +tdiary-contrib (5.0.5-1) unstable; urgency=medium + + [ Hideki Yamane ] + * drop "Depends: ruby-interpreter" + * dh10 + * set Standards-Version: 4.0.0 + + [ Youhei SASAKI ] + * New upstream version 5.0.5 + + -- Youhei SASAKI Tue, 22 Aug 2017 00:50:19 +0900 + tdiary-contrib (5.0.4-2) unstable; urgency=medium [ Christian Hofstaedtler ] diff -Nru tdiary-contrib-5.0.4/debian/compat tdiary-contrib-5.0.5/debian/compat --- tdiary-contrib-5.0.4/debian/compat 2017-06-19 19:17:09.000000000 +0000 +++ tdiary-contrib-5.0.5/debian/compat 2017-08-20 14:43:35.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru tdiary-contrib-5.0.4/debian/control tdiary-contrib-5.0.5/debian/control --- tdiary-contrib-5.0.4/debian/control 2017-06-19 19:17:09.000000000 +0000 +++ tdiary-contrib-5.0.5/debian/control 2017-08-20 14:43:35.000000000 +0000 @@ -6,9 +6,9 @@ Youhei SASAKI , Hideki Yamane Build-Depends: gem2deb, - debhelper (>= 9), + debhelper (>= 10), rsync -Standards-Version: 3.9.8 +Standards-Version: 4.0.0 Homepage: http://www.tdiary.org/ Vcs-Git: https://anonscm.debian.org/git/pkg-ruby-extras/tdiary-contrib.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/tdiary-contrib.git @@ -17,7 +17,7 @@ Package: tdiary-contrib Architecture: all Depends: curl, - ruby | ruby-interpreter, + ruby, tdiary (>= 5), libjs-mootools, ${misc:Depends} diff -Nru tdiary-contrib-5.0.4/Gemfile.lock tdiary-contrib-5.0.5/Gemfile.lock --- tdiary-contrib-5.0.4/Gemfile.lock 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/Gemfile.lock 2017-06-29 08:09:04.000000000 +0000 @@ -1,14 +1,14 @@ PATH remote: . specs: - tdiary-contrib (5.0.3) + tdiary-contrib (5.0.4) ruby-pushbullet tdiary GEM remote: https://rubygems.org/ specs: - addressable (2.5.0) + addressable (2.5.1) public_suffix (~> 2.0, >= 2.0.2) coderay (1.1.1) concurrent-ruby (1.0.5) @@ -16,17 +16,17 @@ safe_yaml (~> 1.0.0) diff-lcs (1.3) docile (1.1.5) - domain_name (0.5.20170223) + domain_name (0.5.20170404) unf (>= 0.0.5, < 1.0.0) emot (0.0.4) thor fastimage (2.1.0) - hashdiff (0.3.2) + hashdiff (0.3.4) hikidoc (0.1.0) http-cookie (1.0.3) domain_name (~> 0.5) - json (2.0.3) - mail (2.6.4) + json (2.1.0) + mail (2.6.6) mime-types (>= 1.16, < 4) method_source (0.8.2) mime-types (2.99.3) @@ -36,25 +36,25 @@ method_source (~> 0.8.1) slop (~> 3.4) public_suffix (2.0.5) - rack (2.0.1) + rack (2.0.3) rake (12.0.0) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rspec (3.6.0) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-core (3.6.0) + rspec-support (~> 3.6.0) + rspec-expectations (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) + rspec-support (~> 3.6.0) + rspec-mocks (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) + rspec-support (~> 3.6.0) + rspec-support (3.6.0) ruby-pushbullet (0.1.4) json rest-client (~> 1.8.0) @@ -63,12 +63,12 @@ docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) + simplecov-html (0.10.1) slop (3.6.0) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - tdiary (5.0.3) + tdiary (5.0.4) bundler (~> 1.3) emot fastimage @@ -81,8 +81,8 @@ thor (0.19.4) unf (0.1.4) unf_ext - unf_ext (0.0.7.2) - webmock (2.3.2) + unf_ext (0.0.7.4) + webmock (3.0.1) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff @@ -100,4 +100,4 @@ webmock BUNDLED WITH - 1.14.3 + 1.14.6 diff -Nru tdiary-contrib-5.0.4/js/appstore.js tdiary-contrib-5.0.5/js/appstore.js --- tdiary-contrib-5.0.4/js/appstore.js 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/js/appstore.js 2017-06-29 08:09:04.000000000 +0000 @@ -88,7 +88,7 @@ }; // for AutoPagerize - $(window).bind('AutoPagerize_DOMNodeInserted', function(event) { + $(window).on('AutoPagerize_DOMNodeInserted', function(event) { appstore(event.target); }); diff -Nru tdiary-contrib-5.0.4/js/google_photos.js tdiary-contrib-5.0.5/js/google_photos.js --- tdiary-contrib-5.0.4/js/google_photos.js 1970-01-01 00:00:00.000000000 +0000 +++ tdiary-contrib-5.0.5/js/google_photos.js 2017-06-29 08:09:04.000000000 +0000 @@ -0,0 +1,63 @@ +$(function() { + var developerKey = $tDiary.plugin.google_photos.api_key; + var clientId = $tDiary.plugin.google_photos.client_id; + var oauthToken; + + if (!developerKey || !clientId) { + $('#google_photos').after($('

設定画面でAPIキーとクライアントIDを登録してください

')); + return false; + } + + gapi.load('auth', + { callback: function() { console.debug('load auth function') } }); + gapi.load('picker', + { callback: function() { console.debug('load picker function') } }); + + $('#google_photos').click(function() { + if (oauthToken) { + createPicker(); + } else { + authentication(); + } + }); + + function authentication() { + window.gapi.auth.authorize( + { + 'client_id': clientId, + 'scope': ['https://www.googleapis.com/auth/photos'], + 'immediate': false + }, + function(authResult) { + if (!authResult || authResult.error) { + console.error('[google_photos] authentication faild'); + return false; + } + oauthToken = authResult.access_token; + createPicker(); + }); + } + + function createPicker() { + var picker = new google.picker.PickerBuilder() + .addView(new google.picker.PhotosView() + .setType(google.picker.PhotosView.Type.UPLOADED)) + .addView(google.picker.ViewId.PHOTOS) + .addView(google.picker.ViewId.PHOTO_UPLOAD) + .setOAuthToken(oauthToken) + .setDeveloperKey(developerKey) + .setLocale('ja') + .setCallback(pickerCallback) + .build(); + picker.setVisible(true); + } + + function pickerCallback(data) { + if (data[google.picker.Response.ACTION] == google.picker.Action.PICKED) { + var doc = data[google.picker.Response.DOCUMENTS][0]; + var image = doc.thumbnails[doc.thumbnails.length - 1]; + var tag = $.makePluginTag("google_photos '" + image.url + "', '" + image.width + "', '" + image.height + "'"); + $('#body').insertAtCaret(tag); + } + } +}); diff -Nru tdiary-contrib-5.0.4/js/image_ex.js tdiary-contrib-5.0.5/js/image_ex.js --- tdiary-contrib-5.0.4/js/image_ex.js 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/js/image_ex.js 2017-06-29 08:09:04.000000000 +0000 @@ -64,13 +64,13 @@ if ($(window).width() <= 360) { $(document).ready(function() { - $("img.image-ex").bind("load", function() { + $("img.image-ex").on("load", function() { resizeImage(this); }); }); // for when images have been cached - $(window).bind("load", function() { + $(window).on("load", function() { $("img.image-ex").each(function() { resizeImage(this); }); diff -Nru tdiary-contrib-5.0.4/js/jquery.socialbutton.js tdiary-contrib-5.0.5/js/jquery.socialbutton.js --- tdiary-contrib-5.0.4/js/jquery.socialbutton.js 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/js/jquery.socialbutton.js 2017-06-29 08:09:04.000000000 +0000 @@ -293,7 +293,7 @@ } }; - var max_index = this.size() - 1; + var max_index = this.length - 1; return this.each(function(index) { diff -Nru tdiary-contrib-5.0.4/js/show_and_hide.js tdiary-contrib-5.0.5/js/show_and_hide.js --- tdiary-contrib-5.0.4/js/show_and_hide.js 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/js/show_and_hide.js 2017-06-29 08:09:04.000000000 +0000 @@ -16,7 +16,7 @@ }; // for AutoPagerize - $(window).bind('AutoPagerize_DOMNodeInserted', function(event) { + $(window).on('AutoPagerize_DOMNodeInserted', function(event) { show_and_hide(event.target); }); diff -Nru tdiary-contrib-5.0.4/js/socialbutton.js tdiary-contrib-5.0.5/js/socialbutton.js --- tdiary-contrib-5.0.4/js/socialbutton.js 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/js/socialbutton.js 2017-06-29 08:09:04.000000000 +0000 @@ -92,7 +92,7 @@ return bottom > $(this).offset().top; }) .filter(function() { - return $(this).find('.socialbutton').size() == 0 + return $(this).find('.socialbutton').length == 0 }) .each(function() { var anchor = $(this).find('h3 a'); @@ -100,7 +100,7 @@ var link = $(this).children('h2').find('a:first').get(0); var url = link ? link.href : document.URL; var title = $(this).children('h2').find('.title').text(); - } else if (anchor.size() == 0) { + } else if (anchor.length == 0) { // The section may not have an anchor on etdiary style. // https://github.com/tdiary/tdiary-contrib/issues/59 var url = ($(this).parents('.day').find('h2 a:first').get(0)||'').href; @@ -129,7 +129,7 @@ }); } - $(window).bind('scroll', function(event) { + $(window).on('scroll', function(event) { socialbutton(document); }); diff -Nru tdiary-contrib-5.0.4/lib/tdiary/contrib/version.rb tdiary-contrib-5.0.5/lib/tdiary/contrib/version.rb --- tdiary-contrib-5.0.4/lib/tdiary/contrib/version.rb 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/lib/tdiary/contrib/version.rb 2017-06-29 08:09:04.000000000 +0000 @@ -1,5 +1,5 @@ module TDiary class Contrib - VERSION = "5.0.4" + VERSION = "5.0.5" end end diff -Nru tdiary-contrib-5.0.4/plugin/en/profile.rb tdiary-contrib-5.0.5/plugin/en/profile.rb --- tdiary-contrib-5.0.4/plugin/en/profile.rb 1970-01-01 00:00:00.000000000 +0000 +++ tdiary-contrib-5.0.5/plugin/en/profile.rb 2017-06-29 08:09:04.000000000 +0000 @@ -0,0 +1,13 @@ +# +# profile.rb: english resource of profile plugin for tDiary +# +# Copyright (C) 2017 by Tada, Tadashi +# Distributed under the GPL. +# +module ::Profile + module Service + class Gravatar < Base + HOST = 'en.gravatar.com' + end + end +end diff -Nru tdiary-contrib-5.0.4/plugin/google_photos.rb tdiary-contrib-5.0.5/plugin/google_photos.rb --- tdiary-contrib-5.0.4/plugin/google_photos.rb 1970-01-01 00:00:00.000000000 +0000 +++ tdiary-contrib-5.0.5/plugin/google_photos.rb 2017-06-29 08:09:04.000000000 +0000 @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# show Google Photos +# +# Copyright (c) MATSUOKA Kohei +# Distributed under the GPL +# + +def google_photos(src, width, height, alt="photo", place="photo") + %Q|#{alt}| +end + +def google_photos_left(src, width, height, alt="photo") + google_photos(src, width, height, alt, 'left') +end + +def google_photos_right(src, width, height, alt="photo") + google_photos(src, width, height, alt, 'right') +end + +if /\A(form|edit|preview|showcomment)\z/ === @mode then + enable_js('google_photos.js') + add_js_setting('$tDiary.plugin.google_photos') + add_js_setting('$tDiary.plugin.google_photos.api_key', @conf['google_photos.api_key'].to_json) + add_js_setting('$tDiary.plugin.google_photos.client_id', @conf['google_photos.client_id'].to_json) + + add_footer_proc do + '' + end +end + +add_edit_proc do |date| + <<-FORM +
+ +
+ FORM +end + +add_conf_proc('google_photos', 'Googleフォト') do + if @mode == 'saveconf' + @conf['google_photos.api_key'] = @cgi.params['google_photos.api_key'][0] + @conf['google_photos.client_id'] = @cgi.params['google_photos.client_id'][0] + end + + r = <<-_HTML +

概要

+

Googleフォトの写真を日記に表示します。

+

機能

+
    +
  • Googleフォトの写真を選択して日記に貼り付ける
  • +
  • PC上の写真をGoogleフォトへアップロードする
  • +
+

制約事項

+
    +
  • サムネイルを使用しているため、サイズが512pxまでしか表示できません
  • +
+

使い方

+

+ このプラグインを使うためには、Google Developers ConsoleからAPIキーと認証用クライアントIDを取得する必要があります。 + 手順はGoogleフォトプラグインを利用するためのAPIキーとクライアントIDの取得手順を参考にしてください。 +

+

APIキー

+

+

認証用クライアントID

+

+_HTML +end diff -Nru tdiary-contrib-5.0.4/plugin/mathjax.rb tdiary-contrib-5.0.5/plugin/mathjax.rb --- tdiary-contrib-5.0.4/plugin/mathjax.rb 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/plugin/mathjax.rb 2017-06-29 08:09:04.000000000 +0000 @@ -10,14 +10,21 @@ # Copyright (C) 2014 by Yuh Ohmura # =begin ChangeLog +2017-06-05 Yuh Ohmura + * Modity MathJax address. 2014-12-17 Yuh Ohmura * created. =end add_header_proc do ' -' end diff -Nru tdiary-contrib-5.0.4/plugin/nicovideo.rb tdiary-contrib-5.0.5/plugin/nicovideo.rb --- tdiary-contrib-5.0.4/plugin/nicovideo.rb 2017-03-29 07:19:28.000000000 +0000 +++ tdiary-contrib-5.0.5/plugin/nicovideo.rb 2017-06-29 08:09:04.000000000 +0000 @@ -23,7 +23,7 @@ require 'net/http' require 'timeout' -enable_js( 'nicovideo.js' ) +enable_js('nicovideo.js') unless base_url =~ /\Ahttps:/ def nicovideo_call_api( video_id ) uri = "http://ext.nicovideo.jp/api/getthumbinfo/#{video_id}" @@ -76,6 +76,8 @@ def nicovideo_player( video_id, size = [544,384] ) if feed? nicovideo( video_id ) + elsif base_url =~ /\Ahttps:/ + nicovideo(video_id) else q = '' if size then @@ -97,7 +99,7 @@ if feed? r.gsub!( /]*)?>/, '' ) r.gsub!( %r{}, '' ) - else + elsif base_url !~ /\Ahttps:/ r << %Q|