Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Index name -> access module matching is now defined using application…

… environment variable 'index_modules'
  • Loading branch information...
commit f6b4247273a3d0e21c89edc87298ace676feed05 1 parent 3d05109
@yrashk yrashk authored
Showing with 11 additions and 3 deletions.
  1. +4 −1 src/agner.app.src
  2. +7 −2 src/agner_server.erl
View
5 src/agner.app.src
@@ -9,7 +9,10 @@
inets,
gproc
]},
- {env, [{indices, [{github, "agner"}]}]},
+ {env, [
+ {indices, [{github, "agner"}]},
+ {index_modules, [{github, agner_github}]}
+ ]},
{mod, { agner_app, []}},
{env, []}
]}.
View
9 src/agner_server.erl
@@ -305,8 +305,13 @@ sha1(Mod, Name, Version) ->
end.
-index_module({github, Account}) ->
- {agner_github, Account}.
+index_module(T) ->
+ case application:get_env(index_modules) of
+ {ok, Modules} ->
+ setelement(1,T,proplists:get_value(element(1,T), Modules));
+ _ ->
+ T
+ end.
indexize({github, "agner"}, Name) ->
Name;
Please sign in to comment.
Something went wrong with that request. Please try again.