Created
December 31, 2015 19:05
-
-
Save blizzarddreams/2ffbcda88d30cf568d1a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| URL = "http://dl.bintray.com/oneclick/rubyinstaller/" | |
| RUBY_VERSIONS_AVAILABLE = open(URL).read.scan(/>(.+)<\/a>/) # TODO: make this better. | |
| .flatten | |
| .delete_if { |r| r =~ /(md5|64|sha256|exe|doc|defunct\/)/ } | |
| .map { |r| r[/>(.+)/].gsub(/>|ruby-/, "").gsub(/(-i386-(.+).7z)/, "") } | |
| .uniq | |
| .group_by { |x| x.split('-')[0] } | |
| .tap { |x| x.map { |key, value| x[key] = x[key].map { |y| y.split('-')[1] }.join('|') } } | |
| .map { |x, y| !y.empty? ? "#{x}[#{y}]" : x } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment