rocketio 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rocketio/controller/error_handlers.rb +10 -1
- data/lib/rocketio/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: ac3f7fe3763afbbeeb150a57c2c6a7c9035f69ac
|
4
|
+
data.tar.gz: fe5bc128ab925c17d8e42a9e1a4b39c85412eea8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dd0a9f073d34f056e7201930adaeddfe69fa79d7552bc6da01c0cbbce52e0b9e9d2300f2a10510ec634ee4da5aa6b5de856bdb1328eb4e62784f8474a8a3bdf
|
7
|
+
data.tar.gz: 9f7c2206703d808ce8c0e05f8879030ab404ceee35270f7f8132cab34fb4dd933ef48a88af14672e3974ac3f9ae71a0180a3af28f34184397230793c9ac9b918
|
@@ -55,10 +55,19 @@ module RocketIO
|
|
55
55
|
#
|
56
56
|
def error code, *args
|
57
57
|
error_handlers[code] || halt(code, *args)
|
58
|
-
halt(code,
|
58
|
+
halt(code, __error__(code, *args))
|
59
59
|
end
|
60
60
|
alias error! error
|
61
61
|
|
62
|
+
# call defined error handler with given arguments.
|
63
|
+
#
|
64
|
+
# @raise NotImplementedError if no handler defined for given code
|
65
|
+
#
|
66
|
+
def __error__ code, *args
|
67
|
+
error_handlers[code] || raise(NotImplementedError, 'No handler defined for %s error' % code.inspect)
|
68
|
+
__send__(error_handlers[code], *args)
|
69
|
+
end
|
70
|
+
|
62
71
|
# 404: Not Found
|
63
72
|
error 404 do
|
64
73
|
RocketIO.error_renderer(404, xhr?, env: env)
|
data/lib/rocketio/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocketio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slee Woo
|
@@ -210,5 +210,5 @@ rubyforge_project:
|
|
210
210
|
rubygems_version: 2.5.1
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
|
-
summary: '["rocketio-0.0.
|
213
|
+
summary: '["rocketio-0.0.4", "Simple, fast, scalable web framework for Ruby"]'
|
214
214
|
test_files: []
|