Permalink
Browse files

typo

  • Loading branch information...
1 parent a53731b commit 3f481440acf79ccb3ae0a4ee62ae1c96e776fe1a @benoitc committed Sep 30, 2009
@@ -28,6 +28,7 @@
-record(server_state, {
couchdb = #couchdb_params{},
prefix,
+ name,
dbs_by_name = undefined,
dbs_by_pid = undefined,
uuids_pid = undefined
View
@@ -18,7 +18,7 @@
-module(couchbeam).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-behaviour(application).
@@ -15,7 +15,7 @@
%% @copyright 2009 Benoît Chesneau.
-module(couchbeam_db).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-behaviour(gen_server).
@@ -46,9 +46,11 @@
info(Db) ->
gen_server:call(Db, info, infinity).
+
+
open(ConnectionPid, DbName) ->
couchbeam_server:open_db(ConnectionPid, DbName).
-
+
close(ConnectionPid, Db) ->
couchbeam_server:close_db(ConnectionPid, Db).
@@ -15,7 +15,7 @@
%% @copyright 2009 Benoît Chesneau.
-module(couchbeam_doc).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-include("couchbeam.hrl").
-export([set_value/3, get_value/2, extend/2, extend/3,
@@ -17,7 +17,7 @@
%% This gen_server is responsible of maintaining registration of server connections.
-module(couchbeam_manager).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-behaviour(gen_server).
@@ -15,7 +15,7 @@
%% @copyright 2009 Benoît Chesneau.
-module(couchbeam_resource).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-include("couchbeam.hrl").
@@ -98,14 +98,6 @@ do_request(#couchdb_params{host=Host, port=Port, ssl=Ssl, timeout=Timeout}=State
after Timeout ->
lhttpc:kill_client(Pid)
end.
-
-
-insert_default_headers([], H) ->
- H;
-insert_default_headers([{K, V}|Rest], H) ->
- H1 = default_header(K, V, H),
- insert_default_headers(Rest, H1).
-
make_auth(#couchdb_params{username=nil, password=nil}, Headers) ->
Headers;
@@ -15,7 +15,7 @@
%% @copyright 2009 Benoît Chesneau.
-module(couchbeam_server).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-behaviour(gen_server).
@@ -48,7 +48,8 @@ start_connection_internal(#couchdb_params{prefix=Prefix,name=Name} = CouchdbPara
end,
CouchdbParams1 = CouchdbParams#couchdb_params{prefix=Prefix1},
InitialState = #server_state{couchdb = CouchdbParams1,
- prefix = Prefix1},
+ prefix = Prefix1,
+ name=Name},
{ok, Pid} = start_internal(InitialState, ProcLink),
{ok, _} = couchbeam_manager:register_connection(Name, Pid),
Pid.
@@ -152,7 +153,7 @@ handle_call({open_db, DbName}, _From, #server_state{prefix=Base,
end,
{reply, Pid, State};
-handle_call({create_db, DbName}, _From, #server_state{prefix=Base,
+handle_call({create_db, DbName}, _From, #server_state{prefix=Base,
couchdb=C,
dbs_by_name=DbsNameTid,
dbs_by_pid=DbsPidTid}=State) ->
@@ -15,7 +15,7 @@
%% @copyright 2009 Benoît Chesneau.
-module(couchbeam_sup).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-behaviour(supervisor).
-export([start_link/0, init/1]).
@@ -15,7 +15,7 @@
%% @copyright 2009 Benoît Chesneau.
-module(couchbeam_uuids).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-behaviour(gen_server).
@@ -17,7 +17,7 @@
-module(couchbeam_view).
--author('Benoît Chesneau <benoitc@e-engura.org').
+-author('Benoît Chesneau <benoitc@e-engura.org>').
-behaviour(gen_server).
View
@@ -43,4 +43,5 @@ test() ->
etap:is(couchbeam_server:delete_db(default, "couchbeam_testdb2"), ok, "delete couchbeam_testdb2 ok"),
AllDbs1 = couchbeam_server:all_dbs(default),
etap:not_ok(lists:member(<<"couchbeam_testdb2">>, AllDbs1), "couchbeam_testdb2 don't exists ok"),
+ couchbeam_db:close(default, Db),
ok.

0 comments on commit 3f48144

Please sign in to comment.