{"action":"created","comment":{"url":"https://api.github.com/repos/snowplow/snowplow/pulls/comments/38815691","id":38815691,"diff_hunk":"@@ -0,0 +1,48 @@\n+/*\n+ * Copyright (c) 2012-2014 Snowplow Analytics Ltd. All rights reserved.\n+ *\n+ * This program is licensed to you under the Apache License Version 2.0,\n+ * and you may not use this file except in compliance with the Apache License Version 2.0.\n+ * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the Apache License Version 2.0 is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.\n+ */\n+package com.snowplowanalytics.snowplow.enrich.common\n+package enrichments\n+package registry\n+\n+// Specs2\n+import org.specs2.Specification\n+import org.specs2.scalaz.ValidationMatchers\n+\n+// Scalaz\n+import scalaz._\n+import Scalaz._\n+\n+/**\n+ * Tests EventFingerprintEnrichment\n+ */\n+class EventFingerprintEnrichmentSpec extends Specification with ValidationMatchers { def is =\n+\n+  \"This is a specification to test the EventFingerprintEnrichment\"                                                 ^\n+                                                                                                           p^\n+  \"getEventFingerprint should combine fields into a hash\"     ! e1^\n+                                                                                                            end\n+\n+  def e1 = {\n+    val config = EventFingerprintEnrichment(\n+      s => s.size.toString,\n+      List(\"stm\")\n+    )\n+\n+    config.getEventFingerprint(Map(\n+      \"stm\" -> \"1000000000000\",\n+      \"e\" -> \"se\",\n+      \"se_ac\" -> \"buy\"\n+      )) must_== \"5\"\n+  }\n+","path":"3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/enrichments/registry/EventFingerprintEnrichmentSpec.scala","position":47,"original_position":47,"commit_id":"48131898906f5b336627c5e8267be166901b32fd","original_commit_id":"48131898906f5b336627c5e8267be166901b32fd","user":{"login":"alexanderdean","id":200511,"avatar_url":"https://avatars.githubusercontent.com/u/200511?v=3","gravatar_id":"","url":"https://api.github.com/users/alexanderdean","html_url":"https://github.com/alexanderdean","followers_url":"https://api.github.com/users/alexanderdean/followers","following_url":"https://api.github.com/users/alexanderdean/following{/other_user}","gists_url":"https://api.github.com/users/alexanderdean/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderdean/subscriptions","organizations_url":"https://api.github.com/users/alexanderdean/orgs","repos_url":"https://api.github.com/users/alexanderdean/repos","events_url":"https://api.github.com/users/alexanderdean/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderdean/received_events","type":"User","site_admin":false},"body":"This spec needs lots more tests to validate that the implementation creates correct fingerprints (it doesn't yet).","created_at":"2015-09-05T23:10:46Z","updated_at":"2015-09-05T23:10:46Z","html_url":"https://github.com/snowplow/snowplow/pull/1997#discussion_r38815691","pull_request_url":"https://api.github.com/repos/snowplow/snowplow/pulls/1997","_links":{"self":{"href":"https://api.github.com/repos/snowplow/snowplow/pulls/comments/38815691"},"html":{"href":"https://github.com/snowplow/snowplow/pull/1997#discussion_r38815691"},"pull_request":{"href":"https://api.github.com/repos/snowplow/snowplow/pulls/1997"}}},"pull_request":{"url":"https://api.github.com/repos/snowplow/snowplow/pulls/1997","id":43306237,"html_url":"https://github.com/snowplow/snowplow/pull/1997","diff_url":"https://github.com/snowplow/snowplow/pull/1997.diff","patch_url":"https://github.com/snowplow/snowplow/pull/1997.patch","issue_url":"https://api.github.com/repos/snowplow/snowplow/issues/1997","number":1997,"state":"open","locked":false,"title":"Feature/r71","user":{"login":"alexanderdean","id":200511,"avatar_url":"https://avatars.githubusercontent.com/u/200511?v=3","gravatar_id":"","url":"https://api.github.com/users/alexanderdean","html_url":"https://github.com/alexanderdean","followers_url":"https://api.github.com/users/alexanderdean/followers","following_url":"https://api.github.com/users/alexanderdean/following{/other_user}","gists_url":"https://api.github.com/users/alexanderdean/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderdean/subscriptions","organizations_url":"https://api.github.com/users/alexanderdean/orgs","repos_url":"https://api.github.com/users/alexanderdean/repos","events_url":"https://api.github.com/users/alexanderdean/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderdean/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-25T16:20:28Z","updated_at":"2015-09-05T23:10:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a24e7b6b287002c6d1091951ebd80cf4e93d042a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/snowplow/snowplow/pulls/1997/commits","review_comments_url":"https://api.github.com/repos/snowplow/snowplow/pulls/1997/comments","review_comment_url":"https://api.github.com/repos/snowplow/snowplow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snowplow/snowplow/issues/1997/comments","statuses_url":"https://api.github.com/repos/snowplow/snowplow/statuses/48131898906f5b336627c5e8267be166901b32fd","head":{"label":"snowplow:feature/r71","ref":"feature/r71","sha":"48131898906f5b336627c5e8267be166901b32fd","user":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars.githubusercontent.com/u/1476001?v=3","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"repo":{"id":3591964,"name":"snowplow","full_name":"snowplow/snowplow","owner":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars.githubusercontent.com/u/1476001?v=3","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snowplow/snowplow","description":"Enterprise-strength web, mobile and event analytics, powered by Hadoop, Kinesis, Redshift and Elasticsearch","fork":false,"url":"https://api.github.com/repos/snowplow/snowplow","forks_url":"https://api.github.com/repos/snowplow/snowplow/forks","keys_url":"https://api.github.com/repos/snowplow/snowplow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snowplow/snowplow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snowplow/snowplow/teams","hooks_url":"https://api.github.com/repos/snowplow/snowplow/hooks","issue_events_url":"https://api.github.com/repos/snowplow/snowplow/issues/events{/number}","events_url":"https://api.github.com/repos/snowplow/snowplow/events","assignees_url":"https://api.github.com/repos/snowplow/snowplow/assignees{/user}","branches_url":"https://api.github.com/repos/snowplow/snowplow/branches{/branch}","tags_url":"https://api.github.com/repos/snowplow/snowplow/tags","blobs_url":"https://api.github.com/repos/snowplow/snowplow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snowplow/snowplow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snowplow/snowplow/git/refs{/sha}","trees_url":"https://api.github.com/repos/snowplow/snowplow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snowplow/snowplow/statuses/{sha}","languages_url":"https://api.github.com/repos/snowplow/snowplow/languages","stargazers_url":"https://api.github.com/repos/snowplow/snowplow/stargazers","contributors_url":"https://api.github.com/repos/snowplow/snowplow/contributors","subscribers_url":"https://api.github.com/repos/snowplow/snowplow/subscribers","subscription_url":"https://api.github.com/repos/snowplow/snowplow/subscription","commits_url":"https://api.github.com/repos/snowplow/snowplow/commits{/sha}","git_commits_url":"https://api.github.com/repos/snowplow/snowplow/git/commits{/sha}","comments_url":"https://api.github.com/repos/snowplow/snowplow/comments{/number}","issue_comment_url":"https://api.github.com/repos/snowplow/snowplow/issues/comments{/number}","contents_url":"https://api.github.com/repos/snowplow/snowplow/contents/{+path}","compare_url":"https://api.github.com/repos/snowplow/snowplow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snowplow/snowplow/merges","archive_url":"https://api.github.com/repos/snowplow/snowplow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snowplow/snowplow/downloads","issues_url":"https://api.github.com/repos/snowplow/snowplow/issues{/number}","pulls_url":"https://api.github.com/repos/snowplow/snowplow/pulls{/number}","milestones_url":"https://api.github.com/repos/snowplow/snowplow/milestones{/number}","notifications_url":"https://api.github.com/repos/snowplow/snowplow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snowplow/snowplow/labels{/name}","releases_url":"https://api.github.com/repos/snowplow/snowplow/releases{/id}","created_at":"2012-03-01T13:02:21Z","updated_at":"2015-09-04T20:13:53Z","pushed_at":"2015-09-05T17:40:59Z","git_url":"git://github.com/snowplow/snowplow.git","ssh_url":"git@github.com:snowplow/snowplow.git","clone_url":"https://github.com/snowplow/snowplow.git","svn_url":"https://github.com/snowplow/snowplow","homepage":"http://snowplowanalytics.com","size":77867,"stargazers_count":2183,"watchers_count":2183,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":539,"mirror_url":null,"open_issues_count":528,"forks":539,"open_issues":528,"watchers":2183,"default_branch":"master"}},"base":{"label":"snowplow:master","ref":"master","sha":"64a789273047d33c186cf00e2a0d8aabe52339f3","user":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars.githubusercontent.com/u/1476001?v=3","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"repo":{"id":3591964,"name":"snowplow","full_name":"snowplow/snowplow","owner":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars.githubusercontent.com/u/1476001?v=3","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snowplow/snowplow","description":"Enterprise-strength web, mobile and event analytics, powered by Hadoop, Kinesis, Redshift and Elasticsearch","fork":false,"url":"https://api.github.com/repos/snowplow/snowplow","forks_url":"https://api.github.com/repos/snowplow/snowplow/forks","keys_url":"https://api.github.com/repos/snowplow/snowplow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snowplow/snowplow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snowplow/snowplow/teams","hooks_url":"https://api.github.com/repos/snowplow/snowplow/hooks","issue_events_url":"https://api.github.com/repos/snowplow/snowplow/issues/events{/number}","events_url":"https://api.github.com/repos/snowplow/snowplow/events","assignees_url":"https://api.github.com/repos/snowplow/snowplow/assignees{/user}","branches_url":"https://api.github.com/repos/snowplow/snowplow/branches{/branch}","tags_url":"https://api.github.com/repos/snowplow/snowplow/tags","blobs_url":"https://api.github.com/repos/snowplow/snowplow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snowplow/snowplow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snowplow/snowplow/git/refs{/sha}","trees_url":"https://api.github.com/repos/snowplow/snowplow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snowplow/snowplow/statuses/{sha}","languages_url":"https://api.github.com/repos/snowplow/snowplow/languages","stargazers_url":"https://api.github.com/repos/snowplow/snowplow/stargazers","contributors_url":"https://api.github.com/repos/snowplow/snowplow/contributors","subscribers_url":"https://api.github.com/repos/snowplow/snowplow/subscribers","subscription_url":"https://api.github.com/repos/snowplow/snowplow/subscription","commits_url":"https://api.github.com/repos/snowplow/snowplow/commits{/sha}","git_commits_url":"https://api.github.com/repos/snowplow/snowplow/git/commits{/sha}","comments_url":"https://api.github.com/repos/snowplow/snowplow/comments{/number}","issue_comment_url":"https://api.github.com/repos/snowplow/snowplow/issues/comments{/number}","contents_url":"https://api.github.com/repos/snowplow/snowplow/contents/{+path}","compare_url":"https://api.github.com/repos/snowplow/snowplow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snowplow/snowplow/merges","archive_url":"https://api.github.com/repos/snowplow/snowplow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snowplow/snowplow/downloads","issues_url":"https://api.github.com/repos/snowplow/snowplow/issues{/number}","pulls_url":"https://api.github.com/repos/snowplow/snowplow/pulls{/number}","milestones_url":"https://api.github.com/repos/snowplow/snowplow/milestones{/number}","notifications_url":"https://api.github.com/repos/snowplow/snowplow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snowplow/snowplow/labels{/name}","releases_url":"https://api.github.com/repos/snowplow/snowplow/releases{/id}","created_at":"2012-03-01T13:02:21Z","updated_at":"2015-09-04T20:13:53Z","pushed_at":"2015-09-05T17:40:59Z","git_url":"git://github.com/snowplow/snowplow.git","ssh_url":"git@github.com:snowplow/snowplow.git","clone_url":"https://github.com/snowplow/snowplow.git","svn_url":"https://github.com/snowplow/snowplow","homepage":"http://snowplowanalytics.com","size":77867,"stargazers_count":2183,"watchers_count":2183,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":539,"mirror_url":null,"open_issues_count":528,"forks":539,"open_issues":528,"watchers":2183,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snowplow/snowplow/pulls/1997"},"html":{"href":"https://github.com/snowplow/snowplow/pull/1997"},"issue":{"href":"https://api.github.com/repos/snowplow/snowplow/issues/1997"},"comments":{"href":"https://api.github.com/repos/snowplow/snowplow/issues/1997/comments"},"review_comments":{"href":"https://api.github.com/repos/snowplow/snowplow/pulls/1997/comments"},"review_comment":{"href":"https://api.github.com/repos/snowplow/snowplow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snowplow/snowplow/pulls/1997/commits"},"statuses":{"href":"https://api.github.com/repos/snowplow/snowplow/statuses/48131898906f5b336627c5e8267be166901b32fd"}}}}