Created
May 25, 2014 09:57
-
-
Save theirix/adc67dc9d4d31abe3d31 to your computer and use it in GitHub Desktop.
Check latest hg version for OS X 10.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'rkelly' | |
ast = RKelly::Parser.new.parse(open('http://mercurial.selenic.com/sources.js').read) | |
ast.pointcut(RKelly::Nodes::ArrayNode).matches[1..-1].each do |node| | |
elements = node.pointcut(RKelly::Nodes::StringNode).matches | |
if elements.any? { |v| v.value =~ /Mercurial.*MacOS.*10\.9/ } | |
puts elements[0].value[1...-1] + ' at ' + elements[2].value[1...-1] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment