flame 5.0.0.rc1 → 5.0.0.rc3

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: 7e3d7d2c5f0cd76e641b7b5cc3999eeff5bf5c11
4
- data.tar.gz: aa3c3efc4fba9d10060a554592be063f3384a7d8
3
+ metadata.gz: 85eb7af6c0680bae7f00910a6e7ba21746509241
4
+ data.tar.gz: 38b4a71563308b2bde1e3456858eb6c6c6077bcb
5
5
  SHA512:
6
- metadata.gz: aeb8af2e6436404b2478a31ae95598f04a0677d13c3ea27b5ec0eb6bef859d3378cfecbbb8a19a1e79e2d37062b3bc58a05c0189bba75be09d93d40d21bb3940
7
- data.tar.gz: ab7eb4d61a48c01cbf122d2a180ac8fdb8945c28d4a1024970c0ff68edd68fcdd92f5aec08bb5612143225dcda135578b798f3465c8f70f74270dad437603ceb
6
+ metadata.gz: 6cdb664fcf2109d1b38a34f7d70019c4118bb4489b1e2a6a5c1d45fab4806c1f972c5f6cd1a5f3597cdea2a589fa36a9cb07fc0ebccb8ad3af156dd946ab159f
7
+ data.tar.gz: b3e61c07ab4ab996c2f5964b0ddc0380df3898e56c5b7c39e7372426db709524bfb0381da4bc52f01f94a1f998e98c373392d7bac8b3d1232d8e1726d85350ff
@@ -134,6 +134,10 @@ module Flame
134
134
  body send(method, *extract_params_for(method))
135
135
  end
136
136
 
137
+ def not_found
138
+ body default_body
139
+ end
140
+
137
141
  ## Default method for Internal Server Error, can be inherited
138
142
  ## @param _exception [Exception] exception from code executing
139
143
  ## @return [String] content of exception page
@@ -45,8 +45,13 @@ module Flame
45
45
  route = @app_class.router.find_nearest_route(request.path)
46
46
  ## Return standard `default_body` if the route not found
47
47
  return default_body unless route
48
- ## Execute `default_body` method for the founded route
49
- body route.controller.new(self).send(:default_body)
48
+ controller = route.controller.new(self)
49
+ ## Execute `not_found` method for the founded route
50
+ if response.not_found?
51
+ controller.send(:not_found)
52
+ else
53
+ body controller.send(:default_body)
54
+ end
50
55
  end
51
56
  end
52
57
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Flame
4
- VERSION = '5.0.0.rc1'
4
+ VERSION = '5.0.0.rc3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flame
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.rc1
4
+ version: 5.0.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-17 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable