package org.cru.godtools.redegg;

import java.net.URISyntaxException;

import com.google.common.collect.ImmutableList;
import org.cru.crs.utils.CrsProperties;
import org.cru.redegg.recording.api.NoOpParameterSanitizer;
import org.cru.redegg.recording.api.ParameterSanitizer;
import org.cru.redegg.reporting.errbit.ErrbitConfig;

import javax.enterprise.inject.Produces;
import java.net.URI;

/**
 * Created by matthewfrederick on 7/3/14.
 */
public class RedEggConfig
{

    @Produces ParameterSanitizer sanitizer = new NoOpParameterSanitizer();


    public
    @Produces ErrbitConfig createConfig() throws URISyntaxException
    {
        ErrbitConfig config = new ErrbitConfig();
        config.setEndpoint(new URI("https://errors.uscm.org"));
        config.setKey(properties.getProperty("errbitApiKey"));
        config.setEnvironmentName(properties.getProperty("errbitEnvironment"));

        config.getApplicationBasePackage().addAll(ImmutableList.of("org.cru.goodTools"));

        return config;
    }
}

@@ -31,44 +31,9 @@
 g;%0A%0A
-import java.net.URISyntaxException;
 %0A
+
 %0Aimp
@@ -81,48 +81,8 @@
 st;%0A
-import org.cru.crs.utils.CrsProperties;%0A
 impo
@@ -288,16 +288,52 @@
 oduces;%0A
+import java.net.URISyntaxException;%0A
 import j
@@ -505,20 +505,8 @@
 );%0A%0A
-%0A    public%0A
     
@@ -515,16 +515,23 @@
 roduces 
+public 
 ErrbitCo
@@ -836,24 +836,24 @@
 onment%22));%0A%0A
-
         conf
@@ -880,16 +880,17 @@
 ePackage
+s
 ().addAl

update to POM and new redeggconfig class (cherry picked from commit 26822b1)