Open patcon opened 11 years ago
Can use this to parse jenkins updates data: https://github.com/jnunemaker/httparty/blob/master/examples/custom_parsers.rb
It's in JSONP, so will need something like this in the custom parser:
response.body.gsub! /^[\w\.]+\((.*)\);?$/m, '\\1'
httparty will follow redirects of http://updates.jenkins-ci.org/update-center.json to http://ftp-chi.osuosl.org/pub/jenkins/updates/update-center.json, but net-http won't.
Actually, this might solve our need: https://github.com/Ericbla/check_jenkins/blob/master/check_jenkins_version.pl
Example code:
Ref:
Still need to figure out a way to check this against the most recent versions