jobim 0.3.1 → 0.4.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e170e35a62c7c3e61f989d8a9ad1cd5d0d22613
4
- data.tar.gz: 3d121cc853c50b5fe7829d366a81396a8abeee48
3
+ metadata.gz: ee2410e2f90a10fc70ce729942edd1dda22bfa14
4
+ data.tar.gz: 3c77f1f5ab5898d90a57f7c049fc7e01d82434ae
5
5
  SHA512:
6
- metadata.gz: 20ddaee3483bcf405d67b72372ac9fa17a722089550e7c55b37807667637521cc0beea1bb26f6a089b9aea6fa0c6baa4a566805610e5b9c4546482de8a3e5999
7
- data.tar.gz: ea813f26e5f125ed5897b25fae7f06b36d995c9c7d89690d21bbc37a25ca0e3108284e1bf3c6f47e0f43bd999db73e7414c3afea14f04116f204b8c053390655
6
+ metadata.gz: ed96d27a59a0ae94570bf7ec13142dccc74d8eff19219dd6a4661fa6e54b3653b0866d7fbfb10ea3e42f13af28db8680bfeba0cec8846e53bae6640afc371366
7
+ data.tar.gz: e7ffd78a2540a44eb106705fff5be07d947d0932d2add24d624a53871d7e630a7affecf1ac0fcc48361d2061b5da5fc61ccae836ad464741c50d65d383ecdf51
data/README.md CHANGED
@@ -1,20 +1,26 @@
1
1
  # Jobim
2
2
 
3
- Jobim is utility for turning a directory into a static HTTP server.
3
+ `jobim` is a small ruby utility to pop-up an HTTP server on top of any given
4
+ directory. `jobim` leverages [Thin](//github.com/macournoyer/thin/) and offers a
5
+ limited subset of the `thin` utilities for your convenience.
4
6
 
5
7
  ## Installation
6
8
 
9
+ `jobim` is registered on [rubygems](//rubygems.org/gems/jobim) and is therefore
10
+ available anywhere good gems are sold.
11
+
7
12
  ``` shell
8
13
  gem install jobim
9
14
  ```
10
15
 
11
16
  ## Usage
12
17
 
18
+ `jobim` is run like `thin` with no configure script.
19
+
13
20
  ``` shell
14
- jobim
21
+ jobim path/to/webroot
15
22
  ```
16
-
17
- View at `http://localhost:5634`
23
+ The site can then be view at `http://localhost:5634`
18
24
 
19
25
  ## Contributing
20
26
 
@@ -26,4 +32,4 @@ View at `http://localhost:5634`
26
32
 
27
33
  ## Copyright
28
34
 
29
- Copyright (c) 2013 Zachary Elliott. See LICENSE for further details.
35
+ Copyright (c) 2013 Zachary Elliott. See [LICENSE](/LICENSE) for further details.
data/bin/jobim CHANGED
@@ -18,8 +18,12 @@ app = Rack::Builder.new do
18
18
  use Rack::Rewrite do
19
19
  rewrite '/', '/index.html'
20
20
  end
21
+
21
22
  use Rack::CommonLogger, STDOUT
22
- run Rack::Directory.new(opts[:Dir])
23
+
24
+ map opts[:Prefix] do
25
+ run Rack::Directory.new(opts[:Dir])
26
+ end
23
27
  end
24
28
 
25
29
  puts ">>> Serving #{opts[:Dir]}"
data/lib/jobim/cli.rb CHANGED
@@ -22,15 +22,14 @@ class Jobim::CLI
22
22
  :Dir => Dir.pwd,
23
23
  :Host => '0.0.0.0',
24
24
  :Port => 5634,
25
+ :Prefix => '/',
25
26
  :Quiet => false
26
27
  }
27
28
  end
28
29
 
29
30
  def parser
30
31
  @parser ||= OptionParser.new do |o|
31
- o.banner = "jobim - TODO: FINISH ME"
32
- o.separator ""
33
- o.separator "Usage: jobim [OPTION]... [DIRECTORY]"
32
+ o.banner = "Usage: jobim [OPTION]... [DIRECTORY]"
34
33
 
35
34
  o.separator ""
36
35
  o.separator "Specific options:"
@@ -48,6 +47,10 @@ class Jobim::CLI
48
47
  options[:Port] = port
49
48
  end
50
49
 
50
+ o.on "-P", "--prefix PATH", "Mount the app under PATH" do |path|
51
+ options[:Prefix] = path
52
+ end
53
+
51
54
  o.on "-q", "--quiet", "Silence all logging" do
52
55
  options[:Quiet] = true
53
56
  end
@@ -64,6 +67,11 @@ class Jobim::CLI
64
67
  puts options[:version]
65
68
  exit
66
69
  end
70
+
71
+ o.separator ""
72
+ o.separator "Jobim home page: <https://github.com/zellio/jobim/>"
73
+ o.separator "Report bugs to: <https://github.com/zellio/jobim/issues>"
74
+ o.separator ""
67
75
  end
68
76
  end
69
77
 
data/lib/jobim/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jobim
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jobim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Elliott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-22 00:00:00.000000000 Z
11
+ date: 2013-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler