rack-vhost 0.1.0 → 0.1.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.
Files changed (4) hide show
  1. data/README.md +1 -1
  2. data/examples/config.ru +6 -6
  3. data/rack-vhost.gemspec +12 -13
  4. metadata +1 -1
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
1
  rack-vhost
2
2
  ==========
3
3
 
4
- Simple Rack middleware to route via host header
4
+ Rack middleware to dispatch to an application via host header.
data/examples/config.ru CHANGED
@@ -2,22 +2,22 @@ require 'rack/vhost'
2
2
 
3
3
  class Router
4
4
  def call(env)
5
- 'Router app'
5
+ [200, { 'Content-Type' => 'text/plain' }, 'Router app']
6
6
  end
7
7
  end
8
8
 
9
9
  class APIApp
10
10
  def call(env)
11
- 'API app'
11
+ [200, { 'Content-Type' => 'text/plain' }, 'API app']
12
12
  end
13
13
  end
14
14
 
15
15
  class MainApp
16
16
  def call(env)
17
- 'Main app'
17
+ [200, { 'Content-Type' => 'text/plain' }, 'Main app']
18
18
  end
19
19
  end
20
20
 
21
- use Rack::Vhost, :vhost => '/^api/', :app => APIApp.new
22
- use Rack::Vhost, :vhost => '/www.philcolabs.com/', :app => MainApp.new
23
- run Router
21
+ use Rack::Vhost, :vhost => /^api/, :app => APIApp.new
22
+ use Rack::Vhost, :vhost => /www.philcolabs.com/, :app => MainApp.new
23
+ run Router.new
data/rack-vhost.gemspec CHANGED
@@ -1,17 +1,16 @@
1
1
  Gem::Specification.new do |gem|
2
- gem.name = 'rack-vhost'
3
- gem.version = '0.1.0'
4
- gem.summary = 'Rack middleware to dispatch to an application via host header'
5
- gem.description = 'Rack middleware to dispatch to an application via host header.'
6
- gem.author = 'Philip Reichenberger'
7
- gem.email = 'preichenberger@philcolabs.com'
8
- gem.homepage = 'http://github.com/preichen/rack-vhost'
9
- gem.has_rdoc = false
10
- gem.require_path = 'lib'
11
-
12
- gem.files = `git ls-files`.split($/)
13
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
14
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
2
+ gem.name = 'rack-vhost'
3
+ gem.version = '0.1.1'
4
+ gem.summary = 'Rack middleware to dispatch to an application via host header'
5
+ gem.description = 'Rack middleware to dispatch to an application via host header.'
6
+ gem.author = 'Philip Reichenberger'
7
+ gem.email = 'preichenberger@philcolabs.com'
8
+ gem.homepage = 'http://github.com/preichen/rack-vhost'
9
+ gem.has_rdoc = false
10
+ gem.require_path = 'lib'
11
+ gem.files = `git ls-files`.split($/)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
14
 
16
15
  gem.add_development_dependency 'rack'
17
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-vhost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: