{"action":"created","comment":{"url":"https://api.github.com/repos/samvera-labs/active_encode/pulls/comments/214027249","pull_request_review_id":150990005,"id":214027249,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDAyNzI0OQ==","diff_hunk":"@@ -0,0 +1,86 @@\n+require 'rails_helper'\n+\n+describe ActiveEncode::PollingJob do\n+  include ActiveJob::TestHelper\n+\n+  before do\n+    class PollingEncode < ActiveEncode::Base\n+      include ActiveEncode::Polling\n+      after_status_update ->(encode) { encode.history << \"PollingEncode ran after_status_update\" }\n+      after_error ->(encode) { encode.history << \"PollingEncode ran after_error\" }\n+      after_cancelled ->(encode) { encode.history << \"PollingEncode ran after_cancelled\" }\n+      after_complete ->(encode) { encode.history << \"PollingEncode ran after_complete\" }\n+\n+      def history\n+        @history ||= []\n+      end\n+    end\n+  end\n+\n+  after do\n+    Object.send(:remove_const, :PollingEncode)\n+  end\n+\n+  describe '#perform' do\n+    let(:encode) { PollingEncode.create(\"sample.mp4\").tap { |encode| encode.state = state } }\n+    let(:poll) { ActiveEncode::PollingJob.new }\n+    subject { encode.history }\n+","path":"spec/units/polling_job_spec.rb","position":28,"original_position":28,"commit_id":"6f549608c9210afb773256bb77628d2c309ec411","original_commit_id":"6f549608c9210afb773256bb77628d2c309ec411","user":{"login":"yingfeng-iu","id":21180528,"node_id":"MDQ6VXNlcjIxMTgwNTI4","avatar_url":"https://avatars0.githubusercontent.com/u/21180528?v=4","gravatar_id":"","url":"https://api.github.com/users/yingfeng-iu","html_url":"https://github.com/yingfeng-iu","followers_url":"https://api.github.com/users/yingfeng-iu/followers","following_url":"https://api.github.com/users/yingfeng-iu/following{/other_user}","gists_url":"https://api.github.com/users/yingfeng-iu/gists{/gist_id}","starred_url":"https://api.github.com/users/yingfeng-iu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yingfeng-iu/subscriptions","organizations_url":"https://api.github.com/users/yingfeng-iu/orgs","repos_url":"https://api.github.com/users/yingfeng-iu/repos","events_url":"https://api.github.com/users/yingfeng-iu/events{/privacy}","received_events_url":"https://api.github.com/users/yingfeng-iu/received_events","type":"User","site_admin":false},"body":"so tap allows one to set instance variables with let, good to know.","created_at":"2018-08-30T13:21:10Z","updated_at":"2018-08-30T13:21:10Z","html_url":"https://github.com/samvera-labs/active_encode/pull/29#discussion_r214027249","pull_request_url":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/samvera-labs/active_encode/pulls/comments/214027249"},"html":{"href":"https://github.com/samvera-labs/active_encode/pull/29#discussion_r214027249"},"pull_request":{"href":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29","id":211932935,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExOTMyOTM1","html_url":"https://github.com/samvera-labs/active_encode/pull/29","diff_url":"https://github.com/samvera-labs/active_encode/pull/29.diff","patch_url":"https://github.com/samvera-labs/active_encode/pull/29.patch","issue_url":"https://api.github.com/repos/samvera-labs/active_encode/issues/29","number":29,"state":"open","locked":false,"title":"[WIP] Polling mixin","user":{"login":"cjcolvar","id":1053603,"node_id":"MDQ6VXNlcjEwNTM2MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1053603?v=4","gravatar_id":"","url":"https://api.github.com/users/cjcolvar","html_url":"https://github.com/cjcolvar","followers_url":"https://api.github.com/users/cjcolvar/followers","following_url":"https://api.github.com/users/cjcolvar/following{/other_user}","gists_url":"https://api.github.com/users/cjcolvar/gists{/gist_id}","starred_url":"https://api.github.com/users/cjcolvar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjcolvar/subscriptions","organizations_url":"https://api.github.com/users/cjcolvar/orgs","repos_url":"https://api.github.com/users/cjcolvar/repos","events_url":"https://api.github.com/users/cjcolvar/events{/privacy}","received_events_url":"https://api.github.com/users/cjcolvar/received_events","type":"User","site_admin":false},"body":"Fixes #14.","created_at":"2018-08-30T01:47:33Z","updated_at":"2018-08-30T13:21:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5896290c90e12cbeea808f32a106b17f5d06568","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":491803044,"node_id":"MDU6TGFiZWw0OTE4MDMwNDQ=","url":"https://api.github.com/repos/samvera-labs/active_encode/labels/in%20review","name":"in review","color":"b60205","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29/commits","review_comments_url":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29/comments","review_comment_url":"https://api.github.com/repos/samvera-labs/active_encode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samvera-labs/active_encode/issues/29/comments","statuses_url":"https://api.github.com/repos/samvera-labs/active_encode/statuses/6f549608c9210afb773256bb77628d2c309ec411","head":{"label":"samvera-labs:issue#14","ref":"issue#14","sha":"6f549608c9210afb773256bb77628d2c309ec411","user":{"login":"samvera-labs","id":7377013,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNzcwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7377013?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera-labs","html_url":"https://github.com/samvera-labs","followers_url":"https://api.github.com/users/samvera-labs/followers","following_url":"https://api.github.com/users/samvera-labs/following{/other_user}","gists_url":"https://api.github.com/users/samvera-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera-labs/subscriptions","organizations_url":"https://api.github.com/users/samvera-labs/orgs","repos_url":"https://api.github.com/users/samvera-labs/repos","events_url":"https://api.github.com/users/samvera-labs/events{/privacy}","received_events_url":"https://api.github.com/users/samvera-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":33488195,"node_id":"MDEwOlJlcG9zaXRvcnkzMzQ4ODE5NQ==","name":"active_encode","full_name":"samvera-labs/active_encode","owner":{"login":"samvera-labs","id":7377013,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNzcwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7377013?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera-labs","html_url":"https://github.com/samvera-labs","followers_url":"https://api.github.com/users/samvera-labs/followers","following_url":"https://api.github.com/users/samvera-labs/following{/other_user}","gists_url":"https://api.github.com/users/samvera-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera-labs/subscriptions","organizations_url":"https://api.github.com/users/samvera-labs/orgs","repos_url":"https://api.github.com/users/samvera-labs/repos","events_url":"https://api.github.com/users/samvera-labs/events{/privacy}","received_events_url":"https://api.github.com/users/samvera-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/samvera-labs/active_encode","description":"Declare encode job classes that can be run by a variety of encoding services","fork":false,"url":"https://api.github.com/repos/samvera-labs/active_encode","forks_url":"https://api.github.com/repos/samvera-labs/active_encode/forks","keys_url":"https://api.github.com/repos/samvera-labs/active_encode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samvera-labs/active_encode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samvera-labs/active_encode/teams","hooks_url":"https://api.github.com/repos/samvera-labs/active_encode/hooks","issue_events_url":"https://api.github.com/repos/samvera-labs/active_encode/issues/events{/number}","events_url":"https://api.github.com/repos/samvera-labs/active_encode/events","assignees_url":"https://api.github.com/repos/samvera-labs/active_encode/assignees{/user}","branches_url":"https://api.github.com/repos/samvera-labs/active_encode/branches{/branch}","tags_url":"https://api.github.com/repos/samvera-labs/active_encode/tags","blobs_url":"https://api.github.com/repos/samvera-labs/active_encode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samvera-labs/active_encode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samvera-labs/active_encode/git/refs{/sha}","trees_url":"https://api.github.com/repos/samvera-labs/active_encode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samvera-labs/active_encode/statuses/{sha}","languages_url":"https://api.github.com/repos/samvera-labs/active_encode/languages","stargazers_url":"https://api.github.com/repos/samvera-labs/active_encode/stargazers","contributors_url":"https://api.github.com/repos/samvera-labs/active_encode/contributors","subscribers_url":"https://api.github.com/repos/samvera-labs/active_encode/subscribers","subscription_url":"https://api.github.com/repos/samvera-labs/active_encode/subscription","commits_url":"https://api.github.com/repos/samvera-labs/active_encode/commits{/sha}","git_commits_url":"https://api.github.com/repos/samvera-labs/active_encode/git/commits{/sha}","comments_url":"https://api.github.com/repos/samvera-labs/active_encode/comments{/number}","issue_comment_url":"https://api.github.com/repos/samvera-labs/active_encode/issues/comments{/number}","contents_url":"https://api.github.com/repos/samvera-labs/active_encode/contents/{+path}","compare_url":"https://api.github.com/repos/samvera-labs/active_encode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samvera-labs/active_encode/merges","archive_url":"https://api.github.com/repos/samvera-labs/active_encode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samvera-labs/active_encode/downloads","issues_url":"https://api.github.com/repos/samvera-labs/active_encode/issues{/number}","pulls_url":"https://api.github.com/repos/samvera-labs/active_encode/pulls{/number}","milestones_url":"https://api.github.com/repos/samvera-labs/active_encode/milestones{/number}","notifications_url":"https://api.github.com/repos/samvera-labs/active_encode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samvera-labs/active_encode/labels{/name}","releases_url":"https://api.github.com/repos/samvera-labs/active_encode/releases{/id}","deployments_url":"https://api.github.com/repos/samvera-labs/active_encode/deployments","created_at":"2015-04-06T15:09:17Z","updated_at":"2018-08-29T18:55:43Z","pushed_at":"2018-08-30T01:47:33Z","git_url":"git://github.com/samvera-labs/active_encode.git","ssh_url":"git@github.com:samvera-labs/active_encode.git","clone_url":"https://github.com/samvera-labs/active_encode.git","svn_url":"https://github.com/samvera-labs/active_encode","homepage":"","size":170,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"samvera-labs:master","ref":"master","sha":"28f240bfa8d806554cd33b28774b90b45010faca","user":{"login":"samvera-labs","id":7377013,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNzcwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7377013?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera-labs","html_url":"https://github.com/samvera-labs","followers_url":"https://api.github.com/users/samvera-labs/followers","following_url":"https://api.github.com/users/samvera-labs/following{/other_user}","gists_url":"https://api.github.com/users/samvera-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera-labs/subscriptions","organizations_url":"https://api.github.com/users/samvera-labs/orgs","repos_url":"https://api.github.com/users/samvera-labs/repos","events_url":"https://api.github.com/users/samvera-labs/events{/privacy}","received_events_url":"https://api.github.com/users/samvera-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":33488195,"node_id":"MDEwOlJlcG9zaXRvcnkzMzQ4ODE5NQ==","name":"active_encode","full_name":"samvera-labs/active_encode","owner":{"login":"samvera-labs","id":7377013,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNzcwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7377013?v=4","gravatar_id":"","url":"https://api.github.com/users/samvera-labs","html_url":"https://github.com/samvera-labs","followers_url":"https://api.github.com/users/samvera-labs/followers","following_url":"https://api.github.com/users/samvera-labs/following{/other_user}","gists_url":"https://api.github.com/users/samvera-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/samvera-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvera-labs/subscriptions","organizations_url":"https://api.github.com/users/samvera-labs/orgs","repos_url":"https://api.github.com/users/samvera-labs/repos","events_url":"https://api.github.com/users/samvera-labs/events{/privacy}","received_events_url":"https://api.github.com/users/samvera-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/samvera-labs/active_encode","description":"Declare encode job classes that can be run by a variety of encoding services","fork":false,"url":"https://api.github.com/repos/samvera-labs/active_encode","forks_url":"https://api.github.com/repos/samvera-labs/active_encode/forks","keys_url":"https://api.github.com/repos/samvera-labs/active_encode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samvera-labs/active_encode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samvera-labs/active_encode/teams","hooks_url":"https://api.github.com/repos/samvera-labs/active_encode/hooks","issue_events_url":"https://api.github.com/repos/samvera-labs/active_encode/issues/events{/number}","events_url":"https://api.github.com/repos/samvera-labs/active_encode/events","assignees_url":"https://api.github.com/repos/samvera-labs/active_encode/assignees{/user}","branches_url":"https://api.github.com/repos/samvera-labs/active_encode/branches{/branch}","tags_url":"https://api.github.com/repos/samvera-labs/active_encode/tags","blobs_url":"https://api.github.com/repos/samvera-labs/active_encode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samvera-labs/active_encode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samvera-labs/active_encode/git/refs{/sha}","trees_url":"https://api.github.com/repos/samvera-labs/active_encode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samvera-labs/active_encode/statuses/{sha}","languages_url":"https://api.github.com/repos/samvera-labs/active_encode/languages","stargazers_url":"https://api.github.com/repos/samvera-labs/active_encode/stargazers","contributors_url":"https://api.github.com/repos/samvera-labs/active_encode/contributors","subscribers_url":"https://api.github.com/repos/samvera-labs/active_encode/subscribers","subscription_url":"https://api.github.com/repos/samvera-labs/active_encode/subscription","commits_url":"https://api.github.com/repos/samvera-labs/active_encode/commits{/sha}","git_commits_url":"https://api.github.com/repos/samvera-labs/active_encode/git/commits{/sha}","comments_url":"https://api.github.com/repos/samvera-labs/active_encode/comments{/number}","issue_comment_url":"https://api.github.com/repos/samvera-labs/active_encode/issues/comments{/number}","contents_url":"https://api.github.com/repos/samvera-labs/active_encode/contents/{+path}","compare_url":"https://api.github.com/repos/samvera-labs/active_encode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samvera-labs/active_encode/merges","archive_url":"https://api.github.com/repos/samvera-labs/active_encode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samvera-labs/active_encode/downloads","issues_url":"https://api.github.com/repos/samvera-labs/active_encode/issues{/number}","pulls_url":"https://api.github.com/repos/samvera-labs/active_encode/pulls{/number}","milestones_url":"https://api.github.com/repos/samvera-labs/active_encode/milestones{/number}","notifications_url":"https://api.github.com/repos/samvera-labs/active_encode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samvera-labs/active_encode/labels{/name}","releases_url":"https://api.github.com/repos/samvera-labs/active_encode/releases{/id}","deployments_url":"https://api.github.com/repos/samvera-labs/active_encode/deployments","created_at":"2015-04-06T15:09:17Z","updated_at":"2018-08-29T18:55:43Z","pushed_at":"2018-08-30T01:47:33Z","git_url":"git://github.com/samvera-labs/active_encode.git","ssh_url":"git@github.com:samvera-labs/active_encode.git","clone_url":"https://github.com/samvera-labs/active_encode.git","svn_url":"https://github.com/samvera-labs/active_encode","homepage":"","size":170,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29"},"html":{"href":"https://github.com/samvera-labs/active_encode/pull/29"},"issue":{"href":"https://api.github.com/repos/samvera-labs/active_encode/issues/29"},"comments":{"href":"https://api.github.com/repos/samvera-labs/active_encode/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/samvera-labs/active_encode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samvera-labs/active_encode/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/samvera-labs/active_encode/statuses/6f549608c9210afb773256bb77628d2c309ec411"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"yingfeng-iu"}}