rack-api 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-api (0.3.0)
4
+ rack-api (0.3.1)
5
5
  activesupport (>= 3.0.0)
6
6
  rack (>= 1.0.0)
7
7
  rack-mount (>= 0.6.0)
@@ -265,7 +265,7 @@ module Rack
265
265
  :version => option(:version),
266
266
  :prefix => option(:prefix),
267
267
  :url_options => option(:url_options),
268
- :rescuers => option(:rescuers, :merge).reverse
268
+ :rescuers => option(:rescuers, :merge)
269
269
  })
270
270
 
271
271
  builder = Rack::Builder.new
@@ -3,7 +3,7 @@ module Rack
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 3
6
- PATCH = 0
6
+ PATCH = 1
7
7
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
8
8
  end
9
9
  end
@@ -50,27 +50,8 @@ describe Rack::API, "Rescue from exceptions" do
50
50
  last_response.status.should == 501
51
51
  end
52
52
 
53
- it "rescues from exception by using inner handler" do
54
- Rack::API.app do
55
- rescue_from Exception
56
-
57
- version :v1 do
58
- rescue_from Exception do
59
- [500, {"Content-Type" => "text/plain"}, ["inner handler"]]
60
- end
61
-
62
- get("/500") { raise "Oops!" }
63
- end
64
- end
65
-
66
- get "/v1/500"
67
- last_response.body.should == "inner handler"
68
- end
69
-
70
53
  it "rescues from exception in app's context" do
71
54
  Rack::API.app do
72
- rescue_from Exception
73
-
74
55
  version :v1 do
75
56
  rescue_from Exception do
76
57
  [500, {"Content-Type" => "text/plain"}, [self.class.name]]
@@ -86,8 +67,6 @@ describe Rack::API, "Rescue from exceptions" do
86
67
 
87
68
  it "yields the exception object" do
88
69
  Rack::API.app do
89
- rescue_from Exception
90
-
91
70
  version :v1 do
92
71
  rescue_from Exception do |error|
93
72
  [500, {"Content-Type" => "text/plain"}, [error.message]]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rack-api
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nando Vieira