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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ebffe292d0d4ed73091bab2ebcaf104da790ac0
4
- data.tar.gz: 3323659d8732297537784c3cf6f7d56df7d0055e
3
+ metadata.gz: ac3f7fe3763afbbeeb150a57c2c6a7c9035f69ac
4
+ data.tar.gz: fe5bc128ab925c17d8e42a9e1a4b39c85412eea8
5
5
  SHA512:
6
- metadata.gz: 18324d12fd3dd92a14b1cc528c99c96f3f24550ab1f7f1d191140114167a7fcdccc35e850956f0328c69c69ace2226e9d5203d3baef80d19be5b01d829df9ee0
7
- data.tar.gz: 26b980c9bc736583f312dcce3cc05bc255914329e41dccbc60e5aa5d34169b6e6730e3984efff70bda7718100a1c798135aa695999a789909f818ed5b7a0a8cd
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, __send__(error_handlers[code], *args))
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)
@@ -1,3 +1,3 @@
1
1
  module RocketIO
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
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.3
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.3", "Simple, fast, scalable web framework for Ruby"]'
213
+ summary: '["rocketio-0.0.4", "Simple, fast, scalable web framework for Ruby"]'
214
214
  test_files: []