lib/elasticsearch/api/actions/indices/open.rb in elasticsearch-api-0.4.0 vs lib/elasticsearch/api/actions/indices/open.rb in elasticsearch-api-0.4.1

- old
+ new

@@ -14,16 +14,15 @@ # # @see http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/ # def open(arguments={}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + valid_params = [ :timeout ] + method = 'POST' - path = "#{arguments[:index]}/_open" - params = arguments.select do |k,v| - [ :timeout ].include?(k) - end - # Normalize Ruby 1.8 and Ruby 1.9 Hash#select behaviour - params = Hash[params] unless params.is_a?(Hash) + path = Utils.__pathify Utils.__escape(arguments[:index]), '_open' + + params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end end