rack-router 0.5.0 → 0.6.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: e4cdf3fc0c4f10427a17e1af387de613c507f691
4
- data.tar.gz: 06f319847932ae6af0b6e6418dbd68699423ae82
3
+ metadata.gz: b747dcf04ede8d9af6a9dd533434d308fe3be235
4
+ data.tar.gz: fcd03c4d46cbc9845048f2bd8de98147185c87eb
5
5
  SHA512:
6
- metadata.gz: 505582df598d172c41686b8f30e6cfc5f3409e9d5608d91ba54363d90dab3e546d386df05949a13afd5b4c2dcbaa94d1dac73e91d75fa6e613a4018207f0667b
7
- data.tar.gz: 33e5e88e820c45f5b4433c1b57ae8e63ce3e3a2e05d2d974b3ca65d430d6d640b80b1983acd3b7524dd2e60ed463ad29fbe7dc78d9ca826f5a8e6aca54a03ce6
6
+ metadata.gz: b2b421a70c5ff17147c36741b6dc6ee516403a4bf83ae7151b27ea623a04cd28006d9a144c06c4c970efba3d4285a805fd101d67e17a48706a50d639aabce0f3
7
+ data.tar.gz: 2832a925b14e452c55587adb4260ca3c6b2bc0d72040f2cd8d26bf95192a3f757b04c0b45526f245f16e2759ab343246387a13be5eb8bd071f107a9974b12fd9
@@ -3,10 +3,11 @@ require 'rack/route'
3
3
  module Rack
4
4
 
5
5
  class Router
6
- VERSION = "0.5.0"
6
+ VERSION = "0.6.0"
7
7
 
8
8
  HEAD = 'HEAD'.freeze
9
9
  GET = 'GET'.freeze
10
+ PATCH = 'PATCH'.freeze
10
11
  POST = 'POST'.freeze
11
12
  PUT = 'PUT'.freeze
12
13
  DELETE = 'DELETE'.freeze
@@ -32,6 +33,10 @@ module Rack
32
33
  route(GET, route_spec)
33
34
  end
34
35
 
36
+ def patch(route_spec)
37
+ route(PATCH, route_spec)
38
+ end
39
+
35
40
  def post(route_spec)
36
41
  route(POST, route_spec)
37
42
  end
@@ -11,5 +11,5 @@ Gem::Specification.new do |gem|
11
11
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
12
12
  gem.name = "rack-router"
13
13
  gem.require_paths = ["lib"]
14
- gem.version = "0.5.0"
14
+ gem.version = "0.6.0"
15
15
  end
@@ -11,13 +11,15 @@ class RouterTest < Minitest::Test
11
11
  put "/it" => app2, :as => :it
12
12
  delete "/remove" => app2
13
13
  get "/:id" => app1
14
+ patch "/patch" => app2
14
15
  end
15
16
 
16
17
  assert_equal([
17
18
  Rack::Route.new('POST', '/stuff', app2),
18
19
  Rack::Route.new('PUT', '/it', app2),
19
20
  Rack::Route.new('DELETE', '/remove', app2),
20
- Rack::Route.new('GET', '/:id', app1)
21
+ Rack::Route.new('GET', '/:id', app1),
22
+ Rack::Route.new('PATCH', '/patch', app2),
21
23
  ], router.routes)
22
24
 
23
25
  assert_equal ["42"], router.call("REQUEST_METHOD" => "GET", "PATH_INFO" => "/42").last
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-06-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple router for Rack apps
14
14
  email: