{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2093","repository_url":"https://api.github.com/repos/thoughtbot/paperclip","labels_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2093/comments","events_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2093/events","html_url":"https://github.com/thoughtbot/paperclip/pull/2093","id":128220445,"number":2093,"title":"Bugfix: Dynamic fog directory","user":{"login":"ravinggenius","id":21517,"avatar_url":"https://avatars.githubusercontent.com/u/21517?v=3","gravatar_id":"","url":"https://api.github.com/users/ravinggenius","html_url":"https://github.com/ravinggenius","followers_url":"https://api.github.com/users/ravinggenius/followers","following_url":"https://api.github.com/users/ravinggenius/following{/other_user}","gists_url":"https://api.github.com/users/ravinggenius/gists{/gist_id}","starred_url":"https://api.github.com/users/ravinggenius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravinggenius/subscriptions","organizations_url":"https://api.github.com/users/ravinggenius/orgs","repos_url":"https://api.github.com/users/ravinggenius/repos","events_url":"https://api.github.com/users/ravinggenius/events{/privacy}","received_events_url":"https://api.github.com/users/ravinggenius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-22T18:54:02Z","updated_at":"2016-03-30T16:09:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thoughtbot/paperclip/pulls/2093","html_url":"https://github.com/thoughtbot/paperclip/pull/2093","diff_url":"https://github.com/thoughtbot/paperclip/pull/2093.diff","patch_url":"https://github.com/thoughtbot/paperclip/pull/2093.patch"},"body":"`Paperclip::Storage::Fog#host_name_for_directory` assumes a String-like object is set and doesn't check if `@options[:fog_directory]` is callable, while `Paperclip::Storage::Fog#directory` does. I would recommend extracting a new method with the condition and refactoring the other two methods to call it.\r\n\r\nSee https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/storage/fog.rb#L191 and https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/storage/fog.rb#L220\r\n\r\nFixes #2018."},"comment":{"url":"https://api.github.com/repos/thoughtbot/paperclip/issues/comments/203506617","html_url":"https://github.com/thoughtbot/paperclip/pull/2093#issuecomment-203506617","issue_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2093","id":203506617,"user":{"login":"ravinggenius","id":21517,"avatar_url":"https://avatars.githubusercontent.com/u/21517?v=3","gravatar_id":"","url":"https://api.github.com/users/ravinggenius","html_url":"https://github.com/ravinggenius","followers_url":"https://api.github.com/users/ravinggenius/followers","following_url":"https://api.github.com/users/ravinggenius/following{/other_user}","gists_url":"https://api.github.com/users/ravinggenius/gists{/gist_id}","starred_url":"https://api.github.com/users/ravinggenius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravinggenius/subscriptions","organizations_url":"https://api.github.com/users/ravinggenius/orgs","repos_url":"https://api.github.com/users/ravinggenius/repos","events_url":"https://api.github.com/users/ravinggenius/events{/privacy}","received_events_url":"https://api.github.com/users/ravinggenius/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T16:09:33Z","updated_at":"2016-03-30T16:09:33Z","body":"I rebase onto master, verified everything still works, and force-pushed again. The `NEWS` file is up-to-date as well. Am I missing anything else?"}}