scorched 0.26 → 0.27

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: 339ebd1bf63b76c2ab0b28410d961d48c979e118
4
- data.tar.gz: 08edcb6e390139ec0bca5e29670d8685dfea7704
3
+ metadata.gz: 492839ee866fd2c9d5eaf33de738c1661008ed93
4
+ data.tar.gz: 2ce3ad605482f1d5a96973cddb4fa4ab910d4db7
5
5
  SHA512:
6
- metadata.gz: ad4c58d8ce1254c46d2190428cc16a14d4f75139d8170b79470a842effeda37ca8435b4897cbad517c123790b1bd8d15358fe667fce95fd5e8f8b13541c2f05f
7
- data.tar.gz: d26845ad1086bbe70d469a6c76ae06a4839103073f94876e8e04e65dbb28161d3833f33bf26095a76467f2ee6eab788470f29d379890c07d5bd607f9cc43880e
6
+ metadata.gz: 2cecfe761d1070e78f7b112dd158aed15768dbe3be19e9953c24c578b36b26487f3f4905632a4346326fe9d3eaa0a948dd7e9724c0aec6643b2bd2f80a02861e
7
+ data.tar.gz: 9f21239c86254de3d08c1c03672a053d7a6163b4afafe2c6aa662801702dd36a77b5ed4e93934fce5f74c8d7bf212e84f6cf6757767b7636b5f6f0f374eca374
data/CHANGES.md CHANGED
@@ -3,6 +3,8 @@ Changelog
3
3
 
4
4
  _Note that Scorched is yet to reach a v1.0 release. This means breaking changes may still be made. If upgrading the version of Scorched for your project, review this changelog carefully._
5
5
 
6
+ ### v0.27
7
+ * Fixed logic surrounding when a requested is considered "handled" (i.e. matched and dispatched) and exceptions that are raised after dispatch. In simpler terms, the `failed_condition` condition now has better logic in the event of an exception.
6
8
  ### v0.26
7
9
  * Fixed issue with `failed_condition` condition resulting in `NoMethodError: undefined method '[]' for nil:NilClass`
8
10
  ### v0.25
@@ -306,8 +306,13 @@ module Scorched
306
306
  }.reverse.each { |match,idx|
307
307
  request.breadcrumb << match
308
308
  catch(:pass) {
309
- catch(:halt) do
310
- dispatch(match)
309
+ begin
310
+ catch(:halt) do
311
+ dispatch(match)
312
+ end
313
+ rescue
314
+ @_handled = true
315
+ raise
311
316
  end
312
317
  @_handled = true
313
318
  }
@@ -1,3 +1,3 @@
1
1
  module Scorched
2
- VERSION = '0.26'
2
+ VERSION = '0.27'
3
3
  end
@@ -788,6 +788,13 @@ module Scorched
788
788
  rt.get('/nopass').status.should == 200
789
789
  handled.should be_truthy
790
790
  end
791
+
792
+ it "is still considered a match if an exception is raised" do
793
+ app.post('/') { }
794
+ app.get('/') { raise "Test error"}
795
+ app.error { true } # Returns true to supress the exception
796
+ rt.get('/').status.should == 200 # Would return a 405 or something other than a 200 prior to v0.27.
797
+ end
791
798
  end
792
799
 
793
800
  describe "status codes" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorched
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.26'
4
+ version: '0.27'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Wardrop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-30 00:00:00.000000000 Z
11
+ date: 2016-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack