flame 5.0.0.rc1 → 5.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/flame/controller.rb +4 -0
- data/lib/flame/dispatcher/routes.rb +7 -2
- data/lib/flame/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85eb7af6c0680bae7f00910a6e7ba21746509241
|
4
|
+
data.tar.gz: 38b4a71563308b2bde1e3456858eb6c6c6077bcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cdb664fcf2109d1b38a34f7d70019c4118bb4489b1e2a6a5c1d45fab4806c1f972c5f6cd1a5f3597cdea2a589fa36a9cb07fc0ebccb8ad3af156dd946ab159f
|
7
|
+
data.tar.gz: b3e61c07ab4ab996c2f5964b0ddc0380df3898e56c5b7c39e7372426db709524bfb0381da4bc52f01f94a1f998e98c373392d7bac8b3d1232d8e1726d85350ff
|
data/lib/flame/controller.rb
CHANGED
@@ -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
|
-
|
49
|
-
|
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
|
data/lib/flame/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|