tdiary-contrib 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tdiary/contrib/version.rb +1 -1
- data/plugin/add_bookmark.rb +1 -1
- data/plugin/instagram.rb +3 -2
- data/plugin/my_hotentry.rb +1 -1
- data/plugin/notify_miniblog.rb +1 -1
- data/plugin/tweet_quote.rb +4 -4
- data/plugin/yahoo_kousei.rb +1 -1
- data/plugin/yo_update.rb +1 -1
- data/style/hatena_style.rb +3 -3
- data/util/tdiary-grep/grep.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d05b8aee451bdb2d46f614f71ecf05c5a1fbea55cc10128f33afbaa78ee891a
|
4
|
+
data.tar.gz: c38b151fd3e0bda3b739b5559edad2314ec9babae98aed542e4ad6a3c47ec2fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86cc1a3bd5df50b9f013c337674728462953142d1c0edac978f59a41e42d2b721a725f3b62bd27baab1b7bf8b00d54c14210d99e50518023746538cf29de51ce
|
7
|
+
data.tar.gz: a81df14d1727012e4c306d1d8c1c4f4ce5878a70f3f6f9bac14f8d9ec988a2c24d19a4c50de395be8a8b0d8edeb17861988b23a7b09828a768a3397000654e5a
|
data/plugin/add_bookmark.rb
CHANGED
@@ -20,7 +20,7 @@ add_subtitle_proc do |date, index, subtitle|
|
|
20
20
|
section_url = @conf.base_url + anchor(date.strftime('%Y%m%d')) + '#p' + ('%02d' % index)
|
21
21
|
|
22
22
|
if @conf['add.bookmark.delicious'] == 't' then
|
23
|
-
escaped_url =
|
23
|
+
escaped_url = CGI.escape(section_url, /[^-.!~*'()\w]/n)
|
24
24
|
caption += %Q|<a href="http://delicious.com/save?url=#{escaped_url}" onclick="window.open('http://delicious.com/save?v=5;noui;jump=close;url=#{escaped_url};title='+encodeURIComponent(document.title), 'delicious', 'toolbar=no,width=550,height=550'); return false">|
|
25
25
|
caption += %Q|<img src="http://static.delicious.com/img/delicious.small.gif" width="10" height="10" style="border: 0 none;vertical-align: middle;" alt="#{@caption_delicious}">|
|
26
26
|
caption += %Q|</a> |
|
data/plugin/instagram.rb
CHANGED
@@ -10,7 +10,6 @@ require 'uri'
|
|
10
10
|
require 'net/http'
|
11
11
|
require 'open-uri'
|
12
12
|
|
13
|
-
|
14
13
|
def instagram(*args)
|
15
14
|
uri = URI::parse(args[0])
|
16
15
|
return instagram_iframe(*args) if uri.scheme.nil?
|
@@ -19,7 +18,9 @@ end
|
|
19
18
|
|
20
19
|
def instagram_iframe(code, width=612, height=700)
|
21
20
|
return <<-BODY
|
22
|
-
<
|
21
|
+
<div class="embed embed-instagram">
|
22
|
+
<iframe src="//instagram.com/p/#{code}/embed/" width="#{width}" height="#{height}" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
|
23
|
+
</div>
|
23
24
|
BODY
|
24
25
|
end
|
25
26
|
|
data/plugin/my_hotentry.rb
CHANGED
@@ -39,7 +39,7 @@ class MyHotEntry
|
|
39
39
|
# RSSを取得
|
40
40
|
rss = nil
|
41
41
|
rss_url = 'http://b.hatena.ne.jp/entrylist?mode=rss&url='
|
42
|
-
rss_url <<
|
42
|
+
rss_url << CGI.escape(base_url)
|
43
43
|
rss_url << "&sort=#{options[:sort]}&threshold=#{options[:threshold]}"
|
44
44
|
begin
|
45
45
|
Timeout.timeout(5) do
|
data/plugin/notify_miniblog.rb
CHANGED
@@ -53,7 +53,7 @@ def notify_miniblog
|
|
53
53
|
|
54
54
|
# strip category
|
55
55
|
sectitle.gsub!(/\[[^\]]+\] */, '')
|
56
|
-
url =
|
56
|
+
url = CGI.escape(@conf.base_url + anchor("#{date}p%02d" % index), /[^-.!~*'()\w]/n)
|
57
57
|
prefix = @conf['miniblog.notify.prefix']
|
58
58
|
format = @conf['miniblog.notify.format']
|
59
59
|
source = 'tdiary/notify_miniblog.rb'
|
data/plugin/tweet_quote.rb
CHANGED
@@ -41,11 +41,11 @@ def twitter_statuses_show_api( tweet_id )
|
|
41
41
|
:oauth_token => @conf["twitter_quote.oauth_token"],
|
42
42
|
:oauth_version => "1.0"
|
43
43
|
}
|
44
|
-
data = "GET&#{
|
45
|
-
data <<
|
44
|
+
data = "GET&#{CGI.escape( url, unsafe )}&"
|
45
|
+
data << CGI.escape( oauth_parameters.merge( parameters ).sort.map{|k, v| "#{k}=#{v}" }.join( "&" ), unsafe )
|
46
46
|
oauth_parameters[:oauth_signature] = [OpenSSL::HMAC.digest(
|
47
47
|
OpenSSL::Digest::SHA1.new,
|
48
|
-
|
48
|
+
CGI.escape( "#{@conf["twitter_quote.oauth_consumer_secret"]}&#{@conf["twitter_quote.oauth_token_secret"]}" ),
|
49
49
|
data
|
50
50
|
)].pack( "m" ).chomp
|
51
51
|
|
@@ -53,7 +53,7 @@ def twitter_statuses_show_api( tweet_id )
|
|
53
53
|
proxy = 'http://' + proxy if proxy
|
54
54
|
|
55
55
|
headers = {
|
56
|
-
"Authorization" => %Q[OAuth #{oauth_parameters.map{|k ,v| "#{
|
56
|
+
"Authorization" => %Q[OAuth #{oauth_parameters.map{|k ,v| "#{CGI.escape( k.to_s, unsafe )}=\"#{CGI.escape( v, unsafe )}\""}.join( "," )}],
|
57
57
|
:proxy => proxy
|
58
58
|
}
|
59
59
|
Timeout.timeout( 20 ) do
|
data/plugin/yahoo_kousei.rb
CHANGED
@@ -26,7 +26,7 @@ Net::HTTP.version_1_2
|
|
26
26
|
def kousei_api( sentence )
|
27
27
|
appid = @conf['yahoo_kousei.appid']
|
28
28
|
|
29
|
-
query = "appid=#{appid}&sentence=#{
|
29
|
+
query = "appid=#{appid}&sentence=#{CGI.escape( sentence.gsub( /\n/, '' ) )}"
|
30
30
|
query << "&filter_group=" + @conf['yahoo_kousei.filter_group'] if @conf['yahoo_kousei.filter_group']
|
31
31
|
query << "&no_filter=" + @conf['yahoo_kousei.no_filter'] if @conf['yahoo_kousei.no_filter']
|
32
32
|
|
data/plugin/yo_update.rb
CHANGED
@@ -100,7 +100,7 @@ def yo_update_subscribers_count
|
|
100
100
|
raise YoUpdateError, "Yo API Key is not set"
|
101
101
|
end
|
102
102
|
req = Net::HTTP::Get.new(
|
103
|
-
URI("http://api.justyo.co/subscribers_count/?api_token=#{
|
103
|
+
URI("http://api.justyo.co/subscribers_count/?api_token=#{CGI.escape(api_key)}")
|
104
104
|
)
|
105
105
|
res = yo_update_access_api(req)
|
106
106
|
data = res.body
|
data/style/hatena_style.rb
CHANGED
@@ -844,7 +844,7 @@ class Hatena::Google
|
|
844
844
|
end
|
845
845
|
|
846
846
|
def convert(mode)
|
847
|
-
uri = 'http://www.google.com/search?q=%s&ie=euc-jp&oe=euc-jp' %
|
847
|
+
uri = 'http://www.google.com/search?q=%s&ie=euc-jp&oe=euc-jp' % CGI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)
|
848
848
|
return uri unless @tag_p
|
849
849
|
template=nil
|
850
850
|
if mode == :CHTML
|
@@ -889,7 +889,7 @@ class Hatena::Keyword
|
|
889
889
|
end
|
890
890
|
|
891
891
|
def convert(mode)
|
892
|
-
uri = '%skeyword/%s' % [@group,
|
892
|
+
uri = '%skeyword/%s' % [@group, CGI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)]
|
893
893
|
return uri unless @tag_p
|
894
894
|
template=nil
|
895
895
|
if mode == :CHTML
|
@@ -958,7 +958,7 @@ class Hatena::AmazonSearch
|
|
958
958
|
end
|
959
959
|
|
960
960
|
def convert(mode)
|
961
|
-
uri = 'http://www.amazon.co.jp/exec/obidos/external-search?mode=blended&tag=%s&encoding-string-jp=%%c6%%fc%%cb%%dc%%b8%%ec&keyword=%s' % [Hatena.conf['amazon.aid'] || '',
|
961
|
+
uri = 'http://www.amazon.co.jp/exec/obidos/external-search?mode=blended&tag=%s&encoding-string-jp=%%c6%%fc%%cb%%dc%%b8%%ec&keyword=%s' % [Hatena.conf['amazon.aid'] || '', CGI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)]
|
962
962
|
return uri unless @tag_p
|
963
963
|
template=nil
|
964
964
|
if mode == :CHTML
|
data/util/tdiary-grep/grep.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdiary-contrib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tDiary contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tdiary
|
@@ -513,7 +513,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
513
513
|
- !ruby/object:Gem::Version
|
514
514
|
version: '0'
|
515
515
|
requirements: []
|
516
|
-
rubygems_version: 3.
|
516
|
+
rubygems_version: 3.1.2
|
517
517
|
signing_key:
|
518
518
|
specification_version: 4
|
519
519
|
summary: tDiary contributions package
|