Class: CouchProxy::Rack::EnsureFullCommit
- Defined in:
- lib/couchproxy/rack/ensure_full_commit.rb
Constant Summary
Constants inherited from Base
Base::APPLICATION_JSON, Base::DESIGN_ID, Base::INVALID_JSON, Base::METHODS, Base::SERVER_VERSION, Base::TEXT_PLAIN
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #method_missing, #proxy_to, #proxy_to_all_nodes, #proxy_to_all_partitions, #proxy_to_any_node, #proxy_to_any_partition, #replicate_to_all_partitions, #rewrite_location, #send_error_response, #send_response, #uuids
Constructor Details
This class inherits a constructor from CouchProxy::Rack::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CouchProxy::Rack::Base
Instance Method Details
#post ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/couchproxy/rack/ensure_full_commit.rb', line 6 def post proxy_to_all_partitions do |responses| ok = responses.map {|res| JSON.parse(res.response)['ok'] } body = {:ok => !ok.include?(false)} send_response(responses.first.response_header.status, response_headers, [body.to_json]) end end |