{"action":"closed","number":34,"pull_request":{"url":"https://api.github.com/repos/perl6-community-modules/uri/pulls/34","id":122718047,"node_id":"MDExOlB1bGxSZXF1ZXN0MTIyNzE4MDQ3","html_url":"https://github.com/perl6-community-modules/uri/pull/34","diff_url":"https://github.com/perl6-community-modules/uri/pull/34.diff","patch_url":"https://github.com/perl6-community-modules/uri/pull/34.patch","issue_url":"https://api.github.com/repos/perl6-community-modules/uri/issues/34","number":34,"state":"closed","locked":false,"title":"Adding mutators and major code cleanup/documentation/test expansion","user":{"login":"zostay","id":34711,"node_id":"MDQ6VXNlcjM0NzEx","avatar_url":"https://avatars2.githubusercontent.com/u/34711?v=4","gravatar_id":"","url":"https://api.github.com/users/zostay","html_url":"https://github.com/zostay","followers_url":"https://api.github.com/users/zostay/followers","following_url":"https://api.github.com/users/zostay/following{/other_user}","gists_url":"https://api.github.com/users/zostay/gists{/gist_id}","starred_url":"https://api.github.com/users/zostay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zostay/subscriptions","organizations_url":"https://api.github.com/users/zostay/orgs","repos_url":"https://api.github.com/users/zostay/repos","events_url":"https://api.github.com/users/zostay/events{/privacy}","received_events_url":"https://api.github.com/users/zostay/received_events","type":"User","site_admin":false},"body":"This is a fairly major patch that adds mutators to URI (see issue #27) and also fixes how the query-form is returns (see issue #33).\r\n\r\nIt adds new class and types for maintaining the correctness of the URI while modified and to provide piecewise encapsulation of data. This includes adding a number of subsets for validating the components and the URI::Query, URI::Authority, and URI::Path classes for maintaining state specific to those components of the URI.\r\n\r\nThe most controversial decision I think I made is a preference for what I call \"heavy mutators\" which are defined as methods on the class rather than as assignment. For example,\r\n\r\n```perl6\r\nmy $u = URI.new(\"mailto:bob@example.com\");\r\n$u.path(\"steve@example.com\");\r\n```\r\n\r\nThis is due to the fact that most of the mutators have to do some amount of specialized validation, conditional object construction, and cross-checking with other fields in order to keep the state of URI pure. The only way to achieve this with assignment is to use a lot of Proxy objects, but I do not believe this to be a good practice. (Historically, I have done just this on other work I've done and I believe that has often been a mistake.)\r\n\r\nThe other controversial decision I made is to deprecate `query-form` and make hash-like use of query data always work with lists of strings rather than a mixed form (see #33). However, because of how lists work in Perl 6, I believe there's a very good chance most existing uses of `query-form` will work correctly despite this. If not, there is a hash-format option for quickly recovering the old behavior. I will also say that I'd be willing to modify the code so that the deprecated `query-form` method always returns the mixed form and recommend everyone update their code to use `query` in the future.\r\n\r\nI have expanded the test suite quite a bit and have attempted to thoroughly document everything URI is capable of doing going forward.","created_at":"2017-05-26T20:51:21Z","updated_at":"2018-10-07T17:13:30Z","closed_at":"2018-10-07T17:13:30Z","merged_at":null,"merge_commit_sha":"090a7134a20ca6cc78561d0bda83e9807f18a97d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/perl6-community-modules/uri/pulls/34/commits","review_comments_url":"https://api.github.com/repos/perl6-community-modules/uri/pulls/34/comments","review_comment_url":"https://api.github.com/repos/perl6-community-modules/uri/pulls/comments{/number}","comments_url":"https://api.github.com/repos/perl6-community-modules/uri/issues/34/comments","statuses_url":"https://api.github.com/repos/perl6-community-modules/uri/statuses/625daf30855b0ac0ebdd3a112544146a6832f640","head":{"label":"zostay:mutators","ref":"mutators","sha":"625daf30855b0ac0ebdd3a112544146a6832f640","user":{"login":"zostay","id":34711,"node_id":"MDQ6VXNlcjM0NzEx","avatar_url":"https://avatars2.githubusercontent.com/u/34711?v=4","gravatar_id":"","url":"https://api.github.com/users/zostay","html_url":"https://github.com/zostay","followers_url":"https://api.github.com/users/zostay/followers","following_url":"https://api.github.com/users/zostay/following{/other_user}","gists_url":"https://api.github.com/users/zostay/gists{/gist_id}","starred_url":"https://api.github.com/users/zostay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zostay/subscriptions","organizations_url":"https://api.github.com/users/zostay/orgs","repos_url":"https://api.github.com/users/zostay/repos","events_url":"https://api.github.com/users/zostay/events{/privacy}","received_events_url":"https://api.github.com/users/zostay/received_events","type":"User","site_admin":false},"repo":{"id":90553763,"node_id":"MDEwOlJlcG9zaXRvcnk5MDU1Mzc2Mw==","name":"uri","full_name":"zostay/uri","private":false,"owner":{"login":"zostay","id":34711,"node_id":"MDQ6VXNlcjM0NzEx","avatar_url":"https://avatars2.githubusercontent.com/u/34711?v=4","gravatar_id":"","url":"https://api.github.com/users/zostay","html_url":"https://github.com/zostay","followers_url":"https://api.github.com/users/zostay/followers","following_url":"https://api.github.com/users/zostay/following{/other_user}","gists_url":"https://api.github.com/users/zostay/gists{/gist_id}","starred_url":"https://api.github.com/users/zostay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zostay/subscriptions","organizations_url":"https://api.github.com/users/zostay/orgs","repos_url":"https://api.github.com/users/zostay/repos","events_url":"https://api.github.com/users/zostay/events{/privacy}","received_events_url":"https://api.github.com/users/zostay/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zostay/uri","description":"Perl6 realization of URI — Uniform Resource Identifiers handler","fork":true,"url":"https://api.github.com/repos/zostay/uri","forks_url":"https://api.github.com/repos/zostay/uri/forks","keys_url":"https://api.github.com/repos/zostay/uri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zostay/uri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zostay/uri/teams","hooks_url":"https://api.github.com/repos/zostay/uri/hooks","issue_events_url":"https://api.github.com/repos/zostay/uri/issues/events{/number}","events_url":"https://api.github.com/repos/zostay/uri/events","assignees_url":"https://api.github.com/repos/zostay/uri/assignees{/user}","branches_url":"https://api.github.com/repos/zostay/uri/branches{/branch}","tags_url":"https://api.github.com/repos/zostay/uri/tags","blobs_url":"https://api.github.com/repos/zostay/uri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zostay/uri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zostay/uri/git/refs{/sha}","trees_url":"https://api.github.com/repos/zostay/uri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zostay/uri/statuses/{sha}","languages_url":"https://api.github.com/repos/zostay/uri/languages","stargazers_url":"https://api.github.com/repos/zostay/uri/stargazers","contributors_url":"https://api.github.com/repos/zostay/uri/contributors","subscribers_url":"https://api.github.com/repos/zostay/uri/subscribers","subscription_url":"https://api.github.com/repos/zostay/uri/subscription","commits_url":"https://api.github.com/repos/zostay/uri/commits{/sha}","git_commits_url":"https://api.github.com/repos/zostay/uri/git/commits{/sha}","comments_url":"https://api.github.com/repos/zostay/uri/comments{/number}","issue_comment_url":"https://api.github.com/repos/zostay/uri/issues/comments{/number}","contents_url":"https://api.github.com/repos/zostay/uri/contents/{+path}","compare_url":"https://api.github.com/repos/zostay/uri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zostay/uri/merges","archive_url":"https://api.github.com/repos/zostay/uri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zostay/uri/downloads","issues_url":"https://api.github.com/repos/zostay/uri/issues{/number}","pulls_url":"https://api.github.com/repos/zostay/uri/pulls{/number}","milestones_url":"https://api.github.com/repos/zostay/uri/milestones{/number}","notifications_url":"https://api.github.com/repos/zostay/uri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zostay/uri/labels{/name}","releases_url":"https://api.github.com/repos/zostay/uri/releases{/id}","deployments_url":"https://api.github.com/repos/zostay/uri/deployments","created_at":"2017-05-07T18:41:15Z","updated_at":"2017-05-23T19:54:57Z","pushed_at":"2017-07-09T05:36:00Z","git_url":"git://github.com/zostay/uri.git","ssh_url":"git@github.com:zostay/uri.git","clone_url":"https://github.com/zostay/uri.git","svn_url":"https://github.com/zostay/uri","homepage":"","size":172,"stargazers_count":1,"watchers_count":1,"language":"Perl6","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"perl6-community-modules:master","ref":"master","sha":"bac75821337a2142c0f364a5deefc5ecbddd8ee4","user":{"login":"perl6-community-modules","id":8063705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwNjM3MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/8063705?v=4","gravatar_id":"","url":"https://api.github.com/users/perl6-community-modules","html_url":"https://github.com/perl6-community-modules","followers_url":"https://api.github.com/users/perl6-community-modules/followers","following_url":"https://api.github.com/users/perl6-community-modules/following{/other_user}","gists_url":"https://api.github.com/users/perl6-community-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/perl6-community-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perl6-community-modules/subscriptions","organizations_url":"https://api.github.com/users/perl6-community-modules/orgs","repos_url":"https://api.github.com/users/perl6-community-modules/repos","events_url":"https://api.github.com/users/perl6-community-modules/events{/privacy}","received_events_url":"https://api.github.com/users/perl6-community-modules/received_events","type":"Organization","site_admin":false},"repo":{"id":26828050,"node_id":"MDEwOlJlcG9zaXRvcnkyNjgyODA1MA==","name":"uri","full_name":"perl6-community-modules/uri","private":false,"owner":{"login":"perl6-community-modules","id":8063705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgwNjM3MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/8063705?v=4","gravatar_id":"","url":"https://api.github.com/users/perl6-community-modules","html_url":"https://github.com/perl6-community-modules","followers_url":"https://api.github.com/users/perl6-community-modules/followers","following_url":"https://api.github.com/users/perl6-community-modules/following{/other_user}","gists_url":"https://api.github.com/users/perl6-community-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/perl6-community-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perl6-community-modules/subscriptions","organizations_url":"https://api.github.com/users/perl6-community-modules/orgs","repos_url":"https://api.github.com/users/perl6-community-modules/repos","events_url":"https://api.github.com/users/perl6-community-modules/events{/privacy}","received_events_url":"https://api.github.com/users/perl6-community-modules/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/perl6-community-modules/uri","description":"Perl6 realization of URI — Uniform Resource Identifiers handler","fork":true,"url":"https://api.github.com/repos/perl6-community-modules/uri","forks_url":"https://api.github.com/repos/perl6-community-modules/uri/forks","keys_url":"https://api.github.com/repos/perl6-community-modules/uri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/perl6-community-modules/uri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/perl6-community-modules/uri/teams","hooks_url":"https://api.github.com/repos/perl6-community-modules/uri/hooks","issue_events_url":"https://api.github.com/repos/perl6-community-modules/uri/issues/events{/number}","events_url":"https://api.github.com/repos/perl6-community-modules/uri/events","assignees_url":"https://api.github.com/repos/perl6-community-modules/uri/assignees{/user}","branches_url":"https://api.github.com/repos/perl6-community-modules/uri/branches{/branch}","tags_url":"https://api.github.com/repos/perl6-community-modules/uri/tags","blobs_url":"https://api.github.com/repos/perl6-community-modules/uri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/perl6-community-modules/uri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/perl6-community-modules/uri/git/refs{/sha}","trees_url":"https://api.github.com/repos/perl6-community-modules/uri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/perl6-community-modules/uri/statuses/{sha}","languages_url":"https://api.github.com/repos/perl6-community-modules/uri/languages","stargazers_url":"https://api.github.com/repos/perl6-community-modules/uri/stargazers","contributors_url":"https://api.github.com/repos/perl6-community-modules/uri/contributors","subscribers_url":"https://api.github.com/repos/perl6-community-modules/uri/subscribers","subscription_url":"https://api.github.com/repos/perl6-community-modules/uri/subscription","commits_url":"https://api.github.com/repos/perl6-community-modules/uri/commits{/sha}","git_commits_url":"https://api.github.com/repos/perl6-community-modules/uri/git/commits{/sha}","comments_url":"https://api.github.com/repos/perl6-community-modules/uri/comments{/number}","issue_comment_url":"https://api.github.com/repos/perl6-community-modules/uri/issues/comments{/number}","contents_url":"https://api.github.com/repos/perl6-community-modules/uri/contents/{+path}","compare_url":"https://api.github.com/repos/perl6-community-modules/uri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/perl6-community-modules/uri/merges","archive_url":"https://api.github.com/repos/perl6-community-modules/uri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/perl6-community-modules/uri/downloads","issues_url":"https://api.github.com/repos/perl6-community-modules/uri/issues{/number}","pulls_url":"https://api.github.com/repos/perl6-community-modules/uri/pulls{/number}","milestones_url":"https://api.github.com/repos/perl6-community-modules/uri/milestones{/number}","notifications_url":"https://api.github.com/repos/perl6-community-modules/uri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/perl6-community-modules/uri/labels{/name}","releases_url":"https://api.github.com/repos/perl6-community-modules/uri/releases{/id}","deployments_url":"https://api.github.com/repos/perl6-community-modules/uri/deployments","created_at":"2014-11-18T20:16:56Z","updated_at":"2018-04-03T17:42:08Z","pushed_at":"2018-10-07T16:46:38Z","git_url":"git://github.com/perl6-community-modules/uri.git","ssh_url":"git@github.com:perl6-community-modules/uri.git","clone_url":"https://github.com/perl6-community-modules/uri.git","svn_url":"https://github.com/perl6-community-modules/uri","homepage":"","size":110,"stargazers_count":2,"watchers_count":2,"language":"Perl 6","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"artistic-2.0","name":"Artistic License 2.0","spdx_id":"Artistic-2.0","url":"https://api.github.com/licenses/artistic-2.0","node_id":"MDc6TGljZW5zZTM="},"forks":11,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/perl6-community-modules/uri/pulls/34"},"html":{"href":"https://github.com/perl6-community-modules/uri/pull/34"},"issue":{"href":"https://api.github.com/repos/perl6-community-modules/uri/issues/34"},"comments":{"href":"https://api.github.com/repos/perl6-community-modules/uri/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/perl6-community-modules/uri/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/perl6-community-modules/uri/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/perl6-community-modules/uri/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/perl6-community-modules/uri/statuses/625daf30855b0ac0ebdd3a112544146a6832f640"}},"author_association":"NONE","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":4,"review_comments":0,"maintainer_can_modify":false,"commits":32,"additions":2672,"deletions":182,"changed_files":12}}
{"actor":{"display_login":"jonathanstowe"}}