anchor.diff:  
   rebuild_tasks([], State) -> ?I("All tasks rebuilt."), State;
   
  -rebuild_tasks([{Url, Type, Options, Id}=T|Tasks], #state{aws_bucket = Buckets, aws_dir = AwsDir} = State) ->
  +rebuild_tasks([{Url, Type, Options, Id}=T|Tasks], #state{aws_dir = AwsDir} = State) ->
     ?D({rebuilding_task, T}),
  -  Task = build_task(Url, Type, Options, Id, Buckets, AwsDir),
  +  Task = build_task(Url, Type, Options, Id, AwsDir),
     rebuild_tasks(Tasks, send_to_manager(Task, State)).
   
   
   %%% @doc
   %%% @end
   
  --spec parse_url(string(),list(string())) -> {IsAws::boolean(),Bucket::string()|boolean(), Path::string(),Name::string(),Ext::string()}.
  -
  -parse_url(Path, Buckets) ->
  +-spec parse_url(string()) -> {IsAws::boolean(),Bucket::string()|boolean(), Path::string(),Name::string(),Ext::string()}.
  +
  +parse_url(Path) ->
     {ok, Re} = re:compile("[^:]+://.+/([^/]+)\\.([^\\.]+)"),
     case re:run(Path, Re, [{capture, all, list}]) of
       {match, [_, Name, Ext]} ->
  
positive.code:   gen_server:call(fyler_server, {cancel_task, Id}).
  
  
  handle_call({run_task, URL, Type, Options}, _From, #state{aws_bucket = Buckets, aws_dir = AwsDir} = State) ->
    case build_task(URL, Type, Options, false, Buckets, AwsDir) of
      #task{id = Id} = Task ->
        NewState = send_to_manager(Task, State),
        {reply, {ok, Id}, NewState};
  
negative.code: -define(setup2(F), {setup, fun setup2_/0, fun cleanup_/1, F}).
  
  path_to_test() ->
    ?assertEqual({false, false, "http://qwe/data.ext", "data", "ext"}, parse_url("http://qwe/data.ext")),
    ?assertEqual({false, false, "http://dev2.teachbase.ru/app/cpi.txt", "cpi", "txt"}, parse_url("http://dev2.teachbase.ru/app/cpi.txt")),
    ?assertEqual({false, false, "https://qwe/qwe/qwr/da.ta.ext", "da.ta", "ext"}, parse_url("https://qwe/qwe/qwr/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/da.ta.ext", "da.ta", "ext"}, parse_url("http://qwe.s3-eu-west-1.amazonaws.com/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/da.ta.ext", "da.ta", "ext"}, parse_url("https://s3-eu-west-1.amazonaws.com/qwe/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/da.ta.ext", "da.ta", "ext"}, parse_url("http://qwe.s3.amazonaws.com/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/path/to/object/da.ta.ext", "da.ta", "ext"}, parse_url("http://qwe.s3-eu-west-1.amazonaws.com/path/to/object/da.ta.ext")),
    ?assertEqual(false, parse_url("qwr/data.ext")).
  
  
  dir_url_test() ->
  