{"action":"created","comment":{"url":"https://api.github.com/repos/democracyworks/notification-works/pulls/comments/26419555","id":26419555,"diff_hunk":"@@ -0,0 +1,18 @@\n+(ns notification-works.db\n+  (:require [turbovote.datomic-toolbox :as datomic-toolbox]\n+            [datomic.api :as datomic]\n+            [turbovote.resource-config :refer [config]])) \n+\n+(defn initialize []\n+  (when (config :datomic :initialize) (datomic-toolbox/initialize)))\n+\n+(defn latest-db []\n+  (datomic-toolbox/db))","path":"src/notification_works/db.clj","position":10,"original_position":10,"commit_id":"5ad3cf02660b314442c2c7033342d42e749d637a","original_commit_id":"5ad3cf02660b314442c2c7033342d42e749d637a","user":{"login":"tie-rack","id":3526,"avatar_url":"https://avatars.githubusercontent.com/u/3526?v=3","gravatar_id":"","url":"https://api.github.com/users/tie-rack","html_url":"https://github.com/tie-rack","followers_url":"https://api.github.com/users/tie-rack/followers","following_url":"https://api.github.com/users/tie-rack/following{/other_user}","gists_url":"https://api.github.com/users/tie-rack/gists{/gist_id}","starred_url":"https://api.github.com/users/tie-rack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tie-rack/subscriptions","organizations_url":"https://api.github.com/users/tie-rack/orgs","repos_url":"https://api.github.com/users/tie-rack/repos","events_url":"https://api.github.com/users/tie-rack/events{/privacy}","received_events_url":"https://api.github.com/users/tie-rack/received_events","type":"User","site_admin":false},"body":"Do we need this? Is the reasoning to have one less `require` in `notification-works.core`?\r\n\r\nAnd, if we *do* want it: `(def latest-db datomic-toolbox/db)`","created_at":"2015-03-13T20:19:31Z","updated_at":"2015-03-13T20:19:31Z","html_url":"https://github.com/democracyworks/notification-works/pull/1#discussion_r26419555","pull_request_url":"https://api.github.com/repos/democracyworks/notification-works/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/democracyworks/notification-works/pulls/comments/26419555"},"html":{"href":"https://github.com/democracyworks/notification-works/pull/1#discussion_r26419555"},"pull_request":{"href":"https://api.github.com/repos/democracyworks/notification-works/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/democracyworks/notification-works/pulls/1","id":30601270,"html_url":"https://github.com/democracyworks/notification-works/pull/1","diff_url":"https://github.com/democracyworks/notification-works/pull/1.diff","patch_url":"https://github.com/democracyworks/notification-works/pull/1.patch","issue_url":"https://api.github.com/repos/democracyworks/notification-works/issues/1","number":1,"state":"open","locked":false,"title":"[WR TH] initial commit","user":{"login":"bwreid","id":1316902,"avatar_url":"https://avatars.githubusercontent.com/u/1316902?v=3","gravatar_id":"","url":"https://api.github.com/users/bwreid","html_url":"https://github.com/bwreid","followers_url":"https://api.github.com/users/bwreid/followers","following_url":"https://api.github.com/users/bwreid/following{/other_user}","gists_url":"https://api.github.com/users/bwreid/gists{/gist_id}","starred_url":"https://api.github.com/users/bwreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwreid/subscriptions","organizations_url":"https://api.github.com/users/bwreid/orgs","repos_url":"https://api.github.com/users/bwreid/repos","events_url":"https://api.github.com/users/bwreid/events{/privacy}","received_events_url":"https://api.github.com/users/bwreid/received_events","type":"User","site_admin":false},"body":"This PR initializes notification-works and completes these two cards: [[1]](https://www.pivotaltracker.com/story/show/87662924) & [[2]](https://www.pivotaltracker.com/story/show/87666338)\r\n\r\nThis does the following:\r\n* Listens on the events topic exchange via `notification.send.queue`\r\n* Pulls an hbs template from an s3 bucket\r\n* Renders that template with given tags/params\r\n* Sends out messages on the queue \"sms\" or \"email\" depending on what medium is specified.\r\n\r\nTo run, do:\r\n```\r\ndocker-compose build\r\nAWS_ACCESS_KEY=[YOUR SECRET] AWS_SECRET_KEY=[YOUR ACCESS] docker-compose run\r\n```\r\n\r\nThen go to the rabbitmq web console and create two new queues: \"sms\" and \"email\". Go into the \"notification.send.queue\" and enter in a payload like the following:\r\n\r\n```\r\n{:medium :sms\r\n :slug \"test-template.hbs\"\r\n :context {:to \"your number\" :from \"my number\" :params {:first-name \"Turbo\"}}}\r\n```\r\n\r\nIf you go to the \"sms\" queue and get a message, you should see the message has come through with the template.\r\n\r\nAssigned @tie-rack.","created_at":"2015-03-05T22:14:33Z","updated_at":"2015-03-13T20:19:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce24056a52a8c810149647c4060c7c21cf41dea2","assignee":{"login":"tie-rack","id":3526,"avatar_url":"https://avatars.githubusercontent.com/u/3526?v=3","gravatar_id":"","url":"https://api.github.com/users/tie-rack","html_url":"https://github.com/tie-rack","followers_url":"https://api.github.com/users/tie-rack/followers","following_url":"https://api.github.com/users/tie-rack/following{/other_user}","gists_url":"https://api.github.com/users/tie-rack/gists{/gist_id}","starred_url":"https://api.github.com/users/tie-rack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tie-rack/subscriptions","organizations_url":"https://api.github.com/users/tie-rack/orgs","repos_url":"https://api.github.com/users/tie-rack/repos","events_url":"https://api.github.com/users/tie-rack/events{/privacy}","received_events_url":"https://api.github.com/users/tie-rack/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/democracyworks/notification-works/pulls/1/commits","review_comments_url":"https://api.github.com/repos/democracyworks/notification-works/pulls/1/comments","review_comment_url":"https://api.github.com/repos/democracyworks/notification-works/pulls/comments{/number}","comments_url":"https://api.github.com/repos/democracyworks/notification-works/issues/1/comments","statuses_url":"https://api.github.com/repos/democracyworks/notification-works/statuses/5ad3cf02660b314442c2c7033342d42e749d637a","head":{"label":"democracyworks:initial-commit","ref":"initial-commit","sha":"5ad3cf02660b314442c2c7033342d42e749d637a","user":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"repo":{"id":31739087,"name":"notification-works","full_name":"democracyworks/notification-works","owner":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/democracyworks/notification-works","description":"","fork":false,"url":"https://api.github.com/repos/democracyworks/notification-works","forks_url":"https://api.github.com/repos/democracyworks/notification-works/forks","keys_url":"https://api.github.com/repos/democracyworks/notification-works/keys{/key_id}","collaborators_url":"https://api.github.com/repos/democracyworks/notification-works/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/democracyworks/notification-works/teams","hooks_url":"https://api.github.com/repos/democracyworks/notification-works/hooks","issue_events_url":"https://api.github.com/repos/democracyworks/notification-works/issues/events{/number}","events_url":"https://api.github.com/repos/democracyworks/notification-works/events","assignees_url":"https://api.github.com/repos/democracyworks/notification-works/assignees{/user}","branches_url":"https://api.github.com/repos/democracyworks/notification-works/branches{/branch}","tags_url":"https://api.github.com/repos/democracyworks/notification-works/tags","blobs_url":"https://api.github.com/repos/democracyworks/notification-works/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/democracyworks/notification-works/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/democracyworks/notification-works/git/refs{/sha}","trees_url":"https://api.github.com/repos/democracyworks/notification-works/git/trees{/sha}","statuses_url":"https://api.github.com/repos/democracyworks/notification-works/statuses/{sha}","languages_url":"https://api.github.com/repos/democracyworks/notification-works/languages","stargazers_url":"https://api.github.com/repos/democracyworks/notification-works/stargazers","contributors_url":"https://api.github.com/repos/democracyworks/notification-works/contributors","subscribers_url":"https://api.github.com/repos/democracyworks/notification-works/subscribers","subscription_url":"https://api.github.com/repos/democracyworks/notification-works/subscription","commits_url":"https://api.github.com/repos/democracyworks/notification-works/commits{/sha}","git_commits_url":"https://api.github.com/repos/democracyworks/notification-works/git/commits{/sha}","comments_url":"https://api.github.com/repos/democracyworks/notification-works/comments{/number}","issue_comment_url":"https://api.github.com/repos/democracyworks/notification-works/issues/comments{/number}","contents_url":"https://api.github.com/repos/democracyworks/notification-works/contents/{+path}","compare_url":"https://api.github.com/repos/democracyworks/notification-works/compare/{base}...{head}","merges_url":"https://api.github.com/repos/democracyworks/notification-works/merges","archive_url":"https://api.github.com/repos/democracyworks/notification-works/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/democracyworks/notification-works/downloads","issues_url":"https://api.github.com/repos/democracyworks/notification-works/issues{/number}","pulls_url":"https://api.github.com/repos/democracyworks/notification-works/pulls{/number}","milestones_url":"https://api.github.com/repos/democracyworks/notification-works/milestones{/number}","notifications_url":"https://api.github.com/repos/democracyworks/notification-works/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/democracyworks/notification-works/labels{/name}","releases_url":"https://api.github.com/repos/democracyworks/notification-works/releases{/id}","created_at":"2015-03-05T22:04:50Z","updated_at":"2015-03-05T22:05:55Z","pushed_at":"2015-03-13T16:50:42Z","git_url":"git://github.com/democracyworks/notification-works.git","ssh_url":"git@github.com:democracyworks/notification-works.git","clone_url":"https://github.com/democracyworks/notification-works.git","svn_url":"https://github.com/democracyworks/notification-works","homepage":"","size":172,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"democracyworks:master","ref":"master","sha":"d18a0b0b7015fedcc9c4f6fb94f1b29b5b50aa98","user":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"repo":{"id":31739087,"name":"notification-works","full_name":"democracyworks/notification-works","owner":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/democracyworks/notification-works","description":"","fork":false,"url":"https://api.github.com/repos/democracyworks/notification-works","forks_url":"https://api.github.com/repos/democracyworks/notification-works/forks","keys_url":"https://api.github.com/repos/democracyworks/notification-works/keys{/key_id}","collaborators_url":"https://api.github.com/repos/democracyworks/notification-works/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/democracyworks/notification-works/teams","hooks_url":"https://api.github.com/repos/democracyworks/notification-works/hooks","issue_events_url":"https://api.github.com/repos/democracyworks/notification-works/issues/events{/number}","events_url":"https://api.github.com/repos/democracyworks/notification-works/events","assignees_url":"https://api.github.com/repos/democracyworks/notification-works/assignees{/user}","branches_url":"https://api.github.com/repos/democracyworks/notification-works/branches{/branch}","tags_url":"https://api.github.com/repos/democracyworks/notification-works/tags","blobs_url":"https://api.github.com/repos/democracyworks/notification-works/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/democracyworks/notification-works/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/democracyworks/notification-works/git/refs{/sha}","trees_url":"https://api.github.com/repos/democracyworks/notification-works/git/trees{/sha}","statuses_url":"https://api.github.com/repos/democracyworks/notification-works/statuses/{sha}","languages_url":"https://api.github.com/repos/democracyworks/notification-works/languages","stargazers_url":"https://api.github.com/repos/democracyworks/notification-works/stargazers","contributors_url":"https://api.github.com/repos/democracyworks/notification-works/contributors","subscribers_url":"https://api.github.com/repos/democracyworks/notification-works/subscribers","subscription_url":"https://api.github.com/repos/democracyworks/notification-works/subscription","commits_url":"https://api.github.com/repos/democracyworks/notification-works/commits{/sha}","git_commits_url":"https://api.github.com/repos/democracyworks/notification-works/git/commits{/sha}","comments_url":"https://api.github.com/repos/democracyworks/notification-works/comments{/number}","issue_comment_url":"https://api.github.com/repos/democracyworks/notification-works/issues/comments{/number}","contents_url":"https://api.github.com/repos/democracyworks/notification-works/contents/{+path}","compare_url":"https://api.github.com/repos/democracyworks/notification-works/compare/{base}...{head}","merges_url":"https://api.github.com/repos/democracyworks/notification-works/merges","archive_url":"https://api.github.com/repos/democracyworks/notification-works/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/democracyworks/notification-works/downloads","issues_url":"https://api.github.com/repos/democracyworks/notification-works/issues{/number}","pulls_url":"https://api.github.com/repos/democracyworks/notification-works/pulls{/number}","milestones_url":"https://api.github.com/repos/democracyworks/notification-works/milestones{/number}","notifications_url":"https://api.github.com/repos/democracyworks/notification-works/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/democracyworks/notification-works/labels{/name}","releases_url":"https://api.github.com/repos/democracyworks/notification-works/releases{/id}","created_at":"2015-03-05T22:04:50Z","updated_at":"2015-03-05T22:05:55Z","pushed_at":"2015-03-13T16:50:42Z","git_url":"git://github.com/democracyworks/notification-works.git","ssh_url":"git@github.com:democracyworks/notification-works.git","clone_url":"https://github.com/democracyworks/notification-works.git","svn_url":"https://github.com/democracyworks/notification-works","homepage":"","size":172,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/democracyworks/notification-works/pulls/1"},"html":{"href":"https://github.com/democracyworks/notification-works/pull/1"},"issue":{"href":"https://api.github.com/repos/democracyworks/notification-works/issues/1"},"comments":{"href":"https://api.github.com/repos/democracyworks/notification-works/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/democracyworks/notification-works/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/democracyworks/notification-works/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/democracyworks/notification-works/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/democracyworks/notification-works/statuses/5ad3cf02660b314442c2c7033342d42e749d637a"}}}}