{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/36218397","id":36218397,"diff_hunk":"@@ -86,10 +86,7 @@ def self.evaluate(cond, rec, inputs={}, attr=:expression)\n \n   def self.do_eval(expr)\n     if expr =~ /^__start_ruby__\\s?__start_context__\\s?(.*)\\s?__type__\\s?(.*)\\s?__end_context__\\s?__start_script__\\s?(.*)\\s?__end_script__\\s?__end_ruby__$/im\n-      context, col_type, script = [$1, $2, $3]\n-      context = MiqExpression.quote(context, col_type)\n-      result = SafeNamespace.eval_script(script, context)\n-      raise \"Expected return value of true or false from ruby script but instead got result: [#{result.inspect}]\" unless result.kind_of?(TrueClass) || result.kind_of?(FalseClass)\n+      raise \"Ruby script in expression is no longer supported\"","path":"app/models/condition.rb","position":8,"original_position":8,"commit_id":"04170b8e723a0dc81d93e7af884eb99c82dd21b5","original_commit_id":"04170b8e723a0dc81d93e7af884eb99c82dd21b5","user":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"body":"Should we deprecate, or at least give an alternative?  What's the best approach here?","created_at":"2015-08-04T17:45:39Z","updated_at":"2015-08-04T17:45:39Z","html_url":"https://github.com/ManageIQ/manageiq/pull/3708#discussion_r36218397","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/36218397"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/3708#discussion_r36218397"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708","id":41546808,"html_url":"https://github.com/ManageIQ/manageiq/pull/3708","diff_url":"https://github.com/ManageIQ/manageiq/pull/3708.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/3708.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3708","number":3708,"state":"open","locked":false,"title":"[WIP] Remove support for ruby expression in conditions","user":{"login":"bzwei","id":7047579,"avatar_url":"https://avatars.githubusercontent.com/u/7047579?v=3","gravatar_id":"","url":"https://api.github.com/users/bzwei","html_url":"https://github.com/bzwei","followers_url":"https://api.github.com/users/bzwei/followers","following_url":"https://api.github.com/users/bzwei/following{/other_user}","gists_url":"https://api.github.com/users/bzwei/gists{/gist_id}","starred_url":"https://api.github.com/users/bzwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzwei/subscriptions","organizations_url":"https://api.github.com/users/bzwei/orgs","repos_url":"https://api.github.com/users/bzwei/repos","events_url":"https://api.github.com/users/bzwei/events{/privacy}","received_events_url":"https://api.github.com/users/bzwei/received_events","type":"User","site_admin":false},"body":"https://bugzilla.redhat.com/show_bug.cgi?id=1248848\r\n\r\n\"RUBY\" option will be removed from UI when editing a condition.\r\nAn exception \"Ruby script is no longer supported\" is issued if any existing policy with RUBY expression in condition is executed. ","created_at":"2015-08-04T08:48:25Z","updated_at":"2015-08-04T17:45:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fb869ffa4ebb1b29108479f7cab1d51d8b7ceb4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3708/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/04170b8e723a0dc81d93e7af884eb99c82dd21b5","head":{"label":"bzwei:remove_ruby_expression","ref":"remove_ruby_expression","sha":"04170b8e723a0dc81d93e7af884eb99c82dd21b5","user":{"login":"bzwei","id":7047579,"avatar_url":"https://avatars.githubusercontent.com/u/7047579?v=3","gravatar_id":"","url":"https://api.github.com/users/bzwei","html_url":"https://github.com/bzwei","followers_url":"https://api.github.com/users/bzwei/followers","following_url":"https://api.github.com/users/bzwei/following{/other_user}","gists_url":"https://api.github.com/users/bzwei/gists{/gist_id}","starred_url":"https://api.github.com/users/bzwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzwei/subscriptions","organizations_url":"https://api.github.com/users/bzwei/orgs","repos_url":"https://api.github.com/users/bzwei/repos","events_url":"https://api.github.com/users/bzwei/events{/privacy}","received_events_url":"https://api.github.com/users/bzwei/received_events","type":"User","site_admin":false},"repo":{"id":20813025,"name":"manageiq","full_name":"bzwei/manageiq","owner":{"login":"bzwei","id":7047579,"avatar_url":"https://avatars.githubusercontent.com/u/7047579?v=3","gravatar_id":"","url":"https://api.github.com/users/bzwei","html_url":"https://github.com/bzwei","followers_url":"https://api.github.com/users/bzwei/followers","following_url":"https://api.github.com/users/bzwei/following{/other_user}","gists_url":"https://api.github.com/users/bzwei/gists{/gist_id}","starred_url":"https://api.github.com/users/bzwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzwei/subscriptions","organizations_url":"https://api.github.com/users/bzwei/orgs","repos_url":"https://api.github.com/users/bzwei/repos","events_url":"https://api.github.com/users/bzwei/events{/privacy}","received_events_url":"https://api.github.com/users/bzwei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bzwei/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/bzwei/manageiq","forks_url":"https://api.github.com/repos/bzwei/manageiq/forks","keys_url":"https://api.github.com/repos/bzwei/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bzwei/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bzwei/manageiq/teams","hooks_url":"https://api.github.com/repos/bzwei/manageiq/hooks","issue_events_url":"https://api.github.com/repos/bzwei/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/bzwei/manageiq/events","assignees_url":"https://api.github.com/repos/bzwei/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/bzwei/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/bzwei/manageiq/tags","blobs_url":"https://api.github.com/repos/bzwei/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bzwei/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bzwei/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/bzwei/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bzwei/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/bzwei/manageiq/languages","stargazers_url":"https://api.github.com/repos/bzwei/manageiq/stargazers","contributors_url":"https://api.github.com/repos/bzwei/manageiq/contributors","subscribers_url":"https://api.github.com/repos/bzwei/manageiq/subscribers","subscription_url":"https://api.github.com/repos/bzwei/manageiq/subscription","commits_url":"https://api.github.com/repos/bzwei/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/bzwei/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/bzwei/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/bzwei/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/bzwei/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/bzwei/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bzwei/manageiq/merges","archive_url":"https://api.github.com/repos/bzwei/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bzwei/manageiq/downloads","issues_url":"https://api.github.com/repos/bzwei/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/bzwei/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/bzwei/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/bzwei/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bzwei/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/bzwei/manageiq/releases{/id}","created_at":"2014-06-13T18:02:48Z","updated_at":"2014-06-24T18:52:43Z","pushed_at":"2015-08-04T17:16:18Z","git_url":"git://github.com/bzwei/manageiq.git","ssh_url":"git@github.com:bzwei/manageiq.git","clone_url":"https://github.com/bzwei/manageiq.git","svn_url":"https://github.com/bzwei/manageiq","homepage":null,"size":79238,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"ManageIQ:master","ref":"master","sha":"7775a99bc03da75a85242b77e578d051a255f911","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Cloud Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","created_at":"2014-06-13T02:31:26Z","updated_at":"2015-07-29T14:03:18Z","pushed_at":"2015-08-04T17:38:47Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":145835,"stargazers_count":130,"watchers_count":130,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":136,"mirror_url":null,"open_issues_count":366,"forks":136,"open_issues":366,"watchers":130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/3708"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/3708"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/3708/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3708/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/04170b8e723a0dc81d93e7af884eb99c82dd21b5"}}}}