{"action":"created","comment":{"url":"https://api.github.com/repos/bundler/bundler/pulls/comments/84592616","pull_request_review_id":5362364,"id":84592616,"diff_hunk":"@@ -47,31 +50,41 @@ def run\n       outdated_gems_list = []\n \n       # Loop through the current specs\n-      gemfile_specs, dependency_specs = current_specs.partition {|spec| current_dependencies.key? spec.name }\n-      [gemfile_specs.sort_by(&:name), dependency_specs.sort_by(&:name)].flatten.each do |current_spec|\n+      gemfile_specs, dependency_specs = current_specs.partition do |spec|\n+        current_dependencies.key? spec.name\n+      end\n+\n+      [gemfile_specs, dependency_specs].flatten.sort_by(&:name).each do |current_spec|\n         next if !gems.empty? && !gems.include?(current_spec.name)\n \n         dependency = current_dependencies[current_spec.name]\n+        next if dependency.nil?\n \n-        if strict\n-          active_spec = definition.specs.detect {|spec| spec.name == current_spec.name && spec.platform == current_spec.platform }\n+        spec_groups = if strict\n+          [definition.specs.detect {|spec| spec.name == current_spec.name && spec.platform == current_spec.platform }]\n         else\n-          active_specs = definition.index[current_spec.name].select {|spec| spec.platform == current_spec.platform }.sort_by(&:version)\n-          if !current_spec.version.prerelease? && !options[:pre] && active_specs.size > 1\n-            active_spec = active_specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }\n+          specs = definition.index[current_spec.name].select {|spec| spec.platform == current_spec.platform }.sort_by(&:version)\n+          if !current_spec.version.prerelease? && !options[:pre] && specs.size > 1\n+            specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }\n+          else\n+            specs\n           end\n-          active_spec = active_specs.last\n         end\n \n-        if options[\"filter-major\"] || options[\"filter-minor\"] || options[\"filter-patch\"]\n+        active_spec = Bundler.definition.gem_version_promoter.sort_versions(dependency, spec_groups).last","path":"lib/bundler/cli/outdated.rb","position":53,"original_position":53,"commit_id":"be4d146969eb01f6771cdcbe6a4358e57187476a","original_commit_id":"be4d146969eb01f6771cdcbe6a4358e57187476a","user":{"login":"ryanfox1985","id":1152728,"avatar_url":"https://avatars.githubusercontent.com/u/1152728?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanfox1985","html_url":"https://github.com/ryanfox1985","followers_url":"https://api.github.com/users/ryanfox1985/followers","following_url":"https://api.github.com/users/ryanfox1985/following{/other_user}","gists_url":"https://api.github.com/users/ryanfox1985/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanfox1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanfox1985/subscriptions","organizations_url":"https://api.github.com/users/ryanfox1985/orgs","repos_url":"https://api.github.com/users/ryanfox1985/repos","events_url":"https://api.github.com/users/ryanfox1985/events{/privacy}","received_events_url":"https://api.github.com/users/ryanfox1985/received_events","type":"User","site_admin":false},"body":"@chrismo In master code is not calling to `gem_version_promoter.sort_versions`. I think it's a good idea keep calling to `gem_version_promoter`.\r\n\r\nI created another PR https://github.com/bundler/bundler/pull/5114 for clean code stuff (I will remove the refactors from this PR).","created_at":"2016-10-23T09:09:14Z","updated_at":"2016-10-23T09:09:14Z","html_url":"https://github.com/bundler/bundler/pull/5058#discussion_r84592616","pull_request_url":"https://api.github.com/repos/bundler/bundler/pulls/5058","_links":{"self":{"href":"https://api.github.com/repos/bundler/bundler/pulls/comments/84592616"},"html":{"href":"https://github.com/bundler/bundler/pull/5058#discussion_r84592616"},"pull_request":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5058"}}},"pull_request":{"url":"https://api.github.com/repos/bundler/bundler/pulls/5058","id":88213356,"html_url":"https://github.com/bundler/bundler/pull/5058","diff_url":"https://github.com/bundler/bundler/pull/5058.diff","patch_url":"https://github.com/bundler/bundler/pull/5058.patch","issue_url":"https://api.github.com/repos/bundler/bundler/issues/5058","number":5058,"state":"open","locked":false,"title":"Merge GemVersionPromoter into outdated cmd","user":{"login":"ryanfox1985","id":1152728,"avatar_url":"https://avatars.githubusercontent.com/u/1152728?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanfox1985","html_url":"https://github.com/ryanfox1985","followers_url":"https://api.github.com/users/ryanfox1985/followers","following_url":"https://api.github.com/users/ryanfox1985/following{/other_user}","gists_url":"https://api.github.com/users/ryanfox1985/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanfox1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanfox1985/subscriptions","organizations_url":"https://api.github.com/users/ryanfox1985/orgs","repos_url":"https://api.github.com/users/ryanfox1985/repos","events_url":"https://api.github.com/users/ryanfox1985/events{/privacy}","received_events_url":"https://api.github.com/users/ryanfox1985/received_events","type":"User","site_admin":false},"body":"Hi I created this PR according with: \r\nhttps://github.com/bundler/bundler/pull/4841\r\n\r\nRegards.","created_at":"2016-10-06T07:50:36Z","updated_at":"2016-10-23T09:09:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e94ea0ac089d6efaec0ae3fd9ff08fcf4b10721","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bundler/bundler/pulls/5058/commits","review_comments_url":"https://api.github.com/repos/bundler/bundler/pulls/5058/comments","review_comment_url":"https://api.github.com/repos/bundler/bundler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/5058/comments","statuses_url":"https://api.github.com/repos/bundler/bundler/statuses/be4d146969eb01f6771cdcbe6a4358e57187476a","head":{"label":"AirRefund:merge_gemversion","ref":"merge_gemversion","sha":"be4d146969eb01f6771cdcbe6a4358e57187476a","user":{"login":"AirRefund","id":19555478,"avatar_url":"https://avatars.githubusercontent.com/u/19555478?v=3","gravatar_id":"","url":"https://api.github.com/users/AirRefund","html_url":"https://github.com/AirRefund","followers_url":"https://api.github.com/users/AirRefund/followers","following_url":"https://api.github.com/users/AirRefund/following{/other_user}","gists_url":"https://api.github.com/users/AirRefund/gists{/gist_id}","starred_url":"https://api.github.com/users/AirRefund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AirRefund/subscriptions","organizations_url":"https://api.github.com/users/AirRefund/orgs","repos_url":"https://api.github.com/users/AirRefund/repos","events_url":"https://api.github.com/users/AirRefund/events{/privacy}","received_events_url":"https://api.github.com/users/AirRefund/received_events","type":"Organization","site_admin":false},"repo":{"id":65001469,"name":"bundler","full_name":"AirRefund/bundler","owner":{"login":"AirRefund","id":19555478,"avatar_url":"https://avatars.githubusercontent.com/u/19555478?v=3","gravatar_id":"","url":"https://api.github.com/users/AirRefund","html_url":"https://github.com/AirRefund","followers_url":"https://api.github.com/users/AirRefund/followers","following_url":"https://api.github.com/users/AirRefund/following{/other_user}","gists_url":"https://api.github.com/users/AirRefund/gists{/gist_id}","starred_url":"https://api.github.com/users/AirRefund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AirRefund/subscriptions","organizations_url":"https://api.github.com/users/AirRefund/orgs","repos_url":"https://api.github.com/users/AirRefund/repos","events_url":"https://api.github.com/users/AirRefund/events{/privacy}","received_events_url":"https://api.github.com/users/AirRefund/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AirRefund/bundler","description":"Manage your application's gem dependencies with less pain","fork":true,"url":"https://api.github.com/repos/AirRefund/bundler","forks_url":"https://api.github.com/repos/AirRefund/bundler/forks","keys_url":"https://api.github.com/repos/AirRefund/bundler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AirRefund/bundler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AirRefund/bundler/teams","hooks_url":"https://api.github.com/repos/AirRefund/bundler/hooks","issue_events_url":"https://api.github.com/repos/AirRefund/bundler/issues/events{/number}","events_url":"https://api.github.com/repos/AirRefund/bundler/events","assignees_url":"https://api.github.com/repos/AirRefund/bundler/assignees{/user}","branches_url":"https://api.github.com/repos/AirRefund/bundler/branches{/branch}","tags_url":"https://api.github.com/repos/AirRefund/bundler/tags","blobs_url":"https://api.github.com/repos/AirRefund/bundler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AirRefund/bundler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AirRefund/bundler/git/refs{/sha}","trees_url":"https://api.github.com/repos/AirRefund/bundler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AirRefund/bundler/statuses/{sha}","languages_url":"https://api.github.com/repos/AirRefund/bundler/languages","stargazers_url":"https://api.github.com/repos/AirRefund/bundler/stargazers","contributors_url":"https://api.github.com/repos/AirRefund/bundler/contributors","subscribers_url":"https://api.github.com/repos/AirRefund/bundler/subscribers","subscription_url":"https://api.github.com/repos/AirRefund/bundler/subscription","commits_url":"https://api.github.com/repos/AirRefund/bundler/commits{/sha}","git_commits_url":"https://api.github.com/repos/AirRefund/bundler/git/commits{/sha}","comments_url":"https://api.github.com/repos/AirRefund/bundler/comments{/number}","issue_comment_url":"https://api.github.com/repos/AirRefund/bundler/issues/comments{/number}","contents_url":"https://api.github.com/repos/AirRefund/bundler/contents/{+path}","compare_url":"https://api.github.com/repos/AirRefund/bundler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AirRefund/bundler/merges","archive_url":"https://api.github.com/repos/AirRefund/bundler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AirRefund/bundler/downloads","issues_url":"https://api.github.com/repos/AirRefund/bundler/issues{/number}","pulls_url":"https://api.github.com/repos/AirRefund/bundler/pulls{/number}","milestones_url":"https://api.github.com/repos/AirRefund/bundler/milestones{/number}","notifications_url":"https://api.github.com/repos/AirRefund/bundler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AirRefund/bundler/labels{/name}","releases_url":"https://api.github.com/repos/AirRefund/bundler/releases{/id}","deployments_url":"https://api.github.com/repos/AirRefund/bundler/deployments","created_at":"2016-08-05T08:14:57Z","updated_at":"2016-08-05T13:25:16Z","pushed_at":"2016-10-23T09:03:41Z","git_url":"git://github.com/AirRefund/bundler.git","ssh_url":"git@github.com:AirRefund/bundler.git","clone_url":"https://github.com/AirRefund/bundler.git","svn_url":"https://github.com/AirRefund/bundler","homepage":"https://bundler.io","size":16740,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bundler:master","ref":"master","sha":"467fb50921d5e33b7bc6aa987a2f912ebe2182a5","user":{"login":"bundler","id":1137638,"avatar_url":"https://avatars.githubusercontent.com/u/1137638?v=3","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"repo":{"id":488514,"name":"bundler","full_name":"bundler/bundler","owner":{"login":"bundler","id":1137638,"avatar_url":"https://avatars.githubusercontent.com/u/1137638?v=3","gravatar_id":"","url":"https://api.github.com/users/bundler","html_url":"https://github.com/bundler","followers_url":"https://api.github.com/users/bundler/followers","following_url":"https://api.github.com/users/bundler/following{/other_user}","gists_url":"https://api.github.com/users/bundler/gists{/gist_id}","starred_url":"https://api.github.com/users/bundler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bundler/subscriptions","organizations_url":"https://api.github.com/users/bundler/orgs","repos_url":"https://api.github.com/users/bundler/repos","events_url":"https://api.github.com/users/bundler/events{/privacy}","received_events_url":"https://api.github.com/users/bundler/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bundler/bundler","description":"Manage your application's gem dependencies with less pain","fork":false,"url":"https://api.github.com/repos/bundler/bundler","forks_url":"https://api.github.com/repos/bundler/bundler/forks","keys_url":"https://api.github.com/repos/bundler/bundler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bundler/bundler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bundler/bundler/teams","hooks_url":"https://api.github.com/repos/bundler/bundler/hooks","issue_events_url":"https://api.github.com/repos/bundler/bundler/issues/events{/number}","events_url":"https://api.github.com/repos/bundler/bundler/events","assignees_url":"https://api.github.com/repos/bundler/bundler/assignees{/user}","branches_url":"https://api.github.com/repos/bundler/bundler/branches{/branch}","tags_url":"https://api.github.com/repos/bundler/bundler/tags","blobs_url":"https://api.github.com/repos/bundler/bundler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bundler/bundler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bundler/bundler/git/refs{/sha}","trees_url":"https://api.github.com/repos/bundler/bundler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bundler/bundler/statuses/{sha}","languages_url":"https://api.github.com/repos/bundler/bundler/languages","stargazers_url":"https://api.github.com/repos/bundler/bundler/stargazers","contributors_url":"https://api.github.com/repos/bundler/bundler/contributors","subscribers_url":"https://api.github.com/repos/bundler/bundler/subscribers","subscription_url":"https://api.github.com/repos/bundler/bundler/subscription","commits_url":"https://api.github.com/repos/bundler/bundler/commits{/sha}","git_commits_url":"https://api.github.com/repos/bundler/bundler/git/commits{/sha}","comments_url":"https://api.github.com/repos/bundler/bundler/comments{/number}","issue_comment_url":"https://api.github.com/repos/bundler/bundler/issues/comments{/number}","contents_url":"https://api.github.com/repos/bundler/bundler/contents/{+path}","compare_url":"https://api.github.com/repos/bundler/bundler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bundler/bundler/merges","archive_url":"https://api.github.com/repos/bundler/bundler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bundler/bundler/downloads","issues_url":"https://api.github.com/repos/bundler/bundler/issues{/number}","pulls_url":"https://api.github.com/repos/bundler/bundler/pulls{/number}","milestones_url":"https://api.github.com/repos/bundler/bundler/milestones{/number}","notifications_url":"https://api.github.com/repos/bundler/bundler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bundler/bundler/labels{/name}","releases_url":"https://api.github.com/repos/bundler/bundler/releases{/id}","deployments_url":"https://api.github.com/repos/bundler/bundler/deployments","created_at":"2010-01-26T00:46:38Z","updated_at":"2016-10-23T01:24:29Z","pushed_at":"2016-10-23T09:05:19Z","git_url":"git://github.com/bundler/bundler.git","ssh_url":"git@github.com:bundler/bundler.git","clone_url":"https://github.com/bundler/bundler.git","svn_url":"https://github.com/bundler/bundler","homepage":"https://bundler.io","size":27768,"stargazers_count":3566,"watchers_count":3566,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1651,"mirror_url":null,"open_issues_count":213,"forks":1651,"open_issues":213,"watchers":3566,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5058"},"html":{"href":"https://github.com/bundler/bundler/pull/5058"},"issue":{"href":"https://api.github.com/repos/bundler/bundler/issues/5058"},"comments":{"href":"https://api.github.com/repos/bundler/bundler/issues/5058/comments"},"review_comments":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5058/comments"},"review_comment":{"href":"https://api.github.com/repos/bundler/bundler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bundler/bundler/pulls/5058/commits"},"statuses":{"href":"https://api.github.com/repos/bundler/bundler/statuses/be4d146969eb01f6771cdcbe6a4358e57187476a"}}}}
{"actor":{"display_login":"ryanfox1985"}}