{"action":"created","comment":{"url":"https://api.github.com/repos/twingly/twingly-amqp/pulls/comments/87591084","pull_request_review_id":8199451,"id":87591084,"diff_hunk":"@@ -0,0 +1,43 @@\n+require \"twingly/amqp/connection\"\n+require \"json\"\n+require \"ostruct\"\n+\n+module Twingly\n+  module AMQP\n+    class QueuePublisher\n+      def initialize(queue_name:, connection: nil)\n+        publish_options do |options|\n+          options.routing_key = queue_name\n+        end\n+\n+        connection ||= Connection.instance\n+        @exchange = connection.create_channel.default_exchange\n+      end\n+\n+      def publish(hash_payload)\n+        raise ArgumentError unless hash_payload.is_a?(Hash)","path":"lib/twingly/amqp/queue_publisher.rb","position":null,"original_position":18,"commit_id":"a02788638fd6b92b2f0d4a34b7146d01302f0cc2","original_commit_id":"63769b3529d2d67c642c5a43a041c8624c9d67ca","user":{"login":"roback","id":2803721,"avatar_url":"https://avatars.githubusercontent.com/u/2803721?v=3","gravatar_id":"","url":"https://api.github.com/users/roback","html_url":"https://github.com/roback","followers_url":"https://api.github.com/users/roback/followers","following_url":"https://api.github.com/users/roback/following{/other_user}","gists_url":"https://api.github.com/users/roback/gists{/gist_id}","starred_url":"https://api.github.com/users/roback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roback/subscriptions","organizations_url":"https://api.github.com/users/roback/orgs","repos_url":"https://api.github.com/users/roback/repos","events_url":"https://api.github.com/users/roback/events{/privacy}","received_events_url":"https://api.github.com/users/roback/received_events","type":"User","site_admin":false},"body":"> For Wally the intended use is when we pass data to the our internal workers, which I think this will work for?\r\n\r\nYes, I think so too :)","created_at":"2016-11-11T13:57:10Z","updated_at":"2016-11-11T13:57:10Z","html_url":"https://github.com/twingly/twingly-amqp/pull/47#discussion_r87591084","pull_request_url":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/twingly/twingly-amqp/pulls/comments/87591084"},"html":{"href":"https://github.com/twingly/twingly-amqp/pull/47#discussion_r87591084"},"pull_request":{"href":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47","id":93313948,"html_url":"https://github.com/twingly/twingly-amqp/pull/47","diff_url":"https://github.com/twingly/twingly-amqp/pull/47.diff","patch_url":"https://github.com/twingly/twingly-amqp/pull/47.patch","issue_url":"https://api.github.com/repos/twingly/twingly-amqp/issues/47","number":47,"state":"open","locked":false,"title":"Introduce class for publishing to Queues","user":{"login":"walro","id":2550510,"avatar_url":"https://avatars.githubusercontent.com/u/2550510?v=3","gravatar_id":"","url":"https://api.github.com/users/walro","html_url":"https://github.com/walro","followers_url":"https://api.github.com/users/walro/followers","following_url":"https://api.github.com/users/walro/following{/other_user}","gists_url":"https://api.github.com/users/walro/gists{/gist_id}","starred_url":"https://api.github.com/users/walro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walro/subscriptions","organizations_url":"https://api.github.com/users/walro/orgs","repos_url":"https://api.github.com/users/walro/repos","events_url":"https://api.github.com/users/walro/events{/privacy}","received_events_url":"https://api.github.com/users/walro/received_events","type":"User","site_admin":false},"body":"Publishes to specific queue bound to the default exchange. Also let Pinger use this new class.\r\n\r\nRelated to #12.","created_at":"2016-11-11T10:57:10Z","updated_at":"2016-11-11T13:57:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"150f6a0ac61093997f42bdb93ea24869c59ce3f4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47/commits","review_comments_url":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47/comments","review_comment_url":"https://api.github.com/repos/twingly/twingly-amqp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twingly/twingly-amqp/issues/47/comments","statuses_url":"https://api.github.com/repos/twingly/twingly-amqp/statuses/a02788638fd6b92b2f0d4a34b7146d01302f0cc2","head":{"label":"twingly:issue/12/class-for-publishing","ref":"issue/12/class-for-publishing","sha":"a02788638fd6b92b2f0d4a34b7146d01302f0cc2","user":{"login":"twingly","id":280263,"avatar_url":"https://avatars.githubusercontent.com/u/280263?v=3","gravatar_id":"","url":"https://api.github.com/users/twingly","html_url":"https://github.com/twingly","followers_url":"https://api.github.com/users/twingly/followers","following_url":"https://api.github.com/users/twingly/following{/other_user}","gists_url":"https://api.github.com/users/twingly/gists{/gist_id}","starred_url":"https://api.github.com/users/twingly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twingly/subscriptions","organizations_url":"https://api.github.com/users/twingly/orgs","repos_url":"https://api.github.com/users/twingly/repos","events_url":"https://api.github.com/users/twingly/events{/privacy}","received_events_url":"https://api.github.com/users/twingly/received_events","type":"Organization","site_admin":false},"repo":{"id":43805440,"name":"twingly-amqp","full_name":"twingly/twingly-amqp","owner":{"login":"twingly","id":280263,"avatar_url":"https://avatars.githubusercontent.com/u/280263?v=3","gravatar_id":"","url":"https://api.github.com/users/twingly","html_url":"https://github.com/twingly","followers_url":"https://api.github.com/users/twingly/followers","following_url":"https://api.github.com/users/twingly/following{/other_user}","gists_url":"https://api.github.com/users/twingly/gists{/gist_id}","starred_url":"https://api.github.com/users/twingly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twingly/subscriptions","organizations_url":"https://api.github.com/users/twingly/orgs","repos_url":"https://api.github.com/users/twingly/repos","events_url":"https://api.github.com/users/twingly/events{/privacy}","received_events_url":"https://api.github.com/users/twingly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twingly/twingly-amqp","description":":bus: Ruby gem for RabbitMQ subscribing and publishing","fork":false,"url":"https://api.github.com/repos/twingly/twingly-amqp","forks_url":"https://api.github.com/repos/twingly/twingly-amqp/forks","keys_url":"https://api.github.com/repos/twingly/twingly-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twingly/twingly-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twingly/twingly-amqp/teams","hooks_url":"https://api.github.com/repos/twingly/twingly-amqp/hooks","issue_events_url":"https://api.github.com/repos/twingly/twingly-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/twingly/twingly-amqp/events","assignees_url":"https://api.github.com/repos/twingly/twingly-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/twingly/twingly-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/twingly/twingly-amqp/tags","blobs_url":"https://api.github.com/repos/twingly/twingly-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twingly/twingly-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twingly/twingly-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/twingly/twingly-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twingly/twingly-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/twingly/twingly-amqp/languages","stargazers_url":"https://api.github.com/repos/twingly/twingly-amqp/stargazers","contributors_url":"https://api.github.com/repos/twingly/twingly-amqp/contributors","subscribers_url":"https://api.github.com/repos/twingly/twingly-amqp/subscribers","subscription_url":"https://api.github.com/repos/twingly/twingly-amqp/subscription","commits_url":"https://api.github.com/repos/twingly/twingly-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/twingly/twingly-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/twingly/twingly-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/twingly/twingly-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/twingly/twingly-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/twingly/twingly-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twingly/twingly-amqp/merges","archive_url":"https://api.github.com/repos/twingly/twingly-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twingly/twingly-amqp/downloads","issues_url":"https://api.github.com/repos/twingly/twingly-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/twingly/twingly-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/twingly/twingly-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/twingly/twingly-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twingly/twingly-amqp/labels{/name}","releases_url":"https://api.github.com/repos/twingly/twingly-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/twingly/twingly-amqp/deployments","created_at":"2015-10-07T09:11:33Z","updated_at":"2016-05-20T15:30:47Z","pushed_at":"2016-11-11T13:49:44Z","git_url":"git://github.com/twingly/twingly-amqp.git","ssh_url":"git@github.com:twingly/twingly-amqp.git","clone_url":"https://github.com/twingly/twingly-amqp.git","svn_url":"https://github.com/twingly/twingly-amqp","homepage":"","size":75,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"base":{"label":"twingly:master","ref":"master","sha":"5f3cd4c267ae37fb9c03d7f0f72f684fb49c29a4","user":{"login":"twingly","id":280263,"avatar_url":"https://avatars.githubusercontent.com/u/280263?v=3","gravatar_id":"","url":"https://api.github.com/users/twingly","html_url":"https://github.com/twingly","followers_url":"https://api.github.com/users/twingly/followers","following_url":"https://api.github.com/users/twingly/following{/other_user}","gists_url":"https://api.github.com/users/twingly/gists{/gist_id}","starred_url":"https://api.github.com/users/twingly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twingly/subscriptions","organizations_url":"https://api.github.com/users/twingly/orgs","repos_url":"https://api.github.com/users/twingly/repos","events_url":"https://api.github.com/users/twingly/events{/privacy}","received_events_url":"https://api.github.com/users/twingly/received_events","type":"Organization","site_admin":false},"repo":{"id":43805440,"name":"twingly-amqp","full_name":"twingly/twingly-amqp","owner":{"login":"twingly","id":280263,"avatar_url":"https://avatars.githubusercontent.com/u/280263?v=3","gravatar_id":"","url":"https://api.github.com/users/twingly","html_url":"https://github.com/twingly","followers_url":"https://api.github.com/users/twingly/followers","following_url":"https://api.github.com/users/twingly/following{/other_user}","gists_url":"https://api.github.com/users/twingly/gists{/gist_id}","starred_url":"https://api.github.com/users/twingly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twingly/subscriptions","organizations_url":"https://api.github.com/users/twingly/orgs","repos_url":"https://api.github.com/users/twingly/repos","events_url":"https://api.github.com/users/twingly/events{/privacy}","received_events_url":"https://api.github.com/users/twingly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twingly/twingly-amqp","description":":bus: Ruby gem for RabbitMQ subscribing and publishing","fork":false,"url":"https://api.github.com/repos/twingly/twingly-amqp","forks_url":"https://api.github.com/repos/twingly/twingly-amqp/forks","keys_url":"https://api.github.com/repos/twingly/twingly-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twingly/twingly-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twingly/twingly-amqp/teams","hooks_url":"https://api.github.com/repos/twingly/twingly-amqp/hooks","issue_events_url":"https://api.github.com/repos/twingly/twingly-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/twingly/twingly-amqp/events","assignees_url":"https://api.github.com/repos/twingly/twingly-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/twingly/twingly-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/twingly/twingly-amqp/tags","blobs_url":"https://api.github.com/repos/twingly/twingly-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twingly/twingly-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twingly/twingly-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/twingly/twingly-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twingly/twingly-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/twingly/twingly-amqp/languages","stargazers_url":"https://api.github.com/repos/twingly/twingly-amqp/stargazers","contributors_url":"https://api.github.com/repos/twingly/twingly-amqp/contributors","subscribers_url":"https://api.github.com/repos/twingly/twingly-amqp/subscribers","subscription_url":"https://api.github.com/repos/twingly/twingly-amqp/subscription","commits_url":"https://api.github.com/repos/twingly/twingly-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/twingly/twingly-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/twingly/twingly-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/twingly/twingly-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/twingly/twingly-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/twingly/twingly-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twingly/twingly-amqp/merges","archive_url":"https://api.github.com/repos/twingly/twingly-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twingly/twingly-amqp/downloads","issues_url":"https://api.github.com/repos/twingly/twingly-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/twingly/twingly-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/twingly/twingly-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/twingly/twingly-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twingly/twingly-amqp/labels{/name}","releases_url":"https://api.github.com/repos/twingly/twingly-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/twingly/twingly-amqp/deployments","created_at":"2015-10-07T09:11:33Z","updated_at":"2016-05-20T15:30:47Z","pushed_at":"2016-11-11T13:49:44Z","git_url":"git://github.com/twingly/twingly-amqp.git","ssh_url":"git@github.com:twingly/twingly-amqp.git","clone_url":"https://github.com/twingly/twingly-amqp.git","svn_url":"https://github.com/twingly/twingly-amqp","homepage":"","size":75,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47"},"html":{"href":"https://github.com/twingly/twingly-amqp/pull/47"},"issue":{"href":"https://api.github.com/repos/twingly/twingly-amqp/issues/47"},"comments":{"href":"https://api.github.com/repos/twingly/twingly-amqp/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/twingly/twingly-amqp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twingly/twingly-amqp/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/twingly/twingly-amqp/statuses/a02788638fd6b92b2f0d4a34b7146d01302f0cc2"}}}}
{"actor":{"display_login":"roback"}}