Skip to content

Commit

Permalink
remove whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo committed Mar 2, 2016
1 parent 0c907d7 commit 1e39029
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion core/kazoo_couch/src/kazoo_couch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ format_error(Error) ->
%% Connection operations
get_db(Server, DbName) ->
kz_couch_util:get_db(Server, DbName).

server_url(Server) ->
kz_couch_util:server_url(Server).

Expand Down
2 changes: 1 addition & 1 deletion core/kazoo_couch/src/kz_couch_attachments.erl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ do_stream_attachment(#db{}=Db, DocId, AName, Caller) ->
Ret;
Else -> Else
end.

relay_stream_attachment(Caller, Ref) ->
relay_stream_attachment(Caller, Ref, couchbeam:stream_attachment(Ref)).

Expand Down
2 changes: 1 addition & 1 deletion core/kazoo_couch/src/kz_couch_db.erl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

get_db(#server{}=Conn, DbName) ->
kz_couch_util:get_db(Conn, DbName).

%%% DB-related functions ---------------------------------------------
-spec db_compact(server(), ne_binary()) -> boolean().
db_compact(#server{}=Conn, DbName) ->
Expand Down
8 changes: 4 additions & 4 deletions core/kazoo_couch/src/kz_couch_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ new_connection(#kz_couch_connection{host=Host
,{'connect_timeout', 500}
,{'connect_options', [{'keepalive', true}]}
% ,{'timeout', 'infinity'}
],
],
get_new_conn(Host, Port, Options);
new_connection(#{}=Map) ->
new_connection(maps:fold(fun connection_parse/3, #kz_couch_connection{}, Map)).
Expand All @@ -112,8 +112,8 @@ connection_parse(password, V, Conn) ->
Conn#kz_couch_connection{password=V};
connection_parse(K, V, #kz_couch_connection{options=Options}=Conn) ->
Conn#kz_couch_connection{options = [{K, V} | Options]}.


-spec get_new_conn(nonempty_string() | ne_binary(), pos_integer(), wh_proplist()) ->
{'ok', server()} |
{'error', 'timeout'} |
Expand Down Expand Up @@ -154,7 +154,7 @@ server_url(#server{url=Url}) -> Url.
%% 'false' -> <<"http">>;
%% 'true' -> <<"https">>
%% end,
%%
%%
%% list_to_binary([Protocol, <<"://">>, UserPass
%% ,<<"@">>, wh_util:to_binary(Host)
%% ,<<":">>, wh_util:to_binary(Port)
Expand Down
2 changes: 1 addition & 1 deletion core/kazoo_data/src/kz_dataconfig.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ connection() ->
[Section] = wh_config:get('data', 'config', ['bigcouch']),
Props = props:get_value('generic', wh_config:get(Section), []),
connection(Props).

connection(List) when is_list(List) ->
connection(maps:from_list(List));
connection(#{driver := App, tag := Tag}=Map) ->
Expand Down
11 changes: 5 additions & 6 deletions core/kazoo_data/src/kz_datamgr.erl
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ open_doc(Server, DbName, DocId, Options) ->
%% {'error', 'not_found'}.
%% admin_open_doc(DbName, DocId) ->
%% admin_open_doc(DbName, DocId, []).
%%
%%
%% admin_open_doc(DbName, DocId, Options) when ?VALID_DBNAME->
%% kzs_doc:open_doc(kz_dataconnections:get_admin_server(), DbName, DocId, Options);
%% admin_open_doc(DbName, DocId, Options) ->
Expand Down Expand Up @@ -680,13 +680,13 @@ db_list(Options) ->

%% -spec admin_all_docs(text()) -> {'ok', wh_json:objects()} |
%% data_error().
%%
%%
%% -spec admin_all_docs(text(), wh_proplist()) -> {'ok', wh_json:objects()} |
%% data_error().
%%
%%
%% admin_all_docs(DbName) ->
%% admin_all_docs(DbName, []).
%%
%%
%% admin_all_docs(DbName, Options) when ?VALID_DBNAME ->
%% kzs_view:all_docs(kz_dataconnections:get_admin_server(), DbName, Options);
%% admin_all_docs(DbName, Options) ->
Expand Down Expand Up @@ -1111,7 +1111,7 @@ attachment_url(DbName, DocId, AttachmentId) ->
Options = [{'content_type', kz_mime:from_extension(Ext)}],
attachment_url(DbName, DocId, AttachmentId, Options)
end.

attachment_url(DbName, DocId, AttachmentId, Options) when ?VALID_DBNAME ->
Server = get_server(),
RequiredOptions = [{'doc_type', fun wh_doc:type/1}
Expand Down Expand Up @@ -1167,4 +1167,3 @@ add_required_option({Key, Fun}, {JObj, Options}=Acc) ->
'true' -> Acc;
'false' -> {JObj, props:filter_undefined([{Key, Fun(JObj)} | Options])}
end.

0 comments on commit 1e39029

Please sign in to comment.