{"action":"created","comment":{"url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/comments/68945902","id":68945902,"diff_hunk":"@@ -0,0 +1,122 @@\n+require \"spec_helper\"\n+\n+RSpec.describe Alephant::Publisher::Queue::RevalidateProcessor do\n+  class TestUrlGenerator\n+    def self.generate(_opts = {})\n+      \"http://example.com\"\n+    end\n+  end\n+\n+  subject { described_class.new(opts, url_generator) }\n+\n+  let(:url_generator) { TestUrlGenerator }\n+\n+  let(:opts) do\n+    instance_double(Alephant::Publisher::Queue::Options,\n+      :writer => { :sequence_id_path => \"$.sequence_id\" },\n+      :cache  => { :elasticache_config_endpoint => \"wibble\" })\n+  end\n+\n+  let(:writer_double) do\n+    instance_double(Alephant::Publisher::Queue::RevalidateWriter, :run! => nil)\n+  end\n+\n+  let(:cache_double) do\n+    instance_double(Dalli::Client, :delete => nil)\n+  end\n+\n+  let(:elasticache_double) do\n+    instance_double(Dalli::ElastiCache, :client => cache_double)\n+  end\n+\n+  let(:message) do\n+    instance_double(AWS::SQS::ReceivedMessage,\n+      :body   => JSON.generate(:id => \"\", :batch_id => \"\", :options => {}),\n+      :delete => nil)\n+  end\n+\n+  before do\n+    allow(Alephant::Publisher::Queue::RevalidateWriter)","path":"spec/alephant/publisher/queue/revalidate_processor_spec.rb","position":39,"original_position":39,"commit_id":"7b1ce3a1793db7ca237ee7d5ae3aa05f24c244fd","original_commit_id":"7b1ce3a1793db7ca237ee7d5ae3aa05f24c244fd","user":{"login":"samfrench","id":743433,"avatar_url":"https://avatars.githubusercontent.com/u/743433?v=3","gravatar_id":"","url":"https://api.github.com/users/samfrench","html_url":"https://github.com/samfrench","followers_url":"https://api.github.com/users/samfrench/followers","following_url":"https://api.github.com/users/samfrench/following{/other_user}","gists_url":"https://api.github.com/users/samfrench/gists{/gist_id}","starred_url":"https://api.github.com/users/samfrench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samfrench/subscriptions","organizations_url":"https://api.github.com/users/samfrench/orgs","repos_url":"https://api.github.com/users/samfrench/repos","events_url":"https://api.github.com/users/samfrench/events{/privacy}","received_events_url":"https://api.github.com/users/samfrench/received_events","type":"User","site_admin":false},"body":"Will these actually be called? I thought it was better to use expect, so we can assert this was happening.","created_at":"2016-06-29T13:33:05Z","updated_at":"2016-06-29T13:33:05Z","html_url":"https://github.com/BBC-News/alephant-publisher-queue/pull/25#discussion_r68945902","pull_request_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/comments/68945902"},"html":{"href":"https://github.com/BBC-News/alephant-publisher-queue/pull/25#discussion_r68945902"},"pull_request":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25","id":72854359,"html_url":"https://github.com/BBC-News/alephant-publisher-queue/pull/25","diff_url":"https://github.com/BBC-News/alephant-publisher-queue/pull/25.diff","patch_url":"https://github.com/BBC-News/alephant-publisher-queue/pull/25.patch","issue_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/25","number":25,"state":"open","locked":false,"title":"Revalidate Strategy Renderer","user":{"login":"dazoakley","id":49645,"avatar_url":"https://avatars.githubusercontent.com/u/49645?v=3","gravatar_id":"","url":"https://api.github.com/users/dazoakley","html_url":"https://github.com/dazoakley","followers_url":"https://api.github.com/users/dazoakley/followers","following_url":"https://api.github.com/users/dazoakley/following{/other_user}","gists_url":"https://api.github.com/users/dazoakley/gists{/gist_id}","starred_url":"https://api.github.com/users/dazoakley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dazoakley/subscriptions","organizations_url":"https://api.github.com/users/dazoakley/orgs","repos_url":"https://api.github.com/users/dazoakley/repos","events_url":"https://api.github.com/users/dazoakley/events{/privacy}","received_events_url":"https://api.github.com/users/dazoakley/received_events","type":"User","site_admin":false},"body":"Add the new \"Revalidate\" strategy renderer code - this allows Alephant to be used to host data/components that have a finite timespan (or TTL) generated by calls to a third-party API or service.\r\n\r\nIt follows the following process flow:\r\n\r\n![alephant revalidate broker](https://cloud.githubusercontent.com/assets/49645/15856003/f3203ef8-2caa-11e6-8841-b88de86269e6.png)\r\n\r\nThis allows the renderer to make a (configurable) API call to get the data needed to populate its templates.","created_at":"2016-06-07T10:55:29Z","updated_at":"2016-06-29T13:33:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"174b49d1d5e87c0f595a8c0870f04b84d12e486a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25/commits","review_comments_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25/comments","review_comment_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/25/comments","statuses_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/statuses/7b1ce3a1793db7ca237ee7d5ae3aa05f24c244fd","head":{"label":"BBC-News:revalidate-renderer","ref":"revalidate-renderer","sha":"7b1ce3a1793db7ca237ee7d5ae3aa05f24c244fd","user":{"login":"BBC-News","id":1401475,"avatar_url":"https://avatars.githubusercontent.com/u/1401475?v=3","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"repo":{"id":25030986,"name":"alephant-publisher-queue","full_name":"BBC-News/alephant-publisher-queue","owner":{"login":"BBC-News","id":1401475,"avatar_url":"https://avatars.githubusercontent.com/u/1401475?v=3","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BBC-News/alephant-publisher-queue","description":"Static publishing to S3 based on SQS messages","fork":false,"url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue","forks_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/forks","keys_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/teams","hooks_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/hooks","issue_events_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/events{/number}","events_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/events","assignees_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/assignees{/user}","branches_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/branches{/branch}","tags_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/tags","blobs_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/refs{/sha}","trees_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/statuses/{sha}","languages_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/languages","stargazers_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/stargazers","contributors_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/contributors","subscribers_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/subscribers","subscription_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/subscription","commits_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/commits{/sha}","git_commits_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/commits{/sha}","comments_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/comments{/number}","issue_comment_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/comments{/number}","contents_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/contents/{+path}","compare_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/merges","archive_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/downloads","issues_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues{/number}","pulls_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls{/number}","milestones_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/milestones{/number}","notifications_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/labels{/name}","releases_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/releases{/id}","deployments_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/deployments","created_at":"2014-10-10T10:28:46Z","updated_at":"2016-03-15T14:16:02Z","pushed_at":"2016-06-29T13:05:48Z","git_url":"git://github.com/BBC-News/alephant-publisher-queue.git","ssh_url":"git@github.com:BBC-News/alephant-publisher-queue.git","clone_url":"https://github.com/BBC-News/alephant-publisher-queue.git","svn_url":"https://github.com/BBC-News/alephant-publisher-queue","homepage":"","size":131,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"BBC-News:master","ref":"master","sha":"ff350ccc58f514fbd21da4d5aa80b3bcacf19ba8","user":{"login":"BBC-News","id":1401475,"avatar_url":"https://avatars.githubusercontent.com/u/1401475?v=3","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"repo":{"id":25030986,"name":"alephant-publisher-queue","full_name":"BBC-News/alephant-publisher-queue","owner":{"login":"BBC-News","id":1401475,"avatar_url":"https://avatars.githubusercontent.com/u/1401475?v=3","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BBC-News/alephant-publisher-queue","description":"Static publishing to S3 based on SQS messages","fork":false,"url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue","forks_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/forks","keys_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/teams","hooks_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/hooks","issue_events_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/events{/number}","events_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/events","assignees_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/assignees{/user}","branches_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/branches{/branch}","tags_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/tags","blobs_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/refs{/sha}","trees_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/statuses/{sha}","languages_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/languages","stargazers_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/stargazers","contributors_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/contributors","subscribers_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/subscribers","subscription_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/subscription","commits_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/commits{/sha}","git_commits_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/git/commits{/sha}","comments_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/comments{/number}","issue_comment_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/comments{/number}","contents_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/contents/{+path}","compare_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/merges","archive_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/downloads","issues_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues{/number}","pulls_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls{/number}","milestones_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/milestones{/number}","notifications_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/labels{/name}","releases_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/releases{/id}","deployments_url":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/deployments","created_at":"2014-10-10T10:28:46Z","updated_at":"2016-03-15T14:16:02Z","pushed_at":"2016-06-29T13:05:48Z","git_url":"git://github.com/BBC-News/alephant-publisher-queue.git","ssh_url":"git@github.com:BBC-News/alephant-publisher-queue.git","clone_url":"https://github.com/BBC-News/alephant-publisher-queue.git","svn_url":"https://github.com/BBC-News/alephant-publisher-queue","homepage":"","size":131,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25"},"html":{"href":"https://github.com/BBC-News/alephant-publisher-queue/pull/25"},"issue":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/25"},"comments":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/BBC-News/alephant-publisher-queue/statuses/7b1ce3a1793db7ca237ee7d5ae3aa05f24c244fd"}}}}
{"actor":{"display_login":"samfrench"}}