{"action":"opened","number":552,"pull_request":{"url":"https://api.github.com/repos/hanami/hanami/pulls/552","id":63798451,"html_url":"https://github.com/hanami/hanami/pull/552","diff_url":"https://github.com/hanami/hanami/pull/552.diff","patch_url":"https://github.com/hanami/hanami/pull/552.patch","issue_url":"https://api.github.com/repos/hanami/hanami/issues/552","number":552,"state":"open","locked":false,"title":"Fix for issue 494 - Move Rack::MethodOverride middleware from application to container","user":{"login":"stevehook","id":450843,"avatar_url":"https://avatars.githubusercontent.com/u/450843?v=3","gravatar_id":"","url":"https://api.github.com/users/stevehook","html_url":"https://github.com/stevehook","followers_url":"https://api.github.com/users/stevehook/followers","following_url":"https://api.github.com/users/stevehook/following{/other_user}","gists_url":"https://api.github.com/users/stevehook/gists{/gist_id}","starred_url":"https://api.github.com/users/stevehook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevehook/subscriptions","organizations_url":"https://api.github.com/users/stevehook/orgs","repos_url":"https://api.github.com/users/stevehook/repos","events_url":"https://api.github.com/users/stevehook/events{/privacy}","received_events_url":"https://api.github.com/users/stevehook/received_events","type":"User","site_admin":false},"body":"This is an attempt to fix https://github.com/hanami/hanami/issues/494\r\n\r\nI've moved `Rack::MethodOverride` from the application middleware stack to the container, but only when using the container architecture.\r\n\r\nIf the application is running the application architecture then there is no container middleware stack so I think we need to keep `Rack::MethodOverride` in the per application stack. To detect this I'm checking `Hanami.environment.container?` - is this the correct way to determine the architecture?\r\n\r\nThere was no obvious way to test the contents of the container middleware stack directly after making the change, I may be missing something here? I've added an integration test that sets up a container app and checks that `Rack::MethodOverride` is present by invoking a PATCH action (it fails without the change). ","created_at":"2016-03-22T21:45:22Z","updated_at":"2016-03-22T21:45:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hanami/hanami/pulls/552/commits","review_comments_url":"https://api.github.com/repos/hanami/hanami/pulls/552/comments","review_comment_url":"https://api.github.com/repos/hanami/hanami/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hanami/hanami/issues/552/comments","statuses_url":"https://api.github.com/repos/hanami/hanami/statuses/7f8dc5793c85353e3a7912435c5ef9cf4cecf9c4","head":{"label":"stevehook:issue_494","ref":"issue_494","sha":"7f8dc5793c85353e3a7912435c5ef9cf4cecf9c4","user":{"login":"stevehook","id":450843,"avatar_url":"https://avatars.githubusercontent.com/u/450843?v=3","gravatar_id":"","url":"https://api.github.com/users/stevehook","html_url":"https://github.com/stevehook","followers_url":"https://api.github.com/users/stevehook/followers","following_url":"https://api.github.com/users/stevehook/following{/other_user}","gists_url":"https://api.github.com/users/stevehook/gists{/gist_id}","starred_url":"https://api.github.com/users/stevehook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevehook/subscriptions","organizations_url":"https://api.github.com/users/stevehook/orgs","repos_url":"https://api.github.com/users/stevehook/repos","events_url":"https://api.github.com/users/stevehook/events{/privacy}","received_events_url":"https://api.github.com/users/stevehook/received_events","type":"User","site_admin":false},"repo":{"id":54341048,"name":"hanami","full_name":"stevehook/hanami","owner":{"login":"stevehook","id":450843,"avatar_url":"https://avatars.githubusercontent.com/u/450843?v=3","gravatar_id":"","url":"https://api.github.com/users/stevehook","html_url":"https://github.com/stevehook","followers_url":"https://api.github.com/users/stevehook/followers","following_url":"https://api.github.com/users/stevehook/following{/other_user}","gists_url":"https://api.github.com/users/stevehook/gists{/gist_id}","starred_url":"https://api.github.com/users/stevehook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevehook/subscriptions","organizations_url":"https://api.github.com/users/stevehook/orgs","repos_url":"https://api.github.com/users/stevehook/repos","events_url":"https://api.github.com/users/stevehook/events{/privacy}","received_events_url":"https://api.github.com/users/stevehook/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevehook/hanami","description":"The web, with simplicity.","fork":true,"url":"https://api.github.com/repos/stevehook/hanami","forks_url":"https://api.github.com/repos/stevehook/hanami/forks","keys_url":"https://api.github.com/repos/stevehook/hanami/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevehook/hanami/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevehook/hanami/teams","hooks_url":"https://api.github.com/repos/stevehook/hanami/hooks","issue_events_url":"https://api.github.com/repos/stevehook/hanami/issues/events{/number}","events_url":"https://api.github.com/repos/stevehook/hanami/events","assignees_url":"https://api.github.com/repos/stevehook/hanami/assignees{/user}","branches_url":"https://api.github.com/repos/stevehook/hanami/branches{/branch}","tags_url":"https://api.github.com/repos/stevehook/hanami/tags","blobs_url":"https://api.github.com/repos/stevehook/hanami/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevehook/hanami/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevehook/hanami/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevehook/hanami/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevehook/hanami/statuses/{sha}","languages_url":"https://api.github.com/repos/stevehook/hanami/languages","stargazers_url":"https://api.github.com/repos/stevehook/hanami/stargazers","contributors_url":"https://api.github.com/repos/stevehook/hanami/contributors","subscribers_url":"https://api.github.com/repos/stevehook/hanami/subscribers","subscription_url":"https://api.github.com/repos/stevehook/hanami/subscription","commits_url":"https://api.github.com/repos/stevehook/hanami/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevehook/hanami/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevehook/hanami/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevehook/hanami/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevehook/hanami/contents/{+path}","compare_url":"https://api.github.com/repos/stevehook/hanami/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevehook/hanami/merges","archive_url":"https://api.github.com/repos/stevehook/hanami/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevehook/hanami/downloads","issues_url":"https://api.github.com/repos/stevehook/hanami/issues{/number}","pulls_url":"https://api.github.com/repos/stevehook/hanami/pulls{/number}","milestones_url":"https://api.github.com/repos/stevehook/hanami/milestones{/number}","notifications_url":"https://api.github.com/repos/stevehook/hanami/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevehook/hanami/labels{/name}","releases_url":"https://api.github.com/repos/stevehook/hanami/releases{/id}","deployments_url":"https://api.github.com/repos/stevehook/hanami/deployments","created_at":"2016-03-20T21:17:07Z","updated_at":"2016-03-20T21:17:08Z","pushed_at":"2016-03-21T00:03:34Z","git_url":"git://github.com/stevehook/hanami.git","ssh_url":"git@github.com:stevehook/hanami.git","clone_url":"https://github.com/stevehook/hanami.git","svn_url":"https://github.com/stevehook/hanami","homepage":"http://hanamirb.org","size":1615,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":"hanami:master","ref":"master","sha":"c53128ef1d5c6a670692be90b98cb508d660a202","user":{"login":"hanami","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/hanami","html_url":"https://github.com/hanami","followers_url":"https://api.github.com/users/hanami/followers","following_url":"https://api.github.com/users/hanami/following{/other_user}","gists_url":"https://api.github.com/users/hanami/gists{/gist_id}","starred_url":"https://api.github.com/users/hanami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanami/subscriptions","organizations_url":"https://api.github.com/users/hanami/orgs","repos_url":"https://api.github.com/users/hanami/repos","events_url":"https://api.github.com/users/hanami/events{/privacy}","received_events_url":"https://api.github.com/users/hanami/received_events","type":"Organization","site_admin":false},"repo":{"id":12004006,"name":"hanami","full_name":"hanami/hanami","owner":{"login":"hanami","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/hanami","html_url":"https://github.com/hanami","followers_url":"https://api.github.com/users/hanami/followers","following_url":"https://api.github.com/users/hanami/following{/other_user}","gists_url":"https://api.github.com/users/hanami/gists{/gist_id}","starred_url":"https://api.github.com/users/hanami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanami/subscriptions","organizations_url":"https://api.github.com/users/hanami/orgs","repos_url":"https://api.github.com/users/hanami/repos","events_url":"https://api.github.com/users/hanami/events{/privacy}","received_events_url":"https://api.github.com/users/hanami/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hanami/hanami","description":"The web, with simplicity.","fork":false,"url":"https://api.github.com/repos/hanami/hanami","forks_url":"https://api.github.com/repos/hanami/hanami/forks","keys_url":"https://api.github.com/repos/hanami/hanami/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanami/hanami/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanami/hanami/teams","hooks_url":"https://api.github.com/repos/hanami/hanami/hooks","issue_events_url":"https://api.github.com/repos/hanami/hanami/issues/events{/number}","events_url":"https://api.github.com/repos/hanami/hanami/events","assignees_url":"https://api.github.com/repos/hanami/hanami/assignees{/user}","branches_url":"https://api.github.com/repos/hanami/hanami/branches{/branch}","tags_url":"https://api.github.com/repos/hanami/hanami/tags","blobs_url":"https://api.github.com/repos/hanami/hanami/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanami/hanami/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanami/hanami/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanami/hanami/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanami/hanami/statuses/{sha}","languages_url":"https://api.github.com/repos/hanami/hanami/languages","stargazers_url":"https://api.github.com/repos/hanami/hanami/stargazers","contributors_url":"https://api.github.com/repos/hanami/hanami/contributors","subscribers_url":"https://api.github.com/repos/hanami/hanami/subscribers","subscription_url":"https://api.github.com/repos/hanami/hanami/subscription","commits_url":"https://api.github.com/repos/hanami/hanami/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanami/hanami/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanami/hanami/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanami/hanami/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanami/hanami/contents/{+path}","compare_url":"https://api.github.com/repos/hanami/hanami/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanami/hanami/merges","archive_url":"https://api.github.com/repos/hanami/hanami/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanami/hanami/downloads","issues_url":"https://api.github.com/repos/hanami/hanami/issues{/number}","pulls_url":"https://api.github.com/repos/hanami/hanami/pulls{/number}","milestones_url":"https://api.github.com/repos/hanami/hanami/milestones{/number}","notifications_url":"https://api.github.com/repos/hanami/hanami/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanami/hanami/labels{/name}","releases_url":"https://api.github.com/repos/hanami/hanami/releases{/id}","deployments_url":"https://api.github.com/repos/hanami/hanami/deployments","created_at":"2013-08-09T15:24:44Z","updated_at":"2016-03-21T08:03:12Z","pushed_at":"2016-03-21T11:26:40Z","git_url":"git://github.com/hanami/hanami.git","ssh_url":"git@github.com:hanami/hanami.git","clone_url":"https://github.com/hanami/hanami.git","svn_url":"https://github.com/hanami/hanami","homepage":"http://hanamirb.org","size":2196,"stargazers_count":2627,"watchers_count":2627,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":267,"mirror_url":null,"open_issues_count":17,"forks":267,"open_issues":17,"watchers":2627,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hanami/hanami/pulls/552"},"html":{"href":"https://github.com/hanami/hanami/pull/552"},"issue":{"href":"https://api.github.com/repos/hanami/hanami/issues/552"},"comments":{"href":"https://api.github.com/repos/hanami/hanami/issues/552/comments"},"review_comments":{"href":"https://api.github.com/repos/hanami/hanami/pulls/552/comments"},"review_comment":{"href":"https://api.github.com/repos/hanami/hanami/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hanami/hanami/pulls/552/commits"},"statuses":{"href":"https://api.github.com/repos/hanami/hanami/statuses/7f8dc5793c85353e3a7912435c5ef9cf4cecf9c4"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":78,"deletions":4,"changed_files":6}}