rango 0.1.1.2.1 → 0.1.1.2.2

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.
@@ -21,23 +21,23 @@ module Rango
21
21
 
22
22
  def to_response
23
23
  method = self.request.env["rango.controller.action"].to_sym
24
- unless controller.respond_to?(method) # TODO: what about method_missing?
25
- raise NotFound, "Controller #{self.name} doesn't have method #{method}"
24
+ unless self.respond_to?(method) # TODO: what about method_missing?
25
+ raise NotFound, "Controller #{self.class.name} doesn't have method #{method}"
26
26
  end
27
- controller.run_filters(:before, method.to_sym)
27
+ self.run_filters(:before, method.to_sym)
28
28
  # If you don't care about arguments or if you prefer usage of params.
29
- if controller.method(method).arity.eql?(0)
30
- Rango.logger.debug("Calling method #{self.name}##{method} without arguments")
31
- controller.response.body = controller.method(method).call
29
+ if self.method(method).arity.eql?(0)
30
+ Rango.logger.debug("Calling method #{self.class.name}##{method} without arguments")
31
+ self.response.body = self.method(method).call
32
32
  else
33
- args = controller.params.values
34
- Rango.logger.debug("Calling method #{self.name}##{method} with arguments #{args.inspect}")
35
- controller.response.body = controller.method(method).call(*args)
33
+ args = self.params.values
34
+ Rango.logger.debug("Calling method #{self.class.name}##{method} with arguments #{args.inspect}")
35
+ self.response.body = self.method(method).call(*args)
36
36
  end
37
- controller.run_filters(:after, method)
38
- return controller.response.finish
37
+ self.run_filters(:after, method)
38
+ return self.response.finish
39
39
  rescue HttpError => exception
40
- controller.rescue_http_error(exception)
40
+ self.rescue_http_error(exception)
41
41
  end
42
42
 
43
43
  # for routers
data/lib/rango/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # NOTE: Do not edit this file manually, this
4
4
  # file is regenerated by task rake version:increase
5
5
  module Rango
6
- VERSION ||= "0.1.1.2.1"
6
+ VERSION ||= "0.1.1.2.2"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rango
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.2.1
4
+ version: 0.1.1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jakub \xC5\xA0\xC5\xA5astn\xC3\xBD aka Botanicus"