{"action":"created","comment":{"url":"https://api.github.com/repos/evercam/evercam-api/pulls/comments/44506989","id":44506989,"diff_hunk":"@@ -0,0 +1,49 @@\n+require 'stringio'\n+\n+module Evercam\n+  module Actors\n+    class MdSettingsUpdate < Mutations::Command\n+      required do\n+        string :id\n+      end\n+\n+      optional do\n+        boolean :enabled\n+        string :week_days, :empty => true\n+        integer :alert_from_hour, :empty => true\n+        integer :alert_to_hour, :empty => true\n+        integer :alert_interval_min, :empty => true\n+        integer :sensitivity, :empty => true\n+        integer :x1, :empty => true\n+        integer :x2, :empty => true\n+        integer :y1, :empty => true\n+        integer :y2, :empty => true\n+      end\n+\n+      def validate\n+        unless Camera.by_exid(id)\n+          add_error(:camera, :exists, 'Camera does not exist')\n+        end\n+      end\n+\n+      def execute","path":"lib/actors/md_settings_update.rb","position":29,"original_position":29,"commit_id":"2ed3ccd00bf9a372c5856f2b54e4ed7a356aeb4f","original_commit_id":"2ed3ccd00bf9a372c5856f2b54e4ed7a356aeb4f","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Assignment Branch Condition size for execute is too high. [28.3/20]","created_at":"2015-11-11T07:14:32Z","updated_at":"2015-11-11T07:14:32Z","html_url":"https://github.com/evercam/evercam-api/pull/504#discussion_r44506989","pull_request_url":"https://api.github.com/repos/evercam/evercam-api/pulls/504","_links":{"self":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/comments/44506989"},"html":{"href":"https://github.com/evercam/evercam-api/pull/504#discussion_r44506989"},"pull_request":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/504"}}},"pull_request":{"url":"https://api.github.com/repos/evercam/evercam-api/pulls/504","id":50116424,"html_url":"https://github.com/evercam/evercam-api/pull/504","diff_url":"https://github.com/evercam/evercam-api/pull/504.diff","patch_url":"https://github.com/evercam/evercam-api/pull/504.patch","issue_url":"https://api.github.com/repos/evercam/evercam-api/issues/504","number":504,"state":"open","locked":false,"title":"Added endpoint to update camera motion detection settings","user":{"login":"azharmalik3","id":6176136,"avatar_url":"https://avatars.githubusercontent.com/u/6176136?v=3","gravatar_id":"","url":"https://api.github.com/users/azharmalik3","html_url":"https://github.com/azharmalik3","followers_url":"https://api.github.com/users/azharmalik3/followers","following_url":"https://api.github.com/users/azharmalik3/following{/other_user}","gists_url":"https://api.github.com/users/azharmalik3/gists{/gist_id}","starred_url":"https://api.github.com/users/azharmalik3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azharmalik3/subscriptions","organizations_url":"https://api.github.com/users/azharmalik3/orgs","repos_url":"https://api.github.com/users/azharmalik3/repos","events_url":"https://api.github.com/users/azharmalik3/events{/privacy}","received_events_url":"https://api.github.com/users/azharmalik3/received_events","type":"User","site_admin":false},"body":"@mosic ","created_at":"2015-11-09T12:27:25Z","updated_at":"2015-11-11T07:14:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"002d61fa79da374393ca7fd0250cf77a1fd5c0e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/evercam/evercam-api/pulls/504/commits","review_comments_url":"https://api.github.com/repos/evercam/evercam-api/pulls/504/comments","review_comment_url":"https://api.github.com/repos/evercam/evercam-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evercam/evercam-api/issues/504/comments","statuses_url":"https://api.github.com/repos/evercam/evercam-api/statuses/2ed3ccd00bf9a372c5856f2b54e4ed7a356aeb4f","head":{"label":"evercam:md_settings","ref":"md_settings","sha":"2ed3ccd00bf9a372c5856f2b54e4ed7a356aeb4f","user":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"repo":{"id":14651973,"name":"evercam-api","full_name":"evercam/evercam-api","owner":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evercam/evercam-api","description":"Grape application that manages all communication between Evecam Media & Evercam Clients","fork":false,"url":"https://api.github.com/repos/evercam/evercam-api","forks_url":"https://api.github.com/repos/evercam/evercam-api/forks","keys_url":"https://api.github.com/repos/evercam/evercam-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evercam/evercam-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evercam/evercam-api/teams","hooks_url":"https://api.github.com/repos/evercam/evercam-api/hooks","issue_events_url":"https://api.github.com/repos/evercam/evercam-api/issues/events{/number}","events_url":"https://api.github.com/repos/evercam/evercam-api/events","assignees_url":"https://api.github.com/repos/evercam/evercam-api/assignees{/user}","branches_url":"https://api.github.com/repos/evercam/evercam-api/branches{/branch}","tags_url":"https://api.github.com/repos/evercam/evercam-api/tags","blobs_url":"https://api.github.com/repos/evercam/evercam-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evercam/evercam-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evercam/evercam-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/evercam/evercam-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evercam/evercam-api/statuses/{sha}","languages_url":"https://api.github.com/repos/evercam/evercam-api/languages","stargazers_url":"https://api.github.com/repos/evercam/evercam-api/stargazers","contributors_url":"https://api.github.com/repos/evercam/evercam-api/contributors","subscribers_url":"https://api.github.com/repos/evercam/evercam-api/subscribers","subscription_url":"https://api.github.com/repos/evercam/evercam-api/subscription","commits_url":"https://api.github.com/repos/evercam/evercam-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/evercam/evercam-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/evercam/evercam-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/evercam/evercam-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/evercam/evercam-api/contents/{+path}","compare_url":"https://api.github.com/repos/evercam/evercam-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evercam/evercam-api/merges","archive_url":"https://api.github.com/repos/evercam/evercam-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evercam/evercam-api/downloads","issues_url":"https://api.github.com/repos/evercam/evercam-api/issues{/number}","pulls_url":"https://api.github.com/repos/evercam/evercam-api/pulls{/number}","milestones_url":"https://api.github.com/repos/evercam/evercam-api/milestones{/number}","notifications_url":"https://api.github.com/repos/evercam/evercam-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evercam/evercam-api/labels{/name}","releases_url":"https://api.github.com/repos/evercam/evercam-api/releases{/id}","created_at":"2013-11-23T22:52:01Z","updated_at":"2015-11-10T16:38:43Z","pushed_at":"2015-11-11T07:14:28Z","git_url":"git://github.com/evercam/evercam-api.git","ssh_url":"git@github.com:evercam/evercam-api.git","clone_url":"https://github.com/evercam/evercam-api.git","svn_url":"https://github.com/evercam/evercam-api","homepage":"http://dash.evercam.io/swagger","size":119774,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":42,"forks":4,"open_issues":42,"watchers":10,"default_branch":"master"}},"base":{"label":"evercam:master","ref":"master","sha":"03440a66e82bc28fc06d6ebc35a020007ef8f5dc","user":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"repo":{"id":14651973,"name":"evercam-api","full_name":"evercam/evercam-api","owner":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evercam/evercam-api","description":"Grape application that manages all communication between Evecam Media & Evercam Clients","fork":false,"url":"https://api.github.com/repos/evercam/evercam-api","forks_url":"https://api.github.com/repos/evercam/evercam-api/forks","keys_url":"https://api.github.com/repos/evercam/evercam-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evercam/evercam-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evercam/evercam-api/teams","hooks_url":"https://api.github.com/repos/evercam/evercam-api/hooks","issue_events_url":"https://api.github.com/repos/evercam/evercam-api/issues/events{/number}","events_url":"https://api.github.com/repos/evercam/evercam-api/events","assignees_url":"https://api.github.com/repos/evercam/evercam-api/assignees{/user}","branches_url":"https://api.github.com/repos/evercam/evercam-api/branches{/branch}","tags_url":"https://api.github.com/repos/evercam/evercam-api/tags","blobs_url":"https://api.github.com/repos/evercam/evercam-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evercam/evercam-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evercam/evercam-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/evercam/evercam-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evercam/evercam-api/statuses/{sha}","languages_url":"https://api.github.com/repos/evercam/evercam-api/languages","stargazers_url":"https://api.github.com/repos/evercam/evercam-api/stargazers","contributors_url":"https://api.github.com/repos/evercam/evercam-api/contributors","subscribers_url":"https://api.github.com/repos/evercam/evercam-api/subscribers","subscription_url":"https://api.github.com/repos/evercam/evercam-api/subscription","commits_url":"https://api.github.com/repos/evercam/evercam-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/evercam/evercam-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/evercam/evercam-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/evercam/evercam-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/evercam/evercam-api/contents/{+path}","compare_url":"https://api.github.com/repos/evercam/evercam-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evercam/evercam-api/merges","archive_url":"https://api.github.com/repos/evercam/evercam-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evercam/evercam-api/downloads","issues_url":"https://api.github.com/repos/evercam/evercam-api/issues{/number}","pulls_url":"https://api.github.com/repos/evercam/evercam-api/pulls{/number}","milestones_url":"https://api.github.com/repos/evercam/evercam-api/milestones{/number}","notifications_url":"https://api.github.com/repos/evercam/evercam-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evercam/evercam-api/labels{/name}","releases_url":"https://api.github.com/repos/evercam/evercam-api/releases{/id}","created_at":"2013-11-23T22:52:01Z","updated_at":"2015-11-10T16:38:43Z","pushed_at":"2015-11-11T07:14:28Z","git_url":"git://github.com/evercam/evercam-api.git","ssh_url":"git@github.com:evercam/evercam-api.git","clone_url":"https://github.com/evercam/evercam-api.git","svn_url":"https://github.com/evercam/evercam-api","homepage":"http://dash.evercam.io/swagger","size":119774,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":42,"forks":4,"open_issues":42,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/504"},"html":{"href":"https://github.com/evercam/evercam-api/pull/504"},"issue":{"href":"https://api.github.com/repos/evercam/evercam-api/issues/504"},"comments":{"href":"https://api.github.com/repos/evercam/evercam-api/issues/504/comments"},"review_comments":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/504/comments"},"review_comment":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/504/commits"},"statuses":{"href":"https://api.github.com/repos/evercam/evercam-api/statuses/2ed3ccd00bf9a372c5856f2b54e4ed7a356aeb4f"}}}}