douban.fm 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/douban.fm +6 -2
  2. data/lib/douban.fm/version.rb +1 -1
  3. metadata +5 -5
@@ -49,8 +49,11 @@ class DoubanFMCLI
49
49
  options.list = true
50
50
  end
51
51
 
52
- opts.on('-i', '--interaction', 'start an http server for interaction') do
52
+ opts.on('-i', '--interaction [port]',
53
+ 'start an http server for interaction',
54
+ 'if omit port, 3000 will be used by default') do |port|
53
55
  options.interaction = true
56
+ options.port = port
54
57
  end
55
58
 
56
59
  opts.on('-V', '--verbose', 'verbose mode') do
@@ -202,7 +205,8 @@ class DoubanFMCLI
202
205
  servletClass.douban_fm = @douban_fm
203
206
 
204
207
  Thread.new do
205
- server = WEBrick::HTTPServer.new(:Port => 3000)
208
+ port = options.port || 3000
209
+ server = WEBrick::HTTPServer.new(:Port => port)
206
210
 
207
211
  %w[INT TERM].each do |signal|
208
212
  trap(signal) do
@@ -1,3 +1,3 @@
1
1
  module DoubanFM
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: douban.fm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-mpd
16
- requirement: &70309504468940 !ruby/object:Gem::Requirement
16
+ requirement: &70272128749900 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.1.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70309504468940
24
+ version_requirements: *70272128749900
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: highline
27
- requirement: &70309504467600 !ruby/object:Gem::Requirement
27
+ requirement: &70272128749180 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.6.15
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70309504467600
35
+ version_requirements: *70272128749180
36
36
  description: douban.fm
37
37
  email:
38
38
  - hxliang1982@gmail.com