galago-router 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ca65e8d3da9c0e6e460c0b264402285bd9d2dfa
4
- data.tar.gz: 774adf1034c62b50bd690092cc6e1efc6e9dccaf
3
+ metadata.gz: 5cddf3cc990d2f88225ab9f7090d8675ea46b86d
4
+ data.tar.gz: 5bfc2cea67b7cb5ece9b4dcba8c645fc0bfb300c
5
5
  SHA512:
6
- metadata.gz: e72781d341817aada32d6f133fecb622e6f58954491acbfdc3d5f7698301b8e8cd189addc592195478c431a9cc4cbffa4fa7539fb009baa8182eed08c25e1eeb
7
- data.tar.gz: 8db3316782ebb5076861c3701db5ff52bd7ab6b51363d8ba87513cbf702457ec48978cf88f7f4a12badbec04571889ba7c493eef54962c33645d28c2be6a05bf
6
+ metadata.gz: e09b70383c09dd9f224fbf1915165281aa5af5eb25108edc5d331bc8cdc0d62d3a66aec4ecfdd31027282706912ccc548921de6f8ad59805110bc699dc22ccce
7
+ data.tar.gz: 7fea16179a6dcc3e70a1e07bd828c1d9deeeffa18ea0c73d927d4fe7dca4fae360bf18cfd59a06fc9324e2b1f6b7657ca0a222dc71b2861c07458dbe393ae852
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Galago Router
2
2
 
3
- A rack router.
3
+ Simple, efficient routing for rack applications.
4
4
 
5
5
  ## Installation
6
6
 
@@ -40,6 +40,40 @@ end
40
40
  run router
41
41
  ```
42
42
 
43
+ ## Routes
44
+
45
+ ### OPTIONS
46
+
47
+ OPTIONS endpoints are automatically defined for each resource provided. The
48
+ response will contain an ALLOW header listing the request methods the resource
49
+ supports.
50
+
51
+ ### HEAD
52
+
53
+ HEAD endpoints are automatically defined for each resource that supports GET.
54
+
55
+
56
+ ## Environment
57
+
58
+ The router adds information about the route that was called to the environment.
59
+ All requests will have the following keys added:
60
+
61
+ | Key | Example Value |
62
+ | :------------------- | :------------ |
63
+ | galago_router.path | '/users/:id' |
64
+ | galago_router.params | { id: 42 } |
65
+
66
+
67
+ ## Responses
68
+
69
+ ### 405 Method Not Allowed
70
+
71
+ In the event a path is requested with an unsupported method, the router will return a method not allowed response.
72
+ This consists of a 405 status code and an 'Allow' header listing the valid request methods.
73
+
74
+ More information: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
75
+
76
+
43
77
  ## Contributing
44
78
 
45
79
  1. Fork it
@@ -18,25 +18,27 @@ module Galago
18
18
  attr_reader :routes
19
19
 
20
20
  def initialize(&block)
21
- @routes = REQUEST_METHODS.each_with_object({}) do |request_method, routes|
22
- routes[request_method] = []
23
- routes
24
- end
25
-
21
+ @routes = []
26
22
  Router::DSL.new(self, block) if block_given?
27
23
  end
28
24
 
29
25
  def add_route(request_method, path, application)
30
- route = Route.new(request_method, path, application)
31
- routes[route.request_method] << route
26
+ if route = find_route_by_raw_path(path)
27
+ route.add_endpoint(request_method, application)
28
+ else
29
+ route = Route.new(path)
30
+ route.add_endpoint(request_method, application)
31
+ @routes << route
32
+ end
32
33
  end
33
34
 
34
35
  def has_route?(request_method, path)
35
- find_route(request_method, path) ? true : false
36
+ route = find_route(path)
37
+ route && route.allowed_methods.include?(request_method)
36
38
  end
37
39
 
38
40
  def call(env)
39
- if route = find_route(env['REQUEST_METHOD'], env['PATH_INFO'])
41
+ if route = find_route(env['PATH_INFO'])
40
42
  route.call(env)
41
43
  else
42
44
  Rack::Response.new("Not Found", 404).finish
@@ -45,15 +47,12 @@ module Galago
45
47
 
46
48
  private
47
49
 
48
- def find_route(request_method, path)
49
- routes = routes_for_request_method(request_method)
50
- route = routes.detect { |route| route.recognizes_path?(path) }
50
+ def find_route(path)
51
+ routes.find { |route| route.recognizes_path?(path) }
51
52
  end
52
53
 
53
- def routes_for_request_method(request_method)
54
- routes.fetch(request_method.to_s.upcase) do
55
- raise RequestMethodInvalid.new(request_method)
56
- end
54
+ def find_route_by_raw_path(raw_path)
55
+ routes.find { |route| route.path.to_s == raw_path }
57
56
  end
58
57
 
59
58
  end
@@ -15,6 +15,7 @@ module Galago
15
15
 
16
16
  def get(path, options)
17
17
  add_route("GET", path, options[:to])
18
+ add_route("HEAD", path, Rack::Head.new(options[:to]))
18
19
  end
19
20
 
20
21
  def patch(path, options)
@@ -24,11 +24,14 @@ module Galago
24
24
  @path_parameters ||= @path.scan(/\:(\w+)/).flatten
25
25
  end
26
26
 
27
- def add_path_params_to_env(env)
27
+ def params_from(env)
28
28
  request = Rack::Request.new(env)
29
+ params = request.params
29
30
 
30
31
  if path_params = identify_params_in_path(request.path)
31
- path_params.each { |key, value| request.update_param(key, value) }
32
+ params.merge(path_params)
33
+ else
34
+ params
32
35
  end
33
36
  end
34
37
 
@@ -49,7 +52,7 @@ module Galago
49
52
 
50
53
  def identify_params_in_path(path)
51
54
  if match = regex.match(path)
52
- named_parameters.zip(match.captures)
55
+ Hash[named_parameters.zip(match.captures)]
53
56
  end
54
57
  end
55
58
 
@@ -2,15 +2,19 @@ module Galago
2
2
  class Router
3
3
  class Route
4
4
 
5
- attr_reader :request_method, :path, :action
5
+ attr_reader :path
6
6
 
7
- def initialize(request_method, path, action)
8
- @request_method = request_method.to_s.upcase
7
+ def initialize(path)
9
8
  @path = Router::Path.new(path)
10
- @action = action
9
+ @endpoints = { 'OPTIONS' => options }
10
+ end
11
+
12
+ def add_endpoint(request_method, endpoint)
13
+ @endpoints[request_method] = endpoint
14
+ end
11
15
 
12
- validate_action!
13
- validate_request_method!
16
+ def allowed_methods
17
+ @endpoints.keys.sort
14
18
  end
15
19
 
16
20
  def recognizes_path?(request_path)
@@ -18,21 +22,23 @@ module Galago
18
22
  end
19
23
 
20
24
  def call(env)
21
- @path.add_path_params_to_env(env)
22
- action.call(env)
25
+ env['galago_router.path'] = @path.to_s
26
+ env['galago_router.params'] = @path.params_from(env)
27
+
28
+ endpoint = @endpoints.fetch(env['REQUEST_METHOD'], method_not_allowed)
29
+ endpoint.call(env)
23
30
  end
24
31
 
25
32
  private
26
33
 
27
- def validate_action!
28
- action.respond_to?(:call) or raise Router::ActionInvalid.new(action)
34
+ def method_not_allowed
35
+ ->(env) { [405, { 'Allow' => allowed_methods.join(', ') }, []] }
29
36
  end
30
37
 
31
- def validate_request_method!
32
- unless Router::REQUEST_METHODS.include?(request_method)
33
- raise Router::RequestMethodInvalid.new(request_method)
34
- end
38
+ def options
39
+ ->(env) { [200, { 'Allow' => allowed_methods.join(', ') }, []] }
35
40
  end
41
+
36
42
  end
37
43
  end
38
44
  end
@@ -1,5 +1,5 @@
1
1
  module Galago
2
2
  class Router
3
- VERSION = '0.1.1'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
@@ -0,0 +1,52 @@
1
+ require 'spec_helper'
2
+
3
+ module Galago
4
+ describe "Routes" do
5
+ describe "HEAD" do
6
+
7
+ let(:app) do
8
+ Galago::Router.new do
9
+ get '/users', to: ->(env) { Rack::Response.new('get').finish }
10
+ put '/users/:id', to: ->(env) { Rack::Response.new('put').finish }
11
+ end
12
+ end
13
+
14
+ context "when a resource responds to GET requests" do
15
+ it "adds a HEAD request to the resource" do
16
+ head '/users'
17
+ expect(last_response.status).to eql 200
18
+ end
19
+
20
+ it "has no response body" do
21
+ head '/users'
22
+ expect(last_response.body).to eql ''
23
+ end
24
+
25
+ it "knows how large the content body would have been" do
26
+ head '/users'
27
+
28
+ content_length = last_response.headers['Content-Length']
29
+ expect(content_length).to eql 'get'.length.to_s
30
+ end
31
+
32
+ it "has the same headers as the GET request" do
33
+ get '/users'
34
+ get_headers = last_response.headers
35
+
36
+ head '/users'
37
+ head_headers = last_response.headers
38
+
39
+ expect(get_headers).to eql head_headers
40
+ end
41
+ end
42
+
43
+ context "when a resource does not respond to GET requests" do
44
+ it "returns a 405 method not allowed" do
45
+ head '/users/1'
46
+ expect(last_response.status).to eql 405
47
+ end
48
+ end
49
+
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ module Galago
4
+ describe "Routes" do
5
+ describe "OPTIONS" do
6
+ let(:app) do
7
+ Galago::Router.new do
8
+ get '/users', to: lambda { |env| [200, {}, ['get']] }
9
+ post '/users', to: lambda { |env| [200, {}, ['post']] }
10
+ end
11
+ end
12
+
13
+ context "when the resource has been defined" do
14
+ it "returns 200" do
15
+ options '/users'
16
+ expect(last_response.status).to eql 200
17
+ end
18
+
19
+ it "lists which request methods have been defined" do
20
+ options '/users'
21
+
22
+ allow_header = last_response.headers['Allow']
23
+ expect(allow_header).to eql 'GET, HEAD, OPTIONS, POST'
24
+ end
25
+ end
26
+
27
+ context "when the resource has not been defined" do
28
+ it "returns 404" do
29
+ options '/users/42'
30
+ expect(last_response.status).to eql 404
31
+ end
32
+ end
33
+
34
+ end
35
+ end
36
+ end
@@ -61,19 +61,18 @@ module Galago
61
61
  end
62
62
  end
63
63
 
64
- describe "#add_path_params_to_env" do
64
+ describe "#params_from" do
65
65
  let(:env) do
66
- { 'rack.input' => anything }
66
+ { 'rack.input' => '' }
67
67
  end
68
68
 
69
69
  it "adds the params" do
70
70
  env['PATH_INFO'] = '/users/21/posts/42'
71
71
 
72
72
  path = Router::Path.new('/users/:user_id/posts/:id')
73
- path.add_path_params_to_env(env)
73
+ params = path.params_from(env)
74
74
 
75
- request = Rack::Request.new(env)
76
- expect(request.params).to eql({
75
+ expect(params).to eql({
77
76
  'user_id' => '21',
78
77
  'id' => '42'
79
78
  })
@@ -83,10 +82,9 @@ module Galago
83
82
  env['PATH_INFO'] = '/users'
84
83
 
85
84
  path = Router::Path.new('/users')
86
- path.add_path_params_to_env(env)
85
+ params = path.params_from(env)
87
86
 
88
- request = Rack::Request.new(env)
89
- expect(request.params).to be_empty
87
+ expect(params).to be_empty
90
88
  end
91
89
  end
92
90
 
@@ -1,88 +1,128 @@
1
1
  require 'spec_helper'
2
+ require 'pry'
2
3
 
3
4
  module Galago
4
5
  describe Router::Route do
5
6
  context "#call" do
6
7
  let(:env) do
7
- { 'PATH_INFO' => '/foo' }
8
+ { 'rack.input' => '' }
8
9
  end
9
10
 
10
11
  let(:action) do
11
12
  lambda { |env| "foo" }
12
13
  end
13
14
 
14
- it "adds the path's params to the env" do
15
- route = Router::Route.new('GET', '/foo', action)
16
- expect(route.path).to receive(:add_path_params_to_env).with(env)
15
+ context "when the request method is allowed" do
16
+ it "adds the named params to the env" do
17
+ env['PATH_INFO'] = '/users/bob'
17
18
 
18
- route.call(env)
19
- end
19
+ route = Router::Route.new('/users/:name')
20
+ route.add_endpoint('GET', action)
20
21
 
21
- it "calls the route's action" do
22
- route = Router::Route.new('GET', '/bar', action)
23
- expect(action).to receive(:call).with(env)
22
+ route.call(env)
24
23
 
25
- route.call(env)
26
- end
27
- end
24
+ extracted_params = env['galago_router.params']
25
+ expect(extracted_params).to eql('name' => 'bob')
26
+ end
28
27
 
29
- context "#initialize" do
30
- context "request method" do
31
- it "errors when an invalid request method is provided" do
32
- expect { Router::Route.new('foo', anything, lambda {})
33
- }.to raise_error Router::RequestMethodInvalid
28
+ it "adds the path to the env" do
29
+ route = Router::Route.new('/foo/:id')
30
+ route.add_endpoint('GET', action)
31
+
32
+ route.call(env)
33
+
34
+ expect(env['galago_router.path']).to eql '/foo/:id'
34
35
  end
35
36
 
36
- it "remembers the request method" do
37
- Router::REQUEST_METHODS.each do |request_method|
38
- route = Router::Route.new(request_method, anything, lambda {})
39
- expect(route.request_method).to eql request_method
40
- end
37
+ it "calls the route's action" do
38
+ route = Router::Route.new('/bar')
39
+ route.add_endpoint('GET', action)
40
+
41
+ expect(action).to receive(:call).with(env)
42
+
43
+ env['REQUEST_METHOD'] = 'GET'
44
+ route.call(env)
41
45
  end
42
46
  end
43
47
 
44
- context "#recognizes?" do
45
- it "recognizes a paths with no named parameters" do
46
- path = Router::Path.new('/users')
47
- expect(path).to be_recognizes('/users')
48
+ context "when the request method is not allowed" do
49
+ let(:route) do
50
+ route = Router::Route.new('/foo')
51
+ route.add_endpoint('GET', lambda { |env| 'foo' })
52
+ route.add_endpoint('PUT', lambda { |env| 'foo' })
53
+ route
48
54
  end
49
55
 
50
- it "recognizes a path with named parameters" do
51
- path = Router::Path.new('/users/:id')
52
- expect(path).to be_recognizes('/users/32')
53
- end
54
- end
56
+ it "has a 405 status code" do
57
+ env['REQUEST_METHOD'] = 'DELETE'
58
+ response = route.call(env)
55
59
 
56
- context "#named_parameters" do
57
- it "has none when no segments start with a ':'" do
58
- path = Router::Path.new('/users')
59
- expect(path).to have(0).named_parameters
60
+ status = response[0]
61
+ expect(status).to eql(405)
60
62
  end
61
63
 
62
- it "returns segments starting with a ':'" do
63
- path = Router::Path.new('/accounts/:account_id/users/:id')
64
- expect(path.named_parameters).to eql ['account_id', 'id']
64
+ it "sets the 'Allow' header" do
65
+ env['REQUEST_METHOD'] = 'DELETE'
66
+ response = route.call(env)
67
+
68
+ headers = response[1]
69
+ expect(headers['Allow']).to eql 'GET, OPTIONS, PUT'
65
70
  end
66
71
  end
72
+ end
67
73
 
68
- context "path" do
69
- it "remembers the path" do
70
- route = Router::Route.new('GET', '/foo', lambda {})
71
- expect(route.path.to_s).to eql '/foo'
72
- end
74
+ context "allowed_methods" do
75
+ let(:route) { Router::Route.new('/users/:id/posts') }
76
+
77
+ it "allows OPTIONS by default" do
78
+ expect(route.allowed_methods).to eql ['OPTIONS']
73
79
  end
74
80
 
75
- context "action" do
76
- it "raises an error when the action does not respond to call" do
77
- expect { Router::Route.new('PATCH', '/foo', :action)
78
- }.to raise_error Router::ActionInvalid
79
- end
81
+ it "has an allowed method for each endpoint" do
82
+ route.add_endpoint('POST', anything)
83
+ route.add_endpoint('PUT', anything)
80
84
 
81
- it "remembers the action" do
82
- action = Proc.new { 'action' }
83
- route = Router::Route.new('GET', '/foo', action)
84
- expect(route.action).to eql action
85
- end
85
+ expect(route.allowed_methods).to eql ['OPTIONS', 'POST', 'PUT']
86
+ end
87
+
88
+ it "lists the allowed methods in alphabetical order" do
89
+ route.add_endpoint('POST', anything)
90
+ route.add_endpoint('DELETE', anything)
91
+ route.add_endpoint('GET', anything)
92
+
93
+ allowed_methods = route.allowed_methods
94
+ expect(allowed_methods).to eql ['DELETE', 'GET', 'OPTIONS', 'POST']
95
+ end
96
+ end
97
+
98
+ context "#recognizes?" do
99
+ it "recognizes a paths with no named parameters" do
100
+ path = Router::Path.new('/users')
101
+ expect(path).to be_recognizes('/users')
102
+ end
103
+
104
+ it "recognizes a path with named parameters" do
105
+ path = Router::Path.new('/users/:id')
106
+ expect(path).to be_recognizes('/users/32')
107
+ end
108
+ end
109
+
110
+ context "#named_parameters" do
111
+ it "has none when no segments start with a ':'" do
112
+ path = Router::Path.new('/users')
113
+ expect(path).to have(0).named_parameters
114
+ end
115
+
116
+ it "returns segments starting with a ':'" do
117
+ path = Router::Path.new('/accounts/:account_id/users/:id')
118
+ expect(path.named_parameters).to eql ['account_id', 'id']
119
+ end
120
+ end
121
+
122
+ context "path" do
123
+ it "remembers the path" do
124
+ route = Router::Route.new('/foo')
125
+ expect(route.path.to_s).to eql '/foo'
86
126
  end
87
127
  end
88
128
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  module Galago
4
4
  describe 'Router::VERSION' do
5
5
  it "current" do
6
- expect(Router::VERSION).to eql '0.1.1'
6
+ expect(Router::VERSION).to eql '0.2.0'
7
7
  end
8
8
  end
9
9
  end
@@ -12,11 +12,11 @@ module Galago
12
12
  delete '/foo' , to: lambda { |env| 'bar' }
13
13
  end
14
14
 
15
- expect(router).to have_route(:get, '/foo')
16
- expect(router).to have_route(:post, '/foo')
17
- expect(router).to have_route(:patch, '/foo')
18
- expect(router).to have_route(:put, '/foo')
19
- expect(router).to have_route(:delete, '/foo')
15
+ expect(router).to have_route('GET', '/foo')
16
+ expect(router).to have_route('POST', '/foo')
17
+ expect(router).to have_route('PATCH', '/foo')
18
+ expect(router).to have_route('PUT', '/foo')
19
+ expect(router).to have_route('DELETE', '/foo')
20
20
  end
21
21
 
22
22
  it 'adds the namespace to the route' do
@@ -32,13 +32,13 @@ module Galago
32
32
  end
33
33
  end
34
34
 
35
- expect(router).to have_route(:get, '/foo')
36
- expect(router).to have_route(:post, '/foo')
35
+ expect(router).to have_route('GET', '/foo')
36
+ expect(router).to have_route('POST', '/foo')
37
37
 
38
- expect(router).to have_route(:get, '/foo/1')
39
- expect(router).to have_route(:patch, '/foo/2')
40
- expect(router).to have_route(:put, '/foo/3')
41
- expect(router).to have_route(:delete, '/foo/4')
38
+ expect(router).to have_route('GET', '/foo/1')
39
+ expect(router).to have_route('PATCH', '/foo/2')
40
+ expect(router).to have_route('PUT', '/foo/3')
41
+ expect(router).to have_route('DELETE', '/foo/4')
42
42
  end
43
43
 
44
44
  it 'can have multiple namespaces' do
@@ -57,10 +57,10 @@ module Galago
57
57
  end
58
58
  end
59
59
 
60
- expect(router).to have_route(:get, '/foo')
61
- expect(router).to have_route(:get, '/foo/bar')
62
- expect(router).to have_route(:get, '/foo/bar/1')
63
- expect(router).to have_route(:get, '/hello')
60
+ expect(router).to have_route('GET', '/foo')
61
+ expect(router).to have_route('GET', '/foo/bar')
62
+ expect(router).to have_route('GET', '/foo/bar/1')
63
+ expect(router).to have_route('GET', '/hello')
64
64
  end
65
65
  end
66
66
 
@@ -71,48 +71,43 @@ module Galago
71
71
 
72
72
  it "stores the route" do
73
73
  router = Router.new
74
- router.add_route(:get, '/users', rack_app)
74
+ router.add_route('GET', '/users', rack_app)
75
75
 
76
- expect(router).to have_route(:get, '/users')
77
- end
78
-
79
- it "raises an error when an invalid http verb is provided" do
80
- router = Router.new
81
-
82
- expect { router.add_route(:foo, '/foo', rack_app)
83
- }.to raise_error Router::RequestMethodInvalid
76
+ expect(router).to have_route('GET', '/users')
84
77
  end
85
78
  end
86
79
 
87
80
  describe "has_route?" do
88
81
  it "returns true when the route has been added" do
89
82
  router = Router.new
90
- router.add_route(:post, '/users', lambda {})
83
+ router.add_route('POST', '/users', lambda {})
91
84
 
92
- expect(router).to have_route(:post, '/users')
85
+ expect(router).to have_route('POST', '/users')
93
86
  end
94
87
 
95
88
  it "returns true when the route has a path param" do
96
89
  router = Router.new
97
- router.add_route(:get, '/users/:id', lambda {})
90
+ router.add_route('GET', '/users/:id', lambda {})
98
91
 
99
- expect(router).to have_route(:get, '/users/42')
92
+ expect(router).to have_route('GET', '/users/42')
100
93
  end
101
94
 
102
95
  it "returns false when the route has not been added" do
103
96
  router = Router.new
104
- router.add_route(:post, '/users', lambda {})
97
+ router.add_route('POST', '/users', lambda {})
105
98
 
106
- expect(router).not_to have_route(:get, '/users')
99
+ expect(router).not_to have_route('GET', '/users')
107
100
  end
108
101
  end
109
102
 
110
103
  describe "#call" do
111
104
  it "calls the rack app when the route is found" do
112
- router = Router.new
113
- router.add_route(:get, '/foo', lambda { |env| [200, {}, 'bar'] })
105
+ router = Router.new do
106
+ get '/foo', to: lambda { |env| [200, {}, 'bar'] }
107
+ end
114
108
 
115
109
  response = router.call({
110
+ 'rack.input' => '',
116
111
  'REQUEST_METHOD' => 'GET',
117
112
  'PATH_INFO' => '/foo'
118
113
  })
@@ -124,6 +119,7 @@ module Galago
124
119
  router = Router.new
125
120
 
126
121
  response = router.call({
122
+ 'rack.input' => '',
127
123
  'REQUEST_METHOD' => 'GET',
128
124
  'PATH_INFO' => '/bar'
129
125
  })
@@ -134,5 +130,27 @@ module Galago
134
130
  end
135
131
  end
136
132
 
133
+ describe "responses" do
134
+ context "method not allowed" do
135
+ let(:app) do
136
+ Router.new do
137
+ get '/foo', to: lambda { |env| [200, {}, ['foo']] }
138
+ end
139
+ end
140
+
141
+ it 'sets the status code to 405' do
142
+ post '/foo'
143
+ expect(last_response.status).to eql(405)
144
+ end
145
+
146
+ it "sets the 'Allow' header to the allowed methods" do
147
+ post '/foo'
148
+
149
+ allow = last_response.headers.fetch('Allow')
150
+ expect(allow).to eql 'GET, HEAD, OPTIONS'
151
+ end
152
+ end
153
+ end
154
+
137
155
  end
138
156
  end
@@ -8,3 +8,4 @@ RSpec.configure do |config|
8
8
 
9
9
  config.include Rack::Test::Methods
10
10
  end
11
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galago-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Karayusuf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-18 00:00:00.000000000 Z
11
+ date: 2014-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -116,6 +116,8 @@ files:
116
116
  - lib/galago/router/path.rb
117
117
  - lib/galago/router/route.rb
118
118
  - lib/galago/router/version.rb
119
+ - spec/galago/features/head_spec.rb
120
+ - spec/galago/features/options_spec.rb
119
121
  - spec/galago/router/path_spec.rb
120
122
  - spec/galago/router/route_spec.rb
121
123
  - spec/galago/router/version_spec.rb
@@ -146,6 +148,8 @@ signing_key:
146
148
  specification_version: 4
147
149
  summary: ''
148
150
  test_files:
151
+ - spec/galago/features/head_spec.rb
152
+ - spec/galago/features/options_spec.rb
149
153
  - spec/galago/router/path_spec.rb
150
154
  - spec/galago/router/route_spec.rb
151
155
  - spec/galago/router/version_spec.rb