GitHub PullRequestReviewCommentEvent at 2014-04-22 20:59:15
Repository: capybara
Actor: twalpole
Payload: {"comment":{"url":"https://api.github.com/repos/jnicklas/capybara/pulls/comments/11875545","id":11875545,"diff_hunk":"@@ -462,20 +477,22 @@ def current_scope\n \n   private\n \n-    def open_file(file_name)\n+    def open_file(path)\n       begin\n         require \"launchy\"\n-        Launchy.open(file_name)\n+        Launchy.open(path)\n       rescue LoadError\n-        warn \"File saved to #{file_name}.\"\n+        warn \"File saved to #{path}.\"\n         warn \"Please install the launchy gem to open the file automatically.\"\n       end\n     end\n \n-    def default_path(extension)\n+    def default_path(extension, options = {})\n       timestamp = Time.new.strftime(\"%Y%m%d%H%M%S\")\n       path = \"capybara-#{timestamp}#{rand(10**10)}.#{extension}\"\n-      File.expand_path(path, Capybara.save_and_open_page_path)\n+      File.expand_path(path, Capybara.save_and_open_page_path).tap do |path|\n+        $stdout.puts \"Capybara: path to saved file: #{path}\" if options[:print_path]","path":"lib/capybara/session.rb","position":107,"original_position":107,"commit_id":"81509deb454f10074f530efe916b42002b217ffd","original_commit_id":"81509deb454f10074f530efe916b42002b217ffd","user":{"login":"twalpole","id":16556,"avatar_url":"https://avatars.githubusercontent.com/u/16556?","gravatar_id":"4c86fb78337803faec5cbf0a32431804","url":"https://api.github.com/users/twalpole","html_url":"https://github.com/twalpole","followers_url":"https://api.github.com/users/twalpole/followers","following_url":"https://api.github.com/users/twalpole/following{/other_user}","gists_url":"https://api.github.com/users/twalpole/gists{/gist_id}","starred_url":"https://api.github.com/users/twalpole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twalpole/subscriptions","organizations_url":"https://api.github.com/users/twalpole/orgs","repos_url":"https://api.github.com/users/twalpole/repos","events_url":"https://api.github.com/users/twalpole/events{/privacy}","received_events_url":"https://api.github.com/users/twalpole/received_events","type":"User","site_admin":false},"body":"then its not a :print_path option - its :print_generated_path, or :print_default_path or something - which just seems to be way too fine grained to me.  either way - the method its in is called default_path -- which in no way implies that the file  is actually being saved - so its not the place to output a statement saying the file is saved","created_at":"2014-04-22T20:59:15Z","updated_at":"2014-04-22T20:59:15Z","html_url":"https://github.com/jnicklas/capybara/pull/1295#discussion_r11875545","pull_request_url":"https://api.github.com/repos/jnicklas/capybara/pulls/1295","_links":{"self":{"href":"https://api.github.com/repos/jnicklas/capybara/pulls/comments/11875545"},"html":{"href":"https://github.com/jnicklas/capybara/pull/1295#discussion_r11875545"},"pull_request":{"href":"https://api.github.com/repos/jnicklas/capybara/pulls/1295"}}}}