anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   pre_eunit(RebarConf, AppFile) ->
  -	case is_base_dir(RebarConf) of
  -		true -> 
  -			{ok, BossConf} = init(RebarConf, AppFile, "test_eunit"),
  -			boss_rebar:run(?BOSS_PLUGIN_CLIENT_VERSION, test_eunit, RebarConf, BossConf, AppFile),
  -			halt(0);
  -		false -> ok
  -	end.
  +  case is_boss_app(AppFile) orelse is_base_dir(RebarConf) of
  +    true -> 
  +      {ok, BossConf} = init(RebarConf, AppFile, "test_eunit"),
  +      boss_rebar:run(?BOSS_PLUGIN_CLIENT_VERSION, test_eunit, RebarConf, BossConf, AppFile),
  +      halt(0);
  +    false -> ok
  +  end.
   
   %% ===================================================================
   %% Internal functions
   %% ===================================================================
  +
  +is_boss_app(Filename)->
  +  BossFileForApp = filename:join([filename:dirname(Filename), "..", "boss.config"]),
  +  filelib:is_file(BossFileForApp).
   
   %% Checks if the current dir (rebar execution) is the base_dir
   %% Used to prevent run boss tasks in deps directory
  
positive.code: %%       Set's the ebin cb_apps and loads the connector 
  %% @end
  %%--------------------------------------------------------------------
  init(_RebarConf, AppFile, Command) ->
      %% Compile and load the boss_rebar code, this can't be compiled
  	%% as a normal boss lib without the rebar source dep
  	%% The load of ./rebar boss:
  	%% - Rebar itself searchs in rebar.config for {plugin_dir, ["priv/rebar"]}.
  	%% - Rebar itself compile this plugin and adds it to the execution chain
  	%% - This plugin compiles and loads the boss_rebar code in ["cb/priv/rebar"],
  	%%   so we can extend/bugfix/tweak the framework without the need of manually
  	%%   recopy code to user apps
      {BossConf, BossConfFile} = boss_config(Command),
  	BossPath = case boss_config_value(boss, path, BossConf) of
  				   {error, _} ->
  					   io:format("FATAL: Failed to read boss=>path config in ~p.~n", [BossConfFile]),
  					   halt(1);
  				   Val -> Val
  			   end,
  	RebarErls = rebar_utils:find_files(filename:join([BossPath, "priv", "rebar"]), ".*\\.erl\$"),
  	
  	rebar_log:log(debug, "Auto-loading boss rebar modules ~p~n", [RebarErls]),
  	
  	lists:map(fun(F) ->
  					  case compile:file(F, [binary]) of
  						  error ->
  							  io:format("FATAL: Failed compilation of ~s module~n", [F]),
  							  halt(1);
  						  {ok, M, Bin} ->
  							  {module, _} = code:load_binary(M, F, Bin),
  							  rebar_log:log(debug, "Loaded ~s~n", [M])
  					  end
  			  end, RebarErls),
  
  	%% add all cb_apps defined in config file to code path
  	%% including the deps ebin dirs
  	[code:add_path(CodePath) || CodePath <- boss_rebar:all_ebin_dirs(BossConf, AppFile)],
      
      %% Load the config in the environment
      boss_rebar:init_conf(BossConf),
  	
  	{ok, BossConf}.
  	
  %%--------------------------------------------------------------------
  %% @doc pre_compile hook
  %% @spec pre_compile(_Config, AppFile) -> ok | {error, Reason}
  
negative.code: %% @end
  %%--------------------------------------------------------------------
  pre_compile(RebarConf, AppFile) ->
    case is_boss_app(AppFile)  orelse is_base_dir(RebarConf) of
      true -> 
        {ok, BossConf} = init(RebarConf, AppFile, "compile"),
        boss_rebar:run(?BOSS_PLUGIN_CLIENT_VERSION, compile, RebarConf, BossConf, AppFile),
        halt(0);
      false -> ok
    end.
  
  %%--------------------------------------------------------------------
  %% @doc pre_eunit hook
  