Merge remote branch 'cloudant:fix_some_specs'

This closes #60

Signed-off-by: ILYA Khlopotov <iilyak@ca.ibm.com>
diff --git a/src/fabric.erl b/src/fabric.erl
index 0c7cfa2..fe663be 100644
--- a/src/fabric.erl
+++ b/src/fabric.erl
@@ -222,7 +222,7 @@
 
 %% @doc update a single doc
 %% @equiv update_docs(DbName,[Doc],Options)
--spec update_doc(dbname(), #doc{}, [option()]) ->
+-spec update_doc(dbname(), #doc{} | json_obj(), [option()]) ->
     {ok, any()} | any().
 update_doc(DbName, Doc, Options) ->
     case update_docs(DbName, [Doc], opts(Options)) of
@@ -241,7 +241,7 @@
     end.
 
 %% @doc update a list of docs
--spec update_docs(dbname(), [#doc{}], [option()]) ->
+-spec update_docs(dbname(), [#doc{} | json_obj()], [option()]) ->
     {ok, any()} | any().
 update_docs(DbName, Docs, Options) ->
     try
@@ -277,8 +277,11 @@
 %%      also be passed to further constrain the query. See <a href=
 %%      "http://wiki.apache.org/couchdb/HTTP_Document_API#All_Documents">
 %%      all_docs</a> for details
--spec all_docs(dbname(), [{atom(), any()}], callback(), [] | tuple(), #mrargs{}) ->
-    {ok, [any()]}.
+-spec all_docs(
+        dbname(), [{atom(), any()}], callback(), [] | tuple(),
+        #mrargs{} | [option()]) ->
+    {ok, any()}.
+
 all_docs(DbName, Options, Callback, Acc0, #mrargs{} = QueryArgs) when
         is_function(Callback, 2) ->
     fabric_view_all_docs:go(dbname(DbName), opts(Options), QueryArgs, Callback, Acc0);