tdiary-contrib 5.1.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d262d84bca36f6a339c14c533b6ca4aa501d05265ccf12302e6e150904115a32
4
- data.tar.gz: 37dfe05808d551ab064233f0c74b39ed18a5b9daa8c4ebaadea6c7270a20b41d
3
+ metadata.gz: 6d05b8aee451bdb2d46f614f71ecf05c5a1fbea55cc10128f33afbaa78ee891a
4
+ data.tar.gz: c38b151fd3e0bda3b739b5559edad2314ec9babae98aed542e4ad6a3c47ec2fb
5
5
  SHA512:
6
- metadata.gz: 2878acca923e00de23074f88283047c0f9e8aa1d75d2406fcf1a02fb4c8f23d68b6f3c913908cef6affe697f2b67f2744e1b615dd3c0693bb6aad38b37c475fe
7
- data.tar.gz: 51c5cddf7db092060fb5e23676443ef6035611e1d81a2c4747541855440a4d86b1bc667aeef160444136652bd60b90ef96388c72e61805abe3e3616232c4bcb6
6
+ metadata.gz: 86cc1a3bd5df50b9f013c337674728462953142d1c0edac978f59a41e42d2b721a725f3b62bd27baab1b7bf8b00d54c14210d99e50518023746538cf29de51ce
7
+ data.tar.gz: a81df14d1727012e4c306d1d8c1c4f4ce5878a70f3f6f9bac14f8d9ec988a2c24d19a4c50de395be8a8b0d8edeb17861988b23a7b09828a768a3397000654e5a
@@ -1,5 +1,5 @@
1
1
  module TDiary
2
2
  class Contrib
3
- VERSION = "5.1.0"
3
+ VERSION = "5.1.1"
4
4
  end
5
5
  end
@@ -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 = URI.escape(section_url, /[^-.!~*'()\w]/n)
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
- <iframe src="//instagram.com/p/#{code}/embed/" width="#{width}" height="#{height}" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
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
 
@@ -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 << URI.escape(base_url, /[^-.!~*'()\w]/n)
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
@@ -53,7 +53,7 @@ def notify_miniblog
53
53
 
54
54
  # strip category
55
55
  sectitle.gsub!(/\[[^\]]+\] */, '')
56
- url = URI.encode(@conf.base_url + anchor("#{date}p%02d" % index), /[^-.!~*'()\w]/n)
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'
@@ -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&#{URI.escape( url, unsafe )}&"
45
- data << URI.escape( oauth_parameters.merge( parameters ).sort.map{|k, v| "#{k}=#{v}" }.join( "&" ), unsafe )
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
- URI.escape( "#{@conf["twitter_quote.oauth_consumer_secret"]}&#{@conf["twitter_quote.oauth_token_secret"]}" ),
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| "#{URI.escape( k.to_s, unsafe )}=\"#{URI.escape( v, unsafe )}\""}.join( "," )}],
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
@@ -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=#{URI.encode( sentence.gsub( /\n/, '' ) )}"
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=#{URI.escape(api_key)}")
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
@@ -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&amp;ie=euc-jp&amp;oe=euc-jp' % URI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)
847
+ uri = 'http://www.google.com/search?q=%s&amp;ie=euc-jp&amp;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, URI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)]
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&amp;tag=%s&amp;encoding-string-jp=%%c6%%fc%%cb%%dc%%b8%%ec&amp;keyword=%s' % [Hatena.conf['amazon.aid'] || '', URI.escape(@str, /[^-_.!~*'()a-zA-Z0-9]/)]
961
+ uri = 'http://www.amazon.co.jp/exec/obidos/external-search?mode=blended&amp;tag=%s&amp;encoding-string-jp=%%c6%%fc%%cb%%dc%%b8%%ec&amp;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
@@ -439,7 +439,7 @@ def escape(str)
439
439
  end
440
440
 
441
441
  def escape_url(u)
442
- escape(URI.encode(u))
442
+ escape(CGI.escape(u))
443
443
  end
444
444
 
445
445
  main
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.0
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: 2019-11-29 00:00:00.000000000 Z
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.0.3
516
+ rubygems_version: 3.1.2
517
517
  signing_key:
518
518
  specification_version: 4
519
519
  summary: tDiary contributions package