tdiary-blogkit 5.0.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.
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'tdiary-blogkit'
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe TDiary::Blogkit do
4
+ it 'has a version number' do
5
+ expect(TDiary::Blogkit::VERSION).not_to be nil
6
+ end
7
+
8
+ it 'enables blog style' do
9
+ expect(TDiary::Style::BlogDiary).not_to be nil
10
+ expect(TDiary::Style::BlogrdDiary).not_to be nil
11
+ expect(TDiary::Style::BlogwikiDiary).not_to be nil
12
+ end
13
+
14
+ it 'enables blogkit extensions' do
15
+ expect(TDiary::Extensions::Blogkit).not_to be nil
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe TDiary::Extensions::Blogkit do
4
+ describe "#sp_path" do
5
+ it 'returns the plugin path' do
6
+ expect(TDiary::Extensions::Blogkit.sp_path).to end_with('/plugin')
7
+ end
8
+
9
+ it 'returns the javascript path' do
10
+ expect(TDiary::Extensions::Blogkit.assets_path).to end_with('/js')
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,150 @@
1
+ #
2
+ # tDiary blog kit configuration file (sample) $Revision: 1.13 $
3
+ #
4
+ @lang = 'en'
5
+
6
+ #
7
+ # data path
8
+ #
9
+ @data_path = '/home/foo/blog'
10
+
11
+ #
12
+ # option of whatsnew-list, recent-entry and recent-entry2
13
+ #
14
+ @options['apply_plugin'] = true
15
+
16
+ #
17
+ # option of whatsnew-list
18
+ #
19
+ #@options['whatsnew_list.rdf'] = './index.rdf'
20
+ @options['whatsnew_list.rdf.description'] = 'description of your site.'
21
+
22
+ #
23
+ # options of last-modified plugin
24
+ #
25
+ # If you want show last-modified below article, set this true.
26
+ @options['lm.bottom'] = false
27
+ # last-modified style customize.
28
+ @options['lm.style'] = 'Last update on %B %d, %Y %H:%M'
29
+
30
+ #
31
+ # options of blog-style plugin
32
+ #
33
+ # date format of blog style.
34
+ @options['blog.date_format'] = 'on %B %d, %Y %H:%M'
35
+
36
+ #
37
+ # options of title_navi plugin
38
+ #
39
+ # max length of navigation button label.
40
+ @options['title_navi.max'] = 30
41
+
42
+ #
43
+ # specify Blog style
44
+ # - No section anchor in the article.
45
+ # - automatic generate new date when update.
46
+ #
47
+ @style = 'Blog'
48
+ #@style = 'BlogWiki' # if you want to write by Wiki style.
49
+ #@style = 'BlogRD' # if you want to write by RD style.
50
+
51
+ #
52
+ # site title
53
+ #
54
+ @html_title = 'my blog'
55
+
56
+ #
57
+ # header
58
+ # - hide sidebar when day mode only.
59
+ #
60
+ @header = <<HEADER
61
+ <div class="adminmenu"><%= navi_user %></div>
62
+ <h1>my blog</h1>
63
+ <% unless @mode == 'day' %><div class="main"><% end %>
64
+ HEADER
65
+
66
+ #
67
+ # footer
68
+ # - hide sidebar when day mode only.
69
+ # - show 'Recent Entiries', 'Recent Updates' and 'Archives'.
70
+ #
71
+ @footer = <<FOOTER
72
+ <% unless @mode == 'day' %>
73
+ </div>
74
+ <div class="sidebar">
75
+
76
+ <div class="sidemenu">Recent Entries:</div>
77
+ <%=recent_entry%>
78
+
79
+ <div class="sidemenu">Recent Updates:</div>
80
+ <%=whatsnew_list%>
81
+
82
+ <div class="sidemenu">Archives:</div>
83
+ <%=archive%>
84
+
85
+ </div>
86
+ <% end %>
87
+ <div class="adminmenu"><%= navi_admin %></div>
88
+ FOOTER
89
+
90
+ #
91
+ # anchor of each articles
92
+ #
93
+ @date_format = '#'
94
+
95
+ #
96
+ # no section anchor
97
+ #
98
+ @section_anchor = ''
99
+
100
+ #
101
+ # specify the blog style theme
102
+ #
103
+ @theme = 'blog'
104
+
105
+ #
106
+ # default settins below
107
+ #
108
+ @no_referer = [
109
+ '^' + Regexp.quote( base_url ), # your blog
110
+ '^http://localhost[:/]',
111
+ '^http://192.168.',
112
+ '^http://172.1[6789]',
113
+ '^http://172.2[0-9]',
114
+ '^http://172.3[01]',
115
+ '^http://10.',
116
+ ]
117
+
118
+ @referer_table = [
119
+ ['^http://www.tdiary.org/.*', 'tDiary.org'],
120
+ ['^http://([^\.]*)\.tdiary.net/.*', 'tDiary.net[\1]'],
121
+ ['^http://www.google.com/search.*?q=([^&]*).*', 'google(\1)'],
122
+ #
123
+ # You must add a new rule above here.
124
+ #
125
+ # This rule abbreviates URLs which are not converted by the rules
126
+ # above and have more than 50 characters.
127
+ #
128
+ ['^(.{50}).*$', '\1...'],
129
+ ]
130
+
131
+ #
132
+ # search engine robots
133
+ #
134
+ @options['bot'] = [
135
+ '^(Naverbot|Cowbot)-',
136
+ '^BlogLines/',
137
+ '^blogmap',
138
+ '^FAST-WebCrawler/',
139
+ '^Hatena Antenna/',
140
+ 'MI[CK]AN/',
141
+ '^msnbot/',
142
+ '^NG/',
143
+ '^Openbot/',
144
+ '^samidare',
145
+ '^TAMATEBAKO/',
146
+ '^TomSoftAntenna'
147
+ ]
148
+
149
+ @secure = false
150
+ load_cgi_conf
@@ -0,0 +1,172 @@
1
+ #
2
+ # tDiary BlogKit設定ファイルサンプル(日本語) $Revision: 1.8 $
3
+ #
4
+ @lang = 'ja'
5
+
6
+ #
7
+ # データを格納するディレクトリ
8
+ #
9
+ @data_path = '/home/foo/blog'
10
+
11
+ #
12
+ # whatsnew-list, recent-entry, recent-entry2プラグイン用オプション
13
+ #
14
+ @options['apply_plugin'] = true
15
+
16
+ #
17
+ # whatsnew-listプラグイン用オプション
18
+ #
19
+ # RDFファイルを出力する時にパスを指定
20
+ #@options['whatsnew_list.rdf'] = './index.rdf'
21
+ # RDFに埋め込むサイトの説明
22
+ @options['whatsnew_list.rdf.description'] = 'description of your site.'
23
+
24
+ #
25
+ # last-modifiedプラグイン用のオプション設定
26
+ #
27
+ # 更新時刻を記事の末尾にしたい場合は以下の値をfalseからtrueに変更
28
+ @options['lm.bottom'] = false
29
+ # 更新時刻の表示フォーマットを指定
30
+ @options['lm.style'] = '%Y年%m月%d日 %H:%M更新'
31
+
32
+ #
33
+ # blog-styleプラグイン用のオプション設定
34
+ #
35
+ # 主にコメントの日付・時刻を表示する際のフォーマット指定
36
+ @options['blog.date_format'] = '%Y年%m月%d日 %H:%M'
37
+
38
+ #
39
+ # title_naviプラグインのオプション設定
40
+ #
41
+ # ナビゲーションボタンの最大文字数
42
+ @options['title_navi.max'] = 30
43
+
44
+ #
45
+ # Blogスタイルの指定
46
+ # 通常のtDiaryスタイルと異なり、
47
+ # - セクションにアンカーが付かない
48
+ # - 最新表示時に最初のセクションのみ表示して残りは「read more..」にする
49
+ # - 追加時に自動的に新しい記事番号を付与
50
+ #
51
+ @style = 'Blog'
52
+ #@style = 'BlogWiki' # Wikiスタイルを使いたい場合はこっち
53
+ #@style = 'BlogRD' # RDスタイルを使いたい場合はこっち
54
+
55
+ #
56
+ # サイトのタイトル
57
+ #
58
+ @html_title = 'my blog'
59
+
60
+ #
61
+ # ヘッダ
62
+ # - Dayモードの時にはサイドバーを隠す
63
+ #
64
+ @header = <<HEADER
65
+ <div class="adminmenu"><%= navi_user %></div>
66
+ <h1>my blog</h1>
67
+ <% unless @mode == 'day' %><div class="main"><% end %>
68
+ HEADER
69
+
70
+ #
71
+ # フッタ
72
+ # - Dayモードの時にはサイドバーを隠す
73
+ # - 更新情報などの表示
74
+ # - 更新用のナビゲーション表示
75
+ #
76
+ @footer = <<FOOTER
77
+ <% unless @mode == 'day' %>
78
+ </div>
79
+ <div class="sidebar">
80
+
81
+ <div class="sidemenu">最近の記事:</div>
82
+ <%=recent_entry%>
83
+
84
+ <div class="sidemenu">最近の更新:</div>
85
+ <%=whatsnew_list%>
86
+
87
+ <div class="sidemenu">記事リスト:</div>
88
+ <%=archive%>
89
+
90
+ </div>
91
+ <% end %>
92
+ <div class="adminmenu"><%= navi_admin %></div>
93
+ FOOTER
94
+
95
+ #
96
+ # 各記事のアンカー
97
+ #
98
+ @date_format = '■'
99
+
100
+ #
101
+ # セクションアンカーはなし
102
+ #
103
+ @section_anchor = ''
104
+
105
+ #
106
+ # テーマの指定
107
+ #
108
+ @theme = 'blog'
109
+
110
+ #
111
+ # その他の設定
112
+ #
113
+ @no_referer = [
114
+ '^' + Regexp.quote( base_url ), # 自分のウェブログ
115
+ '^http://localhost[:/]',
116
+ '^http://192.168.',
117
+ '^http://172.1[6789]',
118
+ '^http://172.2[0-9]',
119
+ '^http://172.3[01]',
120
+ '^http://10.',
121
+ ]
122
+
123
+ @referer_table = [
124
+ ['^http://sho.tdiary.net/(\d{4})(\d\d)(\d\d).*', 'ただのにっき(\1-\2-\3)'],
125
+ ['^http://sho.tdiary.net/(\d{4})(\d\d).*', 'ただのにっき(\1-\2)'],
126
+ ['^http://sho.tdiary.net/antenna/.*', 'ただのあんてな'],
127
+ ['^http://sho.tdiary.net/.*', 'ただのにっき'],
128
+ ['^http://www.tdiary.org/.*', 'tDiary Official Site'],
129
+ ['^http://([^\.]*)\.tdiary.net/.*', 'tDiary.net(\1)'],
130
+ ['^http://www.google.(com|co\.jp)/search.*?q=([^&]*).*', 'google検索(\2)'],
131
+ ['^http://google.yahoo.(com|co\.jp)/.*?p=([^&]*).*', 'Yahoo内google検索(\2)'],
132
+ ['^http://www.infoseek.co.jp/.*?qt=([^&]*).*', 'Infoseek検索(\1)'],
133
+ ['^http://www.lycos.co.jp/cgi-bin/.*?query=([^&]*).*', 'Lycos検索(\1)'],
134
+ ["^http://wisenut.lycos.co.jp/.*?q=([^&]*).*", "Lycos内Wisenut検索(\\1)"],
135
+ ['^http://search.fresheye.com/.*?kw=([^&]*).*', 'FreshEye検索(\1)'],
136
+ ['^http://(www|search).goo.ne.jp/.*?MT=([^&]*).*', 'goo検索(\2)'],
137
+ ['^http://(asearch|www).nifty.com/.*?(q|Text)=([^&]*).*', '@nifty検索(\3)'],
138
+ ['^http://search-intl.netscape.com/ja/google.tmpl.*?search=([^&]*).*', 'Netscape内google検索(\1)'],
139
+ ['^http://www.excite.co.jp/.*?(search|s)=([^&]*).*', 'excite検索(\2)'],
140
+ ['^http://odin.ingrid.org/.*?key=([^&]*).*', 'ODiN検索(\1)'],
141
+ ['^http://www.kensaku.(jp|org)/search.cgi.*?key=([^&]*).*', 'kensaku.jp検索(\2)'],
142
+ ['^http://search.msn.co.jp/.*?(q|MT)=([^&]*).*', 'msn検索(\2)'],
143
+ ["^http://cgi.search.biglobe.ne.jp/cgi-bin/search.*?q=([^&]*).*", "BIGLOBE検索(\\1)"],
144
+ #
145
+ # 以下の設定は、上記の置換リストで変換されなかったリンク元URLのうち、
146
+ # 50文字を越えるものの後半を省略するという設定です。これはかならず
147
+ # @referer_tableの末尾に入っていないと意味がありません。@referer_table
148
+ # に新しい置換ルールを追加する場合は、この上に挿入してください。
149
+ #
150
+ ['^(.{50}).*$', '\1...'],
151
+ ]
152
+
153
+ #
154
+ # search engine robots
155
+ #
156
+ @options['bot'] = [
157
+ '^(Naverbot|Cowbot)-',
158
+ '^BlogLines/',
159
+ '^blogmap',
160
+ '^FAST-WebCrawler/',
161
+ '^Hatena Antenna/',
162
+ 'MI[CK]AN/',
163
+ '^msnbot/',
164
+ '^NG/',
165
+ '^Openbot/',
166
+ '^samidare',
167
+ '^TAMATEBAKO/',
168
+ '^TomSoftAntenna'
169
+ ]
170
+
171
+ @secure = false
172
+ load_cgi_conf
metadata ADDED
@@ -0,0 +1,165 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tdiary-blogkit
3
+ version: !ruby/object:Gem::Version
4
+ version: 5.0.1
5
+ platform: ruby
6
+ authors:
7
+ - tDiary contributors
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: hikidoc
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: tdiary
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: tdiary-style-rd
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'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.10'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.10'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ description: tDiary BlogKit modifies tDiary. This modification enables tDiary to manage
98
+ articles by topics, not daily.
99
+ email:
100
+ - support@tdiary.org
101
+ executables: []
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - COPYING
106
+ - ChangeLog
107
+ - README.en.md
108
+ - README.md
109
+ - Rakefile
110
+ - UPDATE.en.md
111
+ - UPDATE.md
112
+ - lib/tdiary-blogkit.rb
113
+ - lib/tdiary/blogkit.rb
114
+ - lib/tdiary/blogkit/version.rb
115
+ - lib/tdiary/extensions/blogkit.rb
116
+ - lib/tdiary/style/blog.rb
117
+ - lib/tdiary/style/blogrd.rb
118
+ - lib/tdiary/style/blogwiki.rb
119
+ - plugin/archive.rb
120
+ - plugin/blog-category.rb
121
+ - plugin/blog-style.rb
122
+ - plugin/en/blog-category.rb
123
+ - plugin/en/blog-style.rb
124
+ - plugin/en/whatsnew-list.rb
125
+ - plugin/ja/blog-category.rb
126
+ - plugin/ja/blog-style.rb
127
+ - plugin/ja/whatsnew-list.rb
128
+ - plugin/lm.rb
129
+ - plugin/recent-entry.rb
130
+ - plugin/title-link.rb
131
+ - plugin/title-navi.rb
132
+ - plugin/whatsnew-list.rb
133
+ - spec/spec_helper.rb
134
+ - spec/tdiary/blogkit_spec.rb
135
+ - spec/tdiary/extensions/blogkit_spec.rb
136
+ - tdiary.conf.sample
137
+ - tdiary.conf.sample_ja
138
+ homepage: http://www.tdiary.org/
139
+ licenses:
140
+ - GPL2
141
+ metadata: {}
142
+ post_install_message:
143
+ rdoc_options: []
144
+ require_paths:
145
+ - lib
146
+ required_ruby_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ requirements: []
157
+ rubyforge_project:
158
+ rubygems_version: 2.6.4
159
+ signing_key:
160
+ specification_version: 4
161
+ summary: tDiary blogkit package.
162
+ test_files:
163
+ - spec/spec_helper.rb
164
+ - spec/tdiary/blogkit_spec.rb
165
+ - spec/tdiary/extensions/blogkit_spec.rb