{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/comments/86453280","pull_request_review_id":7113569,"id":86453280,"diff_hunk":"@@ -0,0 +1,37 @@\n+require 'okcomputer'\n+\n+OkComputer.mount_at = 'status' # use /status or /status/all or /status/<name-of-check>\n+OkComputer.check_in_parallel = true\n+OkComputer::Registry.deregister 'database' # we don't have a database\n+\n+##\n+# REQUIRED checks\n+\n+# Simple echo of the VERSION file\n+class VersionCheck < OkComputer::AppVersionCheck\n+  def version\n+    File.read(Rails.root.join('VERSION')).chomp\n+  rescue Errno::ENOENT\n+    raise UnknownRevision\n+  end\n+end\n+OkComputer::Registry.register 'version', VersionCheck.new\n+\n+##\n+# EXTERNAL Services\n+\n+OkComputer::Registry.register 'external-solr', OkComputer::SolrCheck.new(Dor::SearchService.solr.uri.to_s)\n+\n+# Simple check to ping the Fedora server by asking it to describe the repository\n+class FedoraCheck < OkComputer::Check\n+  def check\n+    conn = ActiveFedora::Base.connection_for_pid(0)\n+    profile = conn.repository_profile # use vs. `profile` to force a GET call to the server for `/fedora/describe`\n+    mark_message \"Connected to #{profile['repositoryName']} #{profile['repositoryVersion']} via Rubydora #{Rubydora::VERSION}\"\n+  rescue => e\n+    mark_failure\n+    mark_message \"Failure: #{e.class.name}: #{e.message}\"\n+  end\n+end","path":"config/initializers/okcomputer.rb","position":35,"original_position":35,"commit_id":"f12c0a4977dfd062f6586d41564a86deee991066","original_commit_id":"f12c0a4977dfd062f6586d41564a86deee991066","user":{"login":"jmartin-sul","id":7741604,"avatar_url":"https://avatars.githubusercontent.com/u/7741604?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin-sul","html_url":"https://github.com/jmartin-sul","followers_url":"https://api.github.com/users/jmartin-sul/followers","following_url":"https://api.github.com/users/jmartin-sul/following{/other_user}","gists_url":"https://api.github.com/users/jmartin-sul/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin-sul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin-sul/subscriptions","organizations_url":"https://api.github.com/users/jmartin-sul/orgs","repos_url":"https://api.github.com/users/jmartin-sul/repos","events_url":"https://api.github.com/users/jmartin-sul/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin-sul/received_events","type":"User","site_admin":false},"body":"would be nice to get a bit of feedback form @ndushay on this since she's written a bunch of okcomputer checks at this point.  i couldn't remember an app off-hand that uses both okcomputer and a fedora connection, so i mostly wanted to check that we didn't have some other standard way of doing this already out in the wild.","created_at":"2016-11-03T22:04:34Z","updated_at":"2016-11-03T22:05:00Z","html_url":"https://github.com/sul-dlss/dor_indexing_app/pull/58#discussion_r86453280","pull_request_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/comments/86453280"},"html":{"href":"https://github.com/sul-dlss/dor_indexing_app/pull/58#discussion_r86453280"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58","id":92243740,"html_url":"https://github.com/sul-dlss/dor_indexing_app/pull/58","diff_url":"https://github.com/sul-dlss/dor_indexing_app/pull/58.diff","patch_url":"https://github.com/sul-dlss/dor_indexing_app/pull/58.patch","issue_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/58","number":58,"state":"open","locked":false,"title":"port monitoring from is_it_working to OkComputer","user":{"login":"drh-stanford","id":1861171,"avatar_url":"https://avatars.githubusercontent.com/u/1861171?v=3","gravatar_id":"","url":"https://api.github.com/users/drh-stanford","html_url":"https://github.com/drh-stanford","followers_url":"https://api.github.com/users/drh-stanford/followers","following_url":"https://api.github.com/users/drh-stanford/following{/other_user}","gists_url":"https://api.github.com/users/drh-stanford/gists{/gist_id}","starred_url":"https://api.github.com/users/drh-stanford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drh-stanford/subscriptions","organizations_url":"https://api.github.com/users/drh-stanford/orgs","repos_url":"https://api.github.com/users/drh-stanford/repos","events_url":"https://api.github.com/users/drh-stanford/events{/privacy}","received_events_url":"https://api.github.com/users/drh-stanford/received_events","type":"User","site_admin":false},"body":"This PR fixes #48. It doesn't do *exactly* the same thing as the is_it_working implementation but it's close. Notably, the Fedora check now forces a GET from the Fedora server rather than using a cached value (that was internal to Rubydora gem).\r\n\r\nNOTE that I wasn't able to test the `/status/external-solr` endpoint fully due to firewall restrictions. We'll need to deploy to stage to test that piece.","created_at":"2016-11-03T21:27:22Z","updated_at":"2016-11-03T22:05:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abb7d15b87051b59dbe29f97d8ea4dc7fbfc3a32","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/58/comments","statuses_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/statuses/f12c0a4977dfd062f6586d41564a86deee991066","head":{"label":"sul-dlss:48-okcomputer","ref":"48-okcomputer","sha":"f12c0a4977dfd062f6586d41564a86deee991066","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":50071042,"name":"dor_indexing_app","full_name":"sul-dlss/dor_indexing_app","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/dor_indexing_app","description":"An API for providing reindexing endpoints for Stanford's Digital Object Repository","fork":false,"url":"https://api.github.com/repos/sul-dlss/dor_indexing_app","forks_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/forks","keys_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/teams","hooks_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/events","assignees_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/tags","blobs_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/subscription","commits_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/merges","archive_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/downloads","issues_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/deployments","created_at":"2016-01-21T00:43:53Z","updated_at":"2016-11-01T18:11:29Z","pushed_at":"2016-11-03T21:59:35Z","git_url":"git://github.com/sul-dlss/dor_indexing_app.git","ssh_url":"git@github.com:sul-dlss/dor_indexing_app.git","clone_url":"https://github.com/sul-dlss/dor_indexing_app.git","svn_url":"https://github.com/sul-dlss/dor_indexing_app","homepage":"","size":85,"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":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"master"}},"base":{"label":"sul-dlss:master","ref":"master","sha":"96f4225c56d06896a5c1215306414a040dbf6df4","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":50071042,"name":"dor_indexing_app","full_name":"sul-dlss/dor_indexing_app","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/dor_indexing_app","description":"An API for providing reindexing endpoints for Stanford's Digital Object Repository","fork":false,"url":"https://api.github.com/repos/sul-dlss/dor_indexing_app","forks_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/forks","keys_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/teams","hooks_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/events","assignees_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/tags","blobs_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/subscription","commits_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/merges","archive_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/downloads","issues_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/dor_indexing_app/deployments","created_at":"2016-01-21T00:43:53Z","updated_at":"2016-11-01T18:11:29Z","pushed_at":"2016-11-03T21:59:35Z","git_url":"git://github.com/sul-dlss/dor_indexing_app.git","ssh_url":"git@github.com:sul-dlss/dor_indexing_app.git","clone_url":"https://github.com/sul-dlss/dor_indexing_app.git","svn_url":"https://github.com/sul-dlss/dor_indexing_app","homepage":"","size":85,"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":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58"},"html":{"href":"https://github.com/sul-dlss/dor_indexing_app/pull/58"},"issue":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/58"},"comments":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/dor_indexing_app/statuses/f12c0a4977dfd062f6586d41564a86deee991066"}}}}
{"actor":{"display_login":"jmartin-sul"}}