{"action":"created","comment":{"url":"https://api.github.com/repos/cantino/huginn/pulls/comments/79888281","id":79888281,"diff_hunk":"@@ -64,4 +66,29 @@\n       expect(users(:bob).deactivated_at).to be_nil\n     end\n   end\n+\n+  context '#undfined_agent_types' do\n+    it 'returns an empty array when no agents are undefined' do\n+      expect(bob.undfined_agent_types).to be_empty\n+    end\n+\n+    it 'returns the undefined agent types' do\n+      agent = agents(:bob_website_agent)\n+      agent.update_attribute(:type, 'Agents::UndefinedAgent')\n+      expect(bob.undfined_agent_types).to match_array(['Agents::UndefinedAgent'])","path":"spec/models/user_spec.rb","position":22,"original_position":22,"commit_id":"75a5497cd9b9da5f79e9cbc840ac33e694b9b218","original_commit_id":"75a5497cd9b9da5f79e9cbc840ac33e694b9b218","user":{"login":"cantino","id":83835,"avatar_url":"https://avatars.githubusercontent.com/u/83835?v=3","gravatar_id":"","url":"https://api.github.com/users/cantino","html_url":"https://github.com/cantino","followers_url":"https://api.github.com/users/cantino/followers","following_url":"https://api.github.com/users/cantino/following{/other_user}","gists_url":"https://api.github.com/users/cantino/gists{/gist_id}","starred_url":"https://api.github.com/users/cantino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cantino/subscriptions","organizations_url":"https://api.github.com/users/cantino/orgs","repos_url":"https://api.github.com/users/cantino/repos","events_url":"https://api.github.com/users/cantino/events{/privacy}","received_events_url":"https://api.github.com/users/cantino/received_events","type":"User","site_admin":false},"body":"Typo in `undfined` ;)","created_at":"2016-09-21T17:30:03Z","updated_at":"2016-09-21T17:31:22Z","html_url":"https://github.com/cantino/huginn/pull/1695#discussion_r79888281","pull_request_url":"https://api.github.com/repos/cantino/huginn/pulls/1695","_links":{"self":{"href":"https://api.github.com/repos/cantino/huginn/pulls/comments/79888281"},"html":{"href":"https://github.com/cantino/huginn/pull/1695#discussion_r79888281"},"pull_request":{"href":"https://api.github.com/repos/cantino/huginn/pulls/1695"}}},"pull_request":{"url":"https://api.github.com/repos/cantino/huginn/pulls/1695","id":85775913,"html_url":"https://github.com/cantino/huginn/pull/1695","diff_url":"https://github.com/cantino/huginn/pull/1695.diff","patch_url":"https://github.com/cantino/huginn/pull/1695.patch","issue_url":"https://api.github.com/repos/cantino/huginn/issues/1695","number":1695,"state":"open","locked":false,"title":"Rescue from AR:SubclassNotFound and allow to delete agents","user":{"login":"dsander","id":20943,"avatar_url":"https://avatars.githubusercontent.com/u/20943?v=3","gravatar_id":"","url":"https://api.github.com/users/dsander","html_url":"https://github.com/dsander","followers_url":"https://api.github.com/users/dsander/followers","following_url":"https://api.github.com/users/dsander/following{/other_user}","gists_url":"https://api.github.com/users/dsander/gists{/gist_id}","starred_url":"https://api.github.com/users/dsander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsander/subscriptions","organizations_url":"https://api.github.com/users/dsander/orgs","repos_url":"https://api.github.com/users/dsander/repos","events_url":"https://api.github.com/users/dsander/events{/privacy}","received_events_url":"https://api.github.com/users/dsander/received_events","type":"User","site_admin":false},"body":"Especially when using Agent gems it happens that an Agent was deleted from the gem or the user removed a gem from the configuration. Instead of failing with an Internal Server Error the user now is offered to delete all undefined agents.\r\n\r\n`type.constantize` is needed to invoke the Rails auto_loader in development since not all Agent classes are loaded when the application boots.\r\n\r\n<img width=\"1170\" alt=\"screenshot 2016-09-19 13 23 12\" src=\"https://cloud.githubusercontent.com/assets/20943/18630341/4089d5c4-7e6c-11e6-9430-0a18e2858e24.png\">","created_at":"2016-09-19T11:23:55Z","updated_at":"2016-09-21T17:31:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c1e46858b100f67e62263e891fd757ba21d5852","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cantino/huginn/pulls/1695/commits","review_comments_url":"https://api.github.com/repos/cantino/huginn/pulls/1695/comments","review_comment_url":"https://api.github.com/repos/cantino/huginn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cantino/huginn/issues/1695/comments","statuses_url":"https://api.github.com/repos/cantino/huginn/statuses/75a5497cd9b9da5f79e9cbc840ac33e694b9b218","head":{"label":"kreuzwerker:missing-agent-warning","ref":"missing-agent-warning","sha":"75a5497cd9b9da5f79e9cbc840ac33e694b9b218","user":{"login":"kreuzwerker","id":200259,"avatar_url":"https://avatars.githubusercontent.com/u/200259?v=3","gravatar_id":"","url":"https://api.github.com/users/kreuzwerker","html_url":"https://github.com/kreuzwerker","followers_url":"https://api.github.com/users/kreuzwerker/followers","following_url":"https://api.github.com/users/kreuzwerker/following{/other_user}","gists_url":"https://api.github.com/users/kreuzwerker/gists{/gist_id}","starred_url":"https://api.github.com/users/kreuzwerker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreuzwerker/subscriptions","organizations_url":"https://api.github.com/users/kreuzwerker/orgs","repos_url":"https://api.github.com/users/kreuzwerker/repos","events_url":"https://api.github.com/users/kreuzwerker/events{/privacy}","received_events_url":"https://api.github.com/users/kreuzwerker/received_events","type":"Organization","site_admin":false},"repo":{"id":50931965,"name":"DKT.huginn","full_name":"kreuzwerker/DKT.huginn","owner":{"login":"kreuzwerker","id":200259,"avatar_url":"https://avatars.githubusercontent.com/u/200259?v=3","gravatar_id":"","url":"https://api.github.com/users/kreuzwerker","html_url":"https://github.com/kreuzwerker","followers_url":"https://api.github.com/users/kreuzwerker/followers","following_url":"https://api.github.com/users/kreuzwerker/following{/other_user}","gists_url":"https://api.github.com/users/kreuzwerker/gists{/gist_id}","starred_url":"https://api.github.com/users/kreuzwerker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreuzwerker/subscriptions","organizations_url":"https://api.github.com/users/kreuzwerker/orgs","repos_url":"https://api.github.com/users/kreuzwerker/repos","events_url":"https://api.github.com/users/kreuzwerker/events{/privacy}","received_events_url":"https://api.github.com/users/kreuzwerker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kreuzwerker/DKT.huginn","description":"Build agents that monitor and act on your behalf.  Your agents are standing by!","fork":true,"url":"https://api.github.com/repos/kreuzwerker/DKT.huginn","forks_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/forks","keys_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/teams","hooks_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/hooks","issue_events_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/issues/events{/number}","events_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/events","assignees_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/assignees{/user}","branches_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/branches{/branch}","tags_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/tags","blobs_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/git/refs{/sha}","trees_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/statuses/{sha}","languages_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/languages","stargazers_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/stargazers","contributors_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/contributors","subscribers_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/subscribers","subscription_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/subscription","commits_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/commits{/sha}","git_commits_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/git/commits{/sha}","comments_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/comments{/number}","issue_comment_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/issues/comments{/number}","contents_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/contents/{+path}","compare_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/merges","archive_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/downloads","issues_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/issues{/number}","pulls_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/pulls{/number}","milestones_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/milestones{/number}","notifications_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/labels{/name}","releases_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/releases{/id}","deployments_url":"https://api.github.com/repos/kreuzwerker/DKT.huginn/deployments","created_at":"2016-02-02T15:54:16Z","updated_at":"2016-02-16T11:02:29Z","pushed_at":"2016-09-20T10:49:57Z","git_url":"git://github.com/kreuzwerker/DKT.huginn.git","ssh_url":"git@github.com:kreuzwerker/DKT.huginn.git","clone_url":"https://github.com/kreuzwerker/DKT.huginn.git","svn_url":"https://github.com/kreuzwerker/DKT.huginn","homepage":null,"size":6940,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cantino:master","ref":"master","sha":"89cfe8e6a06b30bda151d77a3a8f7fad84a41635","user":{"login":"cantino","id":83835,"avatar_url":"https://avatars.githubusercontent.com/u/83835?v=3","gravatar_id":"","url":"https://api.github.com/users/cantino","html_url":"https://github.com/cantino","followers_url":"https://api.github.com/users/cantino/followers","following_url":"https://api.github.com/users/cantino/following{/other_user}","gists_url":"https://api.github.com/users/cantino/gists{/gist_id}","starred_url":"https://api.github.com/users/cantino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cantino/subscriptions","organizations_url":"https://api.github.com/users/cantino/orgs","repos_url":"https://api.github.com/users/cantino/repos","events_url":"https://api.github.com/users/cantino/events{/privacy}","received_events_url":"https://api.github.com/users/cantino/received_events","type":"User","site_admin":false},"repo":{"id":8681349,"name":"huginn","full_name":"cantino/huginn","owner":{"login":"cantino","id":83835,"avatar_url":"https://avatars.githubusercontent.com/u/83835?v=3","gravatar_id":"","url":"https://api.github.com/users/cantino","html_url":"https://github.com/cantino","followers_url":"https://api.github.com/users/cantino/followers","following_url":"https://api.github.com/users/cantino/following{/other_user}","gists_url":"https://api.github.com/users/cantino/gists{/gist_id}","starred_url":"https://api.github.com/users/cantino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cantino/subscriptions","organizations_url":"https://api.github.com/users/cantino/orgs","repos_url":"https://api.github.com/users/cantino/repos","events_url":"https://api.github.com/users/cantino/events{/privacy}","received_events_url":"https://api.github.com/users/cantino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cantino/huginn","description":"Build agents that monitor and act on your behalf.  Your agents are standing by!","fork":false,"url":"https://api.github.com/repos/cantino/huginn","forks_url":"https://api.github.com/repos/cantino/huginn/forks","keys_url":"https://api.github.com/repos/cantino/huginn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cantino/huginn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cantino/huginn/teams","hooks_url":"https://api.github.com/repos/cantino/huginn/hooks","issue_events_url":"https://api.github.com/repos/cantino/huginn/issues/events{/number}","events_url":"https://api.github.com/repos/cantino/huginn/events","assignees_url":"https://api.github.com/repos/cantino/huginn/assignees{/user}","branches_url":"https://api.github.com/repos/cantino/huginn/branches{/branch}","tags_url":"https://api.github.com/repos/cantino/huginn/tags","blobs_url":"https://api.github.com/repos/cantino/huginn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cantino/huginn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cantino/huginn/git/refs{/sha}","trees_url":"https://api.github.com/repos/cantino/huginn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cantino/huginn/statuses/{sha}","languages_url":"https://api.github.com/repos/cantino/huginn/languages","stargazers_url":"https://api.github.com/repos/cantino/huginn/stargazers","contributors_url":"https://api.github.com/repos/cantino/huginn/contributors","subscribers_url":"https://api.github.com/repos/cantino/huginn/subscribers","subscription_url":"https://api.github.com/repos/cantino/huginn/subscription","commits_url":"https://api.github.com/repos/cantino/huginn/commits{/sha}","git_commits_url":"https://api.github.com/repos/cantino/huginn/git/commits{/sha}","comments_url":"https://api.github.com/repos/cantino/huginn/comments{/number}","issue_comment_url":"https://api.github.com/repos/cantino/huginn/issues/comments{/number}","contents_url":"https://api.github.com/repos/cantino/huginn/contents/{+path}","compare_url":"https://api.github.com/repos/cantino/huginn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cantino/huginn/merges","archive_url":"https://api.github.com/repos/cantino/huginn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cantino/huginn/downloads","issues_url":"https://api.github.com/repos/cantino/huginn/issues{/number}","pulls_url":"https://api.github.com/repos/cantino/huginn/pulls{/number}","milestones_url":"https://api.github.com/repos/cantino/huginn/milestones{/number}","notifications_url":"https://api.github.com/repos/cantino/huginn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cantino/huginn/labels{/name}","releases_url":"https://api.github.com/repos/cantino/huginn/releases{/id}","deployments_url":"https://api.github.com/repos/cantino/huginn/deployments","created_at":"2013-03-10T06:00:31Z","updated_at":"2016-09-21T14:49:59Z","pushed_at":"2016-09-21T00:31:46Z","git_url":"git://github.com/cantino/huginn.git","ssh_url":"git@github.com:cantino/huginn.git","clone_url":"https://github.com/cantino/huginn.git","svn_url":"https://github.com/cantino/huginn","homepage":null,"size":9511,"stargazers_count":14804,"watchers_count":14804,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1569,"mirror_url":null,"open_issues_count":242,"forks":1569,"open_issues":242,"watchers":14804,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cantino/huginn/pulls/1695"},"html":{"href":"https://github.com/cantino/huginn/pull/1695"},"issue":{"href":"https://api.github.com/repos/cantino/huginn/issues/1695"},"comments":{"href":"https://api.github.com/repos/cantino/huginn/issues/1695/comments"},"review_comments":{"href":"https://api.github.com/repos/cantino/huginn/pulls/1695/comments"},"review_comment":{"href":"https://api.github.com/repos/cantino/huginn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cantino/huginn/pulls/1695/commits"},"statuses":{"href":"https://api.github.com/repos/cantino/huginn/statuses/75a5497cd9b9da5f79e9cbc840ac33e694b9b218"}}}}
{"actor":{"display_login":"cantino"}}