{"action":"created","issue":{"url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/381","labels_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/381/comments","events_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/381/events","html_url":"https://github.com/opscode-cookbooks/jenkins/pull/381","id":89463803,"number":381,"title":"Fix ArgumentError when comparing two versions not of the same type","user":{"login":"maoueh","id":123014,"avatar_url":"https://avatars.githubusercontent.com/u/123014?v=3","gravatar_id":"","url":"https://api.github.com/users/maoueh","html_url":"https://github.com/maoueh","followers_url":"https://api.github.com/users/maoueh/followers","following_url":"https://api.github.com/users/maoueh/following{/other_user}","gists_url":"https://api.github.com/users/maoueh/gists{/gist_id}","starred_url":"https://api.github.com/users/maoueh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maoueh/subscriptions","organizations_url":"https://api.github.com/users/maoueh/orgs","repos_url":"https://api.github.com/users/maoueh/repos","events_url":"https://api.github.com/users/maoueh/events{/privacy}","received_events_url":"https://api.github.com/users/maoueh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/opscode-cookbooks/jenkins/labels/Signed%20CLA","name":"Signed CLA","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-19T04:36:23Z","updated_at":"2015-09-01T13:46:12Z","closed_at":"2015-09-01T13:46:12Z","pull_request":{"url":"https://api.github.com/repos/opscode-cookbooks/jenkins/pulls/381","html_url":"https://github.com/opscode-cookbooks/jenkins/pull/381","diff_url":"https://github.com/opscode-cookbooks/jenkins/pull/381.diff","patch_url":"https://github.com/opscode-cookbooks/jenkins/pull/381.patch"},"body":"If a current plugin is parsed as a `String` because being an invalid `Gem::Version` while the desired version is parsed as a `Gem::Version` object, it breaks comparison of version as the two versions objects are not of the same type.\r\n\r\nTo fix this, we added an indirection level using `plugin_upgrade?` that make the comparison. If it fails with an `ArgumentError`, it falls back to the string version for both argument.\r\n\r\nFixes #380"},"comment":{"url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/comments/136727764","html_url":"https://github.com/opscode-cookbooks/jenkins/pull/381#issuecomment-136727764","issue_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/381","id":136727764,"user":{"login":"schisamo","id":6164,"avatar_url":"https://avatars.githubusercontent.com/u/6164?v=3","gravatar_id":"","url":"https://api.github.com/users/schisamo","html_url":"https://github.com/schisamo","followers_url":"https://api.github.com/users/schisamo/followers","following_url":"https://api.github.com/users/schisamo/following{/other_user}","gists_url":"https://api.github.com/users/schisamo/gists{/gist_id}","starred_url":"https://api.github.com/users/schisamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schisamo/subscriptions","organizations_url":"https://api.github.com/users/schisamo/orgs","repos_url":"https://api.github.com/users/schisamo/repos","events_url":"https://api.github.com/users/schisamo/events{/privacy}","received_events_url":"https://api.github.com/users/schisamo/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T13:46:12Z","updated_at":"2015-09-01T13:46:12Z","body":"Merged as ed93a5cdd6f26cd0dc69e01e9e39bb7b36c02be7."}}