Module: Clouder

Defined in:
lib/clouder.rb,
lib/clouder/entity.rb

Overview

The Clouder module holds global server-wide functions.

Defined Under Namespace

Classes: Entity

Constant Summary collapse

VERSION =
'0.5.3'

Class Method Summary collapse

Class Method Details

.collections(uri) ⇒ Object

Returns an array of URIs of the resources exposed by the CloudKit server at the uri.

Clouder.collection("http://localhost:9292")
=> [ "notes", "comments" ]


19
20
21
22
# File 'lib/clouder.rb', line 19

def Clouder.collections(uri)
  uris = Rest.get(File.join(uri, "cloudkit-meta"))["uris"]
  uris.map { |uri| uri.split("/").last }
end

.head(uri) ⇒ Object

Makes a HEAD request to the uri and returns a hash of headers contained in the response.



26
27
28
# File 'lib/clouder.rb', line 26

def Clouder.head(uri)
  Rest.head(uri)
end