Skip to content

Commit

Permalink
flushing things out, it's still nonfunctional
Browse files Browse the repository at this point in the history
  • Loading branch information
rabble committed Aug 20, 2009
1 parent 0e72e9b commit a64dbd1
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/fluiddb.rb
Expand Up @@ -15,11 +15,10 @@ def self.parse(json)
require 'fluiddb/base'

module FluidDB
API_URL = "http://fluiddb.fluidinfo.com/"
API_DOMAIN = "fluiddb.fluidinfo.com"

class << self
attr_accessor :username, :password, :debug
end
attr_accessor :username, :password, :debug


class BadRequest < StandardError; end
class NotFound < StandardError; end
Expand Down
39 changes: 39 additions & 0 deletions lib/fluiddb/base.rb
@@ -0,0 +1,39 @@
module FluidDB
class Base

class << self

def query()

end

def get(obj)
RestClient.get(obj.url, obj.params, standard_headers)
end

def head(obj)
RestClient.head(obj.url, standard_headers)
end

def put
RestClient.put(obj.url, obj.params, standard_headers)
end

def post
RestClient.post(obj.url, obj.params, standard_headers)
end

def delete
RestClient.delete(obj.url, obj.params, standard_headers)
end

def base_url
"http://#{username}:#{password}@#{API_DOMAIN}/"
end

def standard_headers
{:content_type => 'application/json'}
end
end
end
end
5 changes: 5 additions & 0 deletions lib/fluiddb/fluid_object.rb
@@ -0,0 +1,5 @@
module FluidDB
class FluidObject < Base

end
end
5 changes: 5 additions & 0 deletions lib/fluiddb/namespace.rb
@@ -0,0 +1,5 @@
module FluidDB
class Namespace < FluidObject

end
end
5 changes: 5 additions & 0 deletions lib/fluiddb/permission.rb
@@ -0,0 +1,5 @@
module FluidDB
class Permission < FluidObject

end
end
5 changes: 5 additions & 0 deletions lib/fluiddb/policy.rb
@@ -0,0 +1,5 @@
module FluidDB
class Policy < FluidObject

end
end
5 changes: 5 additions & 0 deletions lib/fluiddb/tag.rb
@@ -0,0 +1,5 @@
module FluidDB
class Tag < FluidObject

end
end
5 changes: 5 additions & 0 deletions lib/fluiddb/user.rb
@@ -0,0 +1,5 @@
module FluidDB
class User < FluidObject

end
end
4 changes: 4 additions & 0 deletions test/simple.rb
@@ -0,0 +1,4 @@
require 'rubygems'
require 'fluiddb'
require 'test/unit'

0 comments on commit a64dbd1

Please sign in to comment.