Browse Source

publisher

Namdak Tonpa 9 years ago
parent
commit
6208a05c41
3 changed files with 2 additions and 8 deletions
  1. 1 1
      include/mad.hrl
  2. BIN
      mad
  3. 1 7
      src/mad_deps.erl

+ 1 - 1
include/mad.hrl

@@ -1 +1 @@
--define(VERSION,"9adf7e").
+-define(VERSION,"5d7916").

BIN
mad


+ 1 - 7
src/mad_deps.erl

@@ -99,10 +99,4 @@ name_and_repo({Name, Version}) when is_list(Name) -> {Name, Version};
 name_and_repo({Name, Version}) -> {atom_to_list(Name), Version};
 name_and_repo({Name, Version}) -> {atom_to_list(Name), Version};
 name_and_repo(Name) -> {Name,Name}.
 name_and_repo(Name) -> {Name,Name}.
 
 
-get_publisher(Uri) ->
-    case http_uri:parse(Uri, [{scheme_defaults,
-            [{git, 9418}|http_uri:scheme_defaults()]}]) of
-        {ok, {_, _, _, _, Path, _}} -> hd(string:tokens(Path,"/"));
-        _ -> case string:tokens(Uri,":/") of
-                [_Server,Publisher,_Repo] -> Publisher;
-                _ -> exit(error) end end.
+get_publisher(Uri) -> case string:tokens(Uri,"@:/") of [_Proto,_Server,Publisher|_RepoPath] -> Publisher; _ -> core end.