Skip to content

Commit

Permalink
Added ability to disable user-agent-utils enrichment (closes snowplow…
Browse files Browse the repository at this point in the history
  • Loading branch information
AALEKH committed Jan 8, 2015
1 parent b5b5b6c commit ca43402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ object EnrichmentManager {
case None => ip
})

//Finally User Agent Utils
// Parse the useragent using user-agent-utils
val client = {
registry.getUserAgentUtilsEnrichment match {
case Some(uap) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,19 @@ class EnrichmentConfigsSpec extends Specification with ValidationMatchers {
}
}

"Parsing a valid user_agent_utils_config enrichment JSON" should {
"Parsing a valid user_agent_utils_config enrichment JSON" should {
"successfully construct a UserAgentUtilsEnrichment case object" in {

val userAgentUtilsEnrichmentJson = parse("""{
"enabled": true,
"parameters": {
}
}
}""")

val schemaKey = SchemaKey("com.snowplowanalytics.snowplow", "user_agent_utils_config", "jsonschema", "1-0-0")

val expected = UserAgentUtilsEnrichment

val result = UserAgentUtilsEnrichmentConfig.parse(userAgentUtilsEnrichmentJson, schemaKey)
result must beSuccessful(expected)

Expand Down

0 comments on commit ca43402

Please sign in to comment.