{"action":"created","issue":{"url":"https://api.github.com/repos/sinatra/sinatra-contrib/issues/174","labels_url":"https://api.github.com/repos/sinatra/sinatra-contrib/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/sinatra/sinatra-contrib/issues/174/comments","events_url":"https://api.github.com/repos/sinatra/sinatra-contrib/issues/174/events","html_url":"https://github.com/sinatra/sinatra-contrib/pull/174","id":103389857,"number":174,"title":"Allow cookies#[]= to take an options hash","user":{"login":"mwpastore","id":8540936,"avatar_url":"https://avatars.githubusercontent.com/u/8540936?v=3","gravatar_id":"","url":"https://api.github.com/users/mwpastore","html_url":"https://github.com/mwpastore","followers_url":"https://api.github.com/users/mwpastore/followers","following_url":"https://api.github.com/users/mwpastore/following{/other_user}","gists_url":"https://api.github.com/users/mwpastore/gists{/gist_id}","starred_url":"https://api.github.com/users/mwpastore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwpastore/subscriptions","organizations_url":"https://api.github.com/users/mwpastore/orgs","repos_url":"https://api.github.com/users/mwpastore/repos","events_url":"https://api.github.com/users/mwpastore/events{/privacy}","received_events_url":"https://api.github.com/users/mwpastore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-26T23:58:52Z","updated_at":"2015-08-27T01:41:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sinatra/sinatra-contrib/pulls/174","html_url":"https://github.com/sinatra/sinatra-contrib/pull/174","diff_url":"https://github.com/sinatra/sinatra-contrib/pull/174.diff","patch_url":"https://github.com/sinatra/sinatra-contrib/pull/174.patch"},"body":"I have a need to be able to set different cookies with different options (e.g. a JWT cookie with `httpOnly` and `secure` and a XSRF prevention cookie without). This simple change preserves the existing functionality of `cookies#[]=` while allowing you to optionally pass in a hash of parameters as the value to be merged with `@options` and passed on to `Rack::Response#set_cookie`. I'm new here so I'm open to alternative solutions! "},"comment":{"url":"https://api.github.com/repos/sinatra/sinatra-contrib/issues/comments/135236897","html_url":"https://github.com/sinatra/sinatra-contrib/pull/174#issuecomment-135236897","issue_url":"https://api.github.com/repos/sinatra/sinatra-contrib/issues/174","id":135236897,"user":{"login":"TrevorBramble","id":92880,"avatar_url":"https://avatars.githubusercontent.com/u/92880?v=3","gravatar_id":"","url":"https://api.github.com/users/TrevorBramble","html_url":"https://github.com/TrevorBramble","followers_url":"https://api.github.com/users/TrevorBramble/followers","following_url":"https://api.github.com/users/TrevorBramble/following{/other_user}","gists_url":"https://api.github.com/users/TrevorBramble/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorBramble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorBramble/subscriptions","organizations_url":"https://api.github.com/users/TrevorBramble/orgs","repos_url":"https://api.github.com/users/TrevorBramble/repos","events_url":"https://api.github.com/users/TrevorBramble/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorBramble/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T01:41:44Z","updated_at":"2015-08-27T01:41:44Z","body":"@mwpastore Yeah, a transitive dependency, `ref` recently released a version that removes support for Rubies older than 1.9.3, and since `therubyracer` doesn't have a version constraint on that dependency, it broke us.\r\n\r\nRegarding your change, I would prefer to see the existing arguments left in place and an optional third argument added for your hash. This allows us to preserve the existing behavior without hazarding unintentional side-effects. For example its unclear if `String` is actually the only valid type. I don't believe it is, and regardless it shouldn't matter in this method what the type is."}}