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/spec/spec.opts DELETED
@@ -1 +0,0 @@
1
- -fs --colour
data/spec/spec_helper.rb DELETED
@@ -1,11 +0,0 @@
1
- begin
2
- require 'spec'
3
- rescue LoadError
4
- require 'rubygems'
5
- gem 'rspec'
6
- require 'spec'
7
- end
8
-
9
- $KCODE = "UTF-8"
10
- $LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")
11
- require "kizapi"
@@ -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
@@ -1,7 +0,0 @@
1
- task :ruby_env do
2
- RUBY_APP = if RUBY_PLATFORM =~ /java/
3
- "jruby"
4
- else
5
- "ruby"
6
- end unless defined? RUBY_APP
7
- end
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">(&quot;</span><span class="string">正月</span><span class="punct">&quot;)</span>
64
-
65
- <span class="comment"># =&gt; [&quot;休み&quot;, &quot;仕事&quot;, &quot;いい&quot;, &quot;実家&quot;, &quot;大晦日&quot;, &quot;家&quot;, &quot;大掃除&quot;, &quot;予定&quot;, &quot;雪&quot;,</span>
66
- <span class="comment"># &quot;良い&quot;, &quot;行く&quot;, &quot;飾り&quot;, &quot;掃除&quot;, &quot;準備&quot;, &quot;正月用&quot;, &quot;餅&quot;, &quot;お正月&quot;,</span>
67
- <span class="comment"># &quot;買い物&quot;, &quot;感じ&quot;, &quot;2日&quot;, &quot;年賀状&quot;, &quot;元旦&quot;, &quot;クリスマス&quot;, &quot;ブログ&quot;, &quot;最後&quot;,</span>
68
- <span class="comment"># &quot;迎える&quot;, &quot;家族&quot;, &quot;一年&quot;, &quot;年末年始&quot;, &quot;我が家&quot;, &quot;明け&quot;, &quot;帰省&quot;,</span>
69
- <span class="comment"># &quot;正月準備&quot;, &quot;1日&quot;, &quot;1年&quot;, &quot;おせち&quot;, &quot;来る&quot;, &quot;お年&quot;, &quot;終わり&quot;, &quot;過ごす&quot;,</span>
70
- <span class="comment"># &quot;3日&quot;, &quot;車&quot;, &quot;更新&quot;, &quot;買い&quot;, &quot;買出し&quot;, &quot;年越し&quot;, &quot;無い&quot;, &quot;スーパー&quot;,</span>
71
- <span class="comment"># &quot;正月用品&quot;, &quot;正月気分&quot;, &quot;お餅&quot;, &quot;夜&quot;, &quot;鏡餅&quot;, &quot;お年玉&quot;, &quot;正月前&quot;,</span>
72
- <span class="comment"># &quot;正月料理&quot;, &quot;初詣&quot;, &quot;2007年&quot;, &quot;寒い&quot;, &quot;年明け&quot;]</span>
73
-
74
- <span class="ident">words</span><span class="punct">.</span><span class="ident">date</span>
75
- <span class="comment"># =&gt; 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">(&quot;</span><span class="string">正月</span><span class="punct">&quot;)</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"># =&gt; [&quot;醤油で焼いて海苔巻いたやつ。&quot;, &quot;あと数時間後には正月でいらんほど餅食べれるの</span>
87
- <span class="comment"># に、どんだけフライングだよ。&quot;, &quot;太りたくない。&quot;]</span>
88
-
89
- <span class="ident">context</span><span class="punct">.</span><span class="ident">title</span>
90
- <span class="comment"># =&gt; &quot;食欲&quot;</span>
91
-
92
- <span class="ident">context</span><span class="punct">.</span><span class="ident">link</span>
93
- <span class="comment"># =&gt; #&lt;URI::HTTP:0xfdbcd4032 URL:http://ameblo.jp/monakalife/entry-10063060988.html&gt;</span>
94
-
95
- <span class="ident">contexts</span><span class="punct">.</span><span class="ident">date</span>
96
- <span class="comment"># =&gt; 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"># =&gt; [&quot;イカ天2007復活祭&quot;, &quot;KEIRINグランプリ07&quot;, &quot;ゴーオンジャー&quot;, &quot;最優秀歌唱賞&quot;,</span>
106
- <span class="comment"># &quot;大晦日イブ&quot;, &quot;大晦日イヴ&quot;, &quot;代打屋&quot;, &quot;生つるべ&quot;, &quot;冬コミ2日&quot;,</span>
107
- <span class="comment"># &quot;お笑いダイナマイト&quot;, &quot;お迎え下&quot;, &quot;ココリコ遠藤&quot;, &quot;コミケ73&quot;, &quot;吉原炎上&quot;,</span>
108
- <span class="comment"># &quot;伸し餅&quot;, &quot;フライングキッズ&quot;, &quot;お節作り&quot;, &quot;AVP2&quot;, &quot;C73&quot;, &quot;お正月準備&quot;,</span>
109
- <span class="comment"># &quot;鏡音リン・レン&quot;, &quot;MVS&quot;, &quot;大掃除終了&quot;, &quot;餅搗き&quot;, &quot;オールザッツ漫才&quot;,</span>
110
- <span class="comment"># &quot;元首相暗殺&quot;, &quot;アイアムレジェンド&quot;, &quot;ルビン&quot;, &quot;天皇杯準決勝&quot;, &quot;寒波襲来&quot;]</span>
111
-
112
- <span class="ident">ranking</span><span class="punct">.</span><span class="ident">date</span>
113
- <span class="comment"># =&gt; 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">(&quot;</span><span class="string">正月</span><span class="punct">&quot;)</span>
122
- <span class="comment"># =&gt; [&quot;大根&quot;, &quot;栗&quot;, &quot;ねぎ&quot;, &quot;滝沢秀明(タッキー&翼)&quot;, &quot;サクラ&quot;, &quot;ごぼう&quot;,</span>
123
- <span class="comment"># &quot;ギター&quot;, &quot;北野天満宮(京都府)&quot;, &quot;にんじん&quot;, &quot;かぼちゃ&quot;, &quot;朝青龍&quot;,</span>
124
- <span class="comment"># &quot;二宮和也(嵐)&quot;, &quot;カレイ&quot;, &quot;マンリョウ&quot;, &quot;椎茸&quot;, &quot;白菜&quot;, &quot;れんこん&quot;,</span>
125
- <span class="comment"># &quot;梅&quot;, &quot;沖縄の旅&quot;, &quot;東京の旅&quot;]</span>
126
-
127
- <span class="ident">words</span><span class="punct">.</span><span class="ident">date</span>
128
- <span class="comment"># =&gt; 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"># =&gt; &quot;野菜&quot;</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&#8217;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
-