Class: NodeInfoController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- NodeInfoController
- Defined in:
- app/controllers/node_info_controller.rb
Instance Method Summary collapse
- #document ⇒ Object
-
#host_meta ⇒ Object
TODO: this is only a dummy endpoint, because old versions of the ConnectionTester (<= 0.7.17.0) checked for this endpoint.
- #jrd ⇒ Object
- #statistics ⇒ Object
Instance Method Details
#document ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/node_info_controller.rb', line 8 def document if NodeInfo.supported_version?(params[:version]) document = NodeInfoPresenter.new(params[:version]) render json: document, content_type: document.content_type else head :not_found end end |
#host_meta ⇒ Object
TODO: this is only a dummy endpoint, because old versions of the ConnectionTester (<= 0.7.17.0)
checked for this endpoint. Remove this endpoint again once most pods are updated to >= 0.7.18.0
26 27 28 29 30 31 32 |
# File 'app/controllers/node_info_controller.rb', line 26 def render xml: <<~XML <?xml version="1.0" encoding="UTF-8"?> <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> </XRD> XML end |
#jrd ⇒ Object
4 5 6 |
# File 'app/controllers/node_info_controller.rb', line 4 def jrd render json: NodeInfo.jrd(CGI.unescape(node_info_url("123.123").sub("123.123", "%{version}"))) end |
#statistics ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/node_info_controller.rb', line 17 def statistics respond_to do |format| format.json { head :not_acceptable } format.all { @statistics = NodeInfoPresenter.new("1.0") } end end |