servo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Version +1 -1
  2. data/bin/servo +13 -2
  3. data/servo.gemspec +8 -12
  4. metadata +31 -54
data/Version CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/bin/servo CHANGED
@@ -1,14 +1,25 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
3
  require 'rack'
4
+ require 'optparse'
4
5
 
5
- dir = ARGV.first && File.expand_path(ARGV.first) || Dir.pwd
6
+ options = {:port => 9292}
7
+
8
+ OptionParser.new do |opts|
9
+ opts.banner = "Usage: servo [options] [directory]"
10
+
11
+ opts.on('-p PORT', '--port PORT', 'Configure a port to run on. Default is 9292.') do |port|
12
+ options[:port] = port.to_i
13
+ end
14
+ end.parse!
15
+
16
+ dir = ARGV.first && File.expand_path(ARGV.first) || Dir.pwd
6
17
 
7
18
  servo_app = Rack::Builder.new {
8
19
  run Rack::Directory.new(dir)
9
20
  }
10
21
 
11
- server = Rack::Server.new
22
+ server = Rack::Server.new(:Port => options[:port])
12
23
  server.options[:config] = nil
13
24
  server.instance_variable_set('@app', servo_app)
14
25
  server.start
@@ -4,17 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{servo}
8
- s.version = "0.0.2"
7
+ s.name = "servo"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Flip Sasser"]
12
- s.date = %q{2011-02-14}
13
- s.default_executable = %q{servo}
14
- s.description = %q{
15
- Servo makes it dead simple to serve up a static filesystem using Rack::Directory.
16
- }
17
- s.email = %q{flip@x451.com}
12
+ s.date = "2012-04-26"
13
+ s.description = "\n Servo makes it dead simple to serve up a static filesystem using Rack::Directory.\n "
14
+ s.email = "flip@x451.com"
18
15
  s.executables = ["servo"]
19
16
  s.extra_rdoc_files = [
20
17
  "README.md"
@@ -25,13 +22,12 @@ Gem::Specification.new do |s|
25
22
  "bin/servo",
26
23
  "servo.gemspec"
27
24
  ]
28
- s.homepage = %q{http://github.com/flipsasser/servo}
25
+ s.homepage = "http://github.com/flipsasser/servo"
29
26
  s.require_paths = ["lib"]
30
- s.rubygems_version = %q{1.3.7}
31
- s.summary = %q{A command-line static file server}
27
+ s.rubygems_version = "1.8.10"
28
+ s.summary = "A command-line static file server"
32
29
 
33
30
  if s.respond_to? :specification_version then
34
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
35
31
  s.specification_version = 3
36
32
 
37
33
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,85 +1,62 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: servo
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 2
10
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Flip Sasser
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-02-14 00:00:00 -05:00
19
- default_executable: servo
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-04-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rack
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70231315371700 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 29
30
- segments:
31
- - 1
32
- - 2
33
- - 1
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
34
21
  version: 1.2.1
35
22
  type: :runtime
36
- version_requirements: *id001
37
- description: "\n Servo makes it dead simple to serve up a static filesystem using Rack::Directory.\n "
23
+ prerelease: false
24
+ version_requirements: *70231315371700
25
+ description: ! "\n Servo makes it dead simple to serve up a static filesystem using
26
+ Rack::Directory.\n "
38
27
  email: flip@x451.com
39
- executables:
28
+ executables:
40
29
  - servo
41
30
  extensions: []
42
-
43
- extra_rdoc_files:
31
+ extra_rdoc_files:
44
32
  - README.md
45
- files:
33
+ files:
46
34
  - README.md
47
35
  - Version
48
36
  - bin/servo
49
37
  - servo.gemspec
50
- has_rdoc: true
51
38
  homepage: http://github.com/flipsasser/servo
52
39
  licenses: []
53
-
54
40
  post_install_message:
55
41
  rdoc_options: []
56
-
57
- require_paths:
42
+ require_paths:
58
43
  - lib
59
- required_ruby_version: !ruby/object:Gem::Requirement
44
+ required_ruby_version: !ruby/object:Gem::Requirement
60
45
  none: false
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- hash: 3
65
- segments:
66
- - 0
67
- version: "0"
68
- required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
51
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
77
56
  requirements: []
78
-
79
57
  rubyforge_project:
80
- rubygems_version: 1.3.7
58
+ rubygems_version: 1.8.10
81
59
  signing_key:
82
60
  specification_version: 3
83
61
  summary: A command-line static file server
84
62
  test_files: []
85
-