tdiary-contrib 5.1.3 → 5.1.7

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: e197ac500c058bedf4550b8348befa06bf061335dd95e70aebed756de26ce461
4
- data.tar.gz: 32eb86bd9e7c014e1dc1b0a5fd046810cf494c26ed508a2708e70d00eff42917
3
+ metadata.gz: 7b0d0fc16d8d41985c2d59b9b5b7e5ed0fb592685277e159041d1e1800a8404d
4
+ data.tar.gz: 24321238bd6d69f6f3af587dbc52896fc2d99de93e1c644411f0dfdf2cb93b51
5
5
  SHA512:
6
- metadata.gz: '08910590a8a4409a832c67f9e2105fc39f25a2b9515fcc86a247990267d3ccd5410d181ae23e68b68362a66b91d2bd1c4cc3ffeaebd90cf8c55c6837ff74b25d'
7
- data.tar.gz: ff83cf724de444e5f1c61518d2be03457eb1cf65aa3c9ff7fd58109a763f902bb6180abc7c3a7fad78c8524c68e44e9751406fa14e5c424701cd6c88c50882bf
6
+ metadata.gz: bff5525297303e4ac9937d8c52134a0d06d8c6a7df833fc3004198434c996f4e4b4f5c0eb03eb676bf163510701563435fa3b2cb7c5905c5b19fe316f36a4233
7
+ data.tar.gz: 235cbdfe3b640941dd2652d517c3f3b6cb026f0f57c25ac1e0d4ae3c0c6fea5aef23beb7ca305ac62eaf5e4e3f643d961556807f40218f3312c7af190f5de032
@@ -1,5 +1,5 @@
1
1
  module TDiary
2
2
  class Contrib
3
- VERSION = "5.1.3"
3
+ VERSION = "5.1.7"
4
4
  end
5
5
  end
File without changes
data/plugin/jholiday.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'Calendar.rb'
1
+ require 'holiday_japan'
2
2
  require 'date'
3
3
  unless Time::new.respond_to?( :strftime_holiday_backup )
4
4
  then
@@ -7,8 +7,8 @@ then
7
7
  alias strftime_holiday_backup strftime
8
8
  def strftime( format )
9
9
  holiday = ""
10
- day = Day.new(self.day,self.month,self.year,self.wday)
11
- holiday = day.holiday_name_jp if day.holiday?
10
+ day = Date.new(self.year, self.month, self.day)
11
+ holiday = HolidayJapan.name(day) if HolidayJapan.check(day)
12
12
  strftime_holiday_backup( format.gsub( /%K/, holiday ) )
13
13
  end
14
14
  end
@@ -44,7 +44,7 @@ class MyHotEntry
44
44
  begin
45
45
  Timeout.timeout(5) do
46
46
  # convert Tempfile to String because REXML can't accept Tempfile
47
- open(rss_url) do |f|
47
+ URI.open(rss_url) do |f|
48
48
  rss = REXML::Document.new(f.readlines.join("\n"))
49
49
  end
50
50
  end
data/plugin/ogp.rb CHANGED
@@ -41,6 +41,7 @@ def ogp_tag
41
41
  section_index = @cgi.params['p'][0] || sections.size
42
42
  begin
43
43
  section = sections[section_index.to_i - 1].body_to_html
44
+ @image_date = @date.strftime("%Y%m%d") # hack for image plugin
44
45
  section_html = apply_plugin(section)
45
46
 
46
47
  headers['og:description'] = ogp_description(section_html)
data/plugin/openid.rb CHANGED
@@ -43,6 +43,7 @@ if /^(?:latest|conf|saveconf)$/ =~ @mode then
43
43
  nil,
44
44
  ['https://open.login.yahooapis.com/openid/op/auth', 'https://me.yahoo.com/a/<ID>'],
45
45
  'http://open.login.yahooapis.com/openid20/www.yahoo.com/xrds'),
46
+ 'Launchpad' => @openid_config.new(['https://login.launchpad.net/+openid', 'https://login.launchpad.net/+id/<ID>']),
46
47
  }
47
48
 
48
49
  if @conf['openid.service'] and @conf['openid.id'] then
data/plugin/tatsu_zine.rb CHANGED
@@ -6,6 +6,7 @@
6
6
  # USAGE: {{tatsu_zine 1}}
7
7
 
8
8
  require 'open-uri'
9
+ require 'openssl'
9
10
 
10
11
  def tatsu_zine_cache_dir
11
12
  cache = "#{@cache_path}/tatsu-zine"
@@ -33,10 +34,10 @@ def tatsu_zine( id, doc = nil )
33
34
  end
34
35
 
35
36
  link = "https://tatsu-zine.com/books/#{id}"
36
- doc ||= open(link, ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE).read
37
+ doc ||= URI.open(link, ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE).read
37
38
  title = doc.match(%r|<meta property="og:title" content="(.*)">|).to_a[1]
38
39
  image = doc.match(%r|<meta property="og:image" content="(.*)">|).to_a[1]
39
- price = doc.match(%r|span itemprop="price">(.*)</span>|).to_a[1]
40
+ price = doc.match(%r|span itemprop="price">(.*?)</span>|m).to_a[1].gsub(/,/,'').to_i
40
41
  author = doc.match(%r|<p itemprop="author" class="author">(.*)</p>|).to_a[1]
41
42
 
42
43
  result = <<-EOS
@@ -47,7 +48,7 @@ def tatsu_zine( id, doc = nil )
47
48
  <span class="amazon-detail-desc">
48
49
  <span class="amazon-title">#{h title}</span><br>
49
50
  <span class="amazon-author">#{h author}</span><br>
50
- <span class="amazon-price">#{h price}</span>
51
+ <span class="amazon-price">#{h price}円</span>
51
52
  </span><br style="clear: left">
52
53
  </span></a>
53
54
  EOS
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.3
4
+ version: 5.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - tDiary contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-29 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tdiary
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: holiday_japan
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: coderay
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -544,7 +558,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
544
558
  - !ruby/object:Gem::Version
545
559
  version: '0'
546
560
  requirements: []
547
- rubygems_version: 3.1.2
561
+ rubygems_version: 3.2.22
548
562
  signing_key:
549
563
  specification_version: 4
550
564
  summary: tDiary contributions package