{"action":"created","issue":{"url":"https://api.github.com/repos/pry/pry/issues/1890","repository_url":"https://api.github.com/repos/pry/pry","labels_url":"https://api.github.com/repos/pry/pry/issues/1890/labels{/name}","comments_url":"https://api.github.com/repos/pry/pry/issues/1890/comments","events_url":"https://api.github.com/repos/pry/pry/issues/1890/events","html_url":"https://github.com/pry/pry/pull/1890","id":381913883,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzU5NDMy","number":1890,"title":"automatically call Pry::Config::Lazy objects when read from config","user":{"login":"r-obert","id":8934693,"node_id":"MDQ6VXNlcjg5MzQ2OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/8934693?v=4","gravatar_id":"","url":"https://api.github.com/users/r-obert","html_url":"https://github.com/r-obert","followers_url":"https://api.github.com/users/r-obert/followers","following_url":"https://api.github.com/users/r-obert/following{/other_user}","gists_url":"https://api.github.com/users/r-obert/gists{/gist_id}","starred_url":"https://api.github.com/users/r-obert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-obert/subscriptions","organizations_url":"https://api.github.com/users/r-obert/orgs","repos_url":"https://api.github.com/users/r-obert/repos","events_url":"https://api.github.com/users/r-obert/events{/privacy}","received_events_url":"https://api.github.com/users/r-obert/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-11-18T00:08:36Z","updated_at":"2018-11-21T19:08:51Z","closed_at":"2018-11-20T15:20:48Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/pry/pry/pulls/1890","html_url":"https://github.com/pry/pry/pull/1890","diff_url":"https://github.com/pry/pry/pull/1890.diff","patch_url":"https://github.com/pry/pry/pull/1890.patch"},"body":"The pry-rails prompt uses `pry.config.prompt_name` but assumes it\r\nwill be a string and never tries to `.call` the object, which means\r\nwe can end up with a prompt like this:\r\n\r\n[2] [vagrant][development] #<Pry::Config::Lazy:0x000000000fde07b0>(main)>\r\n\r\nThis commit solves the problem for pry-rails and other prompts who make\r\nthe same mistake by calling `.call` for them, automatically.\r\n\r\nThe commit also removes the issue where every prompt has to deal with `prompt_name`\r\nbeing a string / Proc-like object then acting accordingly. Now it's safe to assume\r\nit will always be a string."},"comment":{"url":"https://api.github.com/repos/pry/pry/issues/comments/440778111","html_url":"https://github.com/pry/pry/pull/1890#issuecomment-440778111","issue_url":"https://api.github.com/repos/pry/pry/issues/1890","id":440778111,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDc3ODExMQ==","user":{"login":"r-obert","id":8934693,"node_id":"MDQ6VXNlcjg5MzQ2OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/8934693?v=4","gravatar_id":"","url":"https://api.github.com/users/r-obert","html_url":"https://github.com/r-obert","followers_url":"https://api.github.com/users/r-obert/followers","following_url":"https://api.github.com/users/r-obert/following{/other_user}","gists_url":"https://api.github.com/users/r-obert/gists{/gist_id}","starred_url":"https://api.github.com/users/r-obert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-obert/subscriptions","organizations_url":"https://api.github.com/users/r-obert/orgs","repos_url":"https://api.github.com/users/r-obert/repos","events_url":"https://api.github.com/users/r-obert/events{/privacy}","received_events_url":"https://api.github.com/users/r-obert/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T19:08:51Z","updated_at":"2018-11-21T19:08:51Z","author_association":"MEMBER","body":"okay sure, but without reading the changelog and coming across the docs for `Pry.lazy`, that's not obvious:\r\nhttps://github.com/pry/pry/blob/14a0273eee13752edb43b02c13a651423bc028c6/lib/pry/pry_class.rb#L410-L417"}}
{"actor":{"display_login":"r-obert"}}