kizapi 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -1
- data/License.txt +1 -1
- data/Manifest.txt +0 -19
- data/README.txt +11 -7
- data/Rakefile +82 -3
- data/lib/kizapi.rb +17 -4
- data/spec/kizapi_spec.rb +38 -41
- metadata +10 -34
- data/config/hoe.rb +0 -78
- data/config/requirements.rb +0 -17
- data/lib/kizapi/version.rb +0 -9
- data/log/debug.log +0 -0
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/script/txt2html +0 -74
- data/setup.rb +0 -1585
- data/spec/spec.opts +0 -1
- data/spec/spec_helper.rb +0 -11
- data/tasks/deployment.rake +0 -34
- data/tasks/environment.rake +0 -7
- data/tasks/rspec.rake +0 -21
- data/tasks/website.rake +0 -17
- data/website/index.html +0 -187
- data/website/index.txt +0 -111
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -138
- data/website/template.rhtml +0 -48
data/spec/spec.opts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
-fs --colour
|
data/spec/spec_helper.rb
DELETED
data/tasks/deployment.rake
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
desc 'Release the website and new gem version'
|
2
|
-
task :deploy => [:check_version, :website, :release] do
|
3
|
-
puts "Remember to create SVN tag:"
|
4
|
-
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
5
|
-
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
6
|
-
puts "Suggested comment:"
|
7
|
-
puts "Tagging release #{CHANGES}"
|
8
|
-
end
|
9
|
-
|
10
|
-
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
|
-
task :local_deploy => [:website_generate, :install_gem]
|
12
|
-
|
13
|
-
task :check_version do
|
14
|
-
unless ENV['VERSION']
|
15
|
-
puts 'Must pass a VERSION=x.y.z release version'
|
16
|
-
exit
|
17
|
-
end
|
18
|
-
unless ENV['VERSION'] == VERS
|
19
|
-
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
20
|
-
exit
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
25
|
-
task :install_gem_no_doc => [:clean, :package] do
|
26
|
-
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
27
|
-
end
|
28
|
-
|
29
|
-
namespace :manifest do
|
30
|
-
desc 'Recreate Manifest.txt to include ALL files'
|
31
|
-
task :refresh do
|
32
|
-
`rake check_manifest | patch -p0 > Manifest.txt`
|
33
|
-
end
|
34
|
-
end
|
data/tasks/environment.rake
DELETED
data/tasks/rspec.rake
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'spec'
|
3
|
-
rescue LoadError
|
4
|
-
require 'rubygems'
|
5
|
-
require 'spec'
|
6
|
-
end
|
7
|
-
begin
|
8
|
-
require 'spec/rake/spectask'
|
9
|
-
rescue LoadError
|
10
|
-
puts <<-EOS
|
11
|
-
To use rspec for testing you must install rspec gem:
|
12
|
-
gem install rspec
|
13
|
-
EOS
|
14
|
-
exit(0)
|
15
|
-
end
|
16
|
-
|
17
|
-
desc "Run the specs under spec/models"
|
18
|
-
Spec::Rake::SpecTask.new do |t|
|
19
|
-
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
|
-
t.spec_files = FileList['spec/*_spec.rb']
|
21
|
-
end
|
data/tasks/website.rake
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
desc 'Generate website files'
|
2
|
-
task :website_generate => :ruby_env do
|
3
|
-
(Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
|
4
|
-
sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
desc 'Upload website files to rubyforge'
|
9
|
-
task :website_upload do
|
10
|
-
host = "#{rubyforge_username}@rubyforge.org"
|
11
|
-
remote_dir = "/var/www/gforge-projects/#{PATH}/"
|
12
|
-
local_dir = 'website'
|
13
|
-
sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
|
14
|
-
end
|
15
|
-
|
16
|
-
desc 'Generate and upload website files'
|
17
|
-
task :website => [:website_generate, :website_upload, :publish_docs]
|
data/website/index.html
DELETED
@@ -1,187 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
-
<title>
|
8
|
-
ruby-kizapi
|
9
|
-
</title>
|
10
|
-
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
-
<style>
|
12
|
-
|
13
|
-
</style>
|
14
|
-
<script type="text/javascript">
|
15
|
-
window.onload = function() {
|
16
|
-
settings = {
|
17
|
-
tl: { radius: 10 },
|
18
|
-
tr: { radius: 10 },
|
19
|
-
bl: { radius: 10 },
|
20
|
-
br: { radius: 10 },
|
21
|
-
antiAlias: true,
|
22
|
-
autoPad: true,
|
23
|
-
validTags: ["div"]
|
24
|
-
}
|
25
|
-
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
-
versionBox.applyCornersToAll();
|
27
|
-
}
|
28
|
-
</script>
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<div id="main">
|
32
|
-
|
33
|
-
<h1>ruby-kizapi</h1>
|
34
|
-
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/kizapi"; return false'>
|
35
|
-
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/kizapi" class="numbers">0.1.0</a>
|
37
|
-
</div>
|
38
|
-
<h2>What</h2>
|
39
|
-
|
40
|
-
|
41
|
-
<p>ruby-kizapi is a wrapper library for kizAPI provided by kizasi.jp.</p>
|
42
|
-
|
43
|
-
|
44
|
-
<h2>Installing</h2>
|
45
|
-
|
46
|
-
|
47
|
-
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">kizapi</span></pre></p>
|
48
|
-
|
49
|
-
|
50
|
-
<h2><span class="caps">API</span> document</h2>
|
51
|
-
|
52
|
-
|
53
|
-
<p><a href="http://kizapi.rubyforge.org/rdoc">http://kizapi.rubyforge.org/rdoc</a></p>
|
54
|
-
|
55
|
-
|
56
|
-
<h2>The basics</h2>
|
57
|
-
|
58
|
-
|
59
|
-
<h3>Related words</h3>
|
60
|
-
|
61
|
-
|
62
|
-
<p><pre class='syntax'>
|
63
|
-
<span class="ident">words</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">RelatedWords</span><span class="punct">.</span><span class="ident">new</span><span class="punct">("</span><span class="string">正月</span><span class="punct">")</span>
|
64
|
-
|
65
|
-
<span class="comment"># => ["休み", "仕事", "いい", "実家", "大晦日", "家", "大掃除", "予定", "雪",</span>
|
66
|
-
<span class="comment"># "良い", "行く", "飾り", "掃除", "準備", "正月用", "餅", "お正月",</span>
|
67
|
-
<span class="comment"># "買い物", "感じ", "2日", "年賀状", "元旦", "クリスマス", "ブログ", "最後",</span>
|
68
|
-
<span class="comment"># "迎える", "家族", "一年", "年末年始", "我が家", "明け", "帰省",</span>
|
69
|
-
<span class="comment"># "正月準備", "1日", "1年", "おせち", "来る", "お年", "終わり", "過ごす",</span>
|
70
|
-
<span class="comment"># "3日", "車", "更新", "買い", "買出し", "年越し", "無い", "スーパー",</span>
|
71
|
-
<span class="comment"># "正月用品", "正月気分", "お餅", "夜", "鏡餅", "お年玉", "正月前",</span>
|
72
|
-
<span class="comment"># "正月料理", "初詣", "2007年", "寒い", "年明け"]</span>
|
73
|
-
|
74
|
-
<span class="ident">words</span><span class="punct">.</span><span class="ident">date</span>
|
75
|
-
<span class="comment"># => Mon Dec 31 05:46:56 0900 2007</span>
|
76
|
-
</pre></p>
|
77
|
-
|
78
|
-
|
79
|
-
<h3>Keyword in context</h3>
|
80
|
-
|
81
|
-
|
82
|
-
<p><pre class='syntax'>
|
83
|
-
<span class="ident">contexts</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">KeywordInContexts</span><span class="punct">.</span><span class="ident">new</span><span class="punct">("</span><span class="string">正月</span><span class="punct">")</span>
|
84
|
-
|
85
|
-
<span class="ident">context</span> <span class="punct">=</span> <span class="ident">contexts</span><span class="punct">.</span><span class="ident">first</span>
|
86
|
-
<span class="comment"># => ["醤油で焼いて海苔巻いたやつ。", "あと数時間後には正月でいらんほど餅食べれるの</span>
|
87
|
-
<span class="comment"># に、どんだけフライングだよ。", "太りたくない。"]</span>
|
88
|
-
|
89
|
-
<span class="ident">context</span><span class="punct">.</span><span class="ident">title</span>
|
90
|
-
<span class="comment"># => "食欲"</span>
|
91
|
-
|
92
|
-
<span class="ident">context</span><span class="punct">.</span><span class="ident">link</span>
|
93
|
-
<span class="comment"># => #<URI::HTTP:0xfdbcd4032 URL:http://ameblo.jp/monakalife/entry-10063060988.html></span>
|
94
|
-
|
95
|
-
<span class="ident">contexts</span><span class="punct">.</span><span class="ident">date</span>
|
96
|
-
<span class="comment"># => Mon Dec 31 05:57:37 0900 2007</span>
|
97
|
-
</pre></p>
|
98
|
-
|
99
|
-
|
100
|
-
<h3>Ranking</h3>
|
101
|
-
|
102
|
-
|
103
|
-
<p><pre class='syntax'>
|
104
|
-
<span class="ident">ranking</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">Ranking</span><span class="punct">.</span><span class="ident">new</span>
|
105
|
-
<span class="comment"># => ["イカ天2007復活祭", "KEIRINグランプリ07", "ゴーオンジャー", "最優秀歌唱賞",</span>
|
106
|
-
<span class="comment"># "大晦日イブ", "大晦日イヴ", "代打屋", "生つるべ", "冬コミ2日",</span>
|
107
|
-
<span class="comment"># "お笑いダイナマイト", "お迎え下", "ココリコ遠藤", "コミケ73", "吉原炎上",</span>
|
108
|
-
<span class="comment"># "伸し餅", "フライングキッズ", "お節作り", "AVP2", "C73", "お正月準備",</span>
|
109
|
-
<span class="comment"># "鏡音リン・レン", "MVS", "大掃除終了", "餅搗き", "オールザッツ漫才",</span>
|
110
|
-
<span class="comment"># "元首相暗殺", "アイアムレジェンド", "ルビン", "天皇杯準決勝", "寒波襲来"]</span>
|
111
|
-
|
112
|
-
<span class="ident">ranking</span><span class="punct">.</span><span class="ident">date</span>
|
113
|
-
<span class="comment"># => Mon Dec 31 05:46:54 0900 2007</span>
|
114
|
-
</pre></p>
|
115
|
-
|
116
|
-
|
117
|
-
<h3>Channel words</h3>
|
118
|
-
|
119
|
-
|
120
|
-
<p><pre class='syntax'>
|
121
|
-
<span class="ident">words</span> <span class="punct">=</span> <span class="constant">KizAPI</span><span class="punct">::</span><span class="constant">ChannelWords</span><span class="punct">.</span><span class="ident">new</span><span class="punct">("</span><span class="string">正月</span><span class="punct">")</span>
|
122
|
-
<span class="comment"># => ["大根", "栗", "ねぎ", "滝沢秀明(タッキー&翼)", "サクラ", "ごぼう",</span>
|
123
|
-
<span class="comment"># "ギター", "北野天満宮(京都府)", "にんじん", "かぼちゃ", "朝青龍",</span>
|
124
|
-
<span class="comment"># "二宮和也(嵐)", "カレイ", "マンリョウ", "椎茸", "白菜", "れんこん",</span>
|
125
|
-
<span class="comment"># "梅", "沖縄の旅", "東京の旅"]</span>
|
126
|
-
|
127
|
-
<span class="ident">words</span><span class="punct">.</span><span class="ident">date</span>
|
128
|
-
<span class="comment"># => Mon Dec 31 06:04:07 0900 2007</span>
|
129
|
-
|
130
|
-
<span class="ident">words</span><span class="punct">.</span><span class="ident">first</span><span class="punct">.</span><span class="ident">subject</span>
|
131
|
-
<span class="comment"># => "野菜"</span>
|
132
|
-
</pre></p>
|
133
|
-
|
134
|
-
|
135
|
-
<h2>Forum</h2>
|
136
|
-
|
137
|
-
|
138
|
-
<p><a href="http://groups.google.com/group/ruby-kizapi">http://groups.google.com/group/kizapi</a></p>
|
139
|
-
|
140
|
-
|
141
|
-
<h2>How to submit patches</h2>
|
142
|
-
|
143
|
-
|
144
|
-
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
145
|
-
|
146
|
-
|
147
|
-
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/kizapi/trunk</code> for anonymous access.</p>
|
148
|
-
|
149
|
-
|
150
|
-
<h2>License</h2>
|
151
|
-
|
152
|
-
|
153
|
-
<p>This code is free to use under the terms of the Ruby license.</p>
|
154
|
-
|
155
|
-
|
156
|
-
<h2>Links</h2>
|
157
|
-
|
158
|
-
|
159
|
-
<ul>
|
160
|
-
<li><a href="http://kizasi.jp/">kizasi.jp</a>
|
161
|
-
<ul>
|
162
|
-
<li><a href="http://kizasi.jp/tool/kizapi.html">kizAPI</a></li>
|
163
|
-
<li><a href="http://blog.kizasi.jp/kizasi/images/kizapi_TOS.pdf" title="PDF">kizAPI利用規約</a></li>
|
164
|
-
</ul>
|
165
|
-
</li>
|
166
|
-
<li>ruby-kizapi
|
167
|
-
<ul>
|
168
|
-
<li><a href="http://kizapi.rubyforge.org/">Website</a></li>
|
169
|
-
<li><a href="http://rubyforge.org/projects/kizapi/">Rubyforge Project</a></li>
|
170
|
-
</ul></li>
|
171
|
-
</ul>
|
172
|
-
|
173
|
-
|
174
|
-
<h2>Contact</h2>
|
175
|
-
|
176
|
-
|
177
|
-
<p>Comments are welcome. Send an email to <a href="mailto:keita.yamaguchi@gmail.com">Keita Yamaguchi</a> or the <a href="http://groups.google.com/group/ruby-kizapi">forum</a></p>
|
178
|
-
<p class="coda">
|
179
|
-
<a href="keita.yamaguchi@gmail.com">Keita Yamaguchi</a>, 31st December 2007<br>
|
180
|
-
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
181
|
-
</p>
|
182
|
-
</div>
|
183
|
-
|
184
|
-
<!-- insert site tracking codes here, like Google Urchin -->
|
185
|
-
|
186
|
-
</body>
|
187
|
-
</html>
|
data/website/index.txt
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
h1. ruby-kizapi
|
2
|
-
|
3
|
-
h2. What
|
4
|
-
|
5
|
-
ruby-kizapi is a wrapper library for kizAPI provided by kizasi.jp.
|
6
|
-
|
7
|
-
h2. Installing
|
8
|
-
|
9
|
-
<pre syntax="ruby">sudo gem install kizapi</pre>
|
10
|
-
|
11
|
-
h2. API document
|
12
|
-
|
13
|
-
"http://kizapi.rubyforge.org/rdoc":http://kizapi.rubyforge.org/rdoc
|
14
|
-
|
15
|
-
h2. The basics
|
16
|
-
|
17
|
-
h3. Related words
|
18
|
-
|
19
|
-
<pre syntax="ruby">
|
20
|
-
words = KizAPI::RelatedWords.new("正月")
|
21
|
-
|
22
|
-
# => ["休み", "仕事", "いい", "実家", "大晦日", "家", "大掃除", "予定", "雪",
|
23
|
-
# "良い", "行く", "飾り", "掃除", "準備", "正月用", "餅", "お正月",
|
24
|
-
# "買い物", "感じ", "2日", "年賀状", "元旦", "クリスマス", "ブログ", "最後",
|
25
|
-
# "迎える", "家族", "一年", "年末年始", "我が家", "明け", "帰省",
|
26
|
-
# "正月準備", "1日", "1年", "おせち", "来る", "お年", "終わり", "過ごす",
|
27
|
-
# "3日", "車", "更新", "買い", "買出し", "年越し", "無い", "スーパー",
|
28
|
-
# "正月用品", "正月気分", "お餅", "夜", "鏡餅", "お年玉", "正月前",
|
29
|
-
# "正月料理", "初詣", "2007年", "寒い", "年明け"]
|
30
|
-
|
31
|
-
words.date
|
32
|
-
# => Mon Dec 31 05:46:56 0900 2007
|
33
|
-
</pre>
|
34
|
-
|
35
|
-
h3. Keyword in context
|
36
|
-
|
37
|
-
<pre syntax="ruby">
|
38
|
-
contexts = KizAPI::KeywordInContexts.new("正月")
|
39
|
-
|
40
|
-
context = contexts.first
|
41
|
-
# => ["醤油で焼いて海苔巻いたやつ。", "あと数時間後には正月でいらんほど餅食べれるの
|
42
|
-
# に、どんだけフライングだよ。", "太りたくない。"]
|
43
|
-
|
44
|
-
context.title
|
45
|
-
# => "食欲"
|
46
|
-
|
47
|
-
context.link
|
48
|
-
# => #<URI::HTTP:0xfdbcd4032 URL:http://ameblo.jp/monakalife/entry-10063060988.html>
|
49
|
-
|
50
|
-
contexts.date
|
51
|
-
# => Mon Dec 31 05:57:37 0900 2007
|
52
|
-
</pre>
|
53
|
-
|
54
|
-
h3. Ranking
|
55
|
-
|
56
|
-
<pre syntax="ruby">
|
57
|
-
ranking = KizAPI::Ranking.new
|
58
|
-
# => ["イカ天2007復活祭", "KEIRINグランプリ07", "ゴーオンジャー", "最優秀歌唱賞",
|
59
|
-
# "大晦日イブ", "大晦日イヴ", "代打屋", "生つるべ", "冬コミ2日",
|
60
|
-
# "お笑いダイナマイト", "お迎え下", "ココリコ遠藤", "コミケ73", "吉原炎上",
|
61
|
-
# "伸し餅", "フライングキッズ", "お節作り", "AVP2", "C73", "お正月準備",
|
62
|
-
# "鏡音リン・レン", "MVS", "大掃除終了", "餅搗き", "オールザッツ漫才",
|
63
|
-
# "元首相暗殺", "アイアムレジェンド", "ルビン", "天皇杯準決勝", "寒波襲来"]
|
64
|
-
|
65
|
-
ranking.date
|
66
|
-
# => Mon Dec 31 05:46:54 0900 2007
|
67
|
-
</pre>
|
68
|
-
|
69
|
-
h3. Channel words
|
70
|
-
|
71
|
-
<pre syntax="ruby">
|
72
|
-
words = KizAPI::ChannelWords.new("正月")
|
73
|
-
# => ["大根", "栗", "ねぎ", "滝沢秀明(タッキー&翼)", "サクラ", "ごぼう",
|
74
|
-
# "ギター", "北野天満宮(京都府)", "にんじん", "かぼちゃ", "朝青龍",
|
75
|
-
# "二宮和也(嵐)", "カレイ", "マンリョウ", "椎茸", "白菜", "れんこん",
|
76
|
-
# "梅", "沖縄の旅", "東京の旅"]
|
77
|
-
|
78
|
-
words.date
|
79
|
-
# => Mon Dec 31 06:04:07 0900 2007
|
80
|
-
|
81
|
-
words.first.subject
|
82
|
-
# => "野菜"
|
83
|
-
</pre>
|
84
|
-
|
85
|
-
h2. Forum
|
86
|
-
|
87
|
-
"http://groups.google.com/group/kizapi":http://groups.google.com/group/ruby-kizapi
|
88
|
-
|
89
|
-
h2. How to submit patches
|
90
|
-
|
91
|
-
Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
|
92
|
-
|
93
|
-
The trunk repository is <code>svn://rubyforge.org/var/svn/kizapi/trunk</code> for anonymous access.
|
94
|
-
|
95
|
-
h2. License
|
96
|
-
|
97
|
-
This code is free to use under the terms of the Ruby license.
|
98
|
-
|
99
|
-
h2. Links
|
100
|
-
|
101
|
-
* "kizasi.jp":http://kizasi.jp/
|
102
|
-
** "kizAPI":http://kizasi.jp/tool/kizapi.html
|
103
|
-
** "kizAPI利用規約(PDF)":http://blog.kizasi.jp/kizasi/images/kizapi_TOS.pdf
|
104
|
-
* ruby-kizapi
|
105
|
-
** "Website":http://kizapi.rubyforge.org/
|
106
|
-
** "Rubyforge Project":http://rubyforge.org/projects/kizapi/
|
107
|
-
|
108
|
-
h2. Contact
|
109
|
-
|
110
|
-
Comments are welcome. Send an email to "Keita Yamaguchi":mailto:keita.yamaguchi@gmail.com or the "forum":http://groups.google.com/group/ruby-kizapi
|
111
|
-
|