hiroshimarb 0.0.3 → 0.0.4

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.
data/README.md CHANGED
@@ -23,9 +23,18 @@
23
23
  <tr>
24
24
  <td>hiroshimarb</td><td>Hiroshima.rb</td>
25
25
  </tr>
26
+ <tr>
27
+ <td>ipad</td><td>広島弁吹替シリーズ</td>
28
+ </tr>
26
29
  <tr>
27
30
  <td>oc-h</td><td>おしい広島県</td>
28
31
  </tr>
32
+ <tr>
33
+ <td>city</td><td>広島市</td>
34
+ </tr>
35
+ <tr>
36
+ <td>pref</td><td>広島県</td>
37
+ </tr>
29
38
  </table>
30
39
 
31
40
  ### member コマンド
@@ -33,3 +42,9 @@
33
42
  $ hiroshimarb member
34
43
 
35
44
  Hiroshima.rb のメンバー一覧を表示します。
45
+
46
+ ### info コマンド
47
+
48
+ $ hiroshimarb info
49
+
50
+ Hiroshima.rb についての情報を表示します。
@@ -2,6 +2,7 @@
2
2
  require 'hiroshimarb/member'
3
3
  require 'rubygems'
4
4
  require 'launchy'
5
+ require 'uri'
5
6
 
6
7
  module Hiroshimarb
7
8
  # コマンドラインから呼びだされる場合のサブコマンドを実装する
@@ -14,6 +15,12 @@ module Hiroshimarb
14
15
  'http://hiroshimarb.github.com'
15
16
  when 'oc-h'
16
17
  'http://oc-h.jp'
18
+ when 'ipad'
19
+ URI.encode 'http://kita.dyndns.org/wiki/?広島弁吹替シリーズ'
20
+ when 'city'
21
+ 'http://www.city.hiroshima.lg.jp'
22
+ when 'pref'
23
+ 'http://www.pref.hiroshima.lg.jp'
17
24
  end
18
25
  Launchy.open url
19
26
  end
@@ -39,7 +46,11 @@ Available commands:
39
46
  open : open the website relevant to Hiroshima in a web browser
40
47
  : subcommands
41
48
  : hiroshimarb - Hiroshim.rb [default]
49
+ : ipad - 広島弁吹替シリーズ
42
50
  : oc-h - おしい広島県
51
+ : city - 広島市
52
+ : pref - 広島県
53
+ info : disploy information of Hiroshimar.rb
43
54
  member : display the member of Hiroshima.rb
44
55
  EOD
45
56
  end
@@ -1,3 +1,3 @@
1
1
  module Hiroshimarb
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -33,6 +33,30 @@ describe Hiroshimarb::CLI do
33
33
  subject
34
34
  end
35
35
  end
36
+
37
+ context '引数 "ipad"' do
38
+ let(:arg) { "ipad" }
39
+ it "広島弁吹替シリーズのサイトを表示" do
40
+ Launchy.should_receive(:open).with('http://kita.dyndns.org/wiki/?%E5%BA%83%E5%B3%B6%E5%BC%81%E5%90%B9%E6%9B%BF%E3%82%B7%E3%83%AA%E3%83%BC%E3%82%BA')
41
+ subject
42
+ end
43
+ end
44
+
45
+ context '引数 "city"' do
46
+ let(:arg) { 'city' }
47
+ it '広島市のサイトを表示' do
48
+ Launchy.should_receive(:open).with('http://www.city.hiroshima.lg.jp')
49
+ subject
50
+ end
51
+ end
52
+
53
+ context '引数 "pref"' do
54
+ let(:arg) { 'pref' }
55
+ it '広島市のサイトを表示' do
56
+ Launchy.should_receive(:open).with('http://www.pref.hiroshima.lg.jp')
57
+ subject
58
+ end
59
+ end
36
60
  end
37
61
 
38
62
  describe '#info' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiroshimarb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,7 +18,7 @@ authors:
18
18
  autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
- date: 2012-09-24 00:00:00.000000000 Z
21
+ date: 2012-10-06 00:00:00.000000000 Z
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
24
  name: launchy