{"action":"opened","issue":{"url":"https://api.github.com/repos/mattheworiordan/capybara-screenshot/issues/145","labels_url":"https://api.github.com/repos/mattheworiordan/capybara-screenshot/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/mattheworiordan/capybara-screenshot/issues/145/comments","events_url":"https://api.github.com/repos/mattheworiordan/capybara-screenshot/issues/145/events","html_url":"https://github.com/mattheworiordan/capybara-screenshot/issues/145","id":114515209,"number":145,"title":"Screenshot.capybara_root Should Not Call Padrino.root With an Absolute Path","user":{"login":"sshaw","id":17570,"avatar_url":"https://avatars.githubusercontent.com/u/17570?v=3","gravatar_id":"","url":"https://api.github.com/users/sshaw","html_url":"https://github.com/sshaw","followers_url":"https://api.github.com/users/sshaw/followers","following_url":"https://api.github.com/users/sshaw/following{/other_user}","gists_url":"https://api.github.com/users/sshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/sshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshaw/subscriptions","organizations_url":"https://api.github.com/users/sshaw/orgs","repos_url":"https://api.github.com/users/sshaw/repos","events_url":"https://api.github.com/users/sshaw/events{/privacy}","received_events_url":"https://api.github.com/users/sshaw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-02T03:01:50Z","updated_at":"2015-11-02T03:01:50Z","closed_at":null,"body":"My config set `Capybara.save_and_open_page_path = Padrino.root('tmp/capybara')`.\r\n\r\nUnder Padrino, `Screenshot.capybara_root` [passes `capybara_tmp_path` to `Padrino.root`](https://github.com/mattheworiordan/capybara-screenshot/blob/v1.0.11/lib/capybara-screenshot.rb#L54-L64), which will always append its argument to Padrino's root directory. This causes screenshots to be saved to the wrong path.\r\n\r\n```\r\npadrino [0.12.5] (itunes_store_transporter_web)$ Capybara.save_and_open_page_path\r\n=> \"/Users/sshaw/code/ruby/itunes_store_transporter_web/tmp/capybara\"\r\npadrino [0.12.5] (itunes_store_transporter_web)$ Padrino.root Capybara.save_and_open_page_path\r\n=> \"/Users/sshaw/code/ruby/itunes_store_transporter_web/Users/sshaw/code/ruby/itunes_store_transporter_web/tmp/capybara\"\r\n```"}}