From 92dcccd795a59ddab8329564beb3b0e139676699 Mon Sep 17 00:00:00 2001 From: Max De Marzi Date: Thu, 27 Mar 2014 04:29:44 -0500 Subject: [PATCH] Removing unneeded class --- lib/neography/rest.rb | 1 - lib/neography/rest/auto_indexes.rb | 64 ------------------------------ 2 files changed, 65 deletions(-) delete mode 100644 lib/neography/rest/auto_indexes.rb diff --git a/lib/neography/rest.rb b/lib/neography/rest.rb index 91db5b4..1ae7954 100644 --- a/lib/neography/rest.rb +++ b/lib/neography/rest.rb @@ -3,7 +3,6 @@ require 'neography/rest/helpers' require 'neography/rest/paths' -require 'neography/rest/auto_indexes' require 'neography/rest/schema_indexes' require 'neography/rest/nodes' diff --git a/lib/neography/rest/auto_indexes.rb b/lib/neography/rest/auto_indexes.rb deleted file mode 100644 index f70d747..0000000 --- a/lib/neography/rest/auto_indexes.rb +++ /dev/null @@ -1,64 +0,0 @@ -module Neography - class Rest - class AutoIndexes - include Neography::Rest::Helpers - - def initialize(connection) - @connection ||= connection - end - - def get(key, value) - index = @connection.get(key_value_path(:key => key, :value => value)) || [] - return nil if index.empty? - index - end - - def find_or_query(key_or_query, value = nil) - if value - index = find(key_or_query, value) - else - index = query(key_or_query) - end - return nil if index.empty? - index - end - - def find(key, value) - @connection.get(key_value_path(:key => key, :value => value)) || [] - end - - def query(query_expression) - @connection.get(query_index_path(:query => query_expression)) || [] - end - - def status - @connection.get(index_status_path) - end - - def status=(value) - options = { - :body => value.to_json, - :headers => json_content_type - } - @connection.put(index_status_path, options) - end - - def properties - @connection.get(index_properties_path) - end - - def add_property(property) - options = { - :body => property, - :headers => json_content_type - } - @connection.post(index_properties_path, options) - end - - def remove_property(property) - @connection.delete(index_property_path(:property => property)) - end - - end - end -end