{"action":"created","comment":{"url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/comments/32152530","id":32152530,"diff_hunk":"@@ -220,6 +220,25 @@\n     end\n   end\n \n+  describe 'Operations' do\n+\n+    it 'does not allow an operation to start with a ~' do\n+      expect{policy_machine.create_operation('~_~')}.to raise_error(ArgumentError)\n+      expect{policy_machine.create_operation('apple~')}.not_to raise_error\n+    end\n+\n+    it 'can derive a prohibition from an operation and vice versa' do\n+      @op = policy_machine.create_operation('fly')\n+      expect(@op.prohibition).to be_prohibition\n+      expect(@op.prohibition.operation).to eq('fly')\n+    end\n+\n+    it 'raises if trying to negate a non-operation' do","path":"spec/support/shared_examples_policy_machine.rb","position":17,"original_position":17,"commit_id":"eabcd7a01ecdd4dadbb76cecc041497bba144b5e","original_commit_id":"4d0b369ec23072de1b9b1fb99b16527949e05f1c","user":{"login":"HonoreDB","id":1795573,"avatar_url":"https://avatars.githubusercontent.com/u/1795573?v=3","gravatar_id":"","url":"https://api.github.com/users/HonoreDB","html_url":"https://github.com/HonoreDB","followers_url":"https://api.github.com/users/HonoreDB/followers","following_url":"https://api.github.com/users/HonoreDB/following{/other_user}","gists_url":"https://api.github.com/users/HonoreDB/gists{/gist_id}","starred_url":"https://api.github.com/users/HonoreDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HonoreDB/subscriptions","organizations_url":"https://api.github.com/users/HonoreDB/orgs","repos_url":"https://api.github.com/users/HonoreDB/repos","events_url":"https://api.github.com/users/HonoreDB/events{/privacy}","received_events_url":"https://api.github.com/users/HonoreDB/received_events","type":"User","site_admin":false},"body":"Added.","created_at":"2015-06-10T18:50:23Z","updated_at":"2015-06-10T18:50:23Z","html_url":"https://github.com/mdsol/the_policy_machine/pull/27#discussion_r32152530","pull_request_url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/comments/32152530"},"html":{"href":"https://github.com/mdsol/the_policy_machine/pull/27#discussion_r32152530"},"pull_request":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27","id":31944624,"html_url":"https://github.com/mdsol/the_policy_machine/pull/27","diff_url":"https://github.com/mdsol/the_policy_machine/pull/27.diff","patch_url":"https://github.com/mdsol/the_policy_machine/pull/27.patch","issue_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues/27","number":27,"state":"open","locked":false,"title":"Support prohibitions","user":{"login":"HonoreDB","id":1795573,"avatar_url":"https://avatars.githubusercontent.com/u/1795573?v=3","gravatar_id":"","url":"https://api.github.com/users/HonoreDB","html_url":"https://github.com/HonoreDB","followers_url":"https://api.github.com/users/HonoreDB/followers","following_url":"https://api.github.com/users/HonoreDB/following{/other_user}","gists_url":"https://api.github.com/users/HonoreDB/gists{/gist_id}","starred_url":"https://api.github.com/users/HonoreDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HonoreDB/subscriptions","organizations_url":"https://api.github.com/users/HonoreDB/orgs","repos_url":"https://api.github.com/users/HonoreDB/repos","events_url":"https://api.github.com/users/HonoreDB/events{/privacy}","received_events_url":"https://api.github.com/users/HonoreDB/received_events","type":"User","site_admin":false},"body":"Couldn't help myself. Don't worry about reviewing this right now, we may not be consuming it yet.\r\n\r\nThis implements prohibitions at the policy machine level, without needing to touch the storage adapters, by storing them as operations. This detail is hidden from the consumer so we can change it later if we want.\r\n\r\nParallelizing the prohibition check should be doable, but it'll require some changes to the adapters so I've left it as a TODO. ","created_at":"2015-03-25T17:16:41Z","updated_at":"2015-06-10T18:50:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"816b1fb1d1adeee6ed7611fa6e1580d149facee0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27/commits","review_comments_url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27/comments","review_comment_url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues/27/comments","statuses_url":"https://api.github.com/repos/mdsol/the_policy_machine/statuses/eabcd7a01ecdd4dadbb76cecc041497bba144b5e","head":{"label":"mdsol:feature/prohibitions_as_negated_operations","ref":"feature/prohibitions_as_negated_operations","sha":"eabcd7a01ecdd4dadbb76cecc041497bba144b5e","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":13685902,"name":"the_policy_machine","full_name":"mdsol/the_policy_machine","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/the_policy_machine","description":"","fork":false,"url":"https://api.github.com/repos/mdsol/the_policy_machine","forks_url":"https://api.github.com/repos/mdsol/the_policy_machine/forks","keys_url":"https://api.github.com/repos/mdsol/the_policy_machine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/the_policy_machine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/the_policy_machine/teams","hooks_url":"https://api.github.com/repos/mdsol/the_policy_machine/hooks","issue_events_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/the_policy_machine/events","assignees_url":"https://api.github.com/repos/mdsol/the_policy_machine/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/the_policy_machine/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/the_policy_machine/tags","blobs_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/the_policy_machine/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/the_policy_machine/languages","stargazers_url":"https://api.github.com/repos/mdsol/the_policy_machine/stargazers","contributors_url":"https://api.github.com/repos/mdsol/the_policy_machine/contributors","subscribers_url":"https://api.github.com/repos/mdsol/the_policy_machine/subscribers","subscription_url":"https://api.github.com/repos/mdsol/the_policy_machine/subscription","commits_url":"https://api.github.com/repos/mdsol/the_policy_machine/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/the_policy_machine/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/the_policy_machine/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/the_policy_machine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/the_policy_machine/merges","archive_url":"https://api.github.com/repos/mdsol/the_policy_machine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/the_policy_machine/downloads","issues_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/the_policy_machine/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/the_policy_machine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/the_policy_machine/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/the_policy_machine/releases{/id}","created_at":"2013-10-18T18:30:56Z","updated_at":"2015-05-07T20:11:03Z","pushed_at":"2015-06-10T18:50:12Z","git_url":"git://github.com/mdsol/the_policy_machine.git","ssh_url":"git@github.com:mdsol/the_policy_machine.git","clone_url":"https://github.com/mdsol/the_policy_machine.git","svn_url":"https://github.com/mdsol/the_policy_machine","homepage":null,"size":910,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"mdsol:master","ref":"master","sha":"59c48dd887041b243e98f2a3359ba8646aac6d24","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":13685902,"name":"the_policy_machine","full_name":"mdsol/the_policy_machine","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/the_policy_machine","description":"","fork":false,"url":"https://api.github.com/repos/mdsol/the_policy_machine","forks_url":"https://api.github.com/repos/mdsol/the_policy_machine/forks","keys_url":"https://api.github.com/repos/mdsol/the_policy_machine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/the_policy_machine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/the_policy_machine/teams","hooks_url":"https://api.github.com/repos/mdsol/the_policy_machine/hooks","issue_events_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/the_policy_machine/events","assignees_url":"https://api.github.com/repos/mdsol/the_policy_machine/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/the_policy_machine/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/the_policy_machine/tags","blobs_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/the_policy_machine/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/the_policy_machine/languages","stargazers_url":"https://api.github.com/repos/mdsol/the_policy_machine/stargazers","contributors_url":"https://api.github.com/repos/mdsol/the_policy_machine/contributors","subscribers_url":"https://api.github.com/repos/mdsol/the_policy_machine/subscribers","subscription_url":"https://api.github.com/repos/mdsol/the_policy_machine/subscription","commits_url":"https://api.github.com/repos/mdsol/the_policy_machine/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/the_policy_machine/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/the_policy_machine/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/the_policy_machine/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/the_policy_machine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/the_policy_machine/merges","archive_url":"https://api.github.com/repos/mdsol/the_policy_machine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/the_policy_machine/downloads","issues_url":"https://api.github.com/repos/mdsol/the_policy_machine/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/the_policy_machine/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/the_policy_machine/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/the_policy_machine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/the_policy_machine/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/the_policy_machine/releases{/id}","created_at":"2013-10-18T18:30:56Z","updated_at":"2015-05-07T20:11:03Z","pushed_at":"2015-06-10T18:50:12Z","git_url":"git://github.com/mdsol/the_policy_machine.git","ssh_url":"git@github.com:mdsol/the_policy_machine.git","clone_url":"https://github.com/mdsol/the_policy_machine.git","svn_url":"https://github.com/mdsol/the_policy_machine","homepage":null,"size":910,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27"},"html":{"href":"https://github.com/mdsol/the_policy_machine/pull/27"},"issue":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/issues/27"},"comments":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/mdsol/the_policy_machine/statuses/eabcd7a01ecdd4dadbb76cecc041497bba144b5e"}}}}