tdiary-contrib 4.0.2 → 4.0.2.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 +5 -13
- data/.gitignore +2 -1
- data/.travis.yml +5 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/lib/tdiary/contrib/version.rb +5 -0
- data/plugin/ohmsha_estore.rb +8 -7
- data/plugin/search-default.rb +8 -3
- data/tdiary-contrib.gemspec +2 -1
- data/util/image-gallery/misc/plugin/recent_image.rb +3 -3
- metadata +13 -12
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
ZjMyYzVhZjljMTgwYjcyODk2MTY3NGUyYTA4YThlMjY1OTJhNjMzMQ==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 85cf1d5815f8a25ac6c6d5c5ba9cb4fc92203dfa
|
|
4
|
+
data.tar.gz: 24e64b73452bf435e9241af42a403f3d16ec9a1f
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
MjAzNjk4NGIzYmJmYWI5Y2JiMmIxYmNjOTg4NmU0YjE5ZjAzNWM5Zjk0YWNh
|
|
11
|
-
OGUzZjE0MjNhNzlmODhlMmRjYTk0NDAzYjQ2ZmY0ODQxYzVjYjk=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
NWU1MzJlODJmMDI1ZWE2MzJmNmRlZGE2ODMxY2EzM2VhOTg0OGQ2Mjk0NDhj
|
|
14
|
-
YjYyM2JkMGNiMGNjNDI5ZTU1NmYzNjVkMmFiM2YzNzg0MzIxNjYwODYwNGIw
|
|
15
|
-
MzRhNDc3MDU1YWUwMzIyYjYyM2RkZWUzMTdlZWQ2MDE3ZDY1YjE=
|
|
6
|
+
metadata.gz: be8344e9e8a190022cc3f5e514357e85e9638174ffe93a9bb09028734bea7e5e2a59ec75484099b5b89ddad3297dacc32f122081640947214ebc23429e2b1877
|
|
7
|
+
data.tar.gz: aa811bccb9496a12411a6f0ac0966f73574687184a544acde2a08136b42c3ab09704f4a6b5f74199fee565489966dbe29ccef222b1714b2aa2a09f4c67d26c91
|
data/.gitignore
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
coverage
|
|
1
|
+
coverage
|
|
2
|
+
pkg
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -20,7 +20,7 @@ GEM
|
|
|
20
20
|
multi_json
|
|
21
21
|
simplecov-html (~> 0.8.0)
|
|
22
22
|
simplecov-html (0.8.0)
|
|
23
|
-
tdiary (4.0.
|
|
23
|
+
tdiary (4.0.2)
|
|
24
24
|
bundler (~> 1.3)
|
|
25
25
|
thor (~> 0.18)
|
|
26
26
|
thor (0.18.1)
|
|
@@ -34,4 +34,4 @@ DEPENDENCIES
|
|
|
34
34
|
rcov
|
|
35
35
|
rspec
|
|
36
36
|
simplecov
|
|
37
|
-
tdiary
|
|
37
|
+
tdiary (= 4.0.2)
|
data/plugin/ohmsha_estore.rb
CHANGED
|
@@ -24,6 +24,9 @@ rescue
|
|
|
24
24
|
nil
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
require 'open-uri'
|
|
28
|
+
autoload :REXML, 'rexml/document'
|
|
29
|
+
autoload :StringIO, 'stringio'
|
|
27
30
|
def ohmsha_estore( id, doc = nil )
|
|
28
31
|
if !@conf.secure and !(result = ohmsha_estore_cache_get(id)).nil?
|
|
29
32
|
return result
|
|
@@ -32,9 +35,7 @@ def ohmsha_estore( id, doc = nil )
|
|
|
32
35
|
domain = "http://estore.ohmsha.co.jp"
|
|
33
36
|
image = "#{domain}/images/covers/#{id}.gif"
|
|
34
37
|
link = "#{domain}/titles/#{id}"
|
|
35
|
-
|
|
36
|
-
doc ||= open(link)
|
|
37
|
-
require 'rexml/document'
|
|
38
|
+
doc ||= StringIO.new(open(link, &:read).gsub(%r|</?fb:.*?>|, ''))
|
|
38
39
|
xml = REXML::Document.new( doc )
|
|
39
40
|
biblio = "//html/body/div/div[2]/div/div/div/div[2]"
|
|
40
41
|
title = REXML::XPath.match( xml,
|
|
@@ -47,16 +48,16 @@ def ohmsha_estore( id, doc = nil )
|
|
|
47
48
|
first.text
|
|
48
49
|
|
|
49
50
|
result = <<-EOS
|
|
50
|
-
<a class="amazon-detail" href="#{h link}"><
|
|
51
|
+
<a class="amazon-detail" href="#{h link}"><span class="amazon-detail">
|
|
51
52
|
<img class="amazon-detail left" src="#{h image}"
|
|
52
53
|
height="150" width="100"
|
|
53
54
|
alt="#{h title}">
|
|
54
|
-
<
|
|
55
|
+
<span class="amazon-detail-desc">
|
|
55
56
|
<span class="amazon-title">#{h title}</span><br>
|
|
56
57
|
<span class="amazon-author">#{h author}</span><br>
|
|
57
58
|
<span class="amazon-label">#{h description}</span><br>
|
|
58
|
-
</
|
|
59
|
-
</
|
|
59
|
+
</span><br style="clear: left">
|
|
60
|
+
</span></a>
|
|
60
61
|
EOS
|
|
61
62
|
|
|
62
63
|
ohmsha_estore_cache_set( id, result ) unless @conf.secure
|
data/plugin/search-default.rb
CHANGED
|
@@ -99,8 +99,13 @@ module DefaultIOSearch
|
|
|
99
99
|
def diary_class(style)
|
|
100
100
|
c = DIARY_CLASS_CACHE[style]
|
|
101
101
|
return c if c
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
if TDiary.const_defined?('Style')
|
|
103
|
+
require "tdiary/style/#{style.downcase}.rb"
|
|
104
|
+
c = eval("TDiary::Style::#{style.capitalize}Diary")
|
|
105
|
+
else
|
|
106
|
+
require "tdiary/style/#{style.downcase}_style.rb"
|
|
107
|
+
c = eval("TDiary::#{style.capitalize}Diary")
|
|
108
|
+
end
|
|
104
109
|
c.__send__(:include, DiaryClassDelta)
|
|
105
110
|
DIARY_CLASS_CACHE[style] = c
|
|
106
111
|
c
|
|
@@ -227,7 +232,7 @@ def search_input_form( q )
|
|
|
227
232
|
end
|
|
228
233
|
|
|
229
234
|
def search_result
|
|
230
|
-
unless @conf.io_class == TDiary::DefaultIO
|
|
235
|
+
unless @conf.io_class == (TDiary.const_defined?('DefaultIO') ? TDiary::DefaultIO : TDiary::IO::Default)
|
|
231
236
|
return %Q|<p class="message">could not use this plugin under #{@conf.io_class}.</p>|
|
|
232
237
|
end
|
|
233
238
|
|
data/tdiary-contrib.gemspec
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'tdiary/contrib/version'
|
|
4
5
|
require 'tdiary/version'
|
|
5
6
|
|
|
6
7
|
Gem::Specification.new do |spec|
|
|
7
8
|
spec.name = "tdiary-contrib"
|
|
8
|
-
spec.version = TDiary::VERSION
|
|
9
|
+
spec.version = TDiary::Contrib::VERSION
|
|
9
10
|
spec.authors = ["tDiary contributors"]
|
|
10
11
|
spec.email = ["support@tdiary.org"]
|
|
11
12
|
spec.summary = %q{tDiary contributions package}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# recent_image.rb $Revision: 2.0.
|
|
1
|
+
# recent_image.rb $Revision: 2.0.3 $
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2005-
|
|
3
|
+
# Copyright (c) 2005-2013 N.KASHIJUKU <n-kashi[at]whi.m-net.ne.jp>
|
|
4
4
|
# You can redistribute it and/or modify it under GPL2.
|
|
5
5
|
#
|
|
6
6
|
# http://www1.whi.m-net.ne.jp/n-kashi/recent_image.htm
|
|
@@ -115,7 +115,7 @@ def image_info_rcimg( filename )
|
|
|
115
115
|
break
|
|
116
116
|
else
|
|
117
117
|
if data.size < data_size
|
|
118
|
-
f.seek(data_size - data.size, IO::SEEK_CUR)
|
|
118
|
+
f.seek(data_size - data.size, File::IO::SEEK_CUR)
|
|
119
119
|
data = ''
|
|
120
120
|
else
|
|
121
121
|
data = data[data_size .. -1]
|
metadata
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tdiary-contrib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.2
|
|
4
|
+
version: 4.0.2.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: 2013-12-
|
|
11
|
+
date: 2013-12-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tdiary
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: 4.0.2
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: 4.0.2
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - ~>
|
|
31
|
+
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '1.3'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - ~>
|
|
38
|
+
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '1.3'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rake
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
description: tDiary contributions package that includes plugins, styles, utilities,
|
|
@@ -60,8 +60,8 @@ executables: []
|
|
|
60
60
|
extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
|
62
62
|
files:
|
|
63
|
-
- .gitignore
|
|
64
|
-
- .travis.yml
|
|
63
|
+
- ".gitignore"
|
|
64
|
+
- ".travis.yml"
|
|
65
65
|
- Gemfile
|
|
66
66
|
- Gemfile.lock
|
|
67
67
|
- README.en.md
|
|
@@ -155,6 +155,7 @@ files:
|
|
|
155
155
|
- lib/bayes/convert.rb
|
|
156
156
|
- lib/exifparser/README
|
|
157
157
|
- lib/tdiary-contrib.rb
|
|
158
|
+
- lib/tdiary/contrib/version.rb
|
|
158
159
|
- lib/wgs2tky.rb
|
|
159
160
|
- misc/section_footer2/buzzurl.yaml
|
|
160
161
|
- misc/section_footer2/fc2.yaml
|
|
@@ -443,12 +444,12 @@ require_paths:
|
|
|
443
444
|
- lib
|
|
444
445
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
445
446
|
requirements:
|
|
446
|
-
- -
|
|
447
|
+
- - ">="
|
|
447
448
|
- !ruby/object:Gem::Version
|
|
448
449
|
version: '0'
|
|
449
450
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
450
451
|
requirements:
|
|
451
|
-
- -
|
|
452
|
+
- - ">="
|
|
452
453
|
- !ruby/object:Gem::Version
|
|
453
454
|
version: '0'
|
|
454
455
|
requirements: []
|