{"action":"closed","issue":{"url":"https://api.github.com/repos/brunophilipe/Cakebrew/issues/162","repository_url":"https://api.github.com/repos/brunophilipe/Cakebrew","labels_url":"https://api.github.com/repos/brunophilipe/Cakebrew/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/brunophilipe/Cakebrew/issues/162/comments","events_url":"https://api.github.com/repos/brunophilipe/Cakebrew/issues/162/events","html_url":"https://github.com/brunophilipe/Cakebrew/issues/162","id":131836994,"number":162,"title":"formulaWithName:andVersion: initializer shouldn't set version to nil","user":{"login":"gui-dos","id":7220550,"avatar_url":"https://avatars.githubusercontent.com/u/7220550?v=3","gravatar_id":"","url":"https://api.github.com/users/gui-dos","html_url":"https://github.com/gui-dos","followers_url":"https://api.github.com/users/gui-dos/followers","following_url":"https://api.github.com/users/gui-dos/following{/other_user}","gists_url":"https://api.github.com/users/gui-dos/gists{/gist_id}","starred_url":"https://api.github.com/users/gui-dos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gui-dos/subscriptions","organizations_url":"https://api.github.com/users/gui-dos/orgs","repos_url":"https://api.github.com/users/gui-dos/repos","events_url":"https://api.github.com/users/gui-dos/events{/privacy}","received_events_url":"https://api.github.com/users/gui-dos/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-06T09:03:39Z","updated_at":"2016-02-13T21:08:35Z","closed_at":"2016-02-13T21:08:35Z","body":"I think that the following initializer of BPFormula shouldn't set the version string to nil. \r\n\r\n```\r\n+ (instancetype)formulaWithName:(NSString*)name andVersion:(NSString*)version\r\n{\r\n\treturn [self formulaWithName:name version:nil andLatestVersion:nil];\r\n}\r\n```\r\n\r\nThis is the reason why the \"Version\" column of the installed formulae is left empty, as displayed even on the main screenshot of Cakebrew's website!\r\n\r\nThe initializer is called i.e. from the method `parseFormulaItem:` of `BPHomebrewInterface.m` but this way the parsed version number is going to be ignored:\r\n```\r\n- (BPFormula *)parseFormulaItem:(NSString *)item\r\n{\r\n\tNSArray *aux = [item componentsSeparatedByString:@\" \"];\r\n\treturn [BPFormula formulaWithName:[aux firstObject] andVersion:[aux lastObject]];\r\n}\r\n```"}}