{"action":"created","comment":{"url":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments/223030234","pull_request_review_id":162065483,"id":223030234,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzAzMDIzNA==","diff_hunk":"@@ -0,0 +1,58 @@\n+require \"rails_helper\"\n+\n+describe OperationJob do\n+\n+  let(:operation) { create(:operation,\n+                           job_class: subject,\n+                           job_id: nil,\n+                           job_started_at: nil,\n+                           job_completed_at: nil) }\n+\n+\n+  describe \"#perform\" do\n+    subject do\n+      Class.new(described_class) do\n+        def perform(operation, *args)\n+        end\n+      end\n+    end\n+\n+    it \"marks operation as started\" do\n+      subject.perform_now(operation)\n+      expect(operation.reload.job_started_at).to_not be_nil\n+    end\n+\n+    it \"marks operation as completed\" do\n+      subject.perform_now(operation)\n+      expect(operation.reload.job_completed_at).to_not be_nil\n+    end\n+\n+    context \"raises error\" do\n+      subject do\n+        Class.new(described_class) do\n+          def perform(operation, *args)\n+            raise StandardError\n+          end\n+        end\n+      end\n+\n+      before { allow(ExceptionNotifier).to receive(:notify_exception).with(StandardError) }\n+\n+      it \"marks operation as started\" do\n+        subject.perform_now(operation)\n+        expect(operation.reload.job_started_at).to_not be_nil\n+      end\n+\n+      it \"marks operation as failed\" do\n+        subject.perform_now(operation)\n+        expect(operation.reload.job_failed_at).to_not be_nil","path":"spec/jobs/operation_job_spec.rb","position":48,"original_position":48,"commit_id":"47a0363f5ad5a11905d378f57b4b7d6adf8aab1e","original_commit_id":"47a0363f5ad5a11905d378f57b4b7d6adf8aab1e","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.","created_at":"2018-10-05T14:39:13Z","updated_at":"2018-10-05T14:39:15Z","html_url":"https://github.com/thecartercenter/elmo/pull/511#discussion_r223030234","pull_request_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/511","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments/223030234"},"html":{"href":"https://github.com/thecartercenter/elmo/pull/511#discussion_r223030234"},"pull_request":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/511"}}},"pull_request":{"url":"https://api.github.com/repos/thecartercenter/elmo/pulls/511","id":220724399,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNzI0Mzk5","html_url":"https://github.com/thecartercenter/elmo/pull/511","diff_url":"https://github.com/thecartercenter/elmo/pull/511.diff","patch_url":"https://github.com/thecartercenter/elmo/pull/511.patch","issue_url":"https://api.github.com/repos/thecartercenter/elmo/issues/511","number":511,"state":"open","locked":false,"title":"6676 csv export background job","user":{"login":"scttnlsn","id":578446,"node_id":"MDQ6VXNlcjU3ODQ0Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/578446?v=4","gravatar_id":"","url":"https://api.github.com/users/scttnlsn","html_url":"https://github.com/scttnlsn","followers_url":"https://api.github.com/users/scttnlsn/followers","following_url":"https://api.github.com/users/scttnlsn/following{/other_user}","gists_url":"https://api.github.com/users/scttnlsn/gists{/gist_id}","starred_url":"https://api.github.com/users/scttnlsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scttnlsn/subscriptions","organizations_url":"https://api.github.com/users/scttnlsn/orgs","repos_url":"https://api.github.com/users/scttnlsn/repos","events_url":"https://api.github.com/users/scttnlsn/events{/privacy}","received_events_url":"https://api.github.com/users/scttnlsn/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-05T14:38:58Z","updated_at":"2018-10-05T14:39:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"797edfa156a31bf36b175da148e3b2bcda373c87","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/511/commits","review_comments_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/511/comments","review_comment_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thecartercenter/elmo/issues/511/comments","statuses_url":"https://api.github.com/repos/thecartercenter/elmo/statuses/47a0363f5ad5a11905d378f57b4b7d6adf8aab1e","head":{"label":"thecartercenter:6676_csv_export_background_job","ref":"6676_csv_export_background_job","sha":"47a0363f5ad5a11905d378f57b4b7d6adf8aab1e","user":{"login":"thecartercenter","id":5075178,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzUxNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/5075178?v=4","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"repo":{"id":11615188,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxNTE4OA==","name":"elmo","full_name":"thecartercenter/elmo","private":false,"owner":{"login":"thecartercenter","id":5075178,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzUxNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/5075178?v=4","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/thecartercenter/elmo","description":" ELMO is a mobile data collection and analysis web application.","fork":false,"url":"https://api.github.com/repos/thecartercenter/elmo","forks_url":"https://api.github.com/repos/thecartercenter/elmo/forks","keys_url":"https://api.github.com/repos/thecartercenter/elmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thecartercenter/elmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thecartercenter/elmo/teams","hooks_url":"https://api.github.com/repos/thecartercenter/elmo/hooks","issue_events_url":"https://api.github.com/repos/thecartercenter/elmo/issues/events{/number}","events_url":"https://api.github.com/repos/thecartercenter/elmo/events","assignees_url":"https://api.github.com/repos/thecartercenter/elmo/assignees{/user}","branches_url":"https://api.github.com/repos/thecartercenter/elmo/branches{/branch}","tags_url":"https://api.github.com/repos/thecartercenter/elmo/tags","blobs_url":"https://api.github.com/repos/thecartercenter/elmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thecartercenter/elmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thecartercenter/elmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/thecartercenter/elmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thecartercenter/elmo/statuses/{sha}","languages_url":"https://api.github.com/repos/thecartercenter/elmo/languages","stargazers_url":"https://api.github.com/repos/thecartercenter/elmo/stargazers","contributors_url":"https://api.github.com/repos/thecartercenter/elmo/contributors","subscribers_url":"https://api.github.com/repos/thecartercenter/elmo/subscribers","subscription_url":"https://api.github.com/repos/thecartercenter/elmo/subscription","commits_url":"https://api.github.com/repos/thecartercenter/elmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/thecartercenter/elmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/thecartercenter/elmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/thecartercenter/elmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/thecartercenter/elmo/contents/{+path}","compare_url":"https://api.github.com/repos/thecartercenter/elmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thecartercenter/elmo/merges","archive_url":"https://api.github.com/repos/thecartercenter/elmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thecartercenter/elmo/downloads","issues_url":"https://api.github.com/repos/thecartercenter/elmo/issues{/number}","pulls_url":"https://api.github.com/repos/thecartercenter/elmo/pulls{/number}","milestones_url":"https://api.github.com/repos/thecartercenter/elmo/milestones{/number}","notifications_url":"https://api.github.com/repos/thecartercenter/elmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thecartercenter/elmo/labels{/name}","releases_url":"https://api.github.com/repos/thecartercenter/elmo/releases{/id}","deployments_url":"https://api.github.com/repos/thecartercenter/elmo/deployments","created_at":"2013-07-23T17:56:04Z","updated_at":"2018-10-05T13:37:03Z","pushed_at":"2018-10-05T14:38:58Z","git_url":"git://github.com/thecartercenter/elmo.git","ssh_url":"git@github.com:thecartercenter/elmo.git","clone_url":"https://github.com/thecartercenter/elmo.git","svn_url":"https://github.com/thecartercenter/elmo","homepage":"https://getelmo.org","size":74838,"stargazers_count":36,"watchers_count":36,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":7,"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":39,"open_issues":7,"watchers":36,"default_branch":"develop"}},"base":{"label":"thecartercenter:develop","ref":"develop","sha":"5460bdadd399bb4498ade76b3a0b8cb678709fbf","user":{"login":"thecartercenter","id":5075178,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzUxNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/5075178?v=4","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"repo":{"id":11615188,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxNTE4OA==","name":"elmo","full_name":"thecartercenter/elmo","private":false,"owner":{"login":"thecartercenter","id":5075178,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzUxNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/5075178?v=4","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/thecartercenter/elmo","description":" ELMO is a mobile data collection and analysis web application.","fork":false,"url":"https://api.github.com/repos/thecartercenter/elmo","forks_url":"https://api.github.com/repos/thecartercenter/elmo/forks","keys_url":"https://api.github.com/repos/thecartercenter/elmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thecartercenter/elmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thecartercenter/elmo/teams","hooks_url":"https://api.github.com/repos/thecartercenter/elmo/hooks","issue_events_url":"https://api.github.com/repos/thecartercenter/elmo/issues/events{/number}","events_url":"https://api.github.com/repos/thecartercenter/elmo/events","assignees_url":"https://api.github.com/repos/thecartercenter/elmo/assignees{/user}","branches_url":"https://api.github.com/repos/thecartercenter/elmo/branches{/branch}","tags_url":"https://api.github.com/repos/thecartercenter/elmo/tags","blobs_url":"https://api.github.com/repos/thecartercenter/elmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thecartercenter/elmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thecartercenter/elmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/thecartercenter/elmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thecartercenter/elmo/statuses/{sha}","languages_url":"https://api.github.com/repos/thecartercenter/elmo/languages","stargazers_url":"https://api.github.com/repos/thecartercenter/elmo/stargazers","contributors_url":"https://api.github.com/repos/thecartercenter/elmo/contributors","subscribers_url":"https://api.github.com/repos/thecartercenter/elmo/subscribers","subscription_url":"https://api.github.com/repos/thecartercenter/elmo/subscription","commits_url":"https://api.github.com/repos/thecartercenter/elmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/thecartercenter/elmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/thecartercenter/elmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/thecartercenter/elmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/thecartercenter/elmo/contents/{+path}","compare_url":"https://api.github.com/repos/thecartercenter/elmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thecartercenter/elmo/merges","archive_url":"https://api.github.com/repos/thecartercenter/elmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thecartercenter/elmo/downloads","issues_url":"https://api.github.com/repos/thecartercenter/elmo/issues{/number}","pulls_url":"https://api.github.com/repos/thecartercenter/elmo/pulls{/number}","milestones_url":"https://api.github.com/repos/thecartercenter/elmo/milestones{/number}","notifications_url":"https://api.github.com/repos/thecartercenter/elmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thecartercenter/elmo/labels{/name}","releases_url":"https://api.github.com/repos/thecartercenter/elmo/releases{/id}","deployments_url":"https://api.github.com/repos/thecartercenter/elmo/deployments","created_at":"2013-07-23T17:56:04Z","updated_at":"2018-10-05T13:37:03Z","pushed_at":"2018-10-05T14:38:58Z","git_url":"git://github.com/thecartercenter/elmo.git","ssh_url":"git@github.com:thecartercenter/elmo.git","clone_url":"https://github.com/thecartercenter/elmo.git","svn_url":"https://github.com/thecartercenter/elmo","homepage":"https://getelmo.org","size":74838,"stargazers_count":36,"watchers_count":36,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":7,"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":39,"open_issues":7,"watchers":36,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/511"},"html":{"href":"https://github.com/thecartercenter/elmo/pull/511"},"issue":{"href":"https://api.github.com/repos/thecartercenter/elmo/issues/511"},"comments":{"href":"https://api.github.com/repos/thecartercenter/elmo/issues/511/comments"},"review_comments":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/511/comments"},"review_comment":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/511/commits"},"statuses":{"href":"https://api.github.com/repos/thecartercenter/elmo/statuses/47a0363f5ad5a11905d378f57b4b7d6adf8aab1e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}